Page 1 of 2
php inside html
Posted: Tue Oct 03, 2006 2:05 pm
by Jef Patat
Hi all,
lately i moved hosting, but now for some reason php inside html is not processed anymore
I searched all over the net and tried various .htaccess configurations but none of them worked
Can it be something else?
kind regards, Jef
Posted: Tue Oct 03, 2006 2:08 pm
by Luke
first off... is php installed?
second... are you using short tags (ie: <? and ?>)
Posted: Tue Oct 03, 2006 2:16 pm
by Jef Patat
The Ninja Space Goat wrote:first off... is php installed?
Yes it is, if I rename the index.html file to index.php everything works correctly
But that would mean I have to rename every page and update all links.
I extremely prefer not to do that.
The Ninja Space Goat wrote:second... are you using short tags (ie: <? and ?>)
Yes, this is an excerpt out of the document:
Code: Select all
<div class="interface-02">
<?php
if ($stylesheet == "visualstyle3"){
echo ' <img src="http://www.jefspalace.be/images/logo.gif" alt="Jefs Palace Logo" height="80" width="80" /> ';
}
?>
</div>
the site is jefspalace.be
Posted: Tue Oct 03, 2006 2:20 pm
by volka
Yes it is, if I rename the index.html file to index.php everything works correctly
The .html is not associated with the php module.
Do you have access to the webserver's configuration? What kind of webserver is it?
Posted: Tue Oct 03, 2006 2:20 pm
by Luke
those aren't short tags. <?php is long and <? is short.
post your htaccess file
Posted: Tue Oct 03, 2006 2:27 pm
by Jef Patat
volka wrote:Yes it is, if I rename the index.html file to index.php everything works correctly
The .html is not associated with the php module.
Do you have access to the webserver's configuration? What kind of webserver is it?
correct, but it at least proves that php is working
It is a paid server, I'm just an amature programmer eager to learn
the .htaccess file used to just include
Code: Select all
AddType application/x-httpd-php .php .htm .html
Posted: Tue Oct 03, 2006 2:29 pm
by Luke
is it a windows server?
Posted: Tue Oct 03, 2006 2:29 pm
by volka
Jef Patat wrote:the .htaccess file used to just include
Code: Select all
AddType application/x-httpd-php .php .htm .html
used? past tense? Or is this .htaccess still there? And is it still an apache webserver?
Maybe you do not have the proper permissons to change values in .htaccess. But that usually leads to a fatal error. see
http://httpd.apache.org/docs/2.0/mod/co ... owoverride
And the name of the file apache is looking for might have been changed as well, see
http://httpd.apache.org/docs/2.0/mod/co ... ssfilename
Posted: Tue Oct 03, 2006 2:46 pm
by Jef Patat
It is still an apache server, i'm using www. one. com
Apache 1.3.31 with security patches from 1.3.33
I can choose to use php 5.1.5 configuration at
http://www. testdomainet. com/info.php
or 4.4.4 configuration at
http://www. testdomainet. dk/info.php
indeed used to be as in: for the moment there is no .htaccess file since it does not make any difference
they do support .htaccess, i'm quite sure of that
thanks for the quick responses
Posted: Tue Oct 03, 2006 2:58 pm
by volka
Jef Patat wrote:indeed used to be as in: for the moment there is no .htaccess file since it does not make any difference
Ask your provider if and how you can link .html files to the php module.
Posted: Tue Oct 03, 2006 3:22 pm
by Jef Patat
Hello again,
volka wrote:Jef Patat wrote:indeed used to be as in: for the moment there is no .htaccess file since it does not make any difference
Ask your provider if and how you can link .html files to the php module.
I did, they have online help, and this is result
Please wait for a site operator to respond.
You are now chatting with 'lee'
lee: Thank you for using One.com 24/7 Interactive Online Support. My name is Lee. How may I assist you?
you: how can I link .html files to the php module
you: ?
you: sorry, hello
lee: Hi there
lee: Please hold on for a moment
you: ok
lee: I do not have information on this
lee: You can check google for more information.
you: lolz
you: google is not hosting my site
lee: What exactly are you looking for?
you: I have inline php in a html file
you: the php engine cannot know to interprete the html
you: so most often you tell it by using the .htaccess file
you: but not on yours
you: take a look at the result at jefspalace.be
you: quite <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> up
lee: Unfortunately I cannot assist you on this as we do not offer technical assistance on scripts and programming.
you: this is not programming
you: this is supporting
you: the code is correct otherwise it wouldn't have worked on the previous host
lee: Are you using includes?
you: amongst others yes
lee: I am sorry i have no information regarding this
lee: Please send an email regarding this to
support@one.com
you: ok
lee: Will there be anything else I can help you with?
you: you mean can not help me with :p
you: no thanks
lee: ser
lee: You are welcome.
lee: Please feel free to contact us again for any further assistance. Good Bye and have a nice time.
So I will send them an email and keep you guys updated
however I do not see what can be the issue for a hosting company that claims 250,000 customers in 149 countries.
Am I the only one trying this?
Posted: Tue Oct 03, 2006 4:54 pm
by Z3RO21
key word claims, I see it all the time people putting false info up to boost amount of customers they get.
Posted: Tue Oct 03, 2006 4:57 pm
by Luke
your host sucks @ss get a new one... that's terrible support
Posted: Tue Oct 03, 2006 7:29 pm
by akimm
Guys, just to make sure he does indeed have php, why not try a phpinfo
Posted: Tue Oct 03, 2006 7:31 pm
by volka
because of
Jef Patat wrote:The Ninja Space Goat wrote:first off... is php installed?
Yes it is, if I rename the index.html file to index.php everything works correctly
