can I easily recomplie PHP with all my current settings and enable SOAP with the new configuration?

StackOverflow https://stackoverflow.com/questions/1374948

  •  21-09-2019
  •  | 
  •  

Question

I have PHP 5.1.6 running with a ton of mods and extensions enabled, is there a way to reconfigure the current settings as well as add SOAP to the mix?

Was it helpful?

Solution

Yeah; if you do php -i|grep 'Configure Command', that will show you the current build options for your recompile. Just add the option for SOAP to that.

OTHER TIPS

If you have the source-code of that version of PHP (pretty old, but you surely can find it somewhere ; for instance : http://www.php.net/releases/#5.1.6 ), yes, you can :

  • use phpinfo() or php -i : in the output, there will be the "configure" line that was used to build your current version of PHP
  • go to the sources directory, and run that configure line, with all its options ; don't forget to add the --enable-soap (If I remember correctly), to add the new extension !
  • Then build as you'd always do (make, make install)

And voila ;-)

And when you have the new PHP executable and/or module, just keep using the same php.ini, so you don't have to reconfigure everything.

for CentsOS 5 (Linux) I just found that I could use yum install php-soap and then restart Apache

php -i|grep 'Configure Command'

does not seem to work anymore. You can do

php-config

depending on your Linus distro you might be lucky and find you can simply install php-soap through your package manager

yum install php-soap for CentOS, or apt-get install php-soap for Debian/Ubuntu etc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top