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
Apache2
PHP5

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.
ims_memoryAsked:
Who is Participating?
 
battletechCommented:
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-
http://www.php.net/manual/en/install.windows.extensions.php

I hope this helps...
0
 
ims_memoryAuthor Commented:
Also,

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.
0
 
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

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).

0
 
damole_ukCommented:
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.
0
 
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.