Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Did you restart the server? –  Daniel Andersson May 4 '12 at 10:59
    
yes, did a full stop and start –  Rooneyl May 4 '12 at 11:12
add comment

1 Answer

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.

share|improve this answer
    
Like like the curl didn't install properly as I can't find curl.so. –  Rooneyl May 4 '12 at 12:33
1  
I found an article which mentioned the need to install the curl development libraries. I also found a topic on StackOverflow that might help: stackoverflow.com/questions/4976971/… –  Melikoth May 4 '12 at 18:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.