cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: Install extension Curl with PHP on NT

From: Fluteau Jerome ICM N PG U PLM A 2 <Jerome.Fluteau_at_icn.siemens.de>
Date: Thu, 10 Oct 2002 13:33:43 +0200

FYI:

I wanted to import an https Web pages thanks to fopen("https://xxx", "r") or
fsockopen but as far as I read, it was only possible with cURL extension (to
get these functions worked with https, we have to wait the PHP 4.3 release,
TBC) , so I installed it and it worked. It is quite easy, but I spend to
much time on it:
First of all, here is the most important: WE DON'T NEED to compile anything
to get curl worked. All the extensions that we need are already in the PHP
4.2.3 zip. So here are the instructions and links to get Apache + PHP + CURL
work properly:

Downloads:
=> Apache Web server with Openssl included:
 
http://www.modssl.org/contrib/ftp/contrib/Apache_1.3.26-Mod_SSL_2.8.9-OpenSS
L_0.9.6d-WIN32.zip

=> PHP 4.2.3 for Windows:
   http://www.php.net/get_download.php?df=php-4.2.3-Win32.zip

=> Optional: Openssl zip to get libeay32.dll and ssleay32.dll (I didn't need
them because I used those stored in PHP zip)
http://www.modssl.org/contrib/ftp/contrib/OpenSSL-0.9.6d-Win32_RAR3_Archive_
.rar

Installs:
=> Unzip Apache in Program Files folder(there should be no problem with the
blank in the path):

=> Follow those instructions:
http://tud.at/programm/apache-ssl-win32-howto.php3 . I didn't exactly do
what they wrote but it helped a lot. I created the test certificat thanks to
this link in order to test my Apache server with SSL.

=> Configure httpd (easy to find on the Web) and test Apache before going
on, it avoids problems.
   I just changed the Port from 80 (http) to 443 (https) in httpd, I only
wanted to perform https.
   I didn't try to get the both working together.

=> Unzip PHP in C:\Php path (don't install it in Program Files folder, you
would have troubles because of the blank this time...)

=> Configure PHP :
http://www.php.net/manual/en/install.windows.php#install.windows.manual
   WARNING: php.ini MUST be stored into the c:\winnt folder and the dlls
must be stored into the c:\winnt\system32 folder.

=> Test it with Apache and phpinfo() function.

cURL:
To add cURL extension, YOU DON'T NEED to compile anything.
All the extensions that you need are in the C:\php\extensions folder. To add
cURL or any other extensions:

=> Have the libeay32.dll and ssleay32.dll in the system32 folder (already
done if you installed PHP)

=> Copy all dlls from php/dll/ folder to winnt/system32/ (libeay32.dll and
ssleay32.dll are already there if you followed
   the previous steps)

=> Remove the ";" in front of extension=php_curl.dll in php.ini.

Those instructions come from:
http://www.php.net/manual/en/install.windows.php#install.windows.extensions

And it should work, just test it with curl functions into your php script.

Hope this will help. If I did right, you have all the information that you
need.
If I forgot anything or if you have questions, please let me know.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-10