PHP within HTML works , php does not

Discuss server installationa nd configuration issues here

Moderators: macek, egami, gesf

kolson3208
New php-forum User
New php-forum User
Posts: 1
Joined: Fri Jul 06, 2012 6:44 am

PHP within HTML works , php does not

Postby kolson3208 » Fri Jul 06, 2012 7:01 am

I have a new Centos 5.8 /Apache server 2.2.3 running PHP 5.1.6. Virtual web servers also.
Both files are called index.php.. so php extensions are being processed.. I'm just stuck explaining the problem much less a cure..


My issue it that php within html code seems to work fine..


<html>
<head>
<title>PHP test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

however pure php code does not.
<?php
$home = "Y";
include ("header.php");
?>
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>
<style type="text/css">
...
This may be more of an Apache config issue, however I though this forum may know the issue faster.

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: PHP within HTML works , php does not

Postby johnj » Fri Jul 06, 2012 10:23 pm

Post the error message.


Return to “Server installation and configuration”

Who is online

Users browsing this forum: No registered users and 1 guest