You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stephen <st...@rogers.com> on 2006/09/23 22:20:10 UTC

[users@httpd] Can't Get .htaccess Include Path to Work - Help!

I am working on a home server but setting it up like my web host.

I am getting an error in a PHP script when it can't find the included 
file because the path is the one specified in Apache's configuration and 
not my .htaccess file. Can someone see what I am doing wrong?

Here is the PHP error:

*Warning*: require_once(Database/MySQL.php) [function.require-once 
<http://www.stephenofroissytest.com/function.require-once>]: failed to 
open stream: No such file or directory in 
*/home/stephen/www/stephenofroissy.com/htdocs/work.php* on line *3*

*Fatal error*: require_once() [function.require 
<http://www.stephenofroissytest.com/function.require>]: Failed opening 
required 'Database/MySQL.php' 
(include_path='.:/usr/share/php:/usr/share/pear') in 
*/home/stephen/www/stephenofroissy.com/htdocs/work.php* on line *3

*Here is the userdir.conf file. I am using an Ubuntu distribution based 
on Debian.

<IfModule mod_userdir.c>
#    UserDir public_html
     UserDir htdocs
        UserDir disabled root
   
# Original
#    <Directory /home/*/public_html>
# My replacement   
    <Directory /home/stephen/www>
        AllowOverride All
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </Directory>
</IfModule>

And here is my .htaccess file:

# Set the include path
php_value include_path 
".:/usr/share/php:/usr/share/pear:/home/stephen/www/stephenofroissy.com/SPLIB/"

Thanks in advance!

Stephen




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't Get .htaccess Include Path to Work - Help!

Posted by Stephen <st...@rogers.com>.
I figured this out. As I expected it was something silly.

I misspelled   htaccess

Stephen wrote:
> I am working on a home server but setting it up like my web host.
>
> I am getting an error in a PHP script when it can't find the included 
> file because the path is the one specified in Apache's configuration 
> and not my .htaccess file. Can someone see what I am doing wrong?
>
> Here is the PHP error:
>
> *Warning*: require_once(Database/MySQL.php) [function.require-once 
> <http://www.stephenofroissytest.com/function.require-once>]: failed to 
> open stream: No such file or directory in 
> */home/stephen/www/stephenofroissy.com/htdocs/work.php* on line *3*
>
> *Fatal error*: require_once() [function.require 
> <http://www.stephenofroissytest.com/function.require>]: Failed opening 
> required 'Database/MySQL.php' 
> (include_path='.:/usr/share/php:/usr/share/pear') in 
> */home/stephen/www/stephenofroissy.com/htdocs/work.php* on line *3
>
> *Here is the userdir.conf file. I am using an Ubuntu distribution 
> based on Debian.
>
> <IfModule mod_userdir.c>
> #    UserDir public_html
>     UserDir htdocs
>        UserDir disabled root
>   # Original
> #    <Directory /home/*/public_html>
> # My replacement      <Directory /home/stephen/www>
>        AllowOverride All
>        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
>    </Directory>
> </IfModule>
>
> And here is my .htaccess file:
>
> # Set the include path
> php_value include_path 
> ".:/usr/share/php:/usr/share/pear:/home/stephen/www/stephenofroissy.com/SPLIB/" 
>
>
> Thanks in advance!
>
> Stephen
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org