PDA

View Full Version : Struggling with cron


chali
08-17-2005, 08:43 AM
I've read through all the topics related to cron that I could find on these forums, but I'm still stuck :(

I know that the crontab is set up, as, using putty, I type "crontab -l" and I get this:
55 23 * * * /usr/bin/php -f /usr/www/users/mysite/phpdig/admin/spider.php /usr/www/users/mysite/cronlist.txt >> /usr/www/users/mysite/phpdig/admin/temp/spider.log

I've made sure cronlist.txt and phpdig/admin/temp is chmodded to 777. I've checked my path in config.php and it is: '/usr/www/users/mysite/phpdig'

I'd appreciate if anyone could point me in the right direction in trying to figure this out - how do I start troubleshooting? Is there a log file I can set up to see if anything is happening?

I'm probably missing something quite straightforward...

Charles.

Charter
08-19-2005, 08:08 AM
Check out this (http://www.phpdig.net/forum/showthread.php?t=2005) bug and see if it fixes the issue.

chali
08-20-2005, 02:00 AM
Hi Charter. Thanks for your response. I commented out the line in spider.php so it now looks like this:

// echo $relative_script_path;
//$relative_script_path = '..';

It still did not work, so I tried to run it from command line using putty, and I got this: Segmentation fault (core dumped)

So do you think it's a problem from my hosts side?

Charles.

Charter
08-20-2005, 07:23 AM
How long did it run before it dumped? How big is the spider.log file? Try changing >> to > (the >> appends to file, the > overwrites file).

chali
08-23-2005, 09:38 PM
Hi Charter. I appreciate your help.

It did not appear to run at all, and spider.log was empty. I tried uploading a simple php hello world script, and tried to run it using

/usr/local/bin/php -f hello.php

and it also gives me a segmentation fault (core dumped).

Do you think that this suggests it's not a phpdig problem, but a problem from my side?

BTW, I ran the command "which php" in putty and it turns out that the path to php is /usr/local/bin/php and not /usr/bin/php. I thought that might help but it did not :(

Charles

Charter
08-26-2005, 08:48 PM
What happens if you just use: php -f hello.php

chali
08-28-2005, 02:26 AM
Hey Charter. The same thing happens when I run the "php -f hello.php" command: segmentation fault (core dumped)

Charter
08-28-2005, 09:02 PM
Are PHP and related directories (/usr/local/bin/php) set to 755 permissions? Maybe there is a clue here (http://www.php.net/features.commandline) or perhaps at GDB (http://www.delorie.com/gnu/docs/gdb/gdb_toc.html)?

chali
08-28-2005, 09:23 PM
Thanks Charter. I'll look into it. I'm also going to look into using the lynx browser to run the cron - I have managed to get this to work when using drupal, so it might work with phpdig as well? I'll post back with any progress I make on this.

Cheers,

Charles.