Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP in HTML probs 1

Status
Not open for further replies.

ValleyWeb

Technical User
Feb 17, 2008
7
US
Hi all,

I have this code:

Code:
<?php

$ALP_URL           = "[URL unfurl="true"]http://valleywebnet.com/aclp/";[/URL]
$LIST_OF_TLDS      = array("com","net","org");
$FORCE_ONLY_DOMAIN = "true";

$lang = array ("available" => "Domain is available for registration.",
	 "invalid" => "Domain is invalid.",
	 "notavailable" => "Domain is not available.",
	 "Check" => "Check",
	 "Please_wait" => "Please wait...",
	 "Continue" => "Continue...",
	 "Domain" => "Domain : ",
	 "Querying" => "Querying whois servers...",
	 "only_domain" => "Register domain only",
	 "with_hosting" => "New domain with hosting");
	 
	 
//////////////////////////////////////////////////////////////////////////////
////////////////////////No need to edit below this line///////////////////////
//////////////////////////////////////////////////////////////////////////////
/****************************************************************************/
?>

in my page. I added the Apache handlers to execute PHP in HTML.

The problem that I have is that this prints out on my page like this.

"Domain is available for registration.","invalid" => "Domain is invalid.","notavailable" => "Domain is not available.","Check" => "Check","Please_wait" => "Please wait...","Continue" => "Continue...","Domain" => "Domain : ","Querying" => "Querying whois servers...","only_domain" => "Register domain only","with_hosting" => "New domain with hosting");//////////////////////////////////////////////////////////////////////////////////////////////////////No need to edit below this line//////////////////////////////////////////////////////////////////////////////////////////////////////****************************************************************************/
?>

Does anyone see anything that would cause this or have any idea what may be going on?

Thanks for all ideas! :)
Jim
 
Did you restart Apache after applying the handler modifications?


Can we see the handler additions you made?

What is the extension of the page this code is in: html or htm?

And what where the handlers that you added again html, htm or both?

Any reason why you don't just change the page's extension to php?


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Did you restart Apache after applying the handler modifications?
Yes

Can we see the handler additions you made?
addhandler application/x-httpd-php .php .html .htm

What is the extension of the page this code is in: html or htm?
Html

And what where the handlers that you added again html, htm or both?
Both -- addhandler application/x-httpd-php .php .html .htm

Any reason why you don't just change the page's extension to php?
This is going into a site that I am having to take over. It would basically mean going through all 500 pages and changing about 5000 links. Not a proposition that I want to take on unless I have to. Yes, I get lazy sometimes. :)

Anyway, thanks for looking,
Jim
 
Each extension should be in its own line.

Code:
addhandler application/x-httpd-php .php
addhandler application/x-httpd-php .html
addhandler application/x-httpd-php .htm


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Ohh and you should add them to the addtype section as well.

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


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Hi

Here on Tek-Tips we used to thank for the received help by giving stars. Please click the

* [navy]Thank vacunita
for this valuable post![/navy]


at the bottom of vacunita's post. That way you both show your gratitude and indicate this thread as helpful.

Feherke.
 
do you really need both the addType and the addHandler? i thought one was (supposed to be) for CGI and the other for SAPI but could in fact be interchanged.

not googled this or anything, just passingly interested if anyone knows the answer off the top of their head.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top