This is an update to my previous article: Installing PHP Soap on OSX Leopard 10.5.5

As a pre-note you need to ensure that you’re running PHP 5.3.6 and OSX Lion 10.7.2, if you try this on a different configuration it may not work. As of writing 10.7.2 is the latest version of the OS, and 5.3.6 is the default distributed PHP installation.

If you are unsure run the following 2 commands in terminal :

php -version
sw_vers

You’ll need to get the PHP source files to extract the Soap extension:

curl -O http://de3.php.net/distributions/php-5.3.6.tar.bz2
tar xjf php-5.3.6.tar.bz2
cd php-5.3.6
cd ext/soap
phpize
./configure
make
sudo make install

It should tell where it copied the soap extension, on OSX 10.7.2 it’s in : (/usr/lib/php/extensions/no-debug-non-zts-20090626/)

If you’re PHP installation is anything like mine you’ll need to enable the extension in your php.ini file.

We’ll need to add the extension (or at least ensure it’s there) :

sudo nano /etc/php.ini

If you get a blank file you’ll need to create this file, as by default OSX loads default settings instead of a custom php.ini file.

sudo mv /etc/php.ini.default /etc/php.ini

You can then edit the file.

Search for the extensions ctrl+w “extension” will jump to the extension section, go the bottom of this section and ensure that the last entry is :

extension=soap.so

Then press ctrl+o to write, enter to confirm ctrl+x to exit.

Now all that’s left it to restart apache and see if it worked.

sudo apachectl restart

Happy Soaping!

Note:

To get your PHP Info document create a .php file with the command

phpinfo();

in it and run this from a browser.

Tagged with:
 

One Response to Installing PHP Soap on OSX Lion 10.7.2

  1. [...] Note: There is an update for this article: Installing PHP Soap on OSX Lion 10.7.2 [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>