Search code examples
phpapachecronzpanel

ZPanel cron suhosin.executor.func.blacklist issue


I have successfully added new cron job to ZPanel:

abc_com/app/cronaction.php

And I found it is running at /var/log/cron:

php -d suhosin.executor.func.blacklist="passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec" -d open_basedir="/var/zpanel/hostdata/zadmin/:/var/zpanel/temp/" /var/zpanel/hostdata/zadmin/public_html/abc_com/app/cronaction.php

My problem is the cronaction.php needs to use 'exec', so where can I change the suhosin.executor.func.blacklist to remove the 'exec'? I have tried to change in /etc/zpanel/configs/apache/httpd-vhosts.conf but no luck. Anyone face this before?

Thanks!


Solution

  • Edit /etc/zpanel/panel/modules/cron/code/controller.ext.php

    And look for :-

    php -d suhosin.executor.func.blacklist="passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec" -d
    

    Remove exec from the code. It is actually hard-coded in php file.