I have created a webapp and now want to send emails at midnight using a cronjob.
When i go directly to the (PHP) script in my browser everthing works correctly, but when using cron to run the script i get these errors:
I tried setting suhosin.executor.disable_eval to Off in my php.ini, but it did not solve it.Code:
ALERT - use of eval is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '***', line 118)
PHP Fatal error: SUHOSIN - Use of eval is forbidden by configuration in ***(118) : eval()'d code on line 118
This is the directory config the app is running in:
But this apperently does not have any effect on cron.Code:
<Directory /***/httpdocs >
php_admin_value suhosin.executor.disable_eval 0
php_admin_value suhosin.mail.protect 0
Any ideas on how to solev this? Can i disable suhosin for cron?
I searched the web but have not found a solution yet.
Found out it also loaded /etc/php.d/suhosin.ini.
changed the two lines mail.protect and disable_eval, and now it works correct. But this is system-wide and i prefer only to have it for cron. Is this possible?Code:
; Enable suhosin extension module
suhosin.mail.protect = 2
suhosin.memory_limit = 32M
suhosin.executor.disable_eval = 1
suhosin.cookie.checkraddr = 1
suhosin.cookie.cryptraddr = 1
suhosin.multiheader = 1
suhosin.session.checkraddr = 1
suhosin.session.cryptraddr = 1
suhosin.upload.disallow_elf = 1