【環境情報】
・baserCMSのバージョン:5.0.10
・レンタルサーバー名:Hyper-V 上の Windows2022
・使用テーマ:デフォルトサンプル
・PHPスキル(自己評価):少し
–ignore-platform-req=ext-xdebugが追加されましたが、
xdebugが要らないのは、インストールの時だけのようです。
#xdebugがないとBaserCMSが正常動作しない…
訳あって、PHPやCURLのパスを通してないのですが、以下の変更で
インストール出来ました。
【環境】
PHP C:\opt\php\php833nts\php.exe
CURL C:\opt\curl\curl-8.6.0_1-win64-mingw\bin\curl.exe
Baserインストールパス D:\website\basercms
【変更】
composer_installer.php を編集します。
26行目:php.exeのフルパス
$phpPath = whichPhp();
→ $phpPath = “C:\opt\php\php833nts\php.exe”;
53行目:コメントアウト
$phpPath = escapeshellarg($phpPath);
→ //$phpPath = escapeshellarg($phpPath);
75行目
$command = “cd {$composerDir}; export HOME={$composerDir}; curl -sS https://getcomposer.org/installer | {$phpPath}”;
→ $command = “cmd.exe /C "cd /D {$composerDir} & set HOME={$composerDir} & C:\opt\curl\curl-8.6.0_1-win64-mingw\bin\curl.exe -sS https://getcomposer.org/installer | {$phpPath} & exit 0"”;
80行目
$command = "cd " . ROOT_DIR . “; export HOME={$composerDir} ; {$phpPath} {$composerDir}composer.phar self-update”;
→ $command = “cmd.exe /C "cd /D " . ROOT_DIR . " & set HOME={$composerDir} & {$phpPath} {$composerDir}composer.phar self-update"”;
84行目
$command = "cd " . ROOT_DIR . “; export HOME={$composerDir} ; yes | {$phpPath} {$composerDir}composer.phar update --ignore-platform-req=ext-xdebug”;
→ $command = “cmd.exe /C "cd /D " . ROOT_DIR . " & set HOME={$composerDir} & echo y | {$phpPath} {$composerDir}composer.phar update --ignore-platform-req=ext-xdebug"”;
※.envがコピーされなかったので、もう少し確認が必要です。