我使用寶塔的的版本為9.4.0
Composer 版本為2.1.6
命令【php】為php7.1
命令【php81】為8.1
本項目配置如下:
Composer:
偽靜態(tài)配置:
啟動失?。?br />
不過我直接進入根目錄,輸入命令【php81 start.php start】卻成功:
請問什么回事?
按照文檔看下項目日志。
還有發(fā)提問時把操作系統(tǒng)加上。
開機啟動勾選掉試下,有開發(fā)者反饋這個也有影響。
我查了一下系統(tǒng)后臺守護進程日志,發(fā)現(xiàn)用寶塔異步啟動的時候報下面的錯誤:
xxx.service: Failed to execute /www/server/php/83/bin/php: Success
Assertion 'exit_status == EXIT_SUCCESS' failed at src/core/execute.c:5321, function exec_spawn(). Aborting.
xxx.service: Main process exited, code=killed, status=6/ABRT
xxx.service: Failed with result 'signal'.
問題已解決
vim /usr/lib/systemd/system/xx.xx.com.service
[Unit]
Description=xx.xx.com
After=network.target
[Service]
ExecStart=/www/server/php/81/bin/php start.php start
ExecStop=/www/server/php/81/bin/php start.php stop
WorkingDirectory=/www/wwwroot/xx.xx.com
Restart=always
SyslogIdentifier=xx.xx.com
User=www
Type=simple
PrivateTmp=false
PIDFile=
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl restart xx.xx.com.service