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: php works on .php files but not on .html
Author
greygrey



Joined: 28 Mar 2008
Posts: 18

PostPosted: Fri 28 Mar '08 14:30    Post subject: php works on .php files but not on .html Reply with quote

Hi.

I'm very new to all of this. Using wamp on XP home. Apache works fine, MySql work fine. And php works fine, but only on .php files. Many of my pages are .html with php embedded. Looks like Apache isn't finding those. Here are the error messages:

Apache access log:

127.0.0.1 - - [28/Mar/2008:05:21:48 -0500] "GET http://barcfg.myway.com/cfg/speedbar/mysaconfg.jsp?s=dl&p=DE&v=1.0.1.7&l=9&c=01&a=qew659JPD8n99l2QBhBtGQ&n=2004122416 HTTP/1.1" 404 224
127.0.0.1 - - [28/Mar/2008:05:26:18 -0500] "GET /testSessions.html HTTP/1.1" 304 -
127.0.0.1 - - [28/Mar/2008:05:28:40 -0500] "GET /customer_info_form.html HTTP/1.1" 304 -
127.0.0.1 - - [28/Mar/2008:05:37:07 -0500] "GET /hellothere.html HTTP/1.1" 304 -

Apache error log:

[Fri Mar 28 05:21:48 2008] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cfg

I checked to see if windows was doing something funky to the extension when I created the files, but it seems okay.

Your help would be greatly appreciated. Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 28 Mar '08 14:59    Post subject: Reply with quote

How did you set up apache that it parses html files?
Back to top
greygrey



Joined: 28 Mar 2008
Posts: 18

PostPosted: Fri 28 Mar '08 19:56    Post subject: Reply with quote

Thanks for your reply, James.

Not sure what you're referring to. The Apache configuration is as it was set up by wamp. I looked through the Apache conf file and didn't see anything that would specify .html files. Of course, as I said, I'm very new to all this. Maybe you could expound a bit?

Btw, I should mention that when I call my .html files through the browser using localhost, the html code works fine, it's just the php that's not being parsed. When I do a view-source, the php code is still there (not being run through the interpreter). If that's any help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 28 Mar '08 22:13    Post subject: Reply with quote

You have to tell apache that php should parse also files with the html extension

Some where in your httpd.conf there is

Code:

AddType application/x-httpd-php .php


add new lines
Code:

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html


if you still have a question please post again.
Back to top
greygrey



Joined: 28 Mar 2008
Posts: 18

PostPosted: Sat 29 Mar '08 13:22    Post subject: Reply with quote

That did the trick. Thank you so much. Sean Blonnery's got nuthin on you. Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sun 30 Mar '08 18:42    Post subject: Reply with quote

who is Sean Blonnery ?
Back to top
greygrey



Joined: 28 Mar 2008
Posts: 18

PostPosted: Tue 01 Apr '08 13:13    Post subject: Reply with quote

James Bond ==> James Blond
Sean Connery ==> Sean Blonnery

Just a lame attempt at humor. Thanks again for your help.

gg
Back to top


Reply to topic   Topic: php works on .php files but not on .html View previous topic :: View next topic
Post new topic   Forum Index -> Other Software