NuSphere Forums
 Installing the Curl extension - resolved

 Joined: 20 Apr 2007 Posts: 25 Location: UK
 Posted: Sun Jun 03, 2007 4:22 pm
I copied and pasted the php_curl.dll windows binary for php 5.1.6 in to the php extensions folder and uncommented extension=php_curl.dll in the php.ini file.

I get Fatal error: Call to undefined function curl_init() when I try to run.

What important little thing have I not done to enable the curl extension?

Last edited by FatBob on Tue Jun 05, 2007 3:53 am; edited 1 time in total

 Joined: 10 Dec 2006 Posts: 37
 Posted: Sun Jun 03, 2007 6:12 pm
FatBob,
This might not be your specific issue, but you do need to make sure that your extensions and your PHP exe's have the same version number. That's caught me out a few times.

Andy

 Joined: 20 Apr 2007 Posts: 25 Location: UK
 Posted: Mon Jun 04, 2007 12:06 am
Thanks Andy,

I checked the version of php with phpinfo and it was 5.1.6 and then downloaded the dll binary from php.net for the corresponding version. What else could it be?

 Joined: 10 Dec 2006 Posts: 37
 Posted: Mon Jun 04, 2007 3:07 am
That's wierd.

The only thing I can think of that might help is to create a file

<?
phpinfo();
?>

Then run that and share the output. Maybe there's something we can spot together.

For the record, you've done exactly what I've done, plus I needed to copy libeay32.dll and ssleay32.dll to the /php folder (not the extensions folder). However, I've just tested, and if I delete those files, I do not get the same error as you - I get an "application could not start" error.

Regards,
Andy

 Joined: 20 Apr 2007 Posts: 25 Location: UK
 Posted: Mon Jun 04, 2007 3:18 am
Is it OK to post a whole phpinfo file on here?

I have pm'd you a copy - Thanks

Last edited by FatBob on Tue Jun 05, 2007 3:18 am; edited 1 time in total

 Joined: 20 Apr 2007 Posts: 25 Location: UK
 Posted: Mon Jun 04, 2007 3:22 am
I added libeay32.dll and ssleay32.dll to the /php folder but the result is, as you predicted, the same.

 Joined: 10 Dec 2006 Posts: 37
 Posted: Mon Jun 04, 2007 3:28 am
Got it.

Curl is not enabled, somehow.

You've got :

ctype
ctype functions enabled

** CURL SHOULD APPEAR HERE
** eg.
** cURL support enabled
** cURL Information libcurl/7.16.0 OpenSSL/0.9.8d zlib/1.2.3

date
date/time support enabled
Timezone Database Version 2006.1
Timezone Database internal
Default timezone Europe/London

Some things to do (very basic I admit - no offence intended!)

- Double check that the php_curl.dll is in C:\Program Files\nusphere\phpdock\php\extensions\

- Double check that in C:\Program Files\nusphere\phpdock\php\php.ini you have uncommented the line for PHP curl - did you save it OK

- Restart the application - after making sure that phpdock.exe is not running in the background via Windows Task Manager

Hope that helps,
Andy

 Joined: 20 Apr 2007 Posts: 25 Location: UK
 Posted: Mon Jun 04, 2007 3:50 am
Offence taken on the chin!!

I was using a different phpdock, so the php-cgi.exe location setting in the phpdock.ini needed to be changed.

Many thanks Andy, I accept the Doh award for the day.

 Joined: 10 Dec 2006 Posts: 37
 Posted: Mon Jun 04, 2007 3:54 am
You're turn for the award today.

My turn tomorrow.