Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: "Peter H. Coffin" Newsgroups: comp.lang.php Subject: Re: why php echo does not show up in HTML? Date: Fri, 24 May 2013 10:51:03 -0500 Organization: A noiseless patient Spider Lines: 35 Message-ID: References: <78f2c263-051b-4b12-b2fc-049aeae3fdd6@z8g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="4163d0103afdb3d32fe6c98974b1e330"; logging-data="16577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hEzpg33p44ZDxEtpQ90wD" User-Agent: slrn/0.9.9p1 (OpenBSD) Cancel-Lock: sha1:vsrly6tp1R2rv8BuzjsEUXNviRU= Xref: csiph.com comp.lang.php:9600 On Fri, 24 May 2013 06:20:03 -0700 (PDT), steve nospam wrote: > >> >> I found the problem. >> >> I needed to modify the .htaccess file. added this line >> >> AddType application/x-httpd-php .htm >> >> Now it works. php works from inside htm file. No need to change file >> extension. > > guys, the above fix did not work on the server. Must be something with > the php used there. It worked on my local apache server. The server configuration may be forbidding FileInfo overrides from .htaccess. In newer Apache versions, allowing this by default is no longer the case, either. > So, I still > looking for a solution. My question is this: > > If I change my index.htm to index.php, is there a way to make an alias > or something so that not all my links are broken? so that a link to > index.htm will use index.php? No. What handler the Apache server uses for type depends on the name. You cannot use a different thing in the name than what the server is looking for and get it to work. -- "It's 106 light-years to Chicago, we've got a full chamber of anti- matter, a half a pack of cigarettes, it's dark, and we're wearing visors." "Engage."