I'm sorry if I am an idiot for asking this question.
but I don't seem to be able to make php interpreter work on Centos7.
I've installed apache with yum install httpd
I've installed php with : yum install php php-devel
basic Apache is working well,
I create a VirtualHost wih a simple html and its working fine.
but when I add the php statement ( <?php echo ... ?>) only the html is showing, I done lots of research and it seems like it should be working.
here is my index.html, which is not showing or processing php code.
what can I do to fix this ? thank you
<!-- DOCTYPE html -->
<html lang='en'>
<head>
<meta charset="UTF-8" />
<title>
My First site
</title>
<link rel="stylesheet" type="text/css" HREF="main.css" />
</head>
<body>
<h1>
HTML Document Structure
</h1>
<p>
This is a simple HTML document.
<?php $var=1 ;
echo $var; ?>
</p>
</body>
</html>
need help with PHP on Apache
Re: need help with PHP on Apache
Your index.html would need to be index.php so that the php interpreter is invoked.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 12
- Joined: 2014/07/21 15:01:48
Re: need help with PHP on Apache
thank you TrevorH
that solved my issue.
that solved my issue.