Why does mysql_connect() keep causing Apache 2.2 to stop working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 12344321
    New Member
    • May 2010
    • 3

    Why does mysql_connect() keep causing Apache 2.2 to stop working?

    I have recently installed MySQL on my laptop on which I am working on locally. I have php5 and MySQL Server 5.1. I am using Windows Vista SP2 with Apache 2.2.

    When I try to run the function mysql_connect() the connection seems to wait for the localhost for a while (30+ seconds) before it eventually gives up and I get the error message: "Apache HTTP Server stopped working and was closed"
    By diagnosing why the page didn't load through windows I get this report: " 'localhost' is not set up to establish a connection on port 'World Wide Web (HTTP)' with this computer'";
    I have tested mysqld through the command prompt and know it is alive from the ping command.

    Please help!

    12344321
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    What PHP version are you using? I'm looking for information on this problem, though I'm not finding much.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      See if this helps.

      Comment

      • 12344321
        New Member
        • May 2010
        • 3

        #4
        It is Version 5.2.9-1 (according to phpinfo()).

        Comment

        • 12344321
          New Member
          • May 2010
          • 3

          #5
          Wow!! That worked! All I had to do was copy and paste "libmysql.d ll" into the Apache bin folder and it seems to be fine. I'll let you know if I have any further problems with the installation.
          Thank you! :)

          12344321

          Comment

          • Markus
            Recognized Expert Expert
            • Jun 2007
            • 6092

            #6
            Haha. That's pretty awesome :)

            Be sure to return if you have any programming issues.

            Comment

            Working...