Setting custom php include path in .htaccess on mac os x
in
/Users/username/Sites/somesite/.htaccess
I have
AllowOverride All
php_value include_path ".:/Users/username/Sites/somesite/inludesFolder:/usr/lib/php"
I have also modified
/etc/apache2/httpd.conf
to
AllowOverride All
and restarted websharing, but it's not finding the a开发者_运维百科dditional include path. I'd like to avoid modifying the php.ini or setting this additional include path with the PHP
The AllowOverride
within the .htaccess
file itself isn't legal like that, and might be causing an error that stops further processing. Since the point of AllowOverride
is to restrict what .htaccess
files can do, it isn't usually useful within an .htaccess
file. Try taking it out and see if it works.
Also, rather than modify /etc/apache2/httpd.conf
, Mac OS X's configuration is set up so that you drop a file in /etc/apache2/users
to configure your own directory. Files in there will persist across system updates and even upgrades!
For example, on my system, the file `/etc/apache2/mark' is:
<Directory "/Users/mark/Sites/">
Options Indexes MultiViews SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
精彩评论