
|
View Full Version : Need help with strange cURL / PHP 4.3.7 issue: claims cURL is not installed
sscooter1010 08-08-2004, 10:26 PM Parts of this may look like a programming question, but I am pretty sure that it is an admin situation. I am a programmer, but thought that I might post this question for my admin, as we are both stuck.
Whenever the curl_init() function is called, this is what I get in the browser:
Fatal error: Call to undefined function: curl_init() in /my/folder/public_html/php/lphp.php on line 285
Most people have said at this point: It looks like cURL support has not been compiled into PHP.
However, this is the output of the php -m command:
Here is the output of php -m:
root@myserver [~/install/php-4.3.7]# php -m
[PHP Modules]
bcmath
calendar
ctype
curl
exif
ftp
gd
gettext
imap
mbstring
mcrypt
mhash
ming
mysql
overload
pcre
posix
session
sockets
standard
swf
tokenizer
wddx
xml
zlib
[Zend Modules]
Does this make sense to anyone as to why the curl_XXX() functions are not available??
TIA!
sscooter1010
Steven 08-08-2004, 11:00 PM You should upgrade to 4.3.8 due to security problems in the prior version.
make a phpinfo page
<?
phpinfo();
?>
Does it say curl is installed?
sscooter1010 08-09-2004, 11:36 AM On that page, the "Configure Command" reports the following:
'./configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysql=/usr' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-imap=/usr/local/imap-2004/' '--with-kerberos=/usr/kerberos/'
(to me, it doesn't appear that the curl switch has even been supplied to the compile, but I'm not an expert about that.)
In the Configuration section, under PHP Core, the following subheadings are displayed:
....
bcmath
calendar
ctype (should I have expected a curl entry here??)
....
Later into the page, there is an "Additional Modules" with an empty table following.
Doing a search for the word "curl" in the page reveals no matches.
The webmaster is confused, due to the fact that curl appears in the php -m command, yet phpinfo(); does not appear to reveal any sign of it being installed.
sscooter1010 08-09-2004, 11:38 AM Additionally, thanks for the suggestion to upgrade to 4.3.8.
sscooter1010
AlexF 08-09-2004, 06:20 PM I had the similar program when I tried to recompile Apache with PHP 4.3.8, curl, curl SSL, mcrypt via WHM/cPanel [FreeBSD]. I ended up having to recompile Apache a few times, meaning unchecking PHP 4.3.3, then building again with 4.3.3. & 4.3.8 and other options, then just 4.3.8 with other options. Confusing, I know but it was the only way to get it going.
sscooter1010 08-09-2004, 06:25 PM Does this make any sense?
The credit card processing company (yourpay dot com, or YP for short) said that what the guys need to do is to compile Apache with curl first, then recompile PHP.
(All of this stuff is over my head anyway!!)
The crux of the matter, as the YP support tech mentioned, was that Apache must first of all have the module installed, *then* recompile PHP with support for curl afterward.
From AlexF's comment, it seems like that is a likely possibility...
linux-tech 08-09-2004, 06:43 PM have you updated or upgraded curl since the php installation?
It's entirely possible you're running 2 versions of curl, one rpm and one compiled, which can produce very unusual results.
sscooter1010 08-09-2004, 06:50 PM Thats a good question. I'm not sure, but I'll forward to the appropriate folks.
Thanks for the tip.
madguy24 08-10-2004, 02:48 AM Sorry may be I am wrong..I doubt PHP has to be compiled with the '--with-curl' option inorder to this to work.
In your PHP Info Pages down the list see whether its is displayed somewhat similar to...
========================
CURL support enabled
CURL Information libcurl/7.12.0 zlib/1.1.4
========================
Thanks
Maddy
|