Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Cron.php errors

I upgraded to 1.9.3 a while ago and noticed that my email fetching immediately stopped working unless I had autocron enabled.  However, that meant I had to keep logging in and out for it to fetch emails.

I just decided to upgrade to 1.9.5 which went smoothly. However, fetching still didn't seem to be working.  I tested the cron.php file by running php cron.php in my server terminal.  It ran and successfully pulled in a test email I had sent right away but it also showed the following errors:

PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning:  file_exists(): SAFE MODE Restriction in effect.  The script whose uid is 10000 is not allowed to access /var/www/vhosts/DOMAIN owned by uid 0 in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739
PHP Warning:  file_exists(): Unable to access /var/www/vhosts/DOMAIN/subdomains/help2/include/i18n/en_US.phar/LC_MESSAGES/messages.mo.php in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739
PHP Warning:  file_exists(): SAFE MODE Restriction in effect.  The script whose uid is 10000 is not allowed to access /var/www/vhosts/DOMAIN owned by uid 0 in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739
PHP Warning:  file_exists(): Unable to access /var/www/vhosts/DOMAIN/subdomains/help2/include/i18n/en.phar/LC_MESSAGES/messages.mo.php in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739
PHP Warning:  file_exists(): SAFE MODE Restriction in effect.  The script whose uid is 10000 is not allowed to access /var/www/vhosts/DOMAIN owned by uid 0 in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739
PHP Warning:  file_exists(): Unable to access /var/www/vhosts/DOMAIN/subdomains/help2/include/i18n/en_US.UTF-8.phar/LC_MESSAGES/messages.mo.php in /var/www/vhosts/DOMAIN/subdomains/help2/include/class.translation.php on line 739

I'm happy that it fetched the email but the errors are concerning, especially since some of the paths referenced in the text don't exist.

I also received an automatic email with the following message:

(root)/include//config/filetype.yaml: File does not exist

#0 (root)/include/class.yaml.php(32): raise_error('/var/www/vhosts...', 'YamlParserError')
#1 (root)/include/class.forms.php(1396): YamlDataParser::load('/var/www/vhosts...')
#2 (root)/include/class.forms.php(1422): FileUploadField::getFileTypes()
#3 (root)/include/class.forms.php(1142): FileUploadField->getConfigurationOptions()
#4 (root)/include/class.forms.php(531): ThreadEntryField->getConfigurationOptions()
#5 (root)/include/class.forms.php(2054): FormField->getConfiguration()
#6 (root)/include/class.mailfetch.php(672): ThreadEntryWidget->getAttachments()
#7 (root)/include/class.mailfetch.php(785): MailFetcher->createTicket(1)
#8 (root)/include/class.mailfetch.php(865): MailFetcher->fetchEmails()
#9 (root)/include/class.cron.php(25): MailFetcher->run()
#10 (root)/include/class.cron.php(98): Cron->MailFetcher()
#11 (root)/include/api.cron.php(19): Cron->run()
#12 (root)/include/api.cron.php(40): CronApiController->run()
#13 (root)/api/cron.php(23): LocalCronApiController::call()
#14 {main}

However, /include/config/filetype.yaml does exist on my server.

Comments

  • edited January 2015
    I'd need more info to help. It's possible someone else has seen something similar, but I don't recall seeing it.  From what you posted, I can't even tell what OS you're on.  Looks like a Linux, but I have no idea what "autocron" is.  And WHICH Linux is important.  Please see:
    Reply with the info that's requested, and it will help us help you

    Jack
  • edited January 2015
    I apologize.  I'm running OSTicket 1.9.5.1 on a Linux server (not sure what distro) with MySQL 5.1.73 and PHP 5.3.3.  The email account I am trying to fetch from is an Office 365 mailbox.  SMTP has always worked without any issues.

    Auto-cron is the setting in OSTicket to poll the mailbox as long as a user is logged in.  Since I'm the only IT staff here it doesn't really work for me since I want to get emails even if I'm out of the office.
  • Where it says
    The script whose uid is 10000 is not allowed to access /var/www/vhosts/DOMAIN owned by uid 0 ...
    That looks like your web server (don't know which flavor -- Apache?) does not have sufficient permissions to the web content, because it is owned by root.  I would recursively chown the osTicket directory to the user whose UID is 10000.  I think that should fix it, or at least get you closer.

    Jack
  • Thanks, and yes I am running Apache. 

    The cron permissions issue doesn't seem to be a problem anymore.  However, I still receive emails about the filetype.yaml error.  It only seems to happen when I receive a ticket with an attachment.
  • I'm puzzled as to why you'd get
    (root)/include//config/filetype.yaml: File does not exist
    when the file does indeed exist.  Even the two slashes (include//config) really shouldn't be an issue. 

    And if this were a filesystem permissions issue or SELinux issue, it seems you'd get a message about permissions rather than "File does not exist".

    I'm stumped.

    Jack
  • My thoughts exactly. Thanks for confirming.  I wonder if anyone else is getting this or has fixed it?  The weird thing is it doesn't seem to actually be causing any problems with attachments as I can read them just fine.
Sign In or Register to comment.