PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 08-17-2005, 08:43 AM   #1
chali
Green Mole
 
Join Date: Aug 2005
Posts: 5
Struggling with cron

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.
chali is offline   Reply With Quote
Old 08-19-2005, 08:08 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Check out this bug and see if it fixes the issue.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 08-20-2005, 02:00 AM   #3
chali
Green Mole
 
Join Date: Aug 2005
Posts: 5
Segmentation fault (core dumped)

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.
chali is offline   Reply With Quote
Old 08-20-2005, 07:23 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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).
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 08-23-2005, 09:38 PM   #5
chali
Green Mole
 
Join Date: Aug 2005
Posts: 5
PHP command not working?

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
chali is offline   Reply With Quote
Old 08-26-2005, 08:48 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
What happens if you just use: php -f hello.php
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 08-28-2005, 02:26 AM   #7
chali
Green Mole
 
Join Date: Aug 2005
Posts: 5
I get the same error

Hey Charter. The same thing happens when I run the "php -f hello.php" command: segmentation fault (core dumped)
chali is offline   Reply With Quote
Old 08-28-2005, 09:02 PM   #8
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Are PHP and related directories (/usr/local/bin/php) set to 755 permissions? Maybe there is a clue here or perhaps at GDB?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 08-28-2005, 09:23 PM   #9
chali
Green Mole
 
Join Date: Aug 2005
Posts: 5
I'll look into it

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.
chali is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cron again xdaniel Bug Tracker 4 05-12-2005 07:33 AM
Locking using Cron Slider Troubleshooting 8 01-13-2005 12:32 AM
cron problem Warmbells Troubleshooting 4 12-23-2004 05:33 PM
Win2000 Cron duffy Troubleshooting 2 12-16-2004 04:43 AM
prblem with cron franklin74 Troubleshooting 5 10-08-2004 07:56 AM


All times are GMT -8. The time now is 11:34 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.