title: html content in php file wont display in centos server
body: <p>I just finished testing my app in the local wamp server and transfered them to my centos VPS which is basically a lamp stack. 
  The problem is, many of my .php files which have html content in them are not displayed properly in there. Here is an example </p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;title&gt;
              Tailor Management - Order Details
          &lt;/title&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div align="center"&gt;
              &lt;h1&gt;
                  Order Details
              &lt;/h1&gt;
          &lt;/div&gt;
          &lt;div style="float: right; margin-right: 10px; background-color: #fe6154; border:2px;"&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;img src="images/blank.png" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;img src="images/1.png" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;img src="images/2.png" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;img src="images/3.png" /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
          &lt;table id="tfhover" class="tftable" border="1"&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      Oid
                  &lt;/th&gt;
                  &lt;th&gt;
                      Cusid
                  &lt;/th&gt;
                  &lt;th&gt;
                      Type
                  &lt;/th&gt;
                  &lt;th&gt;
                      I-Date
                  &lt;/th&gt;
                  &lt;th&gt;
                      D-Date
                  &lt;/th&gt;
                  &lt;th&gt;
                      Quan
                  &lt;/th&gt;
                  &lt;th&gt;
                      Rate
                  &lt;/th&gt;
                  &lt;th&gt;
                      Price
                  &lt;/th&gt;
                  &lt;th&gt;
                      Comments
                  &lt;/th&gt;
                  &lt;th&gt;
                      Status
                  &lt;/th&gt;
                  &lt;th&gt;
                      Details
                  &lt;/th&gt;
  
              &lt;/tr&gt;
              &lt;?php
  
              .....
                      ?&gt;
                  &lt;form name="v_order" method="POST" action="o_processor.php"&gt;
                  &lt;?php
  
                  ........
                  ?&gt;
                  &lt;tr style="background-color:&lt;?php echo $color; ?&gt;"&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "oid[]"  class="inp-form-oid" readonly value ="&lt;?php echo $oid[$counter]; ?&gt;"/&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "cusid[]" class="inp-form-oid" readonly value ="&lt;?php echo $cusid[$counter]; ?&gt;"/&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "type[]"  class="inp-form-oid" value ="&lt;?php echo $otype[$counter]; ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "idate[]"  class="inp-form-oid" value ="&lt;?php $date = new DateTime($idate[$counter]); echo $date-&gt;format('d-m-Y'); ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "ddate[]"  class="inp-form-oid" value ="&lt;?php $date = new DateTime($ddate[$counter]); echo $date-&gt;format('d-m-Y'); ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "quan[]"  class="inp-form-oid" value ="&lt;?php echo $quan[$counter]; ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "rate[]"  class="inp-form-oid" value ="&lt;?php echo $rate[$counter]; ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" name = "price[]" class="inp-form-oid" value ="&lt;?php echo $price[$counter]; ?&gt;" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;textarea name="comments[]" rows="2" cols="8"&gt;&lt;?php echo $comments[$counter]; ?&gt;&lt;/textarea&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
  
                          &lt;label&gt;
                              &lt;input type="checkbox" name="ready[]"  value ="&lt;?php echo $oid[$counter]; ?&gt;" &lt;?php  $status[$counter];
                              if($status[$counter] == 3){
                                  echo 'checked';
                              } ?&gt;/&gt;Ready
                          &lt;/label&gt;
                          &lt;label&gt;
                              &lt;input type="checkbox" name="done[]"  value ="&lt;?php echo $oid[$counter]; ?&gt;" &lt;?php  $status[$counter];
                              if($status[$counter] == 4){
                                  echo 'checked';
                              } ?&gt;/&gt;Done
                          &lt;/label&gt;
                          &lt;label&gt;
                              &lt;input type="checkbox"  name ="cancel[]" value ="&lt;?php echo $oid[$counter]; ?&gt;"/&gt;Cancel
                          &lt;/label&gt;
  
  
                      &lt;/td&gt;
                      &lt;td&gt;
  
                              &lt;a href="detail.php?oid=&lt;?php echo $oid[$counter];?&gt;" target="_blank"&gt;
                                  Order Details
                              &lt;/a&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;
                              &lt;a href="cust_detail.php?oid=&lt;?php echo $oid[$counter];?&gt;" target="_blank"&gt;
                                  Cust Details
                              &lt;/a&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;
                              &lt;a href="emp_detail.php?oid=&lt;?php echo $oid[$counter];?&gt;" target="_blank"&gt;
                                  Emp Details
                              &lt;/a&gt;
  
                      &lt;/td&gt;
  
                  &lt;/tr&gt;
  
                  &lt;?php
                  $color = "#ffff";
              }
              ?&gt;
              &lt;div align="center"&gt;
                  &lt;table style="margin-left:auto;margin-right:auto;margin-top: 40px;"&gt;
                      &lt;td&gt;
                          &lt;input type="submit" value="Submit" style="width:150px; height: 60px;" /&gt;
                      &lt;/td&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
              &lt;/form&gt;
          &lt;/table&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This code when running on my production server displays a page that looks like this</p>
  
  <p><img src="https://i.stack.imgur.com/PZbZG.jpg" alt="Page when running on local wamp server"></p>
  
  <p>But when running on the centos VPS this same page is looking like this</p>
  
  <p><img src="https://i.stack.imgur.com/lnFnw.jpg" alt="page when running on centos"></p>
  
  <p>I have checked that the sql queries are running just fine by manually running them the sql connectivity is fine too.</p>
  
  <p>I have done a clean install of the lamp for 3 time now but still getting the same error. Does anyone have any idea as to why this is happening? Some suggestion on how to solve this would be great.</p>
  
  <p>P.S:- I tried to ask this question in serverfault but it wont let me post the screenshots because I didn't have 10 reputation points in there, so sorry if this is not the right place to ask this question.</p>