PDA

View Full Version : New Error Message: Uncaught exception 'Exception' with message 'DateTime::__construct()


NobodysHero
10-16-2016, 10:27 AM
There's this one:

[16-Oct-2016 15:20:42 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): 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 /home/mystfell/public_html/classes/class_member.php:36
Stack trace:
#0 /home/mystfell/public_html/classes/class_member.php(36): DateTime->__construct()
#1 /home/mystfell/public_html/classes/class_admin.php(16): Member->__construct('1')
#2 /home/mystfell/public_html/classes/class_membercreator.php(54): Admin->__construct('1')
#3 /home/mystfell/public_html/classes/class_membercreator.php(35): MemberCreator->create_admin()
#4 /home/mystfell/public_html/classes/class_mysidia.php(273): MemberCreator->create()
#5 /home/mystfell/public_html/classes/class_mysidia.php(168): in /home/mystfell/public_html/classes/class_member.php on line 36

And this one:
[16-Oct-2016 15:21:38 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): 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 /home/mystfell/public_html/classes/class_visitor.php:14
Stack trace:
#0 /home/mystfell/public_html/classes/class_visitor.php(14): DateTime->__construct()
#1 /home/mystfell/public_html/classes/class_visitorcreator.php(34): Visitor->__construct('173.254.250.226')
#2 /home/mystfell/public_html/classes/class_visitorcreator.php(20): VisitorCreator->create_guest()
#3 /home/mystfell/public_html/classes/class_mysidia.php(273): VisitorCreator->create()
#4 /home/mystfell/public_html/classes/class_mysidia.php(168): Mysidia->getCurrentUser()
#5 /home/mystfell/public_html/class in /home/mystfell/public_html/classes/class_visitor.php on line 14

Please help. T_T

Dinocanid
10-16-2016, 11:17 AM
Did you change any lines in the class files or were you working on a different one and you started getting these? It looks like the error is being caused by "DateTime" lines in the class files from what I can see. For example, in your class_member.php file, does line 36 look like this?:
$this->lastactivity = new DateTime();

NobodysHero
10-16-2016, 11:21 AM
I haven't changed anything in any of those files, so I'm not sure what's wrong. T_T I don't touch the class files unless I'm instructed to by a tutorial on here. It was working fine last night, I wake up this morning and I have a error page on my main URL.

Uploaded what I could of the error log, incase there's something I didn't paste above that might help.

Hall of Famer
10-16-2016, 11:35 AM
Well this has nothing to do with Mysidia Adoptables itself, its something wrong with your PHP settings. Consult with your webhost and ask them what is going on, most likely they had a PHP upgrade or did some changes to the PHP on your server that messed up your code. If you are on VPS or Dedicated Webhost, you may edit php.ini to fix this issue yourself.

NobodysHero
10-16-2016, 11:39 AM
Thanks, HoF! I'll message them and see what the deal is. I did check the version of PHP and it's still 5.4. Wish me luck! XD