Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Apache and PHP with cURL

General Tech Bugs & Fixes
Max. 2000 characters
Replies

usr_profile.png
Peter Jarvis

User

( 6 months ago )

 

I am running Sun server with Solaris 10/SPARC.

I had/have Apache 1.37 with PHP 5.2.1 running as a dynamic extension, and want to enable cURL support. I have tried to re-compile PHP with the --with-curl-lib switch, and it doesn't seem to work.

This was my compile instructions;

./configure \
--with-apxs=/usr/apache/bin/apxs \
--prefix=/usr/php5 \
--with-mysql=/usr/mysql \
--with-mysqli \
--with-mcrypt \
--with-gd \
--with-jpeg-dir=/usr/mysql/mods \
--enable-mbstring \
--with-zlib \
--with-curllib=/usr/local/curl-7.25/lib \
--enable-pspell

make && make install

After doing this I did a test using;

<?php
if  (in_array  ('curl', get_loaded_extensions())) {
  echo "test1 == TRUE\n";
} else {
 echo "test1 == FALSE\n";
}

echo "test 2\n";
if  (function_exists('curl_open')) {
  echo "test2 == TRUE\n";
} else {
   echo "test2 == FALSE\n";
}
?>

The results are FALSE for both tests, what am I doing wrong?

usr_profile.png
Brian Burl

User

( 6 months ago )

If the linux build has a php.ini file you may need to add/uncomment a line like the following. I've only had experience with the windows binaries, in which all that is required is to uncomment a line.

extension=php_curl.dll //This line is in the windows php binaries.

extension=curl.so //This seems to be the one linux uses from what I can gather.

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif