Results 1 to 2 of 2

Thread: Cron Scheduler failing with SAFE MODE Restriction.

  1. #1
    pgudge is offline Junior Member
    Join Date
    Aug 2007
    Posts
    1

    Default Cron Scheduler failing with SAFE MODE Restriction.

    Linux 2.6.16.33-061227b (Fedora Core)
    Sugar Open Source 4.5.1e
    Apache/2.0.54
    PHP 5.0.4 (cli)

    I have just compeleted a SugarCRM install, everything is running great at the moment, users are login in, and recieving email directly into SugarCRM Mailboxes etc, but thay are having to select "Check Mail".

    I have looked at the Scheduler and its is set to run ever minute.

    The crontab looks like this

    Code:
    * * * * * cd /var/www/vhosts/mydomain.com/subdomains/crm/httpsdocs; php -f cron.php 2>&1
    I tried adding the user the cron was to as, as it appears not to be in there (probablty intensional)

    I treid, root, apache and the user that owns the virtual host. But still the SAFE MODE Restriction error as below appears in the output.

    Code:
    PHP Warning:  fopen(): SAFE MODE Restriction in effect.  The script whose uid is 10023 is not allowed to access cache/dynamic_fields/modules.php owned by uid 48 in /var/www/vhosts/mydomain.com/subdomains/crm/httpsdocs/modules/DynamicFields/DynamicField.php on line 823
    and in the sugarcrm.log I get
    Code:
    Tue Aug  7 16:38:15 2007,945 [14832] FATAL SugarCRM - Scheduler cannot write PID file.  Please check permissions on cache/modules/Schedulers
    Tue Aug  7 16:38:15 2007,948 [14832] FATAL SugarCRM - Scheduler cannot write PID file.  Please check permissions on cache/modules/Schedulers
    User 10023 is the owner of the Virtual host, and 48 is apache

    I then added the cron job to the apache cron
    Code:
    crontrab -e -u apache
    When I watch the cron log the cron job is ran every minute as the apache user. There is no output, and there is nothing in the sugarcrm.log file either, I entered some debug in the cron.php file, but it appears that nothing is happening at all user the apache user, and no Emails are being polled.

    My httpd.conf contains the correct openbasedir I think
    Code:
    php_admin_value open_basedir "/var/www/vhosts/mydomain.com/subdomains/crm/httpsdocs:/tmp:/var/lib/php:/Blowfish"
    Safe mode is Off in the master settings and the local settings.

    Can anyone help? I know this has been asked before, and sugarchris suggested a fix, removing some code, but this still fails,

    Thank you very much for your time and reading all of this.

    Regards,

    PaulG.

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Cron Scheduler failing with SAFE MODE Restriction.

    Well, as far as the issue about the pid.php file, it writes this file to /cache/modules/Schedulers/pid.php.

    Make sure that folder exists and apache has writeable access to that directory.


    The line in your httpd.conf file should look like this.

    <Directory /docroot>
    php_admin_value open_basedir /docroot
    </Directory>


    then of course you'll need to restart the server.
    A graceful restart should work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cron failing on server
    By rickcrites in forum Help
    Replies: 0
    Last Post: 2006-12-03, 04:34 AM
  2. Replies: 3
    Last Post: 2006-11-14, 06:48 PM
  3. Problemas en la Instlacion con Safe Mode
    By shrek in forum Espaņol
    Replies: 0
    Last Post: 2006-06-03, 02:38 PM
  4. Cron job fails due to PHP SAFE MODE
    By duncanbrown in forum Help
    Replies: 2
    Last Post: 2006-04-19, 04:13 PM
  5. Replies: 1
    Last Post: 2005-03-16, 03:19 AM

Bookmarks

Posting Permissions

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