You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Neil Freeman <ne...@asa.co.uk> on 2002/02/04 17:06:45 UTC

How do I get htaccess files to take effect?

Hi,

This is my first time attempting to use htaccess files. I am running
Apache 1.3.20 with PHP v4.0.6 installed as a module. Within Apache's
httpd.conf file I have the following value set:

AccessFileName apache.htaccess

And within an 'Alias' directory I have a file entitled 'apache.htaccess'

which contains the following:

<IfModule mod_php4.c>
    php_value include_path = ".;C:/My/PHP/Dir"
</IfModule>

What I am attempting to do is alter PHP's include path 'on the fly'
rather than specifying an overall value within php.ini. The problem I
have though is that the 'include_path' value does not appear to be
picked up. Am I using htaccess files correctly or do I need to alter
some other values within Apache's httpd.conf file?? Would I need to
setup <Directory></Directory> maybe?

If anyone could give me any pointers on this it would be much
appreciated.

Neil
--------------------------------
 Email:  neil.freeman@asa.co.uk
         neil_freeman@yahoo.com
--------------------------------



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: How do I get htaccess files to take effect?

Posted by Neil Freeman <ne...@asa.co.uk>.
Thanks for the help Owen....we have success :)

Owen Boyle wrote:

> Neil Freeman wrote:
> >
> > Hi,
> >
> > This is my first time attempting to use htaccess files. I am running
> > Apache 1.3.20 with PHP v4.0.6 installed as a module. Within Apache's
> > httpd.conf file I have the following value set:
> >
> > AccessFileName apache.htaccess
> >
> > And within an 'Alias' directory I have a file entitled 'apache.htaccess'
> >
> > which contains the following:
> >
> > <IfModule mod_php4.c>
> >     php_value include_path = ".;C:/My/PHP/Dir"
> > </IfModule>
> >
> > What I am attempting to do is alter PHP's include path 'on the fly'
> > rather than specifying an overall value within php.ini. The problem I
> > have though is that the 'include_path' value does not appear to be
> > picked up. Am I using htaccess files correctly or do I need to alter
> > some other values within Apache's httpd.conf file?? Would I need to
> > setup <Directory></Directory> maybe?
>
> You need to permit the htaccess file to override the httpd.conf - as you
> rightly guess, you do this with something like:
>
> <Directory /dir/with/htaccess>
>   AllowOverride all
> </Directory>
>
> Check the docs for details,
>
> Rgds,
>
> Owen boyle.
>
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
>
> ***************************************************************
>  This message was virus checked with: SAVI 3.53 Jan 2002
>  last updated 30th January 2002
> ***************************************************************

--
--------------------------------
 Email:  neil.freeman@asa.co.uk
         neil_freeman@yahoo.com
--------------------------------



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: How do I get htaccess files to take effect?

Posted by Owen Boyle <ob...@bourse.ch>.
Neil Freeman wrote:
> 
> Hi,
> 
> This is my first time attempting to use htaccess files. I am running
> Apache 1.3.20 with PHP v4.0.6 installed as a module. Within Apache's
> httpd.conf file I have the following value set:
> 
> AccessFileName apache.htaccess
> 
> And within an 'Alias' directory I have a file entitled 'apache.htaccess'
> 
> which contains the following:
> 
> <IfModule mod_php4.c>
>     php_value include_path = ".;C:/My/PHP/Dir"
> </IfModule>
> 
> What I am attempting to do is alter PHP's include path 'on the fly'
> rather than specifying an overall value within php.ini. The problem I
> have though is that the 'include_path' value does not appear to be
> picked up. Am I using htaccess files correctly or do I need to alter
> some other values within Apache's httpd.conf file?? Would I need to
> setup <Directory></Directory> maybe?

You need to permit the htaccess file to override the httpd.conf - as you
rightly guess, you do this with something like: 

<Directory /dir/with/htaccess>
  AllowOverride all
</Directory>

Check the docs for details,

Rgds,

Owen boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org