2

I'm using laravel5.8 and when i run my project in local it's ok but in shared host i change php version from multiphp in cpanel to php7.3 and i get this error:

The Process class relies on proc_open, which is not available on your PHP installation

my cronjob code:

/usr/local/bin/ea-php73 /home/username/artisan schedule:run 1>> /dev/null 2>&1

and in kernel.php my shedule is:

protected function schedule(Schedule $schedule)
{
    $schedule->command('queue:work')->everyMinute();
}

in shared host i can't enable proce_open for security reasons...

Bahram Sadin
  • 71
  • 1
  • 1
  • 7
  • Does this answer your question? [Laravel 5.2: The Process class relies on proc\_open, which is not available on your PHP installation](https://stackoverflow.com/questions/45419702/laravel-5-2-the-process-class-relies-on-proc-open-which-is-not-available-on-yo) – Zahid Hassan Shaikot Jan 29 '20 at 09:39
  • Any update ? @Bahram Did you get any solution ? – Shuvo Joseph Apr 02 '20 at 14:33

4 Answers4

2

These is coming from Flare error reporting service enabled in debug mode.

To Fix these on your Local host Publish flare config file with the command:

php artisan vendor:publish --tag=flare-config

and in config/flare.php set:

'reporting' => [ 
    'anonymize_ips' => true, 
    'collect_git_information' => false, 
    'report_queries' => true, 
    'maximum_number_of_collected_queries' => 200, 
    'report_query_bindings' => true, 
    'report_view_data' => true, 
], 

Then Upload to Shared Host, Thanks.

М.Б.
  • 1,308
  • 17
  • 20
1

I've been in this problem for several days and my shared host does not allow enable proc_open. I've tried the flare config solution above but still no luck.

Then I try to change schedule:run in

/usr/local/bin/ea-php73 /home/username/artisan schedule:run 1>> /dev/null 2>&1

directly to your command:name

/usr/local/bin/ea-php73 /home/username/artisan command:name 1>> /dev/null 2>&1

fantastically my cron job is now running smoothly

schedule function will be not executed so you cannot rely on the frequency. You should directly set the frequency in the cPanel cron setting. And if you have several commands to be executed, you should put that command one by one in the cPanel cron setting.

Hope this might solved your issue.

0

I have the same problem. Then, I upgraded the php version to 7.3 for Laravel 6.x in cPanel. And works for me.

Hope this might solved your issue.

Batara
  • 1
-1

I solve this problem by removing proc_open string from php.ini-s disable_functions where it was defined by me long time ago and i forget about it

disable_functions = proc_open
Kaxa
  • 515
  • 1
  • 6
  • 11