开发者

php include in .htaccess not getting set

开发者 https://www.devze.com 2023-03-15 19:12 出处:网络
I am trying to set the include path for php in my htaccess file.It works on my local computer but on my dev server it doesn\'t work.Both ubuntun running apache2.2Here is my .htaccess file:

I am trying to set the include path for php in my htaccess file. It works on my local computer but on my dev server it doesn't work. Both ubuntun running apache2.2 Here is my .htaccess file:

AddType application/x-httpd-php .html .htm .php
# ---------------------------------------------------------------------------
# PHP.INI VALUES
# Upload Variables, Include Path, Etc
# ---------------------------------------------------------------------------

php_value include_path "/var/www/includes:.:/usr/local/lib/php:/var/www/"
php_value upload_max_filesize 5242880
php_value post_max_size 5242880
php_value memory_limit 32M

# --------------------------------------开发者_StackOverflow-------------------------------------
# Prepend File
# ---------------------------------------------------------------------------
php_value auto_prepend_file "/var/www/includes/prepend.php"

    <Limit GET POST>

    order deny,allow

    deny from all

 allow from all

</Limit>

<Limit PUT DELETE>

        order deny,allow

    deny from all

</Limit>

I am lost as to why this isn't working. Any ideas?

The apache error is saying: PHP Fatal error: require_once(): Failed opening required 'db.inc.php' (include_oath='.:/usr/share/php:/usr/share/pear') in /var/www/concert2.php on line 3


Check:

  • Your directory structure is the exact same
  • Apache has permissions to read this file
  • The path in your code. Make sure there's no typos, etc.

This related article might help: PHP Fatal Error Failed opening required File

In my experience, these problems are almost always either path related (you're not actually pointing where you think you're pointing) or permissions related.

0

精彩评论

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