Jump to content

Archived

This topic is now archived and is closed to further replies.

magnusprime

403 Forbidden Error

Recommended Posts

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?

Share this post


Link to post
Share on other sites
I think youve blocked your own ip address so maybe try unblocking it.

Share this post


Link to post
Share on other sites
See if adding a forward slash at the end of the url resolves this:
http://host/phpMyAdmin/

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[quote author=vangelion link=topic=110007.msg451229#msg451229 date=1160716172]
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
[/quote]

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.