Jump to content


Photo

403 Forbidden Error


  • Please log in to reply
12 replies to this topic

#1 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 29 September 2006 - 07:49 PM

I just installed a clean Fedora Core 5 system, with Apache 2.2, MySQL 5 and PHP 5.1.2.
If I create a index.php with phpinfo() in it, and put that in my webroot, it displays perfectly fine.
If I create a subdir under my webroot, and copy the index.php to there, it displays just fine.

Here is where the fun stuff starts.  I download a php-application such as phpMyAdmin.  I extract it, and move the extracted files to a subdirectory on my webroot, so I have this: /var/www/html/phpMyAdmin, and all the phpMyAdmin stuff in there.  It contains an index.php.  (I followed the instructions in the phpMyAdmin and created a config file for it.)  If I navigate to http://host/phpMyAdmin, I get the following error:
Forbidden

You don't have permission to access /phpMyAdmin on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

If I try a different application, such as a CMS system, or message board, I get the same error. 

Any ideas?  I think it has to do with my apache config, but I have no idea where to look.  Possibly the re-write rules?

#2 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 30 September 2006 - 01:15 AM

I think youve blocked your own ip address so maybe try unblocking it.
Join my Froums www.phpbbplanet.com/darkwinter

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 September 2006 - 12:02 PM

See if adding a forward slash at the end of the url resolves this:
http://host/phpMyAdmin/

#4 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 October 2006 - 01:45 PM

I do not have m y ip blocked, as no matter which system I try to access it from I get the same error message.  (If I try from my laptop, the error is the same.)
Also, adding the / at the end doesnt make a difference either. 

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 02 October 2006 - 01:51 PM

Try this:
http://host/phpMyAdmin/index.php

If that works then you need to add Indexes to the Options (around line 273) in the httpd.conf and add/or index.php on to the end of the DirectoryIndex line (around line 327).

if it doesnt then I dont know whats wrong.

#6 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 October 2006 - 06:00 PM

Still get an access denied error.  and index.php works fine if I manually created one (with lets say phpinfo() in it), and put it in my webroot. 

#7 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 03 October 2006 - 05:28 PM

Just a bump here.  Anyone have any ideas at all?  Has anyone seen an issue like this before?

#8 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 05 October 2006 - 03:03 PM

Could it be that Fedora Core 5 bundles Apache 2.2? 
I think there are known issues with Apache 2.2 and PHP 5, correct?

#9 vangelion

vangelion
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 13 October 2006 - 05:09 AM

I don't know why this happens, but I think I have found a fix.  I also am using Fedora Core 5 and Apache 2.2, PHP 5.
I noticed that even accessing 'Documentation.html' resulted in a 403 Forbidden error.  But when I copied the file to another name, then overwrote 'Documentation.html' with the temporary copy, the error went away.  So I untarred phpMyAdmin in a remote directory and used Konqueror (KDE graphical file manager) to copy the files into place.  It seems to be working.
--Van

#10 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 13 October 2006 - 09:49 AM

Oh. I know what it may be. You may have not had the correct file parmissions when you extracted PMA files and thus you got the 403 fobbiden error.

#11 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 25 October 2006 - 02:30 PM

I don't know why this happens, but I think I have found a fix.  I also am using Fedora Core 5 and Apache 2.2, PHP 5.
I noticed that even accessing 'Documentation.html' resulted in a 403 Forbidden error.  But when I copied the file to another name, then overwrote 'Documentation.html' with the temporary copy, the error went away.  So I untarred phpMyAdmin in a remote directory and used Konqueror (KDE graphical file manager) to copy the files into place.  It seems to be working.
--Van


I dont know why this worked, but it worked for me.  I just dont get it.  It doesnt make any sense at all to me.  Why wouldnt untarring followed by a move command not work, but using the UI to extract/copy/paste work?  Just weird if you ask me.

#12 magnusprime

magnusprime
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 October 2006 - 08:46 PM

Well... perhaps I spoke too soon.  It seems that it worked for phpMyAdmin, but it is not working for other app's, like SMF.

More Ideas?

#13 Penderia

Penderia
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 20 November 2006 - 10:37 AM

Try changing :

http://localhost/phpMyAdmin/
To ->
http://127.0.0.1/phpMyAdmin/

Works fine for me. Not really sure why, Perhaps, it's Apache thingy, and not caused by PMA.

Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users