View Full Version : PHP Error
I need help to solve PHP error
Warning: date() [function.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.
djr33
03-04-2014, 07:38 AM
http://www.php.net/date_default_timezone_set
I tried to put this code into my index.php .. but no luck
if( ! ini_get('date.timezone') )
{
date_default_timezone_set('GMT');
}
do I need to alter php.ini
Your ini file would be the preferred place to set a timezone, but setting it at runtime should work also (assuming you do so before using any date/time functions). What do you mean by "no luck"? are you still getting the same error?
?foru
03-05-2014, 02:35 AM
Here is a list of available timezones if that helps: http://www.php.net/manual/en/timezones.php
Ok I already solved this problem with the help of Host ..
I am using Vbulletin 3.8.7 on my site .. when I use thanks button I get this error
Deprecated: Assigning the return value of new by reference is deprecated in /home/mysite/public_html/forum/includes/class_core.php on line 2552
my site have PHP version 5.3.27
How to solve this issue
Beverleyh
03-05-2014, 06:41 AM
Normally if you Google the error along with the name if the script, you'll find answers/solutions.
Lots found here: https://www.google.com/search?q=deprecated%20assigning%20the%20return%20value%20of%20new%20by%20reference%20vbulletin
Please reply HERE (http://www.dynamicdrive.com/forums/showthread.php?76529-AutoIndex-php)
I am using Vbulletin 3.8.7 on my site .. when I use thanks button I get this error
Deprecated: Assigning the return value of new by reference is deprecated in /home/mysite/public_html/forum/vbb/includes/init.php on line 37
( etc. )
Unfortunately, there is no easy solution for this. What's happening is that your version of VBulletin was written for an earlier version of PHP, which handled objects differently than current versions. Basically, every line of code that looks something like this:
$something =& new Something();…should look like this instead:
$something = new Something();I would not recommend implementing this fix yourself unless a) you are comfortable doing so, and b) you make a complete backup first.
Your google searching may turn up suggestions to change PHP's error reporting level. This is Not A Solution®: it's just a way of ignoring the problem.
All things considered, the best solution would be to visit the VB site and find out if there is a more recent release that fixes this problem. If not, file a bug report.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.