My .htaccess file looks like this:
php_value include_path "/home/username/public_html/site"
and is the same location as the include path.
It's causing a 500 internal service error, but was working fine locally. I'm digging around to try and find s开发者_开发百科omething via the host but not having much luck.
Without knowing the exact error message, it is difficult to tell what is going wrong. As Pekka explained, one reason could be that mod_php is not used. This could be the case, for instance if suPHP or any other variant based on PHP's CGI interface is used.
If that's the case AND if you are using PHP 5.3.0 or later, you could create a per-directory configuration using a .user.ini
file1. So instead of using a .htaccess
file with the line
php_value include_path "/home/username/public_html/site"
you would use a .user.ini
containing the line
include_path = "/home/username/public_html/site"
1) Note that this is the default file name. The file may have a different name (the file name is configured through the INI directive user_ini.filename
) or may be disabled completely.
In Centos, the default include_path is:
.:/usr/share/pear:/usr/share/php
精彩评论