Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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

share|improve this answer
add comment

I had image not found error once and I could solve it by defining the extention with an absolute path.

So instead:

extension=foobar.so

This:

extension="/path/to/foobar.so"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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