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 -> Other Software View previous topic :: View next topic
Reply to topic   Topic: configuration error trying to open php file in browser
Author
Merel



Joined: 07 Oct 2015
Posts: 3
Location: Netherlands

PostPosted: Wed 07 Oct '15 15:18    Post subject: configuration error trying to open php file in browser Reply with quote

Hi, I'm sorry for posting a probably very simple question, but I couldn't find it anywhere.

I'm trying to get php and mysql running on an Apache server on my own computer, to view my php pages there.
-The server is running properly,
-the php works
-and I've succesfully loaded mod_fcgid.
But php pages won't open in my browser. It says there's a config problem and I haven't got a clue what it is. I've followed the steps in "A Fast, Reliable and Proven Setup :: Apache PHP MySQL Perl" and added the mod_fcgid config lines, not the ones for php as a module. I've made sure to put everything in C:\ to make sure there wouldn't be any path problems.

I'm using the files from this site and php links from that post:
apache: httpd-2.4.6-win32-VC14
php: 5.6.14-win32-VC11-x86
mod_fcgid-2.3.9-win32-VC14

My machine is 64 bit, but I've tried this thing with 64 bit versions of the above, too, with the exact same result, so I thought 32 bit versions would work better....

Could anyone help me figure out what to look for?

Thanks!
Merel
Back to top
Steffen
Moderator


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

PostPosted: Wed 07 Oct '15 16:02    Post subject: Reply with quote

Strange that it works local and not from outside, or do I not understand you correct ?

Non php pages ok ?

Anything in the the apache error.log and/or php.log ?

You wrote: It says there's a config problem
What exact message you get in the browser ?

What changes made you in httpd.conf for php ?

You wrote: httpd-2.4.6-win32-VC14 , looks a typo and it is 2.4.16.
Back to top
Merel



Joined: 07 Oct 2015
Posts: 3
Location: Netherlands

PostPosted: Wed 07 Oct '15 16:31    Post subject: Reply with quote

PHP files don't work, both local or outside.

The error message in the browser:
"Internal Server Error

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

Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

Yes, the apache file is a typo, it was 16 like you wrote. Smile

and html files work fine, it's only php, so it must be something I did wrong with the config for mod fcgid? is it maybe a problem that I have VC11 and VC14 files? But there aren't any VC14 php files I think.

Should I send an error log? Which part?

These are the lines I added to the http.conf, but they're copied from the post, so I can't figure out what would be wrong, even the paths are correct:

Code:
LoadModule fcgid_module modules/mod_fcgid.so

<IfModule fcgid_module>
   FcgidIOTimeout 40
   FcgidConnectTimeout 10

   FcgidMaxProcesses 300
   FcgidMaxProcessesPerClass 300

   FcgidOutputBufferSize 64
   ProcessLifeTime 0
   FcgidMaxRequestsPerProcess 0
   FcgidMinProcessesPerClass 0
   FcgidFixPathinfo 0
   FcgidProcessLifeTime 0
   FcgidZombieScanInterval 20
   FcgidMaxRequestLen 536870912
   FcgidIOTimeout 120
   FcgidTimeScore 3
   
   FcgidPassHeader Authorization

   FcgidInitialEnv PHPRC "C:\\php5"
   FcgidInitialEnv PATH "C:\\php5;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
   FcgidInitialEnv SystemRoot "C:\\Windows"
   FcgidInitialEnv SystemDrive "C:"
   FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv windir "C:\\WINDOWS"
   <Files ~ "\.php$">
      Options Indexes FollowSymLinks ExecCGI
      AddHandler fcgid-script .php
      FcgidWrapper "C:/php5/php-cgi.exe" .php
   </Files>
</IfModule>

the relevant error log part:

Code:
[Wed Oct 07 16:13:36.718608 2015] [mpm_winnt:notice] [pid 3464:tid 496] AH00354: Child: Starting 64 worker threads.
[Wed Oct 07 16:15:56.570822 2015] [fcgid:warn] [pid 3464:tid 1004] (OS 109)De pipe is beëindigd.  : [client ::1:50203] mod_fcgid: get overlap result error
[Wed Oct 07 16:15:56.570822 2015] [core:error] [pid 3464:tid 1004] [client ::1:50203] End of script output before headers: myfirstphpscript.php
[Wed Oct 07 16:20:11.268009 2015] [fcgid:warn] [pid 3464:tid 1004] (OS 109)De pipe is beëindigd.  : [client ::1:50216] mod_fcgid: get overlap result error
[Wed Oct 07 16:20:11.268009 2015] [core:error] [pid 3464:tid 1004] [client ::1:50216] End of script output before headers: php.php



In dutch it says 'de pipe is beëindigd' (e.g. in line 4), which means the pipe has ended I think. (sorry if it's a bad translation)
Back to top
Steffen
Moderator


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

PostPosted: Wed 07 Oct '15 17:42    Post subject: Reply with quote

Also the simple script goes wrong:

<?php

phpinfo();

?>


Better to use PHP 7 wich is VC14. It is at the QA tab at windows.php.net.


Last edited by Steffen on Wed 07 Oct '15 19:08; edited 1 time in total
Back to top
Merel



Joined: 07 Oct 2015
Posts: 3
Location: Netherlands

PostPosted: Wed 07 Oct '15 18:20    Post subject: VC14 did it! Reply with quote

Thank you so very much for the VC14 link, it works now! Now I don't feel so very dumb after all, all of the settings were correct!

Thanks again, you made my day!
Back to top


Reply to topic   Topic: configuration error trying to open php file in browser View previous topic :: View next topic
Post new topic   Forum Index -> Other Software