dwayne dibbly Posted April 2, 2006 Posted April 2, 2006 (edited) Well i asked here and got what i thought was the answer to my problems, However it seemed not as if i ran my photo insertion script manualy it inserted the photo's to my data base as it should, But when the cron job did it nothing was inserted. So i have done some research and because the php server api is apache and not cgi i had to do a different cron. the one i had was.. /usr/bin/php -q /home/your_cpanel_name/public_html/path/to/script/script.php This ran once an hour and basicaly buggered it up. I have subsequently found that to run a succesfull cron job using apache i have to use... lynx -dump http://www.mysite.com/path/to/the/script/script.php and this now works. I hope this may be helpful to some people who are in need of a script running automaticaly using a cron. Perhaps this could be included in a FAQ somewhere as it took me a long time to find what i needed... Edited April 2, 2006 by dwayne dibbly Quote
TCH-Bruce Posted April 2, 2006 Posted April 2, 2006 I'm glad you found a solution to run your script. Depending on how the script was written would determine the method of running it. The /usr/bin/php example you gave is the proper way to run a script on the server. Using lynx -dump is calling the script as a brower would and not the same. Quote
TweezerMan Posted April 2, 2006 Posted April 2, 2006 Using lynx -dump is calling the script as a brower would and not the same. Not to mention that the last I heard, access to command line browsers (such as lynx) was supposed to be removed from all servers. If your script has to be called through a browser, TCH-MikeJ described the proper method for doing this (same forum topic as linked above), using a second script to call your script with a PHP include. Quote
dwayne dibbly Posted June 24, 2006 Author Posted June 24, 2006 Not to mention that the last I heard, access to command line browsers (such as lynx) was supposed to be removed from all servers. If your script has to be called through a browser, TCH-MikeJ described the proper method for doing this (same forum topic as linked above), using a second script to call your script with a PHP include. Thanks for the advanced notice of turning it off (NOT) it wasnt untill i had people telling me photos were not appearing that i had a look and you turned it off 4 days ago. Still not to worry looks like i will try that other way you told me about but it would have been nice to have been warned. Quote
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.