Community

.htaccess: Options not allowed here - php running via fastcgi

I have a 4.7.4 installation running on Dreamhost, but trying to install on another ISP today I'm getting "Options not allowed here" from the default .htaccess file.

Apache 1.3.29
PHP 4.3.10 (cgi-fcgi)

This ISP uses virtual hosting, and I've made the changes to the relevant config file to enable php for the site domain. Apache is not compiled with mod_php, but php runs via fastcgi.

If I remove the .htaccess file I get the Drupal "Unable to connect to database server message," although the confusing thing there is that it references the local hostname rather than the db host I entered in settings.php

Any advice appreciated.

Clark

Comments

hmmm

Not sure about the allowed options - you could either ask your host for help (they should have better access to the detailed server error logs) or try disabling the options one by one to find out the culprit.

Anyway, that error you get by removing .htaccess is bizarre. Removing .htaccess shouldn't make any difference to database settings. The only thing I can think of is that database error was always there, and you didn't see it because Apache complained first. Recheck your settings.php and make sure you weren't editing a commented out line or anything like that.

If that wasn't the case, do you use multisite? It might be that removing .htaccess rewrite rules somehow affects the site name or directory used to access Drupal and your multisite directory name no longer applies and Drupal is falling back to the default site directory.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ

--
Anton

Your host migth be using

Your host migth be using AllowOverride to restrict your options, see
http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

Here you can find the scopes of the Options directive:
http://httpd.apache.org/docs/2.2/mod/core.html#options
which are pretty much anywhere:
server config, virtual host, directory, .htaccess

If you have multiple Options directive comment then out to isolate the faulty one.
Start line with # to comment out the line, like:
# Options +ExecCGI

As you can see with AllowOverride host can restrict some particular options and not others.
Once you find the faulty "Options" line, if it is defining multiple Options try each one to see if it is a particular option.

Once you have isolated the problem (and the exact faulty option) which is causing the issue, email your host with the specific.
The more you tell (like the exact thing they might need to do) usually the the better and faster they can help.

Good luck,
Chris

Tech. articles with a WAMP+IIS+Drupal focus

Take a break: Guide to France

disabling Options in .htaccess fixed problem

Thanks Chris and Anton. I hadn't made the connection between the error message "Options not allowed" and the "Options" lines in the .htaccess file (Doh!). Commenting them out fixed the problem. (I did try them sequentially, and had to comment out both.)

I checked the Apache site for the options in question:

# Set some options.
#Options -Indexes
#Options +FollowSymLinks

and I see what they do, but from Druapl's point of view is there anything I need to do or avoid now that these are disabled?

Thanks again.

Clark

Solution??

I've got the same problem with my provider. Without these options I can't see any pictures (only a red cross) and my provider don't want to chance the security options.

Do you a solution and did you have the same problems?

I have same problem like you,

I have same problem like you, do you remember how you solved this problem?

I ♥ Drupal.

[SOLVED] with adding "Options" to "AllowOverride"

Hi,

I solved this error : "[alert] ... .htaccess: Options not allowed here"
by adding "Options" to the "AllowOveride" apache directory directive configuration in /etc/apache2/:

# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
<Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit Indexes Options
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
                Order allow,deny
                Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS>
                Order deny,allow
                Deny from all
        </LimitExcept>
</Directory>

Just find a <Directory> configuration for the directory of your drupal, and allow .htaccess to override Options :)
If you don't have access to this configuration, ask the admin to allow you to override Options for this particular directory.

It's worked

Thank you so much tristanC.
It's worked on ubuntu (LAMP). I edited /etc/apache2/mods-available/userdir.conf and add Options to AllowOverride. Then restarted apache2 service.

nobody click here