Avatar of SAbboushi
SAbboushiFlag for United States of America asked on

403 Forbidden You don't have permission to access /phpinfo.php on this server

Just installed Apache & PHP on Windows 7 64.

Decided to use configuration 4 per http://www.apachelounge.com/viewtopic.php?t=4481:

4. Apache64 with NTS PHP32 and FCGID64

Apache:httpd-2.4.6-win64-VC11.zip to c:\Apache24

FCGID64: modules-2.4-win64-VC11.zip.  Copied mod_fcgid.so to c:\Apache24\modules

PHP: php-5.5.3-nts-Win32-VC11-x86.zip to c:\php

---
Apache is running per ApacheMonitor; "It works!" displays when I go to localhost in browser

I have a phpinfo.php file in the document root; a browser address of localhost/phpinfo.php results in
403 Forbidden  You don't have permission to access /phpinfo.php on this server

access.log shows:
::1 - - [27/Aug/2013:00:43:23 -0500] "GET /phpinfo.php HTTP/1.1" 403 214

I've given the document root (i.e. c:\Apache24\htdocs) full control permissions for Users

In httpd.conf, I've given the directories:
    AllowOverride all
    Require all granted

Been scouring the web for hours, but haven't found anything that resolves this.

I sure hope some of you gurus out there can help me out...

Thanks-
Sam
httpd.conf.txt
php.ini
Apache Web ServerPHPWeb Servers

Avatar of undefined
Last Comment
SAbboushi

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
PtitPinpin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Dave Baldwin

Apache almost always runs under a special limited user and the name you have in httpd.conf is 'daemon'.  I believe you have to give that user permissions in the 'htdocs' directory.
ASKER
SAbboushi

Thanks for your responses.

>> could you try to add the ExecCGI option to line of Option statement undernearth the <Directory "c:/Apache24/htdocs"> line and try again ?
PtitPinpin: OK - I added
Options ExecCGI

Open in new window


Now, getting a different error:
500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

error.log:
[Tue Aug 27 06:23:17.003319 2013] [mpm_winnt:notice] [pid 9700:tid 284] AH00424: Parent: Received restart signal -- Restarting the server.
[Tue Aug 27 06:23:17.152328 2013] [mpm_winnt:notice] [pid 9700:tid 284] AH00455: Apache/2.4.6 (Win64) mod_fcgid/2.3.7 configured -- resuming normal operations
[Tue Aug 27 06:23:17.152328 2013] [mpm_winnt:notice] [pid 9700:tid 284] AH00456: Apache Lounge VC11 Server built: Jul 15 2013 20:45:22
[Tue Aug 27 06:23:17.152328 2013] [core:notice] [pid 9700:tid 284] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Tue Aug 27 06:23:17.153328 2013] [mpm_winnt:notice] [pid 9700:tid 284] AH00418: Parent: Created child process 10480
[Tue Aug 27 06:23:18.004377 2013] [mpm_winnt:notice] [pid 10480:tid 488] AH00354: Child: Starting 64 worker threads.
[Tue Aug 27 06:23:19.004434 2013] [mpm_winnt:notice] [pid 11180:tid 488] AH00364: Child: All worker threads have exited.
[Tue Aug 27 06:23:22.437630 2013] [fcgid:warn] [pid 10480:tid 1052] (OS 109)The pipe has been ended.  : [client ::1:54166] mod_fcgid: get overlap result error
[Tue Aug 27 06:23:22.437630 2013] [core:error] [pid 10480:tid 1052] [client ::1:54166] End of script output before headers: phpinfo.php

Is that one step closer...?

>> Apache almost always runs under a special limited user and the name you have in httpd.conf is 'daemon'.  I believe you have to give that user permissions in the 'htdocs' directory.
DaveBaldwin:  thanks... didn't work... (says "no such object).  BTW, this is for W7 and that block of code says "<IfModule unixd_module>..."

Any other thoughts...?
phpinfo.php
ASKER
SAbboushi

Ahhh... I just saw a post suggesting that a good troubleshooting tip is to double-click php.exe to make sure it runs.  I got error: msvcr110.dll missing... which is from Visual Studio 2012...

But I installed Visual C++ Redistributable for Visual Studio 2012 Update 3 - (vcredist_x64.exe)

Hmmm... but I'm using the 32 bit version of php!  

So I just also installed the 32 bit version of Visual C++ Redistributable for Visual Studio 2012 Update 3 - vcredist_x86.exe

Problem resolved!

The Apache Lounge said I need Visual C++ Redistributable for Visual Studio 2012 Update 3 - vcredist, and I assumed since I was running W7 64 that I needed the 64 bit VS Redistributable version.

But I need BOTH:  I'm running Apache 64 bit and php 32 bit.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER
SAbboushi

Thanks - This solved my 403 problem!