This is a discussion on Apache2.2 fails to parse PHP script within a HTML page on XPsp2 within the Windows Web Servers forums, part of the Web Server and Related Forums category; I'm down to pulling out hair in frustration, since I've looked at every FAQ, blog, help group, manual ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm down to pulling out hair in frustration, since I've looked at every FAQ,
blog, help group, manual and document and can't find anyone else with this problem, so it must be my configuration. I'm running Apache2.2.8 (win32) with PHP5.2.5 (win32) on XPSP2, no IIS or other servers. Apache serves up regular html pages just fine, and if I browse to a file like "test.php" that contains just "<?php phpinfo();?>" test code, apache serves it up perfectly. What doesn't work is to have some PHP code in an html file. The browser's page source shows the PHP code wasn't processed by PHP5 module, since Apache just served the page w/o invoking PHP. I'm using the php5apache2_2.dll and have been thru both http.conf and php.ini with a fine-tooth comb looking for things like quotation marks, dos path separators, etc., and no luck. The php directory is in the PATH, security on all PHP5 dirs and files gives LOCAL SERVICE full control, and the EventLogging for apache and php5 shows nothing unusual, Turning on debug log in Apache shows what looks like a clean httpd startup: Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations Server built: Jan 18 2008 00:37:19 Parent: Created child process 2104 .... etc Output of httpd -M shows the following Loaded Modules: core_module (static) win32_module (static) mpm_winnt_module (static) http_module (static) so_module (static) actions_module (shared) alias_module (shared) asis_module (shared) auth_basic_module (shared) authn_default_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) dir_module (shared) env_module (shared) include_module (shared) isapi_module (shared) log_config_module (shared) mime_module (shared) negotiation_module (shared) php5_module (shared) setenvif_module (shared) Syntax OK So can anyone out there suggest what silly thing I'm overlooking in getting PHP script embedded in html to be processed by PHP when Apache is processing an html file? Surely I'm just being stupid, since I've reinstalled apache and PHP a couple of times, rebooted a lot to insure fresh starts, but still no luck. A whisper of advice would be greatly appreciated! TIA Jerry Schneider |
|
|||
|
A bit late, but...
I had similar trouble, namely PHP was NOT parsed at all, with that exact PHP/Apache setup. What I did was move LoadModule php5_module C:/php/php5apache2_2.dll from the END of httpd.conf to the begining of the Load Module section. It worked. Still, working o parsin .html as .php, since RemoveHandler .html .htm AddType application/x-httpd-php .php .html .htm in .htaccess seems to have lost its meaning with Apache2.2.x :( |
| Thread Tools | |
| Display Modes | |
|
|