Hi, this is my first post but I hope it's fruitful. First, I am running PHP 5.1.6 on my VPS and I am trying to write a Leaderboard script for a game that takes place on my server. The game was not written by me and I know it works perfectly. I have also accessed the database through shell multiple times, so I know that works fine. Here is the code for my leaderboard script:
<html>
<title>Middle Cup Leaderboard</title>
<body>
<?php
echo "about to connect\n";
$dbc = mysqli_connect ('localhost','root', 'password', 'shoddybattle') OR die ('sql error:' . mysqli_connect_error() );
echo "Debugging point: connected\n";
//$query = "SELECT estimate FROM users";
//$result = mysqli_query($dbc,$query) or die ('Could not retrieve ratings!');
//echo 'Debugging point: requested\n';
//mysqli_close($dbc);
//echo 'Debugging Point: closed\n';
//echo 'Middle Cup Leaderboard Results\n';
?>
</body>
</html>
Here is the source code of the output when I navigate to it:
<html>
<title>Middle Cup Leaderboard</title>
<body>
about to connect
As you can see, it looks as if the program stops indefinitely when I try to connect to the database. Does anyone know what could be wrong with this? Any help would be greatly appreciated!