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

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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ims_memoryAuthor Commented:

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.
Richard QuadlingSenior Software DeveloperCommented:
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).

Hi. The best place to look is the PHP Manaual at http://www.php.net/curl.

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: http://curl.haxx.se/download.html
You will need to look under "Windows Generic" to find the latest version.
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...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ims_memoryAuthor Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.