Forum Moderators: coopster

Message Too Old, No Replies

Can't install cURL on local host

         

neophyte

9:27 am on Aug 24, 2014 (gmt 0)

10+ Year Member



Hello All -

I want to install cURL on my local dev environment but for some reason I can't get it to work.

Been researching the web on how this is done and it looks like I've get everything right - according to what I've read - but can't get phpinfo() to confirm that it's installed.

I'm using a manual install of PHP 5.3.6 and Apache 2.2 (not WAMP or anything like that) that I've been developing with for the past few years.

What I've done is the following:

1. un-commented php_curl.dll in my php.ini file
2. verified that php_curl.dll is in php>ext directory
3. downloaded a cURL msi installer and ran it
4. verified that cURL has been installed and is in my environmental variables list (C:\Users\John\AppData\Local\Apps\cURL\bin)
5. restarted apache

Then I ran phpinfo() and still no love.

Can someone please let me know what I'm doing wrong?

brotherhood of LAN

3:57 pm on Aug 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Check that the php.ini file you edited is the same on your see in phpinfo(), there's usually 2 ini's, one for the CLI and one for your webserver.

Also try phpinfo() from the command line using `php -a`

brotherhood of LAN

5:29 pm on Aug 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's been a while since I installed WAMP but also turn on error reporting and try and use the curl functions... you may find that you need a couple of extra DLLs like ssleay.dll in order for the cURL library to be runnable.

neophyte

7:48 am on Aug 25, 2014 (gmt 0)

10+ Year Member



Hi Lan -

Thanks for the reply.

As mentioned, I did a complete manual install of PHP/Apache (not WAMP) so the only php.ini file I have (which has always worked fine) is located here: Loaded Configuration File: C:\PHP\php.ini.

I do not have a php.ini file anywhere in the Apache folder.

I have also verified that ssleay.dll IS in the root of my PHP folder.

I did try to call curl_init and got the following expected response: Fatal error: Call to undefined function curl_init() in (file and directory info).

Went back on the web for more research but can't find anything about how to enable cURL in a manual PHP/Apache install... (all I can find on the topic references WAMP or Joomla or something else)... Darn!

Any other ideas on how I can get this running? Anyplace you (or anyone) can point me too in order to help me solve this?

Great appreciation in advance to all readers/responders.

neophyte

9:27 am on Aug 26, 2014 (gmt 0)

10+ Year Member



Hello All -

Finally got it working. Found a website which simply instructed:

"If you're using Windows, you can enable Curl support by copying the files libeay32.dll and ssleay32.dll into your c:\windows\system32 folder, then enabling the extension in your php.ini file. Look for the line ";extension=php_curl.dll" and take the semi-colon off from the beginning."

Thanks to LAN and anyone else who took a look at my post

penders

5:57 pm on Aug 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the follow up. Just curious, what does the cURL msi installer do?

neophyte

12:31 am on Aug 28, 2014 (gmt 0)

10+ Year Member



Hi Penders -

According to the website of the guy who built the installer, it provides:

A full-featured, fully functional 64-bit build of cURL and libcurl - SSL, SSH, the whole thing.
A correctly named SSL cert-bundle so people could start curling immediately, and the download scripts for serious users to stay up to date. And of course, instructions on how to use them.
All the documentation, readable on Windows' default text editor.
A windows installer for easy setup, especially for beginners.

I compiled cURL from the official source distribution with Visual Studio 2012 Express [Update 02/11/14: As of version 7.35.0, I'm using Visual Studio 2013 Express]. I used OpenSSL for SSL capability, libssh2 for SSH, and zlib for compression. I then converted all of the line endings of the text files, and arranged all of the HTML manuals in a folder. Finally, I learned how to use Wix to build an MSI installer.


He says a lot more than just the above. I don't think that I can provide a link here, but if one were to google "curl msi" then you can find the site with the installer and full explanation.

I'm not promoting this package but it worked for me.

Even after installing it, however, cURL still didn't work for my PHP development until - as noted in my previous post - that I had to copy libeay32 and ssleay32 into my system32 folder, un-comment extension=php_curl.dll in my php.ini and then restart Apache.

All of those breadcrumbs to eventual success were found from different venues (including a clue from this site via Brother of Lan).