Jump to content

Cron Task php with include, can't open it


Recommended Posts

I have created a cron task on dedicated server. It is requesting a php page. Both are under the 'root' user, and 777 permissions. This is purely to get it working.

 

It is executing the php script, but the includes with the php script are not being included. Here are the error messages I get:

 

PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning:  include_once(): Unable to access ../globalConfig.php in /var/www/vhosts/***REMOVED****/inc/cronTasks/pull.php on line 4
PHP Warning:  include_once(../globalConfig.php): failed to open stream: No such file or directory in /var/www/vhosts/***REMOVED****/inc/cronTasks/pull.php on line 4

 

Anyone got any ideas? The php file here is within the same directory as the files I am trying to include. So I am pretty sure it is finding the included files, it's just not being allowed to include it. I have set the include paths correctly as includes are working, it's only when I use it as a cron job.

 

The cron job is performed by 'root' user as well.

 

 

Link to comment
https://forums.phpfreaks.com/topic/258217-cron-task-php-with-include-cant-open-it/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.