Laravel 5.2: Process class relies on proc_open which is not available when PHP is installed

I am using a cron job to do some CRUD operation using laravel scheduling scheduling. On localhost and on my Share-Hosting server, it has been working fine for months and until recently I keep getting this error when I run a cron job on my Share-Hosting server. I didn't make any changes to the code on my Share-Hosting server.

[2017-07-14 09:16:02] production.ERROR: exception 'Symfony\Component\Process\Exception\RuntimeException' with message 'The Process class relies on proc_open, which is not available on your PHP installation.' in /home/xxx/xx/vendor/symfony/process/Process.php:144
Stack trace:

      

But on localhost it works fine. Based on my internet search, I tried the following.

  • Contact my hosting company to remove the proc_open form, disable PHP features.
  • The hosting company provided a custom php.ini file. I remove all disable_functions
  • The Share-Hosting Server has been restarted and the cache has been cleared.

None of this has been resolved. ... I'm not sure what to try, because the same project works fine on Share-Hosting server.

+7


source to share


2 answers


After many weeks of trying to resolve this error. The following fixes worked

  • Upgrade project from Laravel 5.2 to 5.4
  • In CPanel using "Select Php Version" set PHP version to 7
  • Or on CPanel using "MultiPHP Manager" install PHP version to ea-php70


The cron job now runs smoothly. Hope this helps someone.

+7


source


Solving the problem with deleting the cached version of the config.php file (Laravel 6). go to bootstrap / cache / config.php and delete the file. Also don't forget to change APP_URL to your domain address. PHP version must match laravel version.




for shared host, if you cannot change php.ini you should use laravel 5.8.

0


source







All Articles