Solved

403 - Forbidden error

Posted on 2011-02-16
10
1,584 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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
 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to refresh a page from a sub domain in ajax ? 34 48
PHP: Filling Out/Creating a PDF 29 109
PHP function parameters defined 14 42
Convert php array to comma seperated list 19 35
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

726 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