Page 1 of 1

Installing curl with PHP 4 and Apache on Windows XP

Posted: Fri Jan 20, 2006 7:18 am
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

Posted: Fri Jan 20, 2006 8:14 am
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

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

Posted: Fri Jan 20, 2006 8:26 am
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

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

Posted: Fri Jan 20, 2006 8:29 am
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

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

Posted: Fri Jan 20, 2006 9:33 am
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:

Posted: Fri Jan 20, 2006 2:39 pm
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