Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - Urgent

Posted on 2006-03-21
Last Modified: 2013-12-13
I am trying to setup CURL on my PHP Installation however it just doesn't load when I restarted Apache.

I am running:
Windows XP Pro

I have checked the ext/ directory and it is definately there and I am editing the correct php.ini file.

Anyone have a solution to this problem?

Thanks in advance.
Question by:ims_memory

    Author Comment


    If I completely clear out the file, it does find the file, however it gives me a new error:

    PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - %1 is not a valid Win32 application

    So I thought the php_curl may be corrupted, so I download another copy of PHP and extracted the file, however the same issue occured.
    LVL 40

    Assisted Solution

    What is the directory containing the php_curl.dll file?

    In the php.ini file is this path the same as the entry of extension_dir.

    Mine is ...

    extension_dir = "C:\PHP5\ext\"

    I don't use Apache.

    But try this too.

    Open a command prompt.

    Change directory to the PHP directory.

    Mine is C:\PHP5

    Then type...

    php -i > phpinfo.log

    Then examine phpinfo.log and see what it has with regard to curl.

    Mine shows ...


    CURL support => enabled
    CURL Information => libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3

    You may also need to make sure that the PHP directory in in the PATH.

    I have C:\PHP5 in the path as this allows me to not have to type c:\php5\php.exe in front of every .php script I want to run at the command line (other settings are also necessary).


    Assisted Solution

    Hi. The best place to look is the PHP Manaual at

    Here is an abridged version of the relative information:

    You will need to download the "libcurl" package.

    For PHP > 4.2.3 you need libcurl 7.0.2-beta or higher
    For PHP > 4.3.0 you need libcurl 7.9.8 or higher
    for PHP > 5.0.0 you need libcurl 7.10.5 or higher

    In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH, i.e you will need to copy these files to your C:\Windows, C:\Windows\System, C:\Windows\System32, C:\PHP or C:\PHP\ext folder.

    Note: You don't need libcurl.dll from the CURL site.

    If you don't have any of these files goto:
    You will need to look under "Windows Generic" to find the latest version.
    LVL 2

    Accepted Solution

    The problem lies in both of the above comments -
       a)You need to have defined in your php.ini, the path to your ext directory.
       b)You need to edit your Windows environmental variable to C:\PHP & C:\PHP\ext.
    -On Windows NT, 2000, XP and 2003:
    Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003)

    Go to the Advanced tab

    Click on the 'Environment Variables' button

    Look into the 'System Variables' pane

    Find the Path entry (you may need to scroll to find it)

    Double click on the Path entry

    Enter your PHP directory ant the end, including ';' before (e.g. ;C:\php)

    Press OK and restart your computer

    Read this, it will shed some light on the picture-

    I hope this helps...

    Author Comment

    Thanks for your help, i finally managed to get it working after reinstalling apache and php. I did implement all of your tips and it seems to be running fine now, thankyou for your quick reponses as well.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    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 dynamically set the form action using jQuery.

    733 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

    17 Experts available now in Live!

    Get 1:1 Help Now