Jump to content

Cannot access http://localhost/index.php


nati

Recommended Posts

Hello everybody!

 

I have a problem with access to my index.php page.

 

If I put an index.html page into my localhost folder and call it from browser, it works fine. But when I put an index.php page into my localhost folder and call it from browser, I'm getting next error:

 

You are not authorized to view this page

HTTP Error 403 - Forbidden

 

I cannot find out what caused this problem. Anyone can help?

 

Tnx in advance!

Nati

 

Link to comment
https://forums.phpfreaks.com/topic/124081-cannot-access-httplocalhostindexphp/
Share on other sites

I never recommend to setup PHP in CGI mode. I always configure PHP as an Apache Module using the following instead:

LoadModule php5_module "C:/php/php5apache2_2.dll"
PHPIniDir "C:/php"
AddType application/x-httpd-php .php

Hi,

 

Tnx a lot, it is better now, but there is still a small problem.

 

When I call http://localhost/index.php, I'm getting my php page correctly.

But when I call http://localhost, I'm just getting the content of my localhost folder including a link to index.php. As I know, I should get index.whatever page as a default page by calling http://localhost, right?

 

I suppose it is different problem now...  ???

 

 

Regards,

Nati

Archived

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

×
×
  • Create New...

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.