Skip to main content

Custom php.ini cron jobs don´t work

Comments

4 comments

  • JacobPerkins
    Hi, Try copying your php.ini to a .user.ini, or make the changes via the cPanel >> INI Editor UI. Doing so should write the .user.ini out and it should work after that. Please let me know how it goes!
    0
  • joaosavioli
    Hi, Try copying your php.ini to a .user.ini, or make the changes via the cPanel >> INI Editor UI. Doing so should write the .user.ini out and it should work after that. Please let me know how it goes!

    Thank you for reply. I've tried, but didn"t work. user@user.com.br [~]# cat .user.ini ; cPanel-generated php ini directives, do not edit ; Manual editing of this file may result in unexpected behavior. ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) ; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation) [PHP] asp_tags = Off display_errors = Off max_execution_time = 90 max_input_time = -1 max_input_vars = 1000 memory_limit = 1024M session.gc_maxlifetime = 1440 session.save_path = "/var/cpanel/php/sessions/ea-php56" upload_max_filesize = 10M always_populate_raw_post_data = -1 /opt/cpanel/ea-php56/root/usr/bin/php -c php.ini -i | grep memory_limit memory_limit => 256M => 256M /opt/cpanel/ea-php56/root/usr/bin/php -i | grep memory_limit memory_limit => 256M => 256M /opt/cpanel/ea-php56/root/usr/bin/php -c .user.ini -i | grep memory_limit memory_limit => 256M => 256M Any idea? Thank you Joao[/PHP]
    0
  • cPanelMichael
    Hello, Would you mind opening a support ticket using the link in my signature so we can take a closer look at the affected system? Thank you.
    0
  • joaosavioli
    Hello, I"ve opened a suport ticket and the problem was fixed. Here is the solution to help comunity: "Hello, Usually if you need to set a Custom php.ini it is better to not use MultiPHPini Editor in WHM because it will create a file that overrides PHP settings. # /opt/cpanel/ea-php56/root/etc/php.d/local.ini ( This file overrides custom php.ini files. ) I've moved this file out of the way for you to test the issue a bit further. Did you have a specific cron task that you were using where the issue was experienced? CLI PHP and CGI PHP can function differently sometimes. User accounts have a wrapper enabled which should auto determine their PHP version however if you call it from the full path to PHP it may result in something different occurring as well. # /usr/local/bin/php ( wrapper ) # /opt/cpanel/ea-php56/root/usr/bin/php ( full path to script ) Calling PHP with the wrapper should automatically find the correct PHP version for this account. Curious if you were only testing with calling PHP directly or if you were actually using the PHP wrapper which is called automatically when you use command "php". Best Regards, -- Steven V. Sublett" Thank you Joao
    0

Please sign in to leave a comment.