Information Services Talk
Information Services Talk
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Apache2.2 fails to parse PHP script within a HTML page on XP

 
Post new topic   Reply to topic    Information Services Talk Forum Index -> Information Services Talk
View previous topic :: View next topic  
Author Message
Jerry Schneider
Guest





PostPosted: Fri Feb 15, 2008 11:01 am    Post subject: Apache2.2 fails to parse PHP script within a HTML page on XP Reply with quote

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
Back to top
  Ads
Advertising
Sponsor


Guest






PostPosted: Sun Mar 16, 2008 8:19 pm    Post subject: Re: Apache2.2 fails to parse PHP script within a HTML page o Reply with quote

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 Sad
Back to top
  Ads
Advertising
Sponsor


Display posts from previous:   
Post new topic   Reply to topic    Information Services Talk Forum Index -> Information Services Talk All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Board Security

80 Attacks blocked

Powered by phpBB © 2001, 2005 phpBB Group