Solved

403 - Forbidden error

Posted on 2011-02-16
10
1,576 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:Sumanbabu
  • 5
  • 4
10 Comments
 
LVL 4

Expert Comment

by:andreizz
ID: 34905521
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
 
LVL 4

Accepted Solution

by:
andreizz earned 125 total points
ID: 34905572
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
 
LVL 2

Author Comment

by:Sumanbabu
ID: 34905604
.htaccess is not there in C:\Program Files\LightTPD\htdocs
0
 
LVL 2

Author Comment

by:Sumanbabu
ID: 34905633
as per requirement i need to use only LightHttpd :(
0
 
LVL 4

Expert Comment

by:andreizz
ID: 34905651
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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 2

Author Comment

by:Sumanbabu
ID: 34905690
yes, I created "hi.txt" and I am able to access http://localhost/hi.txt and can see the out put.
0
 
LVL 2

Author Comment

by:Sumanbabu
ID: 34905729
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
 
LVL 2

Author Comment

by:Sumanbabu
ID: 34905805
Thanks for your cooperation @andreizz.

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

0
 
LVL 4

Expert Comment

by:andreizz
ID: 34906382
No problem, good luck!
0
 
LVL 8

Assisted Solution

by:rationalboss
rationalboss earned 125 total points
ID: 34907047
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now