Find the answer to your Linux question:
Results 1 to 1 of 1

Thread: Cron + Suhosin

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Cron + Suhosin

    Hi everyone,

    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:

    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
    I tried setting suhosin.executor.disable_eval to Off in my php.ini, but it did not solve it.

    This is the directory config the app is running in:
    <Directory /***/httpdocs >
    php_admin_value suhosin.executor.disable_eval 0
    php_admin_value suhosin.mail.protect 0
    But this apperently does not have any effect on cron.

    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.
    ; 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
    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?
    Last edited by klompie; 05-06-2011 at 02:25 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts