Reputation: 21
I have this code from the Internet:
<?php
session_start();
require("authen/inc/mysql.php");
require("authen/inc/Membership.class.php");
$Member = new Membership($DBH);
require("authen/inc/membership.php");
//test user permissions
if(!$Member -> test_perms(2))
{
//No perms, echo error or forward or something
die("You do not have permissions to view this page!<br>");
}
include("authen/inc/menu.php");
?>
It works perfectly on one of my webservers. So I copy everything using scp to another webserver but now I get this weird error:
test_perms(2)) { //No perms, echo error or forward or something die("You do not have permissions to view this page!
"); } include("authen/inc/menu.php"); ?>
It seems to me that the "->" is not interpreted correctly by this webserver or browser as it sees it as part of the HTML instead of PDO sign.
How do I fix this?
Thanks
Upvotes: 2
Views: 93
Reputation: 64526
That isn't an error, that is your PHP code being sent to the browser, as opposed to being executed on the server. Simply put, the server does not have PHP installed and configured correctly. The reason you only see part of the code is because the ->
is being interpretted as a closing HTML tag by the browser. if you view the raw source, you will see the entire PHP code.
Upvotes: 6