SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I set up my php/mysql server on apache according to Kevin Yanks guide on setting up php and mysql.

    When trying to run the jokes.php which is in the 4 part I get the following error when trying to connect to the database and can't figure out what is going wrong.

    Here is the error when I remove the @ sign from mysql_connect

    Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/test/jokes.php on line 22

    Help me please???

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your PHP server is not running

    ---------------------
    Kryogen WebHosting - the bridge between today and tomorrow

  3. #3
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the page is loading and giving an error message then PHP must be working. It is more likely that MySQL is not running either that, or you need to specify the host where the server is running - usually localhost

    ------------------
    Karl Austin
    KDA Web Services

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The mySql server is seems to be running I can acces my database's using /usr/local/mysql/bin/mysql
    with no problems.
    mysqld is also running.

    Any other ideas...

  5. #5
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the command top to see if mysql is running. That's what I did when I had a similar problem.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the command top????

    By the way localhost is specified.

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both are apparently running. I used the top command to see if mysqld was running and it is. I reinstalled mysql last night and will reinstall php tonight.
    I'm running RedHat6.2 and PHP4.0.0 I'll let you know if a reinstall works or not. Will reinstalling PHP affect my apache server or should it be OK.

  8. #8
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RPM installs ? .. or compiled installs

    ------------------
    Kryogen WebHosting - use it, abuse it

  9. #9
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Compile installs

  10. #10
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now it works eventually, I forgot to comment out a line the httpd.conf, Oh Well

    Thanks for all your help guys!!


Bookmarks

Posting Permissions

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