?
Solved

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

Posted on 2006-03-21
5
Medium Priority
?
3,911 Views
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
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.
0
Comment
Question by:ims_memory
5 Comments
 

Author Comment

by:ims_memory
ID: 16253329
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
 
LVL 40

Assisted Solution

by:Richard Quadling
Richard Quadling earned 400 total points
ID: 16256624
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
 

Assisted Solution

by:damole_uk
damole_uk earned 400 total points
ID: 16258750
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
 
LVL 2

Accepted Solution

by:
battletech earned 1200 total points
ID: 16259298
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
 

Author Comment

by:ims_memory
ID: 16316992
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
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…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

807 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