![]() |
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 |
Hi. It sounds like it could be a Jailshell issue. Maybe try contacting your host and see if they allow PHP in Jailshell.
|
Yes I can run PHP in Jailshell. I ran other php scripts from the command line.
Joshua |
Hi. Perhaps cd to the admin directory and type:
Code:
php -f spider.php http://www.testsite.com > phpdiglog.txt 2>&1 |
unable to connect to database: check the connection script.
This is what appeared in the log file. |
Hi. Check that the correct database information is in the connect.php file.
|
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.
|
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.
|
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? |
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?
|
Ok then if I have two installs how do I clear it up?
I guess I will unistall everything and installit again. |
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 |
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 |
I changed localhost to 127.0.0.1 also, and now the command line works to index. I am half way there! :D
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. :) |
Hi. Is this a path issue: /text_content/keepalive.txt versus /phpdig/text_content/keepalive.txt?
|
All times are GMT -8. The time now is 10:33 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.