ステキな一日

IT技術やトレンディな話題を中心に個人的なメモを書き綴っていきます。

cakephp 3.4インストールのメモ

Windows10にcakephp3.4をインストールした途中までのメモ

環境はXAMPPをインストール C:\xampp にインストールした。

次に、Windows版コンポーザーをインストール。

コマンドプロンプトで以下を実行

C:\xampp\htdocs>composer create-project --prefer-dist cakephp/app my_app

なんとなく変なメッセージで終わったけれど無視して、ブラウザにアドレス http://localhost/my_app/ を入力して実行したら、以下のエラーで起動せず。

Warning: require(C:\xampp\htdocs\my_app/vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\my_app\webroot\index.php on line 27Fatal error: require(): Failed opening required 'C:\xampp\htdocs\my_app/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\my_app\webroot\index.php on line 27

これはどうやら php.ini のintl.dllがコメントアウトされていることが原因のよう。 テキストエディタでC:\xampp\php\php.iniを開き以下の行を修正。

;extension=php_intl.dll

extension=php_intl.dll

apacheを再起動して、先ほど作成したapp my_appフォルダ内のファイルをすべて削除。 そして、もう一度コマンドラインから以下を実行

C:\xampp\htdocs>composer create-project --prefer-dist cakephp/app my_app

C:\xampp\htdocs>composer create-project --prefer-dist cakephp/app my_app Installing cakephp/app (3.4.0) - Installing cakephp/app (3.4.0) Loading from cache Created project in my_app Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 35 installs, 0 updates, 0 removals - Installing cakephp/plugin-installer (0.0.15) Downloading: 100% - Installing aura/intl (3.0.0) Downloading: 100% - Installing mobiledetect/mobiledetectlib (2.8.24) Downloading: 100% - Installing psr/http-message (1.0.1) Downloading: 100% - Installing zendframework/zend-diactoros (1.3.10) Downloading: 100% - Installing psr/log (1.0.2) Downloading: 100% - Installing cakephp/chronos (1.0.4) Downloading: 100% - Installing cakephp/cakephp (3.4.0) Downloading: 100% - Installing symfony/yaml (v3.2.3) Downloading: 100% - Installing symfony/debug (v3.2.3) Downloading: 100% - Installing symfony/polyfill-mbstring (v1.3.0) Downloading: 100% - Installing symfony/console (v3.2.3) Downloading: 100% - Installing symfony/filesystem (v3.2.3) Downloading: 100% - Installing symfony/config (v3.2.3) Downloading: 100% - Installing robmorgan/phinx (v0.6.5) Downloading: 100% - Installing cakephp/migrations (1.6.7) Downloading: 100% - Installing jakub-onderka/php-console-color (0.1) Downloading: 100% - Installing jakub-onderka/php-console-highlighter (v0.3.2) Downloading: 100% - Installing dnoegel/php-xdg-base-dir (0.1) Downloading: 100% - Installing nikic/php-parser (v3.0.4) Downloading: 100% - Installing symfony/var-dumper (v3.2.3) Downloading: 100% - Installing psy/psysh (v0.8.1) Downloading: 100% - Installing jdorn/sql-formatter (v1.2.17) Downloading: 100% - Installing symfony/process (v3.2.3) Downloading: 100% - Installing symfony/finder (v3.2.3) Downloading: 100% - Installing seld/phar-utils (1.0.1) Downloading: 100% - Installing seld/jsonlint (1.5.0) Downloading: 100% - Installing seld/cli-prompt (1.0.2) Downloading: 100% - Installing justinrainbow/json-schema (4.1.0) Downloading: 100% - Installing composer/spdx-licenses (1.1.5) Downloading: 100% - Installing composer/semver (1.4.2) Downloading: 100% - Installing composer/ca-bundle (1.0.6) Downloading: 100% - Installing composer/composer (1.3.2) Downloading: 100% - Installing cakephp/debug_kit (3.9.0) Downloading: 100% - Installing cakephp/bake (1.2.14) Downloading: 100% cakephp/app suggests installing markstory/asset_compress (An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.) cakephp/app suggests installing phpunit/phpunit (Allows automated tests to be run without system-wide install.) cakephp/app suggests installing cakephp/cakephp-codesniffer (Allows to check the code against the coding standards used in CakePHP.) symfony/console suggests installing symfony/event-dispatcher () symfony/var-dumper suggests installing ext-symfony_debug () psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :)) psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.) psy/psysh suggests installing ext-readline (Enables support for arrow-key history navigation, and showing and manipulating command history.) psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.) psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.) cakephp/debug_kit suggests installing ext-sqlite (DebugKit needs to store panel data in a database. SQLite is simple and easy to use.) Writing lock file Generating autoload files > Cake\Composer\Installer\PluginInstaller::postAutoloadDump > App\Console\Installer::postInstall Created `config/app.php` file Set Folder Permissions ? (Default to Y) [Y,n]? Updated Security.salt value in config/app.php C:\xampp\htdocs>

今度はうまくいったらしい。

とりあえず、インストールはこれで完了。