Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    359

    Problem with install PHP 5.2 on Win2K3

    I am at the end of my rope, so to speak. I have searched every forum known to man, I've RTFM over and over, and I have called everyone I know with any experience with this. But, no progress....

    I have installed PHP 5.2 as ISAPI and MySQL 5.1 on a Windows 2K3 platform. I unzipped the ZIP files first into a directory called "c:\php" and I then downloaded the 5.2 installer and ran it. I later manually edited the various settings as I have detailed below.

    PHP works fine, it opens up the info page that displays the php variables, and it will open up and parse an ordinary .php page. BUT, when I try to open a page that uses mysql_connect() in it, I get this error.

    Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\sitename\phppages\dbaccess.php on line 12

    Now, I understand that the following must be done....

    extension_dir =C:\php\ext
    doc_root = c:\Inetpub\sitename

    I copied lib_mysql.dll into
    c:\php
    c:\windows
    c:\windows\system32

    I copied php5isapi.dll to c:\Windows

    PHP uses php.ini out of the Windows Directory
    c:\Windows\php.ini

    I also uncommented the following in php.ini
    extension=php_mysql.dll

    In IIS, I edited the web site under tab HOME >> CONFIGURATION >> MAPPINGS
    to point to...
    C:\WINDOWS\php5isapi.dll with the extension of .php

    IN IIS, I set the ISAPI Filter to
    C:\WINDOWS\php5isapi.dll

    In IIS, under WEB SERVICE EXTENSIONS
    I set the PHP extension to
    c:\Windows\php5isapi.dll

    I reset IIS at the command prompt...
    c\Documents and Settings\Admin > iisreset

    But still, I get the error message....
    Fatal error: Call to undefined function mysql_connect()

    In ENVIRONMENT VARIABLES, I added the following in the path
    C:\php

    What, if anything, have I done wrong? I would so appreciate some help and will even be willing to pay a qualified person to complete this install for me. I have spent over 10 hours in 2 days on this.... help!

    Oh, and please don't tell me to use Apache instead.... this is a friends server and the server software is his choice, not mine.
    Last edited by sonixi; 01-20-2007 at 05:51 PM.

  2. #2
    Join Date
    Jun 2005
    Posts
    87
    I copied lib_mysql.dll into
    c:\php
    c:\windows
    c:\windows\system32
    I dont know if that's a type, but you have to copy the original libmysql.dll from your php folder (c:\php) to c:\windows\system32

    Also does your phpinfo() show you have the mysql extension loaded ?

  3. #3
    Join Date
    Aug 2004
    Location
    Sheffield, United Kingdom
    Posts
    238
    or you can add the PHP info to your PATH
    █ Windows and Exchange Server Experts, UK and US Dedicated Exchange Servers.
    MCSE Certified, Registered Microsoft Partner.
    █ Exchange 2010, Server 2008 and IIS 7 Services now available!
    www.windowsserv.com Email: mail@windowsserv.com

  4. #4
    Join Date
    Sep 2005
    Posts
    79
    Perhaps a couple of additional suggestions at http://us3.php.net/manual/en/ref.mysql.php#63912 which may be helpful

Posting Permissions

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