I've just started out coding in PHP but there is something stopping me from enjoying this experience. I have intermittent problems connecting to my website when I click any link. I'm currently using the following php as a test at http://mysite.com:
<ul>
<li><a href="./">Home</a></li>
<li><a href="./index.php?nav=testone">Test 1</a></li>
<li><a href="./index.php?nav=testtwo">Test 2</a></li>
<li><a href="./index.php?nav=testthree">Test 3</a></li>
</ul>
<?php
if ($_GET["nav"] == "testone") {
echo "This is Test 1";
}
elseif ($_GET["nav"] == "testtwo") {
echo "This is Test 2";
}
elseif ($_GET["nav"] == "testthree") {
echo "This is Test 3";
}
else {
echo "Hello! Press a link.";
}
?>
The site loads fine at first but sometimes when I click a link (eg. link to mysite/index.php?nav=testtwo), it doesn't load and I get "The connection was reset" in my browser. I use site24x7.com to check that it's not just me who has this problem. Now if I use www.mysite.com/index.php?nav=testtwo, it loads fine, but even this fails eventually. It's a subdirectory domain but the root level domain loads consistently throughout all this. I've phoned my hosting provider who says the servers are fine and that I should check my php.ini but I have no idea what to look for. I did edit the following though:
from
max_execution_time = 300
max_input_time = 60
memory_limit = 18M
to
max_execution_time = 300000
max_input_time = 300000
memory_limit = 256M
But that didn't make any difference. I'd like to first of all diagnose the problem and I have no idea where to start. Please any input! Thanks!