Installing curl with PHP 4 and Apache on Windows XP

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Installing curl with PHP 4 and Apache on Windows XP

Post by raghavan20 »

I have already seen the thread here

I have uncommented the appropriate line in php.ini at j:/php-4.4.2/php.ini-dist and at c:/windows/php.ini-dist as well. I do not really know to which file I should make the change.

Code: Select all

;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_mbstring.dll
extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
extension=php_curl.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
I have done this as well in both ini files

Code: Select all

; Directory in which the loadable extensions (modules) reside.
extension_dir = "j:/php-4.4.2/extensions"
But I have downloaded the curl package and extracted it at
j:/curl/libcurl-7.15.1

I have restarted the Apache after I made the change to the ini file
But this is the error message when I run a curl command.

Code: Select all

echo curl_version();

Fatal error: Call to undefined function: curl_version() in j:\apache\apache\htdocs\test\timediff.php on line 20
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Moved to Web Servers.


curl under php and windows requires 2 libraries in the PATH: libeay32.dll and ssleay32.dll. It does not require libcurl.dll.

If you don't believe me, read the note under installation in the manual: http://php.net/curl#curl.installation
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Re: Installing curl with PHP 4 and Apache on Windows XP

Post by redmonkey »

raghavan20 wrote:I have uncommented the appropriate line in php.ini at j:/php-4.4.2/php.ini-dist and at c:/windows/php.ini-dist as well. I do not really know to which file I should make the change.
You might want to think about renaming that file to php.ini
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: Installing curl with PHP 4 and Apache on Windows XP

Post by feyd »

redmonkey wrote:
raghavan20 wrote:I have uncommented the appropriate line in php.ini at j:/php-4.4.2/php.ini-dist and at c:/windows/php.ini-dist as well. I do not really know to which file I should make the change.
You might want to think about renaming that file to php.ini
That's a good point too :P
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Installing curl with PHP 4 and Apache on Windows XP

Post by Chris Corbyn »

redmonkey wrote:
raghavan20 wrote:I have uncommented the appropriate line in php.ini at j:/php-4.4.2/php.ini-dist and at c:/windows/php.ini-dist as well. I do not really know to which file I should make the change.
You might want to think about renaming that file to php.ini
LOL.... :lol:
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Long time ago, I had php in my system, that old php.ini was used for a long time and the new php.ini-dist file was not used at all. So, I deleted the older one and now renamed the new php.ini-dist as php.ini after which it started to recognize loading of modules.

But I am not able to load the modules...It says two files are missing and it says that three times before it starts Apache.

Code: Select all

The two files are,
1. ssleay32.dll
2. libmcryptl.dll (I am trying to add mcrypt module as well)

Code: Select all

PHP Warning:  Unknown(): Unable to load dynamic library 'j:/php-4.4.2/extensions
\php_curl.dll' - The specified module could not be found.
 in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library 'j:/php-4.4.2/extensions
\php_mcrypt.dll' - The specified module could not be found.
 in Unknown on line 0
Apache/1.3.34 (Win32) PHP/4.4.2 running...


I downloaded the libmcrypt.dll into j:/php-4.4.2/extensions/libmcrypt.dll
I have a doubt, if I install apache from J:, where the application(.exe) file would be, at C: or J:. I think this file is reporting for missing dll files.
Anyway, I thought setting path would be useful...Here is the path...

Code: Select all

C:\WINDOWS>set path
Path=C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Pro
gram Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\B
in;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\j
dk1.3.1_15\bin;j:/php-4.4.2/extensions/libmcrypt.dll;j:/php-4.4.2/dlls/ssleay32.dll;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
Post Reply