Author |
|
greygrey
Joined: 28 Mar 2008 Posts: 18
|
Posted: Fri 28 Mar '08 14:30 Post subject: php works on .php files but not on .html |
|
|
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
|
Posted: Fri 28 Mar '08 14:59 Post subject: |
|
|
How did you set up apache that it parses html files? |
|
Back to top |
|
greygrey
Joined: 28 Mar 2008 Posts: 18
|
Posted: Fri 28 Mar '08 19:56 Post subject: |
|
|
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
|
Posted: Fri 28 Mar '08 22:13 Post subject: |
|
|
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
|
Posted: Sat 29 Mar '08 13:22 Post subject: |
|
|
That did the trick. Thank you so much. Sean Blonnery's got nuthin on you. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 30 Mar '08 18:42 Post subject: |
|
|
who is Sean Blonnery ? |
|
Back to top |
|
greygrey
Joined: 28 Mar 2008 Posts: 18
|
Posted: Tue 01 Apr '08 13:13 Post subject: |
|
|
James Bond ==> James Blond
Sean Connery ==> Sean Blonnery
Just a lame attempt at humor. Thanks again for your help.
gg |
|
Back to top |
|