开发者

Are there usually include_path/htaccess restrictions on hosts?

开发者 https://www.devze.com 2023-04-09 03:36 出处:网络
My .htaccess file looks like this: php_value include_path \"/home/username/public_html/site\" and is the same location as the include path.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号