Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have both Apache and PHP set up manually, albeit the latter without CURL.

There is this jungle of instructions and explanations on extensions for PHP.

I have a very straightforward question - what do I need to do to enable CURL in a more dynamic way. I resent the idea of static linking, in fact I hate and avoid static linking like the plague. Is it possible to have my Apache and PHP understand that there is CURL in town? I can compile CURL if necessary.

I would like to know how to accomplish this without package management, i.e. building it all myself.

share|improve this question
add comment

1 Answer

No you don't need to recompile.

there 3 different ways to enable/install php5-curl extension on Ubuntu. all of them are easy. here is the link to that. http://php.net/manual/en/install.pecl.php last 3 options starting with "compiling..." all works for you. apply any of them. get curl.so file in extensions directory of php installation. then edit related extension line in php.ini file. restart the apache.

btw, dpkg can not update the installation via deb/apt, because you didn't use precompiled packages so it's normal behaviour of apt.

why do you need to remove suhosin patch ?

share|improve this answer
    
As I said, package management is out of the question, firstly because Ubuntu only supplies a "modded" PHP with Suhosin, and second, because currently my PHP is /usr/local so most likely any supplemental package like php5-curl will assume another PHP5 installation altogether. I need to remove the patch because it is not as stable as most people would have it to be - it hangs my scripts that manipulate images with GD, which does not happen with vanilla PHP install. Hence I assume Suhosin is to blame. –  amn May 19 '10 at 20:22
    
i'm also using GD & imagemagick for image manipulation. and i've never met any problems caused by suhosin patch. but never used vanilla. maybe you may double check vanilla's code. so did you install php-curl extension ? –  risyasin May 19 '10 at 20:38
    
The problems are occasional, at which point PHP stops doing any useful work - i.e. script produces unexpected errors, f.e. GD image routines returning errors where otherwise they don't. 'vanilla' refers to the 5.3.2 version of PHP I built myself. I did not yet install php-curl, currently reinstalling PHP, because yesterday, to be sure, I wiped it and Apache out. Apache is now up, PHP is next due now, and then I will install php-curl with PEAR/PECL. Thanks. –  amn May 20 '10 at 10:20
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.