Installing php-module using port on osx lion. It works from command line but not from apache
- by Lorraine Bernard
I installed php5-intl on my osx lion.
It seems to work properly on command line mode because if I try to run the following script (1):
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
echo "First Formatted output is ".datefmt_format( $fmt , 0)."\n";
> php -m |grep intl
intl
> php test.php
First Formatted output is Wednesday, December 31, 1969 4:00:00 PM Pacific Standard Time
But if I try to sun the same from my apache (after sudo apachectl restart) I get the following error:
> tail /private/var/log/apache2/error_log
PHP Fatal error: Call to undefined function datefmt_create() in
P.S.:
I also added the following line to my php.ini
extension_dir = "/opt/local/lib/php/extensions/no-debug-non-zts-20090626"
ll /opt/local/lib/php/extensions/no-debug-non-zts-20090626
total 848
-rwxr-xr-x 1 root 261712 7 May 10:54 xdebug.so
-rwxr-xr-x 1 root 168912 31 May 19:53 intl.so