PHP in snow leopard

PHPphp.iniphp5

Snow leopard comes with PHP already installed and configured

I am running a web application on a development server which has MAMP and the system runs fine however when I put the application on a live server then I get this error

PHP Fatal error:  Call to undefined function bindtextdomain() in /Library/WebServer/Documents/centre/Warehouse.php on line 44

I got a solution to go to php.ini and change this line extension=php_gettext.dll
However the solution was for a windows machine when it comes to my mac the php.ini has the same line as that in windows and when i uncomment the line, I still get the same error

When i compare the MAMP php.ini and Snow leopard php.ini i realize the one in the MAMP folder has extension=gettext.so as an equivalent, when i paste this to the snow leopard php.ini i get an error

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so, 9): image not found in Unknown on line 0

is there a solution for this or should i just intall a new PHP on the mac

Best Answer

Go to this webpage and download the PHP 5.3.3-4 and install it. the PHP5 will be isntalled in the /usr/local/

http://taracque.hu/php5/

then go to you apache httpd.conf and add a line LoadModule php5_module local/php5/libphp.so

from there you will be good to go with php5 on snow leopard