我的PDO适用于我的本地主机但不适用于我的主机[重复]

I am using a $_SERVER['REQUEST_URI'] to get a token which I then check in the database to get a link I have the same database table for both. Of course I changed the config.php But the problem is that Half of the script does not even appear

I tried debugging by echo hi1 and hi2 hi1 appears but hi2 does not appear

$tokenplus = $_SERVER['REQUEST_URI'];

$tokenit = substr("$tokenplus",1);


include 'config.php';
echo "hi1";

//hi 1 should appear

$stmt = $con -> prepare ("SELECT 
  * 
       FROM 
  links 
       WHERE 
  alias =?
  LIMIT 1");

  $stmt-> execute ( array($tokenit));
  $row =$stmt -> fetch();
  $count = $stmt-> rowCount();
  echo "hi2";

//Hi 2 should appear


  if ($stmt-> rowCount() > 0) {
  $linkit = $row['url'];

?>

<center>







        <script>

               function enableBtn(){
                   document.getElementById("button1").disabled = false;
                  }
               </script>
               <div class="g-recaptcha" data-sitekey="6LeX3a8UAAAAABnC7xJ9Qv7jxcRayrEcwjm4tnah" data-callback="enableBtn"></div>
               <form action = "<?php echo 'http://www.'.$linkit;?>" >              
               <input class="btn btn-outline-primary btn-captcha m-4 disabled" type="submit" value="Click here to continue" id="button1" disabled="true">

            </form>


</center>




<?php 
}else{
 ?><center> <?php echo  'The link was not found' ;?></center>
 <?php
}
?>
</div>