logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 403 Error
Author
OldManRiver



Joined: 21 Jun 2006
Posts: 21

PostPosted: Thu 24 Aug '06 19:59    Post subject: 403 Error Reply with quote

Been troubleshooting my WAMP on W2k Pro and Apache was working, but PHP was not. Found I had not defined the "doc_root" in the php.ini file, so changed it.

Now I get 403 errors even on the root localhost.

httpd.conf reads:
Code:

ServerRoot "D:/Program Files/Apache/Apache2"
Listen 80
ServerName localhost
DirectoryIndex index.htm index.html index.html.var index.shtml index.php index.phml index.cfm index.cfml
DocumentRoot "D:/Program Files/Apache/Apache2/htdocs"
<Directory>
  Options FollowSymLinks
  AllowOverride None
</Directory>
UserDir "E:/Nyle's/Business Projects/Projects (External)"
# Config for PHP
LoadModule php5_module "D:/Program Files/PHP/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/Program Files/PHP"
Action application/x-httpd-php "/php/php-cgi.exe"
ScriptAlias /php/ "D:/Program Files/PHP/"
AddHandler php-script .php .phml
AddHandler php .php .phml
<Directory "D:/Program Files/PHP">
  Options
  Allow from all
  Order allow,deny
  AllowOverride None
</Directory>


php.ini reads:
Code:

;include_path = ".;c:\php\includes"
doc_root = "D:/Program Files/Apache/Apache2/htdocs"
user_dir =
extension_dir = "./"


What do I need to look for or correct? Do I need to match the user directories?

Install instructions at:

http://www.devarticles.com/c/a/Apache/Installing-PHP-under-Windows/4/

say I need to copy files into the Apache root directory, this is written for version 4 not 5. Are these still good instructions? What would change on these for version 5?

YMR
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Thu 24 Aug '06 20:43    Post subject: Reply with quote

I never set the doc_root, the php manual says it had to be used when you run as CGI.

I am curious why you use a ScriptAlias /php/ directive ?
It marks the target directory as containing CGI scripts.

There or more strange things in your setup. Looks like you mixing a CGI with a Module) setup.

Do you want to setup as CGI (is not advised) or as Module ?


It is strongly advised to use the excellent instruction by pnllan at: www.apachelounge.com/viewtopic.php?t=570


Steffen
Back to top


Reply to topic   Topic: 403 Error View previous topic :: View next topic
Post new topic   Forum Index -> Apache