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: Apache won't run PHP
Author
borges



Joined: 26 Sep 2011
Posts: 2

PostPosted: Mon 26 Sep '11 10:46    Post subject: Apache won't run PHP Reply with quote

Hi,

I'm on a Win7-64 system where Apache seems to not start PHP. Plain html looks right, but PHP code is sent as-is to the browser. httpd.conf refers to the php dll. Apache as a service restarts without hassle. Access and error log don't report PHP related issues. Any suggestions?

Apache was installed from httpd-2.2.21-win32-x86-ssl.zip to c:\Apache2. I ran httpd.exe -k install as administrator.

PHP was installed from php-5.3.8-Win32-VC9-x86.msi. It successfully modified httpd.conf as shown below.

Restarts don't change anything. I also tried installing Apache VC6 from the .msi but ran into the read-only problems. Fixed those by putting the disc in another computer. Installed PHP VC6, same problem as with VC9. Clean uninstalls and full delete between installs.

With the above install files httpd.conf ends with
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\php\"
LoadModule php5_module "C:\php\php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

access.log says:
::1 - - [26/Sep/2011:08:45:13 +0200] "GET /phptest.html HTTP/1.1" 304 -
::1 - - [26/Sep/2011:08:45:15 +0200] "GET /phptest.html HTTP/1.1" 304 -

error.log says:
[Sun Sep 25 21:33:27 2011] [warn] pid file C:/Apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Sep 25 21:33:27 2011] [notice] Apache/2.2.21 (Win32) PHP/5.3.8 configured -- resuming normal operations
[Sun Sep 25 21:33:27 2011] [notice] Server built: Sep 10 2011 11:34:11
[Sun Sep 25 21:33:27 2011] [notice] Parent: Created child process 2432
httpd.exe: Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName
[Sun Sep 25 21:33:27 2011] [notice] Child 2432: Child process is running
[Sun Sep 25 21:33:27 2011] [notice] Child 2432: Acquired the start mutex.
[Sun Sep 25 21:33:27 2011] [notice] Child 2432: Starting 64 worker threads.
[Sun Sep 25 21:33:27 2011] [notice] Child 2432: Starting thread to listen on port 80.
[Sun Sep 25 21:33:27 2011] [notice] Child 2432: Starting thread to listen on port 80.


Thanks,
Borge
Back to top
bagu



Joined: 06 Jan 2011
Posts: 193
Location: France

PostPosted: Mon 26 Sep '11 12:18    Post subject: Reply with quote

Php files may end by .php and not by .html
And you may add :
Code:
    AddType application/x-httpd-php .php


In httpd.conf
Back to top
borges



Joined: 26 Sep 2011
Posts: 2

PostPosted: Mon 26 Sep '11 13:25    Post subject: Reply with quote

Oh my! I haven't felt this stupid for a long time... Thanks for pointing out the obvious.

Borge
Back to top


Reply to topic   Topic: Apache won't run PHP View previous topic :: View next topic
Post new topic   Forum Index -> Other Software