debugging - This site can’t be reached after executing php script

I have a PHP script that is more than 400 lines of code. It was working fine, I made like couple of updates to it and now the browser is showing the following error:
This site can’t be reached
website.com unexpectedly closed the connection.
I have the following code to show and log errors:
//Set maximum execution time to max value
set_time_limit(0);
//Show errors on page
ini_set('display_errors',1);
//Report all errors
error_reporting(E_ALL);
//Log errors
ini_set('log_errors', TRUE);
//Change directory to file location
$fileDir = dirname(__FILE__);
chdir($fileDir);
//Save errors in errors.txt
ini_set('error_log', $fileDir . '/errors.txt');
So the errors should be saved in a fileerrors.txt
, However I don't see any errors in that file.
The script is stopped after few seconds without any obvious error.
I checked the script for typo errors specially the updates I made, But I can't find any.
The script is hosted on Cpanel server. Is there is a way to debug or see where the script is stopped?
How to know if the script exceeded the maximum memory or CPU for example? Although it just stops after few seconds not minutes.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: uncaught error: call to undefined function mysqli_connect()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.