pls i need a step by step information on how to install PHP with CURL(as in make PHP work with CURL)
as i have been reading so many articles and i don't seem to get it to work because i don't understand what they usually meant.
i have
PHP 4.4.1 and libcurl 7.15.3

Who is Participating?
Richard QuadlingConnect With a Mentor Senior Software DeveloperCommented:
And is the config file you edited the same one as is seen by the phpinfo() ?

And daft question, is YOUR pc also the webserver?
Richard QuadlingSenior Software DeveloperCommented:
What OS are you using? For Windows, edit your php.ini (or equivalent) and remove the ; in from of ;extension=php_curl.dll

Restart your web server.

From the manual for other OS.

In order to use PHP's CURL functions you need to install the libcurl package (which you've got, but not sure if it is installed correctly - make sure you follow libcurl's installation instructions - do they provide a test script to prove installation is successful?). PHP requires that you use libcurl 7.0.2-beta or higher. In PHP 4.2.3, you will need libcurl version 7.9.0 or higher. From PHP 4.3.0, you will need a libcurl version that's 7.9.8 or higher. PHP 5.0.0 requires a libcurl version 7.10.5 or greater.

Your version is OK.

To get curl active within *ix, you need to compile PHP. Again, from the manual ...

To use PHP's CURL support you must also compile PHP --with-curl[=DIR] where DIR is the location of the directory containing the lib and include directories. In the "include" directory there should be a folder named "curl" which should contain the easy.h and curl.h files. There should be a file named libcurl.a located in the "lib" directory. Beginning with PHP 4.3.0 you can configure PHP to use CURL for URL streams --with-curlwrappers.

Note to Win32 Users:
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.  You don't need libcurl.dll from the CURL site.

xavier45Author Commented:
i'm on Win XP Pro and i after doing what you adviced i get this error when i try to open a PHP page that uses CURL

Fatal error: Call to undefined function: curl_init() in C:\Program Files\xampp\htdocs\grabgmail\GrabGmail.class.php on line 162

pls help
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Richard QuadlingSenior Software DeveloperCommented:
If your php directory is NOT in your path - add it. This makes EVERYTHING a LOT easier.

RIght click "My Computer" and choose Properties|Advanced|Environment Variables|System Variables|Path|Edit

I use PHP a LOT!!!!, so my path is ...

C:\BATCH;C:\PHP5;C:\PEAR;C:\Program Files\WinRAR;C:\PKWare;D:\SAGE\UTILS;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Data\Web Sites\Quick Scripts\public_html;C:\Program Files\Support Tools\;C:\Program Files\Windows Resource Kits\Tools\;D:\cygwin\bin;C:\Essbase\bin;C:\Program Files\Intel\DMIX;D:\Program Files\InVu\;C:\Program Files\QuickTime\QTSystem\

I have C:\PHP5 near the front of the path. Just do. You don't need to if you just want to add it to the end.

Having saved that open a cmd prompt.

Type PATH [enter] just to make sure PHP is in the path.

If you are using a different directory then make sure you add that directory!

At the cmd prompt type

C:\>php -i | find "Configuration File" [enter]

This will return something like ...

Configuration File (php.ini) Path => C:\WINDOWS\php-cli.ini

The file (C:\window\php-cli.ini) could be anywhere/anything.

Edit that file and check that extension=php_curl.dll has no ; in front of it.

Save file.

Back at the cmd prompt type

C:\>php -m [enter]

You will get back something like ...

[PHP Modules]

[Zend Modules]
Zend Extension Manager

The actual list will depend upon your settings.

If you see curl there, then PHP managed to load the curl library and the functions are available.

If you get ANY error or CURL is not present, then let me know.

This is working, so far, at the cli version of windows.

Now create a file called info.php containing

<?php phpinfo(); ?>

And save that in your webroot somewhere.

Open your browser and open the info.php

Look for "Configuration File" and curl. See if the same config file is used (I use different ones for CLI/FCGI/CGI/ISAPI).

If you are using the same config file and curl is NOT present, restart your web server. Then recheck.

At this stage, any errors would be important.

Let me know.
xavier45Author Commented:
i couldn't get it to work because i'm lost

i did this "RIght click "My Computer" and choose Properties|Advanced|Environment Variables|System Variables|Path|Edit" and added this "C:\Program Files\xampp\php(thats my php installation dir)" but when i get to the command prompt it does not display that as part of the PATH items.

pls help
Richard QuadlingSenior Software DeveloperCommented:

You MAY need to reboot. I've never done so. Also, the change on affects NEW command prompt windows. Open ones CAN get the new environment, but I don't know how other than closing the program and then re-running it.
xavier45Author Commented:
ok i was able to go pass all that now and cmd loaded all the modules including curl but when i get to the phpinfo page i could not find curl anywhere on that page(even after restarting my webserver).
xavier45Author Commented:
i ngot it working now...
the problem is from me(or should i say from xampp - for placing the php config file in the apache bin dir)
like i said earlier i use XAMPP and while i was busy editing and updating the PHP config file in the PHP dir, little did i know the config file is in the APACHE bin dir.

it was earlier this morning that i check their website at and found out about it from the FAQ section.

who reads the manual these days -:)

anyway thanks much
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.