Help with composer: proc_open, allow_url_fopen
Hello,
I've been using composer without problems for a lot of months, but after the upgrade to cPanel 58 composer stopped working.
I see in the docs that now composer is added in cPanel & WHM, so may be the old composer configuration is in conflict with the new one.
If I run composer diagnose I have the sequent errors:
composer diagnose
Checking platform settings: FAIL
The allow_url_fopen setting is incorrect.
Add the following to the end of your `php.ini`:
allow_url_fopen = On
The php.ini used by your command-line PHP is: /opt/cpanel/ea-php56/root/etc/php.ini
If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.
Checking git settings:
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
diagnose
I don't like very much the idea of enabling allow_url_fopen, is there a custom php.ini for composer? I know i can run
, but it is not a permanent solution. Same thing for proc_open, I'd like to enable this function only for composer. Thanks.
I don't like very much the idea of enabling allow_url_fopen, is there a custom php.ini for composer? I know i can run
alias composer="php -d allow_url_fopen=1 -d detect_unicode=0 $(which composer)", but it is not a permanent solution. Same thing for proc_open, I'd like to enable this function only for composer. Thanks.
-
I've just realizad that the suggestion given by composer diagnose ma be a good solution: The php.ini used by your command-line PHP is: /opt/cpanel/ea-php56/root/etc/php.ini
Is this php.ini used only in command line? I've edited the suggested php.ini, but the strange thing is that here proc_open is not disabled, the line disable_function is completely clean, so how can enable proc_open?0 -
I don't like very much the idea of enabling allow_url_fopen, is there a custom php.ini for composer?
I think you are using Easyapache 4. You can try to disable/enable allow_url_fopen through WHM. Login th WHM >> Software >> MultiPHP INI Editor0 -
Hello, You may also find these documents helpful: How to Edit Your php.ini File - cPanel Knowledge Base - cPanel Documentation The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation MultiPHP INI Editor for WHM - Documentation - cPanel Documentation EasyApache 4 and the ea-php-cli Package - EasyApache 4 - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
3 comments