Solved

403 - Forbidden error

Posted on 2011-02-16
10
1,578 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 camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

 
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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

15 Experts available now in Live!

Get 1:1 Help Now