I am trying to install Drupal 4.7.3 following the instructions at http://drupal.org/INSTALL.txt

I've 'tar'red the files and changed $db_url in settings.php. I've created the files directory and chmod 777'd it. When I load the drupal directory in the browser I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, X and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.34 Server at www.X.co.uk Port 80

I don't own the server but can access the error log:

[Sat Sep 2 14:46:28 2006] [alert] [client x.x.x.x] /home/X/public_html/drupal/.htaccess: order not allowed here

The relevant (I think) part of httpd.conf says:

    <Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS PROPFIND>
            Order allow,deny
            Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND>
            Order deny,allow
            Deny from all
        </LimitExcept>
    </Directory>

I can make .htaccess files work fine on the server. Might it be relevant that php safe mode is on (I am the 'owner' of all the files)?

I seem to have fallen at the first hurdle! Please help...

Comments

Hello2’s picture

Just a quick update which might help you help me...

I commented out the following lines of .htaccess (which I guessed had caused the first problem):

# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
  Order deny,allow
  Deny from all
</FilesMatch>

Then the error log said:

[Sat Sep 2 15:33:59 2006] [alert] [client 84.65.178.126] /home/X/public_html/drupal/.htaccess: Options not allowed here

I assume this refers to:

# Set some options.
Options -Indexes
Options +FollowSymLinks

When I renamed the .htaccess file so it wouldn't be used, I got about two dozen SQL and PHP errors and a blank browser screen. I assume they were caused by the lack of .htaccess file, so I won't trouble you with them here!

desm0n’s picture

I'm not much help in this BUT robery douglas had this issue way back in 2004 and sme of the comments may help you find a solution

http://drupal.org/node/10133

It sounds like your web provider MAY need to edit the httpd.conf file.
--
http://www.porttalbotchat.co.uk
-------------------------------------------------
Our mission is to discuss issues and topics of residents of Port Talbot. We provide info on events, issues, concerns and discussions of our local area.

styro’s picture

It sounds like your server is very restrictive in what it allows in .htaccess files. You'd need to talk to your host or sysadmin to see what bits you are allowed.

When I renamed the .htaccess file so it wouldn't be used, I got about two dozen SQL and PHP errors and a blank browser screen. I assume they were caused by the lack of .htaccess file, so I won't trouble you with them here!

Nope, the .htacess file is optional. The SQL and PHP errors probably mean that you haven't set up your database yet.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

Hello2’s picture

OK I will speak to him. Thanks for the advice. See the first post - would the line return in the middle of the AllowOverride command make any difference? It does allow "Indexes" (for example) but it's on the second line? I don't have a clue how the file's parsed.

The problem is that xoops (or more accurately a dodgy third party module) got his site hacked and he doesn't want my site to mess it up again. Quite understandably, he's got php safe mode on too, which I imagine will lead to other problems (for me).

styro’s picture

Yep, the AllowOverride directive needs to be less restrictive.

I've always just used AllowOverride All in the past, but I don't know if that is the minimum required.

If you are friendly with your sysadmin, you could always ask him to past the contents of your .htaccess file into the virtual host part of httpd.conf. That way you get all the benefits of what is in the .htaccess without the potential performance or security headaches of enabling .htaccess files. That is what we do on our servers now.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

Hello2’s picture

In the end I went back to xoops, only because I was in a hurry to get the thing done. I will look again at Drupal soon.

One query the server owner had was - why are the files which are protected by the first .htaccess lines (see second post) not just put outside of the web root?

P.S. Perhaps the installation instructions could make clear what privileges are required to install Drupal.

styro’s picture

The .htaccess is completely optional. It isn't required to run Drupal. It just offers some extra Apache settings for tidying up various things.

The files it denies access to for the most don't really have any real need to be hidden at all. More advanced users probably wouldn't upload the non essential files, or move them elsewhere. Leaving them where they are is just really to make things easier for less experienced users.

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

Hello2’s picture

I know Drupal isn't catering for the 'idiot' market... but perhaps that could be made more obvious? :-)

joachim’s picture

I'm having the same problem trying to install Drupal 5.0, both on my own machine and my webhost.

What's the AllowOverride directive in apache's default httpd.conf file?
I'm pretty sure I've not made changes to min, though it's possible Ubuntu has customized it.

mike stewart’s picture

Hey joachim- I see you're still using drupal. I'm setting up a xubuntu 7.10 desktop for development, and am running into this problem as part of a multisite setup... did you ever solve this?

joachim’s picture

I did work it out, because I was using Drupal on my local Ubuntu machine for a time.
I'm not sure what I did though. I still have the files though I've given up on Ubuntu, and looking at them, here's what I can tell:

My .htaccess is identical to the 5.1 file, except for the FilesMatch line which I think was a patch or security fix.
I was using virtual hosts so each site I worked on had its own url like 'drupal.ubuntu'. Here's the config file for the drupal host from apache's sites-available/:

<VirtualHost *>
        DocumentRoot /home/joachim/public_html/drupal-5.1/
        ServerName drupal.ubuntu 

        <Directory /home/joachim/public_html/drupal-5.1/>
                Options Indexes FollowSymLinks MultiViews +Includes
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

</VirtualHost>

Hope that helps.

mike stewart’s picture

yes, it does help, thanks!

i had actually fixed this before reading your post, but i fixed it by editing the virtual host config similar to your post.

in summary i had a virtual host that was created using webmin... and apparently it setup the host using a very skeleton setup that is not the default of apache2.

dirkjot’s picture

Hi, just to update this, I ran into the same problem with ubuntu gutsy and drupal 6.4.

First, I enabled user dirs (localhost/~user) by symlinking the userdir.conf and userdir.load modules from /etc/apache2/mods-available to the mods-enabled directory next to it.

Secondly, in /etc/apache2/mods-enabled/userdir.conf, I changed the AllowOverride to 'All' instead of the list given there by default.

Thirdly, change in /etc/php5/apache2/php.ini: uncommented the include_path directive (it starts with a semicolon, remove that)

Fourthly, the sites/default/ directory should temporarily be made writable so the installer can do its work:
chmod o+rw sites/default. To undo this later, use chmod o-w sites/default

Finally, permission are set very tight on ubuntu which means that new files are not readable by anyone (including the webserver) by default. You have to have your drupal files readable by others for drupal to work. So when extracting the source, make sure to use the 'p' option of tar (so: tar xvpzf drupal-6.4.tar.gz) and when copying default.settings.php to settings.php, make sure to reset its permisssion with
chmod a+rw sites/default/settings.php
my settings.php had been made writable by the chmod suggested in the drupal docs, but it also needs to be readable of course.

hope this helps,
dirk