PHP Configuration File on XServe

Mindwatering Incorporated

Author: Tripp W Black

Created: 02/18/2007 at 06:19 PM

 

Category:
OS X Configuration
Web Service - PHP, Software Update

PHP Configuration is in the php.ini.

On OSX apple doesn't actually ship the server with one. So when you enable the PHP module, it runs on internal defaults.

To get the PHP path, open up Safari or Firefox, and simply enter the servers name followed by info.php (e.g. www.mindwatering.com/info.php).
On this page you can see the php.ini configuration folder in the 1st section. Common default locations are: /etc/php.ini (or /private/php.ini) and /usr/local/lib/php/
Create a php.ini in that folder from the php.ini.default file, and restart Apache to have PHP no reference the folder.
Notes:
Copy default file: sudo cp /etc/php.ini.default /etc/php.ini
Restart Apache using the GUI or the command apachectl restart.

Make following changes:
1. Turn on Safe Mode (safe_mode = On).
2. Set the Safe Mode Execution Directory (safe_mode_exec_dir = ...) This sets user to only execute from their document root.
3. Check the Dynamic Module Loading (enable_dl = On) and think about setting it to Off. The reason is that with dynamic loading it is possible to circumvent Safe Mode.

Make sure you include Squirrelmail directories in php.ini as safe folders.
(You have to keep adding directories to the include_path variables.)


previous page

×