I am running multiple PHP apps on my Mac, running OS X 10.5.6, Apache 2, PHP 5. I have subdomains setup for each project, a host file entries for each subdomain, and Virtual Directory blocks in the Apache config. So
project1.localhost goes to /Library/WebServer/Documents/Project1
project2.localhost goes to /Library/WebServer/Documents/Project2
etc...
However, this method doesn't really "isolate" the web apps. For example, if I include a script like so:
<?php
include("/includes/include.php");
?>
It references the script from the base directory of my computer. So it accesses
C:/includes/include.php
Is there a way for me to make it reference
C:/Library/WebServer/Documents/Project2/includes/include.php
Basically, make it so that its not aware of anything outside of its own directory. Also, is there a way to use php.ini's on a per subdomain basis as well?
max_file_uploads is a setting managed through the PHP Options which sets the maximum number of files that can be uploaded at a time. While do not allow direct changes to PHP.
ini using disable_functions directive. This directive allows you to disable certain functions for security reasons.
I believe it's possible to set a php.ini per virtual host
<VirtualHost *:80>
...
PHPINIDir /full/path/to/php/ini/
</VirtualHost>
this way you can customize open_basedir and others
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With