thesirwolf
asked on
PHP recompile and cURL support
Hi,
I just compiled PHP but forgot to add curl (--with-curl) while compiling also added memcached support (which took a lot to make it work) and now server is on production so i need to be sure if i recompile with curl extension loaded memcached configuration and support wont lost.
Or is there any other way to load curl extension without recompiling ?
I am using Php 5.3.14 on Centos 5.8 with Lighttpd
I just compiled PHP but forgot to add curl (--with-curl) while compiling also added memcached support (which took a lot to make it work) and now server is on production so i need to be sure if i recompile with curl extension loaded memcached configuration and support wont lost.
Or is there any other way to load curl extension without recompiling ?
I am using Php 5.3.14 on Centos 5.8 with Lighttpd
You should have a config.status in your PHP source folder that contains your original ./configure command. You should be able to simply copy that configure command, add whatever else you need, and re-run the whole process. Back up any php.ini or other config files (if you have any others) just in case.
What gr8gonzo said. In addition to having a backup, you might want to consider having a test bed with its own server so you can try things like this without any risk to the production systems.
No points for that, thanks, ~Ray
No points for that, thanks, ~Ray
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Also a note on the shared module stuff - PHP versions HAVE to match. You should NEVER try to take a shared module that was built from the source of PHP 5.3.1 and use it with a PHP 5.3.2 version, for example. Sometimes they will work, but there's no guarantee that it will be reliable (even if a few basic tests seem to work).
So when you upgrade PHP in the future, just remember to add the "--with-curl=shared" (or whatever module you want as an ".SO" file) so that you end up with updated versions of the module along with all the normal PHP stuff.
So when you upgrade PHP in the future, just remember to add the "--with-curl=shared" (or whatever module you want as an ".SO" file) so that you end up with updated versions of the module along with all the normal PHP stuff.
A final note - I promise this is the last one - don't be scared of recompiling PHP. Get used to the process if you're building from source. It's not a process to be feared, even if it took a long time to get memcached configured right. Usually once you're past a hurdle, you're in the clear, and you can recompile all the time if you want to.
Get extremely comfortable with it so that you can upgrade quickly when new versions come out that have security patches and bug fixes. You don't want to be sitting on insecure versions of PHP, waiting for attackers.
Get extremely comfortable with it so that you can upgrade quickly when new versions come out that have security patches and bug fixes. You don't want to be sitting on insecure versions of PHP, waiting for attackers.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I'm kinda sure compiling curl as shared module can work but i got conflicts so it did not. Recompiling is better way to do it in my opinion.