# PHP code not recognised

**URL:** <https://www.phphelp.com/t/php-code-not-recognised/25727>\
**Category:** PHP Installation and Configuration\
**Created:** [February 15, 2017, 2:41am UTC](https://www.phphelp.com/t/php-code-not-recognised/25727 "2017-02-15T02:41:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://www.phphelp.com/uploads/default/original/2X/2/243e9ed5d93c5653ce3186f18df16e019ce38445.png) [@system](https://www.phphelp.com/u/system)\
**Post date:** [February 15, 2017, 2:41am UTC](https://www.phphelp.com/t/php-code-not-recognised/25727/1 "2017-02-15T02:41:14Z")

</div>

I have installed apache2 and php5. My trial page index.html displays OK in Firefox except that the script \<?php echo "This is John page" ?\> isn’t rendered.  
The result of a2query -m php5 is php5(enabled by maintainer script)  
Any ideas on what’s wrong and how to correct the problem  
Thanks

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [February 15, 2017, 4:55am UTC](https://www.phphelp.com/t/php-code-not-recognised/25727/2 "2017-02-15T04:55:23Z")

</div>

Php only executes for php extensions, run thru the server.

---

<div class="post-metadata">

**Author:** ![benanamen](https://www.phphelp.com/user_avatar/www.phphelp.com/benanamen/32/287_2.png) [@benanamen](https://www.phphelp.com/u/benanamen)\
**Post date:** [February 15, 2017, 7:15am UTC](https://www.phphelp.com/t/php-code-not-recognised/25727/3 "2017-02-15T07:15:40Z")

</div>

You need to change the .html to .php
