Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frobinrobin

    Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

    I am running Win2k3 Server and when I try to use the mysql_connect
    function I am getting an error:

    Fatal error: Call to undefined function mysql_connect() in
    C:\Inetpub\wwwr oot\programs\in dex.php on line 8

    Now, I def know I've configured my php.ini correctly (its literally the
    same as my XP machine) and I know that mysql works fine with PHP as I
    can run it from the command line :D
    I've got the files (tried in multiple places - but happiest with it in
    my php & php/ext dirs with Windows path set.)
    PHP 5 is running as an ISAPI (for some reason I cant get the CGI to
    parse php files).
    I have amended my php.ini with the doc_root, and cgi-force_redirect and
    extension dir - all the permissions on my php / inetpub folders have
    been given set for iusr, iwam and IWG full control (purely for
    troubleshooting ).
    MySQL is 4.1, IIS 6.0 on Windows 2003 with PHP 5.

    Its caused me lots of grief so any help would be much appreciated!

    Regards

    FrobinRobin

  • Philip  Olson

    #2
    Re: Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

    Make a call to phpinfo() and tell me exactly what the value of:
    "Configurat ion File (php.ini) Path" is. Also, you should use the mysqli
    extension with MySQL 4.1+

    Remember, PHP 5 requires mysql a dll file loaded in php.ini whereas PHP
    4 does not. See the manual for details.

    Comment

    • FrobinRobin

      #3
      Re: Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

      Thanks Philip, I can blatantly see that my PHP path is set to
      c:\windows when the php.ini doesnt even exist in that dir!
      This is my first Win2003 install (I've usually used WinXP/2000) and
      I've come across quite a few differences with configuring for 2003.
      Sure enough as soon as I put a copy in c:\windows - phpinfo displays
      the filename as well as the path!
      I soon found a way to correct the php.ini file location by creating a
      registry file as follows:

      [HKEY_LOCAL_MACH INE\SOFTWARE\PH P]
      "IniFilePath"=" c:\\PHP"

      A quick restart of IIS6 and it all works fine.
      Thank you very much for your help Philip!

      Comment

      Working...