I'm creating a connection between an android mobile and a server. For this purpose I'm using XAMPP 1.8.0 with PHP: 5.4.4 on a Windows x64 7. Ten days ago, I was working with a code that worked 100%. Because of other work I couldn't work more with this project. Today I launched my app and surprise! There's a warning from function date and an error in the connection:
Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:\SERVER\xampp\htdocs\creater.php on line 13
[{"errorInfo":null}]
WTF have happened? In this time I updated windows with some windows update fixes and my mobile was updated from android 4.0.2 to 4.1.2.
PD. Error info comes from:
try{
$link = new PDO('mysql:unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock;host=localhost;dbname=mydb', 'root', '');
$link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(Exception $e) {
echo json_encode(array($e));
exit();
}