View previous topic :: View next topic |
Author |
Message |
apoc2222 n00b

Joined: 18 Dec 2003 Posts: 44 Location: Hamburg, Germany
|
Posted: Fri Dec 26, 2003 4:01 pm Post subject: apache2 + php, .php works but <?php tag won't |
|
|
Apache processes only .php files with php, in .html files the <?php tag is ignored by apache I have no clue where ti fix this, any suggestions?
Thanks! |
|
Back to top |
|
 |
monotux l33t


Joined: 09 Sep 2003 Posts: 751 Location: Stockholm, Sweden
|
Posted: Fri Dec 26, 2003 6:26 pm Post subject: |
|
|
apache is supposed to ignore processing <?php in a .html document.
there is no fix for that. _________________ Computer science is no more about computers than astronomy is about telescopes. |
|
Back to top |
|
 |
khel Tux's lil' helper


Joined: 07 Mar 2003 Posts: 80
|
Posted: Fri Dec 26, 2003 6:27 pm Post subject: |
|
|
As far as I know, if apache processes .php files, then it should work with php in .html files as well. Does it give you an error? And if so, what does it say?
Though, most likely, you have a sintax error or configuration issue.
khel _________________ If it's stupid but works, it isn't stupid.
Using Gentoo? Help the others!
Last edited by khel on Fri Dec 26, 2003 6:41 pm; edited 1 time in total |
|
Back to top |
|
 |
khel Tux's lil' helper


Joined: 07 Mar 2003 Posts: 80
|
Posted: Fri Dec 26, 2003 6:36 pm Post subject: |
|
|
retribrute wrote: | apache is supposed to ignore processing <?php in a .html document.
there is no fix for that. |
How about this fix? (maybe that was the problem)
First way
For apache, look in the apache/conf/ directory for your httpd.conf file and look for lines like these: AddType application/x-httpd-php4 .phtml .pwml AddType application/x-httpd-php4 .php4 .php .php3 .php2 and put whatever extensions you want in there.
Second way
edit the directory configuration file (.htaccess for apache) and add:
AddType application/x-httpd-php .php .phtml .php4 .php3 .html .htm
khel _________________ If it's stupid but works, it isn't stupid.
Using Gentoo? Help the others! |
|
Back to top |
|
 |
|