PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 01-27-2004, 04:45 AM   #1
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Unhappy Problem running spider from Command Line

Hello,
I try to run the spider from the command line using SSH Jailshell-2.05a$.

I am on a windows system accessing a linux server with apache.

The problem is when I run the spider it doesn't work it give no message is just give back the shell prompt and the site is not spidered.

php -f /home/user1/www/admin/spider.php http://www.testsite.com

This is the command I am typing that gives no results.

Please help
Joshua
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-27-2004, 09:05 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. It sounds like it could be a Jailshell issue. Maybe try contacting your host and see if they allow PHP in Jailshell.
__________________
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 01-27-2004, 09:29 AM   #3
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Yes I can run PHP in Jailshell. I ran other php scripts from the command line.

Joshua
joshuag200 is offline   Reply With Quote
Old 01-27-2004, 09:41 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Perhaps cd to the admin directory and type:
Code:
php -f spider.php http://www.testsite.com > phpdiglog.txt 2>&1
What appears in the phpdiglog.txt 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 01-27-2004, 10:30 AM   #5
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
unable to connect to database: check the connection script.


This is what appeared in the log file.
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-27-2004, 02:55 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Check that the correct database information is in the connect.php 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 01-27-2004, 04:12 PM   #7
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Yes the correct database information is in the connect.php. The spider is running perfect from the web browser but not from the command line.
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-27-2004, 04:32 PM   #8
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. The only place that the message "Unable to connect to database : Check the connection script" is generated is from the connect.php file (the _connect.php file is used by install.php to make connect.php, and connect.php is used to connect to the database). Please see this thread. It seems that either (a) Jailshell is not allowing mysql_connect or (b) the database info in the connect.php file is incorrect.
__________________
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 01-28-2004, 05:30 AM   #9
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Jail shell is allowing me to connect to MySQL from the command line. I have tried it with other scripts.

The connect.php file works perfectly from the browser so I conclude everything is find with that file.

What do you think the problem could be?
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-28-2004, 11:22 AM   #10
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. The message "Unable to connect to database : Check the connection script" only comes from the connect script. The only other thing I can think of is that maybe you have two installs?
__________________
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 01-28-2004, 01:41 PM   #11
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Ok then if I have two installs how do I clear it up?

I guess I will unistall everything and installit again.
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-28-2004, 04:28 PM   #12
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
Ok before you reply I have some information that may help you I added mysql_error() to the die part of the connect and I got the following error:

Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2)jailshell-2.05a$

Tell me what I can do to correct this
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 01-28-2004, 08:02 PM   #13
joshuag200
Green Mole
 
Join Date: Jan 2004
Posts: 10
I got the problem fix!

In the mysql_connect (); in connect.php

I change localhost to 127.0.0.1


I read this document http://us2.php.net/function.mysql-connect

That help me a lot. I think this tread will be useful to many
__________________
Best Regards,
Joshua
joshuag200 is offline   Reply With Quote
Old 09-03-2004, 05:49 PM   #14
WebDiva 2.0
Former Member
 
Join Date: Aug 2004
Posts: 18
I changed localhost to 127.0.0.1 also, and now the command line works to index. I am half way there!

I did get this error msg now: cannot create the file in /text_content/keepalive.txt
OK, this means what? keepalive.txt already is there. Does this require chmod 777 or 666 (my default file permission is 644)

Also, I have written some new search function I will share in just a few days here.

Charter thank you much for this excellent work.
WebDiva 2.0 is offline   Reply With Quote
Old 09-07-2004, 04:46 PM   #15
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Is this a path issue: /text_content/keepalive.txt versus /phpdig/text_content/keepalive.txt?
__________________
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
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
Problems running command line remc Troubleshooting 2 03-15-2005 09:34 AM
spider from command line twanoo Troubleshooting 3 01-14-2005 11:04 AM
Spider.php is killed at the command line bforsyth Troubleshooting 2 12-05-2004 02:09 PM
Command Line Spider spiders all sites Wayne McBryde Troubleshooting 3 01-27-2004 06:15 PM
Spider in command line : 3 errors Yannick Troubleshooting 2 12-19-2003 04:01 AM


All times are GMT -8. The time now is 08:23 PM.


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