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

curl-and-php

Re: Linux Curl PHP problem

From: Etienne Andreoni <etienne.sqad_at_gmail.com>
Date: Thu, 23 Jul 2009 01:41:19 +0200
Hi,

I think it'as a php compilation problem. Your apache do not know curl.

Running a phpinfo() in a index.php file, you must see :

curl

cURL support enabled
cURL Information libcurl/7.16.0 OpenSSL/0.9.8h zlib/1.2.3

If not you must recopile php.

If you can run curl in command line, it only mean that the curl bash library is enable. Nothing to do with php and apache.

I think you must download the last php release (official web site), and recompile all php

Try this

./configure --with-apxs2=/usr/local/apache2/bin/apxs  --prefix=/usr/local/apache2/php --with-config-file-path=/usr/local/apache2/php --with-zlib --with-gettext --with-gdbm --with-curl=shared,/usr/local/curl --with-openssl --enable-mbstring

Untill the curl appear in the phpinfo() it won't work.

Bye


DreamSight a écrit :
Hi Again
           also just tried

[root@]# yum list curl

and got..........

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* etc.
Excluding Packages in global exclude list
Finished
Installed Packages
curl.i386                      7.15.5-2.1.el5_3.4 installed
[root@]#

paul


----- Original Message ----- From: "Mark E" <mark@edwards.org>
To: "curl with PHP" <curl-and-php@cool.haxx.se>
Sent: Wednesday, July 22, 2009 5:13 PM
Subject: Re: Linux Curl PHP problem




DreamSight wrote:
Hi Mark
           thank you for your reply, i did not expect that as fast:) the kind of Linux is "CentOS release 5.3 (Final)" up to this point I have had lot's of experience with windows boxes but very little with Linux Server (Unix) machines, I am on a fast learning curve:)

Do a Google search on something like this:

yum curl php apache


But first, use the command "php -m" to see what modules are loaded into PHP. If you don't see curl listed then you need to install it. It's "yum" that you'd use to install packages into CentOS. So you need to make sure that you have the php-curl extension installed.

With that done PHP and curl should work from within Apache after restarting Apache.

You can also create a PHP file with the following code, then load the page in a browser to see how PHP under Apache is configured:


<?php
phpinfo();
?>



Mark
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php



_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-07-23