I've spend all afternoon trying to figure this one out...
I have a cron job set for OSticket:
*/5 * * * * nobody /usr/bin/php /var/www/virtual/blahblah/api/cron.php
It wasn't working (no log entry of success or failure), so I tried running the cron.php script from the command line. And I get this error:
PHP Notice: Undefined index: SCRIPT_NAME in /var/www/virtual/blahblah/main.inc.php on line 20
PHP Warning: session_start(): open(/var/lib/php/session/sess_a061a6df64e6b608b395d92e715cddfd, O_RDWR) failed: Permission denied (13) in /var/www/virtual/blahblah/main.inc.php on line 46
Content-type: text/html
X-Powered-By: PHP/4.3.9
Set-Cookie: PHPSESSID=a061a6df64e6b608b395d92e715cddfd; path=/
Expires: Thu, 19 Nov 1981 08 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
PHP Warning: Unknown(): open(/var/lib/php/session/sess_a061a6df64e6b608b395d92e715cddfd, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
I can't for the life of me figure out why $_SERVER in main.inc.php is undefined. Line 20, fwiw, is the line that comparies SCRIPT_NAME to __FILE__ to make sure they are the same else the script dies.
I assuming this is where things are being held up, but I'm not sure what to do. If I can main.inc.php to load, I can at least try logging other variables to see if anything else is going wrong, but I can't even get that far.
Thanks.