I'm presently establishing my New Mac Small Lion server. I'm now setting up mongodb and apc extension. I wish to range from the ini configurations for that extensions around the /etc/php.d directory (similar with my server configurations on centOS)

I attempted to complete

php -i | grep php.d

also it provides me with

Scan this dir for additional .ini files => /etc/php.d/
Additional .ini files parsed => /etc/php.d/apc.ini,
PHP_INI_SCAN_DIR => /etc/php.d/
_SERVER["PHP_INI_SCAN_DIR"] => /etc/php.d/

However when I attempted on phpinfo() on the php script, I acquired:

Configuration File (php.ini) Path   /etc
Loaded Configuration File   /private/etc/php.ini
Scan this dir for additional .ini files     (none)
Additional .ini files parsed    (none) 

The php atmosphere on CLI and php script is identical which php


as well as on php script page

PATH /usr/bin:/bin:/usr/sbin:/sbin

Can there be anything I ought to set around the apache side?

I'm thinking to stay using the Built-in apache and php in the mac installation because I love the Server Application from Mac.

Help me.


I simply did this another evening, even though it was this is not on Lion Server.

sudo nano /etc/apache2/httpd.conf


#LoadModule php5_module   libexec/apache2/libphp5.so

then restart apache

sudo apachectl restart -t

Furthermore, you will have to

cd /etc
sudo cp php.ini.default php.ini
sudo chmod 666 php.ini

I'd also recommend setting up php.ini (essentially every module is disabled).