Cristian D
Cristian D

Reputation: 691

PHP no Longer getting Parsed?

Okay, so I had a website that was perfectly functional, I haven't done any changes at all, but I know after my host updated their CP to V2, this happened:

PHP Code like this:

<?php
  $result = mysql_query("SELECT * FROM tz_members ORDER BY id");
  echo "<table border='0'>
    <tr>
      <th style='width: 15px'>ID</th>
      <th style='width: 300px'>Username</th>
      <th style='width: 100px'>Privileges</th>
      <th style='width: 200px'>Join Date</th>
    </tr>";

  while($row = mysql_fetch_array($result))
  {
    echo "<tr>";
    echo "<td>" . $row['id'] . "</td>";
    echo "<td>" . $row['usr'] . "</td>";
    echo "<td>" . $row['priv'] . "</td>";
    echo "<td>" . $row['dt'] . "</td>";
    echo "</tr>";
  }
  echo "</table>";
?>
</center>
<?php
  endif;
?>

Now instead of properly outputting my member list, will show up as plain text. Here's the page that should display an example: http://www.cod5showtime.url.ph/members.html

Few PHP functions still work properly, any ideas why ? :/

Upvotes: 0

Views: 107

Answers (4)

Ofer
Ofer

Reputation: 11

Use .htaccess anyway,but be sure of what you do there. It is most recommended to have the power of parsing and rendering on your side, especialy when you know there an upgrade on your host's side. One more thing - backup, backup,backup.

Upvotes: 0

Karim Lahlou
Karim Lahlou

Reputation: 168

rename your file to members.php

Upvotes: 1

Robbert
Robbert

Reputation: 6592

PHP is generally parsed when the file name ends in php. You can configure the server to use other extensions, such as html, but it appears your administrator didn't recreate the setting when he or she upgraded your server.

Upvotes: 4

user924016
user924016

Reputation:

Your host has made a change to the configuration. It no longer parses .html as php.

Rename to .php or take a look at Using .htaccess to make all .html pages to run as .php files?

Upvotes: 3

Related Questions