To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    5

    Red face mysql + php, worked with other vps but not with westhost...

    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.
    Last edited by ramyhin; 12-15-2006 at 04:36 AM.

  2. #2
    Senior Member jalal's Avatar
    Join Date
    May 2003
    Location
    Germany
    Posts
    1,377

    Default

    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...

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,676

    Default

    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

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    5

    Default

    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?

  5. #5
    Junior Member
    Join Date
    Dec 2006
    Posts
    5

    Default

    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?

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,676

    Default

    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

  7. #7
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,676

    Default

    BTW, If you are logged into your account via SSH you could execute the update.php with the following command:
    Code:
    php update.php
    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 /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

  1. WestHost Client Connection - Volume IV, Issue VI
    By WestHost - CReeves in forum News / Announcements
    Replies: 0
    Last Post: 09-07-2007, 03:52 PM
  2. Installing Bugzilla on a WestHost VPS
    By sonavor in forum CGI Scripts / Perl
    Replies: 0
    Last Post: 03-28-2006, 11:43 PM
  3. How to install MediaWiki on WestHost VPS
    By nsc in forum PHP / MySQL
    Replies: 4
    Last Post: 12-18-2005, 10:59 PM
  4. PHP and MySQL Site Application Upgrades
    By WestHost - MStevenson in forum News / Announcements
    Replies: 0
    Last Post: 02-01-2005, 12:55 PM
  5. Replies: 0
    Last Post: 12-18-2004, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •