I've looked everywhere on the forums and can't find the fix for this problem. I'm very much a newbie to CMS and Drupal, but I've set up an osCommerce shopping cart before so I know how to edit php and databases, but I think I'm about to just give up on this!!
So after finishing the install I click on 'save and continue' and I get this error on the page:
403 Access Forbidden
ACCESS FORBIDDEN
Access denied. Please click on the back button to return to the former page.
But when I put in my browser: http://www.mysite.com/drupal-6.2/index.php the welcome page shows up fine....until I try to click on anything and then I just get the same error.
I thought I had to tell my server to use index.php beside index.html but it is already set. What could be the problem? Do I need to run a test site? And how do you do that? I am very new to this and so far nothing has helped.....could it be permission settings? I just don't know.
Comments
Hover the mouse over the
Hover the mouse over the menu links which give you the error. What do they look like? What is the URL when you get the 403 error page?
This is what I get as the
This is what I get as the url when I try to login to the index.php page. They all look something like this:
http://www.mysite.com/drupal-6.2/?q=node&destination=node
Does Drupal's .htaccess file
Does Drupal's .htaccess file contain a line
DirectoryIndex index.php?Or a line
DirectoryIndex index.php index.htmlIf it does, check if it works. Put an index.php file containing a "Hello World!" in a subdirectory and try to browse to that subdirectory.
Yes, it has the
Yes, it has the DirectoryIndex index.php line in it.
Ok - sorry this took so long
Ok - sorry this took so long to respond but I was a work.....so I've added an index.php file to a subdirectory of the Drupal folder and sure enough the file does work when I enter the url into my browser....any recommendations? thanks
So, to sum up the
So, to sum up the problem:
http://www.mysite.com/drupal-6.2/subdir-containing-index/ works without specifying the index file
http://www.mysite.com/drupal-6.2/ gives you an access denied
http://www.mysite.com/drupal-6.2/index.php works
Right?
- Is Drupal's .htaccess file unmodified or have you added any authorization code?
- Are the permissions of the drupal-6.2 directory at least 755, so that the server can list its contents to find the index.php file?
So, to sum up the
So, to sum up the problem:
http://www.mysite.com/drupal-6.2/subdir-containing-index/ works without specifying the index file
-----> no, I need to specify the index file to get this to work
http://www.mysite.com/drupal-6.2/ gives you an access denied
-----> yes, it gives me the 403 access forbidden error
http://www.mysite.com/drupal-6.2/index.php works
-----> yes, when I include the index.php part of the url it works, but nothing on the page works when clicked
I think the only thing I added to drupal's .htaccess file is the line "php_flag register_globals 0" at the end when I was having problems installing the site initially (but I fixed it, this line did not work but I never deleted it)
I have the drupal directory set to 775 - could this be the problem?? :-) I hope it's this simple
The permissions are OK...
The permissions are OK... So, if the
DirectoryIndexline exists and is not commented out, it has no effect. No idea why.Is there another .htaccess file higher up in your web root, containing any authentication code?
Yes, there is one in the
Yes, there is one in the root htdocs directory that has been there from the beginning. It contains this:
"DirectoryIndex index.html
AuthUserFile /htdocs/.htpasswd
AuthGroupFile /htdocs/.htgroup
AuthName "Site Studio"
AuthType Basic
deny from all
deny from all
php_flag register_globals 0"
Are there missing lines
Are there missing lines which were enclosed in
<and>?Add
<code>and</code>tags around that, because they are filtered out here.Sorry - not sure why they
Sorry - not sure why they didn't show up
- here's what that .htaccess code looks like again:
DirectoryIndex index.html
AuthUserFile /htdocs/.htpasswd
AuthGroupFile /htdocs/.htgroup
AuthName "Site Studio"
AuthType Basic
deny from all
deny from all
php_flag register_globals 0
And this is what the drupal .htaccess code looks like:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
Options +FollowSymlinks
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $
php_flag register_globals 0
The small one would be
The small one would be enough, but it is still not showing correctly for the reason I explained. Include it in code tags.
Or, if you want to troubleshoot it, comment out all its lines (with a # in front) and check the results, then add back some lines to to see if something there was causing the problem.
Well I got it to work
Well I got it to work *finally* by taking out this line: php_flag register_globals 0
I had put it in at the end of the drupal .htaccess file because I was trying to get the register_globals to turn off. This method didn't with my hosting company's setup in the end and I just never deleted it. I deleted it and now it seems to be working.
Thanks for all your help!
If I put the index.php file
If I put the index.php file in my site's root directory: http://www.mysite.com/index.php it displays a 404 page not found error.
Can anyone help? I'm about ready to just reinstall or try another CMS
Maybe the rewrite rules...
Maybe the rewrite rules (for clean URLs) are getting in the way...
Try http://www.mysite.com/drupal-6.2/index.php?q=user/login
or http://www.mysite.com/drupal-6.2/index.php?q=node
Also, you could try to delete the cookie cache in your browser