I had to set up a new dev machine and installed a LAMP stack with apache2.04, mysql8, and php7.4. My index.php used to work but on the new machine the php isn’t terminating. Here’s the code:
“`
`<?php
$php_scripts = ‘../php/’;
require $php_scripts . ‘PDO_Connection_Select.php’;
require $php_scripts . ‘GetUserIpAddr.php’;
{
$ip = GetUserIpAddr();
if (!$pdo = PDOConnect(“foxclone_data”)) {
exit;
}
{
$stmt = $pdo->prepare(“INSERT INTO download (address) values (?)”);
$stmt->execute([$ip]) ;
}
}
?>
<!DOCTYPE html> <!– showing brown like php code in editor –>
<html lang=”en”>
<head>
etc,etc….`
This causes the following problem:
“`
`test is currently unable to handle this request.
HTTP ERROR 500`
Does anyone have any ideas why this is happening? The code worked on the old machine.