Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP cli not working with local path (suddenly)

From a couple of hours, PHP commands, given from the console, are not accepting local path. For example in laravel i've always given the command

php artisan

but from this night i'm receiving the following reply

Status: 404 Not Found
Content-type: text/html; charset=UTF-8

No input file specified

but if i try php ./artisan, it's working.

The server is configured with WHM/cPanel and, the strangest thing, is that nothing has been changed, and yesterday everything was working correctly. Also the row with the Content-type was not appearing before today.

like image 601
Giacomo Torricelli Avatar asked Aug 24 '16 09:08

Giacomo Torricelli


Video Answer


1 Answers

Here I have the response (with the solution) from cPanel team that solved this problem a few hours ago.

Thanks for your patience while I corrected this issue. This was occurring due to an update in the ea-php-cli package which occurred last night which conflicted with another case EA-4753 in which the include_path was set incorrectly and the issue wasn't visible until the update of ea-php-cli last night.

I've corrected your issue and have filed case EA-5106 so that our developers ensure that EA4 doesn't allow for this to occur again. The current workaround is to go to Home »Software »Editor INI MultiPHP, select the version of php, scroll down to include_path and then added .:/path/to/php/pear as opposed to .;/path/to/php/pear which has corrected your issue.

EDIT: We also made a downgrade of the package ea-php-cli because in this version there are multiple problems (for example when you do a 'php artisan' (or any other php file) command, it prints the headers), so the command is:

====
yum downgrade ea-php-cli-0.0.6-3.3.1
====

And is possible to lock the package, to prevent it updates automatically before a 'stable' version is released.

====
yum versionlock add ea-php-cli
====

Note that you will need to remove the versionlock once a corrected version has been released:

====
yum versionlock delete ea-php-cli
yum upgrade ea-php-cli
====
like image 166
Giacomo Torricelli Avatar answered Oct 09 '22 06:10

Giacomo Torricelli