Jump to content

[SOLVED] I don't think this is a PHP problem as such, but more a Cpanel and Cronjob prob


Recommended Posts

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

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.

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  :)

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  ;D

 

thanks guys.

 

Regards ACE

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.