Page 1 of 1

403 Error

Posted: Thu Aug 24, 2006 1:32 pm
by OldManRiver
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: Select all

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: Select all

;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/I ... 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?

OMR

Posted: Fri Aug 25, 2006 11:53 pm
by RobertGonzalez
When you say PHP was not working, how do you mean that?

Posted: Sat Aug 26, 2006 4:02 am
by yaqeane
check back config.php trouble shoot from there.

Answer

Posted: Sun Aug 27, 2006 1:24 pm
by OldManRiver
Everah,

The browser (tried on both MSIE and FF) would always come up with a dialog and ask me to "Save" or "Open" the file, rather than just interpret the file and/or show it in the browser.

Yaqeane,

What config.php? Doesn't exist in PHP. That is an application file, not anything to do with PHP installation or configuration.

Did you mean php.ini? If you did you should know the only line chaged was:

Code: Select all

doc_root = 

to 

doc_root = "D:/Program Files/Apache/Apache2/htdocs"
which would change nothing in Apache and the 403 error is an Apache error, not PHP. Apache restarts without errors, so I do not know what to look at in the httpd.conf (Apache config) file to find this error. It is a security/permissions error, so need to know more about permissions, etc. to troubleshoot.

Do you have insight on permissions?

OMR

Posted: Sun Aug 27, 2006 1:37 pm
by blackbeard
Make sure that there isn't a file association for PHP. Had the same thing happen to me a few weeks back after a new desktop image was used at work.