LoginSignup
4
4

More than 5 years have passed since last update.

EC-CUBE3開発環境設定(失敗編)

Last updated at Posted at 2015-03-31

git clone

EC-CUBE3のメモ - GitHub/Git使い方を参考に、fork した後、git clone

データベースの用意

使用するデータベースで、データベースユーザとデータベースを作成

インストールの設定変更

「eccube_install.sh」の内容を変更
多分この辺り

eccube_install.sh
…
ADMIN_MAIL=${ADMIN_MAIL:-"◯◯◯◯◯"}
HTTP_URL=${HTTP_URL:-"◯◯◯◯◯"}
HTTPS_URL=${HTTPS_URL:-"◯◯◯◯◯"}
…
DBNAME=${DBNAME:-"◯◯◯◯◯"}
DBUSER=${DBUSER:-"◯◯◯◯◯"}
DBPASS=${DBPASS:-"◯◯◯◯◯"}
…

「HTTP_URL」などの設定は、「app/config/eccube/config.php」をいじれば後からでも出来そう?!

インストールの実行

$ ./eccube_install.sh pgsql

定数の設定

EC-CUBE/ec-cube インストール方法を参考に、以下のファイルを手動作成

src/Eccube/Constant.php
<?php

namespace Eccube;

class Constant
{
    const ROOT = '/◯◯◯◯/html/';
    const TPL = '/◯◯◯◯/html/user_data/packages/default/';
    const SHOP_NAME = 'EC-CUBE3 SHOP';
    const RELEASE_YEAR = '2015';
}

表示確認

「HTTP_URL」に設定した URL にアクセスして、表示を確認
表示されない…
「html/index.php」にて
var_dump(__DIR__.'/../vendor/autoload.php');
string(67) "/◯◯◯/◯◯◯/◯◯◯/◯◯◯/◯◯◯/ec-cube/html/../vendor/autoload.php"
そもそも「vendor/autoload.php」が無い模様…
今ここで躓き中…

原因

PHP のバージョンが合っていないため、vendor 以下が生成されないようでした。
以下の場合は、PHP のバージョンを上げる必要があるようです。
http://qiita.com/chihiro-adachi/items/645fee870d50a985dc88#comment-d167823c0d8b603c4668

$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

Your PHP (5.3.2-1ubuntu4.28) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.

Downloading...

Composer successfully installed to: /◯◯◯/◯◯◯/◯◯◯/◯◯◯/◯◯◯/ec-cube/composer.phar
Use it: php composer.phar
$ php composer.phar install

  [Composer\Json\JsonValidationException]                     
  "./composer.json" does not match the expected JSON schema:  
   - homepage : Invalid URL format                            

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

参考

4
4
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4