curl-and-php
Re: Linux Curl PHP problem
Date: Sat, 25 Jul 2009 13:22:20 +0100
Hi Etienne
And Thank you for that (will try it on a new install), I am used to compiling things once then adding plugins or libraries (apart from scripts)! finding this extremely fascinating having to recompile something every time you add a new service like curl! (and in different parts of the system) I am used to *.EXE land..... I know my way around a windows server and i program in C++ and Perl but the Unix/Linux machine is a completely new beastie to me, even although Perl (in particular) started out here........
Please excuse me and my ignorance at the moment, still trying to understand the logic behind (what appears "to me") to be an illogical Unix folder structure! so very much a newbie on this level, although slowly becoming clear in some area's now.
anyway........
could not find curl in phpinfo (at all) so i cheated on this one and installed cpanel and got it to do it:) and it now works:~) Just needed to get this one working fairly rapid.
i am getting another machine at home and going to install Linux on it so I will be in contact again (without a doubt) if you all don't mind! in the meantime........
which flavor of Linux would you recommend? i.e. CentOS, Ubuntu, Fedora, Slackware, Debian! I thought of getting CentOS (Again) because it is on my server machine but if there is something better or recommended I will try that.
Paul
----- Original Message -----
From: Etienne Andreoni
To: curl with PHP
Sent: Thursday, July 23, 2009 12:41 AM
Subject: Re: Linux Curl PHP problem
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_at_edwards.org>
To: "curl with PHP" <curl-and-php_at_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
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-07-25