MasterACE14 Posted October 19, 2007 Share Posted October 19, 2007 Evening PHP Freaks, Before you all say "this isn't is a PHP question!", I need to say that, I don't particularly know of any other forums that would be able to help me with this matter, and I have been searching google for hours. So, my problem is, I have setup a cronjob to run hourly, and the cronjob runs my PHP file.(which inserts UPDATE's my database) But for some reason it is not working. So I changed it to every minute( * * * * * | in that format in Cpanel) and I'm still getting nothing, I would like to mention that it was working fine on the 13th, then when I made some changes to my PHP file its stopped. Yet my PHP file works fine when I access it via its URL manually. I have it set up like this in Cpanel: /home/ace/public_html/conflictingforces/3d81add95b39904/9d3bb858d68c2a58ded7.php(note: I have chopped out half of the directoy and half of the file name for security reasons) in the 'command' input box, and in the timer input box's I have this: 0 * * * * so it should run hourly. But I'm getting nothing. here is the error_log from the 13th, the last time it was working. [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/weapons.php on line 3 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant weapon - assumed 'weapon' in /home/ace/public_html/conflictingforces/weapons.php on line 4 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/weapons.php on line 5 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant damage - assumed 'damage' in /home/ace/public_html/conflictingforces/weapons.php on line 6 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/weapons.php on line 7 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/weapons.php on line 8 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/weapons.php on line 9 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/weapons.php on line 11 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/weapons.php on line 13 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant weapon - assumed 'weapon' in /home/ace/public_html/conflictingforces/weapons.php on line 14 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/weapons.php on line 15 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant damage - assumed 'damage' in /home/ace/public_html/conflictingforces/weapons.php on line 16 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/weapons.php on line 17 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/weapons.php on line 18 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/weapons.php on line 19 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/weapons.php on line 21 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/weapons.php on line 23 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant weapon - assumed 'weapon' in /home/ace/public_html/conflictingforces/weapons.php on line 24 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/weapons.php on line 25 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant damage - assumed 'damage' in /home/ace/public_html/conflictingforces/weapons.php on line 26 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/weapons.php on line 27 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/weapons.php on line 28 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/weapons.php on line 29 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/weapons.php on line 30 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/armors.php on line 3 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant armor - assumed 'armor' in /home/ace/public_html/conflictingforces/armors.php on line 4 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/armors.php on line 5 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant defence - assumed 'defence' in /home/ace/public_html/conflictingforces/armors.php on line 6 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/armors.php on line 7 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/armors.php on line 8 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/armors.php on line 9 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/armors.php on line 10 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/armors.php on line 12 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant armor - assumed 'armor' in /home/ace/public_html/conflictingforces/armors.php on line 13 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/armors.php on line 14 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant defence - assumed 'defence' in /home/ace/public_html/conflictingforces/armors.php on line 15 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/armors.php on line 16 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/armors.php on line 17 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/armors.php on line 18 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/armors.php on line 19 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/armors.php on line 21 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant armor - assumed 'armor' in /home/ace/public_html/conflictingforces/armors.php on line 22 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/armors.php on line 23 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant defence - assumed 'defence' in /home/ace/public_html/conflictingforces/armors.php on line 24 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/armors.php on line 25 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/armors.php on line 26 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/armors.php on line 27 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/armors.php on line 29 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/vehicles.php on line 3 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant vehicle - assumed 'vehicle' in /home/ace/public_html/conflictingforces/vehicles.php on line 4 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/vehicles.php on line 5 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant power - assumed 'power' in /home/ace/public_html/conflictingforces/vehicles.php on line 6 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/vehicles.php on line 7 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/vehicles.php on line 8 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/vehicles.php on line 9 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/vehicles.php on line 10 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/vehicles.php on line 12 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant vehicle - assumed 'vehicle' in /home/ace/public_html/conflictingforces/vehicles.php on line 13 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/vehicles.php on line 14 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant power - assumed 'power' in /home/ace/public_html/conflictingforces/vehicles.php on line 15 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/vehicles.php on line 16 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/vehicles.php on line 17 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/vehicles.php on line 18 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/vehicles.php on line 19 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant id - assumed 'id' in /home/ace/public_html/conflictingforces/vehicles.php on line 21 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant vehicle - assumed 'vehicle' in /home/ace/public_html/conflictingforces/vehicles.php on line 22 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant price - assumed 'price' in /home/ace/public_html/conflictingforces/vehicles.php on line 23 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant power - assumed 'power' in /home/ace/public_html/conflictingforces/vehicles.php on line 24 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant type - assumed 'type' in /home/ace/public_html/conflictingforces/vehicles.php on line 25 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant rarity - assumed 'rarity' in /home/ace/public_html/conflictingforces/vehicles.php on line 26 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant description - assumed 'description' in /home/ace/public_html/conflictingforces/vehicles.php on line 27 [13-Oct-2007 17:49:39] PHP Notice: Use of undefined constant options - assumed 'options' in /home/ace/public_html/conflictingforces/vehicles.php on line 28 I'm wondering if maybe this is the reason why its not working at all, because the I am using undefined constants? But this is a 'Notice' not a error. So I dunno, any ideas are appreciated. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/73918-solved-i-dont-think-this-is-a-php-problem-as-such-but-more-a-cpanel-and-cronjob-prob/ Share on other sites More sharing options...
steve448 Posted October 19, 2007 Share Posted October 19, 2007 I think I had a similar problem to this a while ago. Are you using relative includes in the cron files which include all the constants being defined? Because I found that because the script was running from the location of php and not the actual file called it wasn't finding the includes. My hosting company wouldn't allow me to use http includes so my workaround was to make it one long script with no includes, not ideal but luckily for me it wasn't that big a job. Quote Link to comment https://forums.phpfreaks.com/topic/73918-solved-i-dont-think-this-is-a-php-problem-as-such-but-more-a-cpanel-and-cronjob-prob/#findComment-373047 Share on other sites More sharing options...
MasterACE14 Posted October 20, 2007 Author Share Posted October 20, 2007 hmm ok, thats a tough one for me to do unfortuantly :-\ , I'm just testing different things in the moment, the strange thing is though, when It was working, it was including the files correctly. I don't really know whats stuffed it. thanks for your suggestion Quote Link to comment https://forums.phpfreaks.com/topic/73918-solved-i-dont-think-this-is-a-php-problem-as-such-but-more-a-cpanel-and-cronjob-prob/#findComment-373609 Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 So you are saying your entire php page is returning a blank white page (no errors)? Quote Link to comment https://forums.phpfreaks.com/topic/73918-solved-i-dont-think-this-is-a-php-problem-as-such-but-more-a-cpanel-and-cronjob-prob/#findComment-373615 Share on other sites More sharing options...
MasterACE14 Posted October 20, 2007 Author Share Posted October 20, 2007 I've got it working now, So you are saying your entire php page is returning a blank white page (no errors)? The page has been working fine when I ran it manually. To fix it I added 'php' (without the comma's) to the front of the command in Cpanel, and it is now running hourly as it should thanks guys. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/73918-solved-i-dont-think-this-is-a-php-problem-as-such-but-more-a-cpanel-and-cronjob-prob/#findComment-373647 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.