Problem with htaccess

I am having a problem with htacces files. My sites do not seem to read them properly.

I am trying to use simple directives just to test things but does not work:
php_flag display_errors on
php_flag file_uploads of

One of my sites has mod_rewrite directives in htaccess and these seem to work but the above flags do not. Same with creating a new site…directives do not work.

Here is a sample of one of my configs:

<Directory /home/domain/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/domain/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/domain/fcgi-bin/php5.fcgi .php5

Any idea why it won’t work or where I should look. I have restarted apache as well.

Just did some testing.

I was able to get htaccess files to work but the php execution mode had to be Apache mod_php…I could not use CGIwrapper or FCGId.

I am confused about one thing though…not all directives can be controlled by htaccess.

If using mod_php then ‘file_uploads’ will always be set to on. I can not override with htaccess and also even if file uploads is set to off in the php settings, running phpinfo() will always show that fileuploads is on. If I change to CGIwrapper or FCGId then I can not override with httaccess (seems to not work) but I can override in the php settings.

How do the different execution modes handle these things?

running in mod_fcgid means you need to edit your php.ini which each domain has. /home/domain/etc instead of .htaccess

if you run in mod_php then you need to use .htaccess although some directives through the .htaccess will also work in mod_fcgid

Actually .htaccess works fine under CGIwrapper here.

However the last upgrade of VM Pro seems to have changed the default to FCGId instead so suddenly i found new sites with .htaccess failing to work - Then changed back to CGIwrapper and all was working as intended again.