In my project, there is just one file index.php and the following is the entire content of it:
<?php
session_start();
if(isset($_SESSION['count'])) {
$_SESSION['count'] = intval($_SESSION['count']) + 1;
}
else {
$_SESSION['count'] = 0;
}
echo $_SESSION['count'];
For some reason, the script runs twice and thus increments by 2 on each reload. I do not have any .htaccess file or any rewrite rules that I know of. I am running laravel valet as a webserver.
Additionally, I have observed that the problem persists when opening the script in chrome, but not in firefox.
Where could I look in order to start debugging this issue?