Warning: strtotime() [function.strtotime]: It is not safe to
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue May 03, 2011 3:07 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
It's very helpful, thanks for that
-
- Joomla! Apprentice
- Posts: 33
- Joined: Sun Feb 24, 2008 5:22 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
Changing the __construct is not the answer. It will cause you more issues that way.. please check the following first:
#1. Check your Php.ini file to reflect your time zone
date.timezone America/New_York
then restart apache.
#2. You can add this to the date.php file:
date_default_timezone_set('America/New_York');
The issue appears to be with Php 5.3 and above. just keep this in mind.
#1. Check your Php.ini file to reflect your time zone
date.timezone America/New_York
then restart apache.
#2. You can add this to the date.php file:
date_default_timezone_set('America/New_York');
The issue appears to be with Php 5.3 and above. just keep this in mind.
- STIN
- Joomla! Apprentice
- Posts: 32
- Joined: Tue Jul 19, 2011 10:02 pm
Re: Warning: strtotime() [function.strtotime]: It is not saf
OMGZ! THANK YOU!! I WAS CRUMBLING FOR A WEEK OVER THIS! YOU RULE!!kanji2000 wrote:There is something wrong with the code itself.
Go to C:\xampp\htdocs\libraries\joomla\utilities\date.php
Line 52 creates a function called __construct. Notice how the underscore is too long. Highlight part of it and you'll see that it's actually two underscores. This is a mistake. Highlight one of the underscores and delete it. You should end up with _construct. Notice how the underscore is shorter?
Now save and reload.
Happy coding!!!
~stin
Biotrends Intl.
Biotrends Intl.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Jul 30, 2011 3:18 pm
Re: Warning: strtotime() [function.strtotime]: It is not saf
@dhuelsmann
Brilliant. I was getting timezone errors all over my Joomla page. This fixed it.
Brilliant. I was getting timezone errors all over my Joomla page. This fixed it.
Thanks!dhuelsmann wrote: if your host allows php directives in .htaccess, you can add this command to your .htaccess in Joomla root.
Code:
php_value date.timezone yourServerTimeZone
-
- Joomla! Apprentice
- Posts: 49
- Joined: Fri Aug 05, 2011 11:12 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
I downgraded to 5.2 and all my errors dissapeared.Pancakes wrote:Off of the research I have done, I have discovered that the reason this issue may occur is because of PHP 5.3
Downgrading or installing PHP 5.2 may resolve this error from occurring. I have not tested this myself but plan to.
Cheers
- bossies
- Joomla! Enthusiast
- Posts: 112
- Joined: Tue Oct 11, 2005 3:53 pm
- Location: Malmesbury - South Africa
- Contact:
Re: Warning: strtotime() [function.strtotime]: It is not saf
thanks @dhuelsmann worked for me as well!
- hannylicious
- Joomla! Explorer
- Posts: 292
- Joined: Fri Feb 22, 2008 2:57 pm
- Location: Chicago, IL
- Contact:
Re: Warning: strtotime() [function.strtotime]: It is not saf
I know this is an older thread, but Dhuelsmann's recommendation of adding the correct code to the php.ini worked out perfectly for me!
Pushpin Designs
www.pushpindesigns.com
www.pushpindesigns.com
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Sep 18, 2011 11:02 pm
Re: Warning: strtotime() [function.strtotime]: It is not saf
if none of those solution worked add this to your index.php
last resort solution!
last resort solution!
Code: Select all
error_reporting(0);
@ini_set(‘display_errors’, 0);
-
- Joomla! Fledgling
- Posts: 3
- Joined: Sun Jan 23, 2011 10:10 pm
Re: Warning: strtotime() [function.strtotime]: It is not saf
Bingo! Thank you, Auntyfleen.auntyfleen wrote:Hello. The solution for me was that it was a compatibility issue (PHP 5.3 not being compatible with Joomla) See this post...
http://forum.joomla.org/viewtopic.php?p=1810330
-
- Joomla! Apprentice
- Posts: 11
- Joined: Thu Nov 10, 2011 7:50 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
My problem was caused by my shared hosting server not running the correct version of PHP. I added this line, AddType x-mapp-php5 .php, in my .htaccess to the root of my site and it immediately solved the problem.
-
- Joomla! Apprentice
- Posts: 25
- Joined: Sun Nov 23, 2008 3:32 pm
Re: Warning: strtotime() [function.strtotime]: It is not saf
I'm also having the same issue. Would someone like to fix this for me?LoonyTune wrote:I downgraded to 5.2 and all my errors dissapeared.Pancakes wrote:Off of the research I have done, I have discovered that the reason this issue may occur is because of PHP 5.3
Downgrading or installing PHP 5.2 may resolve this error from occurring. I have not tested this myself but plan to.
Cheers
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jun 13, 2011 10:50 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
For GoDaddy and others:
Why isn't my php.ini file taking effect?
Answer:
http://support.godaddy.com/help/5647/wh ... ing-effect
Why did I receive a timezone error with my PHP website?
Answer:
http://support.godaddy.com/help/6703/wh ... hp-website
What is my timezone?
Answer:
http://www.php.net/manual/en/timezones.php
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Apr 22, 2013 5:56 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
Dear All
My website is hosted in third party hosting provider.
I have added code date_default_timezone_set ("America/New_York"); in my date.php file
But still I am getting the error in line 56.
I don't know will it get effected immediately or should we ask the provider to do something at their end
please suggest.
Thanks in advance,
Tajudeen
My website is hosted in third party hosting provider.
I have added code date_default_timezone_set ("America/New_York"); in my date.php file
But still I am getting the error in line 56.
I don't know will it get effected immediately or should we ask the provider to do something at their end
please suggest.
Thanks in advance,
Tajudeen
-
- Joomla! Apprentice
- Posts: 13
- Joined: Wed Mar 17, 2010 11:54 am
Re: Warning: strtotime() [function.strtotime]: It is not saf
THANK YOU for posting this helpful material.sitehost wrote:Changing the __construct is not the answer. It will cause you more issues that way.. please check the following first:
#1. Check your Php.ini file to reflect your time zone
date.timezone America/New_York
then restart apache.
#2. You can add this to the date.php file:
date_default_timezone_set('America/New_York');
The issue appears to be with Php 5.3 and above. just keep this in mind.
I was getting errors suddenly, this morning, matching the description in this post, on the front end and back end of my live site. (Not sure what version of PHP my host is using--probably the latest--hosted by Siteground.)
The steps suggested above worked to apparently completely clear the errors--in both cases the suggested code was added to the end of the files referred to. Step #1 fixed the front end errors which were appearing probably at the top of every site page. Step #2 fixed the back end errors which were showing in the Articles manager.
Joomla 1.5.26, live site, on Linux server
twinoakscommunity.org