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
ASKER CERTIFIED SOLUTION
Avatar of PtitPinpin
PtitPinpin

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

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.
Avatar of SAbboushi
SAbboushi
Flag of United States of America image

ASKER

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
Avatar of SAbboushi
SAbboushi
Flag of United States of America image

ASKER

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.
Avatar of SAbboushi
SAbboushi
Flag of United States of America image

ASKER

Thanks - This solved my 403 problem!
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo