skip to Main Content

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…

4

Answers


  1. 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.

    Login or Signup to reply.
  2. 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
    
    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
  4. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search