Restarting IIS: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll'

Posted on 2005-05-01
Last Modified: 2013-12-12
Get the following message when restarting IIS:
PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll' - The specified procedure could not be found.

Am using MySQL Server 4.1 and PHP 5.0.4

How do I fix this problem?

Question by:lydx137
    LVL 32

    Expert Comment

    PHP5 (unlike PHP4) does not have MySql extension enabled by default in windows. Edit php.ini file and uncomment the "extension" line by removing the semi-colon. So it should look like:

    extension = php_mysql.dll

    Make sure the .dll file exists in the defined "extension_dir" line of your php.ini. If you dont find the file, get it from the zipped version of PHP5 (I think the file is not available in the installer version).
    LVL 32

    Accepted Solution

    Make sure you've restarted IIS after editing php.ini.

    If that doesn't works for you, copy the libmySQL.dll file from mysql\bin directory into windows\system and windows\system32 directories.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    As this topic comes over and over again in different forms, I've finally decided to write a short (yea, right...) article / tutorial about pagination with PHP with MySQL database. There are dozens of these kind of tutorials, I know - I wanted to mak…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now