Hey, I know lots has been written about this error, but I've tried so many different things and cant get this working.

I have Apache 2.0.55 installed and PHP 5.1.1

In the php.ini I have
extension=php_mysql.dll
uncommented, and as someone suggested I changed my httpd.conf file in the Apache Group folder to have
LoadModule php5_module C:/php/php5apache2.dll

All is well but my mysql_connect() brings about a fatal error.

In the past i've used IIS with no problems at all, if anyone could guide me in the right direction thatd be great

thanks in advance

    1. What error, exactly are you getting.
    2. Can you connect to MySQL through the command line.
    3. Is the correct php.ini being read, I remeber there being 2 installed on my box the first time I set it up, one in winnt and one in the server's directory.

      I'm a newbie, i dont know how to connect through command prompt, i connect to the sql db using query browser...

      the error im getting is

      Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\indexer.php on line 9

      and i have two php.ini files strangely, i just did a search:
      located here c:/php/php.ini and c:/windows

        hedgehead wrote:

        and i have two php.ini files strangely, i just did a search:
        located here c:/php/php.ini and c:/windows

        In which case until you can decide which one is being used you need to make sure that they are both the same, by uncommenting extension=php_mysql.dll in both.

        After that you should run a phpinfo() script

         
        <?php
        phpinfo()
        ?>

        to see if Mysql is listed there

          Fantastic, thanks so much, it was reading the one in the windows directory.
          It worked, if i could bother u for a second longer.... I think one last thing is wrong
          with the ini file cause i keep getting

          Notice: Undefined variable: Pword in C:\Program Files\Apache Group\Apache2\htdocs\SCHOOLIES\tester.php on line 19

          All im doing is using a form to post to tester.php
          but the variable called Pword is unrecognised??

          thanks again for helping me out

            Glad that worked.

            Lets have a look at the code and then I maybe able to help.

              thanks soo much! I accidentally misnamed a variable, just a typo, thanks again๐Ÿ˜‰

                Write a Reply...