PHP code appears as normal text on browser

Alles, was den Apache betrifft, kann hier besprochen werden.

PHP code appears as normal text on browser

Postby zetnix » 25. October 2016 18:56

Hello recently i tried some PHP coding, i've been trying to setup everything for it but found a problem

Whenever i insert these lines into my httpd.conf and restarted Apache it refused to start
LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
PHPIniDir "C:/xampp/php/"
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler application/x-httpd-php .php

I have tested and yes, Apache starts without those in the httpd.conf

so my question is
1. how i solve the Apache not running problem with the httpd.conf
2. does it matter where i put the lines in the httpd.conf?

here is the error log when i tried to run Apache with the lines:
[Wed Oct 26 01:18:08.509754 2016] [ssl:warn] [pid 12260:tid 240] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:18:09.371803 2016] [ssl:warn] [pid 12260:tid 240] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:18:09.660819 2016] [mpm_winnt:notice] [pid 12260:tid 240] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Wed Oct 26 01:18:09.660819 2016] [mpm_winnt:notice] [pid 12260:tid 240] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Wed Oct 26 01:18:09.660819 2016] [core:notice] [pid 12260:tid 240] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Oct 26 01:18:09.664820 2016] [mpm_winnt:notice] [pid 12260:tid 240] AH00418: Parent: Created child process 15544
[Wed Oct 26 01:18:10.606874 2016] [ssl:warn] [pid 15544:tid 252] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:18:11.340915 2016] [ssl:warn] [pid 15544:tid 252] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:18:11.376918 2016] [mpm_winnt:notice] [pid 15544:tid 252] AH00354: Child: Starting 150 worker threads.
[Wed Oct 26 01:31:46.495540 2016] [ssl:warn] [pid 16364:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:31:46.763555 2016] [ssl:warn] [pid 16364:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:31:46.788556 2016] [mpm_winnt:notice] [pid 16364:tid 248] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Wed Oct 26 01:31:46.788556 2016] [mpm_winnt:notice] [pid 16364:tid 248] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Wed Oct 26 01:31:46.788556 2016] [core:notice] [pid 16364:tid 248] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Oct 26 01:31:46.790557 2016] [mpm_winnt:notice] [pid 16364:tid 248] AH00418: Parent: Created child process 16656
[Wed Oct 26 01:31:47.339588 2016] [ssl:warn] [pid 16656:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:31:47.601603 2016] [ssl:warn] [pid 16656:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 26 01:31:47.628604 2016] [mpm_winnt:notice] [pid 16656:tid 260] AH00354: Child: Starting 150 worker threads.
zetnix
 
Posts: 1
Joined: 25. October 2016 18:47
XAMPP version: 7.0.9
Operating System: Windows 7

Re: PHP code appears as normal text on browser

Postby Nobbie » 26. October 2016 20:39

zetnix wrote:Hello recently i tried some PHP coding, i've been trying to setup everything for it but found a problem


And why did you override the Xampp Configuration (which definately works)? This forum is meant for people who are struggeling with Xampp configuration, but it is not meant for people which destroys the Xampp configuration.

zetnix wrote:1. how i solve the Apache not running problem with the httpd.conf


I would use the standard Xampp configuration. If you dont like to do so, we need more precisely error messages, what exactly is going wrong (the messages you applied do not even report about any error, its only warnings).

zetnix wrote:2. does it matter where i put the lines in the httpd.conf?


No and yes. It does not matter if you put the lines in the beginning or in the end, but it matters, if these lines are surrounded by other configuration tags (like "VirtualHost" or "Directory" etc.). Instead of starting Apache via Xampp Control, please try to run "apache_start.bat" in the Xampp folder, this might give more clues, what exactly is going wrong.

Last not least, this is a german board ("Grundlagen und Wissenswertes" is german, undoubtly or not?!), there is an english part in the bottom. Please do not write in english in the german board.
Nobbie
 
Posts: 9622
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 5 guests