[英]laradock Modify the PHP configuration file to make it work at workspace
phar. Readonly = off
phar. Readonly = off
phar. Readonly = off
docker-compose restart php-fpm
docker-compose restart php-fpm
docker-compose exec workspace bash
docker-compose exec workspace bash
php xxx phar
is error php xxx phar
错误 error info:
disabled by the php.ini setting phar.readonly
How can I get PHP to configure workspace to work? 如何获取PHP以配置工作区才能正常工作? tks.
tks。
Which file exactly did you change? 您究竟更改了哪个文件?
Connect to your workspace and run: 连接到您的工作区并运行:
php --ini
Then, copy the 'Loaded Configuration File' path and run (remember to change the path if yours is different): 然后,复制“已加载的配置文件”路径并运行(如果您的路径不同,请记住更改路径):
cat /etc/php/7.3/cli/php.ini | grep -n phar.readonly
laradock@901e2daa988c:/var/www$ cat /etc/php/7.3/cli/php.ini | grep -n
phar.readonly
1057:; http://php.net/phar.readonly
1058:;phar.readonly = On
It'll probably show that it's ON and the line number. 它可能会显示它为ON和行号。 So, just vim into the file and edit and set it to off (remember to change the line number, mine is 1058):
因此,只需将vim插入文件并进行编辑并将其设置为关闭(请记住更改行号,我的是1058):
vim +1058 /etc/php/7.3/cli/php.ini
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.