403 - Forbidden error

Hello friends,

I am new to PHP world. I have gone through the below link and setup and lighthttpd and PHP server in windows XP.
http://www.winstonyw.com/2008/05/28/installing-lighttpd-and-php-on-windows/ 
After successfully restarting the server I can able to see the home page(index.html).
lastly i put testing.php in C:\Program Files\LightTPD\htdocs and after restarting the server i opened the browser and http://localhost/testing.php is giving "403 - Forbidden" error.

Please help me.
LVL 2
SumanbabuAsked:
Who is Participating?
 
andreizzCommented:
You should consider using Xampp instead of Lighthttpd, it's easier and better,
http://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.7.4/xampp-win32-1.7.4-VC6-installer.exe/download
or the light version: http://www.brothersoft.com/xampp-lite-164759.html

To see if your .htaccess file is the problem try renameing it so that the webserver will not use it.
0
 
andreizzCommented:
This may be from your .htaccess configuration, please post that so we can see.
You can find it in htdocs, it may be hidden.
0
 
SumanbabuAuthor Commented:
.htaccess is not there in C:\Program Files\LightTPD\htdocs
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
SumanbabuAuthor Commented:
as per requirement i need to use only LightHttpd :(
0
 
andreizzCommented:
Check to see if the folder and file are not read-only, and search for the .htaccess file.
Put a txt file in the htdocs folder and try to access that.
0
 
SumanbabuAuthor Commented:
yes, I created "hi.txt" and I am able to access http://localhost/hi.txt and can see the out put.
0
 
SumanbabuAuthor Commented:
i just noticed while starting the lightHttpd i got the below warning

WARNING: unknown config-key: cgi.assign (ignored)

i have added the line "
cgi.assign = ( ".php" => "C:/php/php-cgi.exe" )" at the end of lighttpd-inc.conf
0
 
SumanbabuAuthor Commented:
Thanks for your cooperation @andreizz.

 I deleted "mod_cgi" earlier, i put it back. Its working fine.

0
 
andreizzCommented:
No problem, good luck!
0
 
rationalbossCommented:
Change your installation directory to c:\lighttpd\htdocs.
The forbidden error might be caused by Windows restricting access to c:\Program Files\

This would also save you a lot from more headaches in the future, move it out of Program Files.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.