URGENT HELP:Install php/cURL On CentOS 5

I installed curl and curl-devel but my application still has problem and says that:
"CURL is not installed or is disabled on your server"
 How is it possible to enable the cURL?

 
kenbyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Britt ThompsonSr. Systems EngineerCommented:
PHP has to be compiled with cURL for cURL to be available. Create a file named phpinfo.php with this bit of php code: <?php phpinfo(); ?>   this will show you what your PHP is compiled with. If it doesn't show --with-curl it needs to be recompiled with curl. Or, it could be that you have curl compiled and installed correctly but there's no SSL support enabled. If curl is compiled with your PHP install then scroll down in that phpinfo to the curl section and see if you see OpenSSL (version) in there.

Let me know what the status is and if this is your server or if this is at a domain host and I can help you get your stuff setup properly.
0
shobinsunCommented:
Hi,

Did you install php-curl?

yum install php-curl php-ssl

Try with it.

0
kenbyAuthor Commented:
@shobinsun:
yum install php-curl php-ssl -->
Result :

No package available for php-curl
No package available for php-curl

@renazonse:
here is the link of php.info :

http://72.55.148.217/~billing/info.php
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

kenbyAuthor Commented:
How to recompile php with cURL ?
by the way I want to keep my current php setting.
0
shobinsunCommented:
Hi,

try this:

wget http://curl.haxx.se/download/curl-7.18.2.tar.gz

tar -xzf curl-7.18.2.tar.gz
cd curl-7.18.2
./configure
make
make install
0
kenbyAuthor Commented:
@shobinsun:
I Installed this curl version, installation has been completed but I've still have the error!, I think that I've to compile php with curl ! but actually don't know how to do this! :(

So:
HOW TO COMPILE PHP WITH CURL ?
0
Britt ThompsonSr. Systems EngineerCommented:
Same process as above but you download php instead. this is your original configuration with the --with-curl added:

./configure --disable-pdo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pic --with-png-dir=/usr --with-ttf --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr  --with-curl

Make a backup first in case you run into trouble.
0
Britt ThompsonSr. Systems EngineerCommented:
Or, more detailed;

wget http://us.php.net/distributions/php-5.2.9.tar.gz

tar -xzf php-5.2.9.tar.gz

cd php-5.2.9

./configure --disable-pdo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pic --with-png-dir=/usr --with-ttf --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr  --with-curl

make

make install
0
kenbyAuthor Commented:
Hi,
I was wondering if  you please let me know what is the problem that the php 5.2.9 is not installed!! please take a look at the log:

root@cl-t048-462cl [~/php-5.2.9]# make install
Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /usr/bin/
Installing PHP CLI binary:        /usr/bin/
Installing PHP CLI man page:      /usr/man/man1/
Installing build environment:     /usr/lib/php/build/
Installing header files:          /usr/include/php/
Installing helper programs:       /usr/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar    - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR           - already installed: 1.7.2
Wrote PEAR system config file at: /usr/etc/pear.conf
You may want to add: /usr/lib/php to your php.ini include_path
0
kenbyAuthor Commented:
Check the phpinfo here : http://72.55.148.217/~billing/info.php
0
Britt ThompsonSr. Systems EngineerCommented:
You're not using the new PHP compilation...try this to get your site to use the new install:

mkdir -p /usr/lib/php/etc/php5/<DOMAIN-NAME>
cp ~/php-5.2.9/php.ini-dist /usr/lib/php/etc/php5/<DOMAIN-NAME>/php.ini

mkdir -p /<DOMAIN LOCATION ROOT>/cgi-bin
chmod 0755 /<DOMAIN LOCATION ROOT>/cgi-bin

cp /usr/lib/php/bin/php-cgi /<DOMAIN LOCATION ROOT>/cgi-bin/php.cgi

Finally, you need to add this to your site's .htaccess file to use
the version of PHP that you've just compiled:

AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi


Obviously replacing the items within the <> to your info
0
kenbyAuthor Commented:
No file or folder for :
/usr/lib/php/bin/php-cgi

Not found http://72.55.148.217/~billing/info.php
:(
0
Britt ThompsonSr. Systems EngineerCommented:
You need to find where your php-cgi was installed to:

cp /<PATH-TO-YOUR-PHP-CGI/php-cgi /<DOMAIN LOCATION ROOT>/cgi-bin/php.cgi
0
Britt ThompsonSr. Systems EngineerCommented:
Actually, if PHP is run as an Apache module "mod_php" you can do this in your .htaccess:

mkdir -p /usr/lib/php/etc/php5/<DOMAIN-NAME>
cp ~/php-5.2.9/php.ini-dist /usr/lib/php/etc/php5/<DOMAIN-NAME>/php.ini
SetEnv PHPRC /usr/lib/php/etc/php5/<DOMAIN-NAME>/php.ini
0
kenbyAuthor Commented:
Hi,
it does not work!
finally I found the solution myself! using cpanel you can use easyapache and when you going ahead the are multiple options from php version to extensions! .. now everything is working fine!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.