Computer Forums

Computer Forums (http://www.geekboards.com/forums/index.php)
-   Linux Chat (http://www.geekboards.com/forums/forumdisplay.php?f=4)
-   -   Cron executing php scripts? (http://www.geekboards.com/forums/showthread.php?t=930)

StupidNoob 04-08-2008 05:25 PM

Cron executing php scripts?
 
Hello all, Nice site you guys have here. Found it very useful.

Having problems executing a php script using cron.

Info about my setup. I running centos 4.6 with Webmin and virtualmin installed. I setup the cron job through the webmin modules for cron
I googled endlessly and tried several methods

I tried

php -q /home/shockey/public_html/Beta/666.php
wget www.site.com/path/to/script
tried putting /usr/bin/php at the top of the php script. still no luck.

I execute the script from my browser by going to the site and it works perfectly(Except for the undefined offset part).


I can't figure out this undefined offset error for the life of me, My script works fine on my computer but i load it up on the server and it doesn't go away. It does it on all my script. At least the ones with Arrays in them.


PHP Code:

PHP Warning:  fopen(headers/wolverine1666@hotmail.com.txt): failed to open streamNo such file or directory in /home/shockey/public_html/Beta/666.php on line 29

Warning
fopen(headers/wolverine1666@hotmail.com.txt): failed to open streamNo such file or directory in /home/shockey/public_html/Beta/666.php on line 29
PHP Warning
:  curl_setopt(): supplied argument is not a valid File-Handle resource in /home/shockey/public_html/Beta/666.php on line 43

Warning
curl_setopt(): supplied argument is not a valid File-Handle resource in /home/shockey/public_html/Beta/666.php on line 43
PHP Warning
:  fclose(): supplied argument is not a valid stream resource in /home/shockey/public_html/Beta/666.php on line 45

Warning
fclose(): supplied argument is not a valid stream resource in /home/shockey/public_html/Beta/666.php on line 45
PHP Warning
:  file(headers/wolverine1666@hotmail.com.txt): failed to open streamNo such file or directory in /home/shockey/public_html/Beta/666.php on line 670

Warning
file(headers/wolverine1666@hotmail.com.txt): failed to open streamNo such file or directory in /home/shockey/public_html/Beta/666.php on line 670
PHP Warning
:  Invalid argument supplied for foreach() in /home/shockey/public_html/Beta/666.php on line 672

Warning
Invalid argument supplied for foreach() in /home/shockey/public_html/Beta/666.php on line 672
17
:18:32 wolverine1666@hotmail.com<br>
PHP Notice:  Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 332

Notice
Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 332
17
:18:32 Repair cost = <br>
17:18:32 Already bought mercs<br>
PHP Notice:  Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 391

Notice
Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 391
PHP Notice
:  Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 398

Notice
Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 398
17
:18:32 -  gold
17
:18:32 No deposits statements found<br>
PHP Notice:  Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 417

Notice
Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 417
17
:18:32 not enough money to bank<br>
17:18:32 recruiting started!<br>
PHP Notice:  Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 591

Notice
Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 591
PHP Notice
:  Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 592

Notice
Undefined offset:  1 in /home/shockey/public_html/Beta/666.php on line 592
PHP Notice
:  Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 594

Notice
Undefined offset:  0 in /home/shockey/public_html/Beta/666.php on line 594
(0no ticket number found<br>
PHP Notice:  Undefined variableticket in /home/shockey/public_html/Beta/666.php on line 616



deleted all other undefined offsets to make post smaller
17
:18:35 logged out.<br


any help would be great, I'm stuck :(

sohel02 08-24-2008 12:10 PM

Perfect script site
 
I execute the script from my browser by going to the site and it works perfectly(Except for the undefined offset part).I can't figure out this undefined offset error for the life of me, My script works fine on my computer but i load it up on the server and it doesn't go away. It does it on all my script. At least the ones with Arrays in them.


All times are GMT -5. The time now is 07:10 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.