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.

Package management may be out of the question, because I built PHP myself - I am on Ubuntu, and it does not provide PHP without Suhosin and a a whole lot of time, so I removed it and built PHP myself. The whole slew of related questions simply propse installing "php5-curl" package, which is exactly one thing I CANNOT do since it installs it in a completely unrelated directory, which my PHP does not even seem to bother linking to.

link|improve this question
feedback

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 ?

link|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
feedback

Your Answer

 
or
required, but never shown

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