sometimes I get the script execution error, where it takes over 30 seconds. It’s always in my connector file. Could you have a look pelase and let me know if you say anything obvious…
I’m on a VPS so I have full control of the server so I can make any required changes.
session_start();
date_default_timezone_set('Europe/London');
$uTime = time();
$uDate = date('Ymd',$uTime);
$onlineLimit = 1800;
$activeLimit = 3628800;
$fDate = date('Ymd', strtotime('next monday'));
$time_start = microtime(true);
$db = mysql_connect("localhost", "xxxxxxx", "xxxxxxxx") or die("Could not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("xxxx",$db))
die("No database selected.");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'")or die(mysql_error());
$page = $_SERVER['PHP_SELF'];
$season = mysql_fetch_assoc(mysql_query("SELECT `id`,`start`,`end` from `season` order by `id` DESC limit 0,1"));
$seasonDays = round((strtotime($season['end'])-strtotime($season['start'])) / 86400);
$currentDay = ceil(($uTime - strtotime($season['start'])) / 86400);
i would set higher max_execution time in php.ini and you will see where it will die…