so I'm trying to get a php script to connect to mysql, and I get the following error when I run a wget command for the script...
******(same error comes up 20 times before it decides to quit)...
--12:15:25-- http://localhost/server/update.php
(try:20) => `-'
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Giving up.
******
This script worked perfectly with my other VPS. The only diferrence is that on my other VPS, I had the following installed from ubuntu's installer:
apt-get install mysql-server (installed mysql5) apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql
With Westhost, I have only MySql4 and php5 installed from their site applications, and I restarted the vps. Do I need to install additional applications? ps, I turned on cmd, passthru, popen, proc_open, shell_exec, and system in PHP and that did not seem to help. Any ideas? I feel like this is the only thing preventing me from getting my website to funcion properly.
Thanks.
Results 1 to 7 of 7
-
12-15-2006, 04:33 AM #1Junior Member
- Join Date
- Dec 2006
- Posts
- 9
mysql + php, worked with other vps but not with westhost...
Last edited by ramyhin; 12-15-2006 at 04:36 AM.
-
12-15-2006, 07:06 AM #2
The read error in headers sounds like it is an Apache problem.
Are you sure the script exists in /var/www/html/server/ ??
And what do you have in the apache error logs? That would give you a clue...
-
12-15-2006, 07:30 AM #3
To it looks like update.php is located on your local computer. Am I right about that? If that is true did you enable remote connecting for MySQL when you installed it? Jalal understans error messages better then me but the localhost thing looks wrong to me for some reason.
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
-
12-15-2006, 10:28 AM #4Junior Member
- Join Date
- Dec 2006
- Posts
- 9
Thank you for the quick response...
ok
- no errors show up in the apache log file when I run the script
- yes, I am positive the script exists in /var/www/html/server/
- the script is located on my vps in the /var/www/html/server/ directory, the wget command and script runs within the VPS. "localhost" is the VPS. Should I still turn on remote connecting for MySQL? Should I change the name from localhost to something else? The command I am using in SSH is
"wget -O - http://localhost/server/update.php" which worked fine on another VPS I used. Do you think something needs to be changed in Apache?
-
12-15-2006, 10:42 AM #5Junior Member
- Join Date
- Dec 2006
- Posts
- 9
When I take out localhost, and replace it with my website address, I get the following message...
*****************
wget -O - http://(mywebsite.com)/server/update.php
--18:34:01-- http://(mywebsite.com)/server/update.php
=> `-'
Resolving (mywebsite.com)... done.
Connecting to (mywebsite.com)[(my website's ip)]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
[ <=> ] 0 --.--K/s
18:34:02 (0.00 B/s) - `-' saved [0]
***********
but nothing is saved... any thoughts?
-
12-15-2006, 12:44 PM #6
Why do you need to use wget? I don't fully understand what you are doing. If you are logged into your account via SSH you should be able to run the update.php without the wget.
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
-
12-15-2006, 12:52 PM #7
BTW, If you are logged into your account via SSH you could execute the update.php with the following command:
You would need to be in the directory where update.php is or you would need to provide the full path like this:Code:php update.php
Code:php /var/www/html/server/update.php
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
Similar Threads
-
WestHost Client Connection - Volume IV, Issue VI
By WestHost - CReeves in forum News / AnnouncementsReplies: 0Last Post: 09-07-2007, 03:52 PM -
Installing Bugzilla on a WestHost VPS
By sonavor in forum CGI Scripts / PerlReplies: 0Last Post: 03-28-2006, 11:43 PM -
How to install MediaWiki on WestHost VPS
By nsc in forum PHP / MySQLReplies: 4Last Post: 12-18-2005, 10:59 PM -
PHP and MySQL Site Application Upgrades
By WestHost - MStevenson in forum News / AnnouncementsReplies: 0Last Post: 02-01-2005, 12:55 PM -
Mysql 4.0.20 + php 5.0.2 installed on a VPS and working
By ssever in forum PHP / MySQLReplies: 0Last Post: 12-18-2004, 09:34 AM
so I'm trying to get a php script to connect to mysql, and I get the following error when I run a wget command for the script...
Reply With Quote