The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Thu Aug 19, 2010 10:38 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Aug 19, 2010 10:30 am
Posts: 3
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!!!

:D


This solution worked for me but in my case it was line 56.

Thanks for the help.


Top
 Profile  
 
PostPosted: Thu Aug 19, 2010 4:23 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Aug 19, 2010 10:30 am
Posts: 3
I still see the error:

Warning: strtotime() [function.strtotime]: 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 'America/Chicago' for '-5.0/DST' instead in C:\xampp\htdocs\joomlabeta\libraries\joomla\utilities\date.php on line 56

(Using Notepad++)

date.php Line 56 reads
Code:
$this->_date = strtotime(gmdate("8-19-2010 10:39:45", time()));


c:\xampp\php\php.ini contains
Code:

[Date]
; Defines the default timezone used by the date functions
;date.timezone = "America/Chicago"

; http://php.net/date.default-latitude
;date.default_latitude = 31.7667

; http://php.net/date.default-longitude
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333



Do I need to use the ful time zone as described in the error
Code:
'America/Chicago' for '-5.0/DST'

or what should I do?


Top
 Profile  
 
PostPosted: Thu Aug 19, 2010 8:30 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18621
Location: Omaha, NE
Just uncomment the line in php.ini by removing the semi-colon
Code:
;date.timezone = "America/Chicago"

_________________
Regards, Dave
http://www.kiwaniswest.org


Top
 Profile  
 
PostPosted: Tue Aug 24, 2010 4:06 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 24, 2010 3:54 am
Posts: 2
I was change my php.ini :

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Krasnoyarsk"

but in my joomla (localhost) like this...

Warning: strtotime() [function.strtotime]: 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\xampp\htdocs\Mysitus\libraries\joomla\utilities\date.php on line 56

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. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\xampp\htdocs\Mysitus\libraries\joomla\utilities\date.php on line 198

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. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\xampp\htdocs\Mysitus\libraries\joomla\utilities\date.php on line 198

Can anyone help me????


Top
 Profile  
 
PostPosted: Tue Aug 24, 2010 5:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Aug 19, 2010 10:30 am
Posts: 3
As a newbie to Joomla I want to relate my experience with this erro. What I did in my case I used a the ZIP file to install the latest XAMPP then followed the instructions for MySQL and then Joomla in that order and skipping a few steps along the way that landed me here.

After the joomla install I got the same error as posted here, along my 3 day search I ended up doing all these steps.

1. Run the SETUP script in XAMP in order to have it set the time zone for the server. Better yet read the README.xtx file because it helps avoid most rookie mistakes. I should know.

2. Edit the C:\xampp\php\php.ini file to match the time zone you are in like I did mine for America/Chicago

Code:
[Date]
196     ; Defines the default timezone used by the date functions
197     ; http://php.net/date.timezone
198     date.timezone = "America/Chicago"


NOTICE: Make sure you take the ; off the front of the line in question because the semicolon comments your line out, so take it off.

3. Edit C:\xampp\htdocs\joomlabeta\libraries\joomla\utilities\date.php

( I had to undo my changes to line 56 to match this)
Code:
52   function __construct($date = 'now', $tzOffset = 0)
53   {
54      if ($date == 'now' || empty($date))
55      {
56         $this->_date = strtotime(gmdate("M d Y H:i:s", time()));
57         return;
58      }


After all the changes restart the Apache server and MySQL and there is no more errors.

Hope this helps


Top
 Profile  
 
PostPosted: Fri Aug 27, 2010 3:27 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 24, 2010 3:54 am
Posts: 2
Thank You Very Much "JF", Its has completed my problem.
But I have a new problem that is only the header display in my joomla. Whether I use the default templates or templates joomla artisteer artificial.

Help me..


Top
 Profile  
 
PostPosted: Sat Sep 04, 2010 1:44 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 04, 2010 1:42 pm
Posts: 1
Thanks luckymohan, it works for me.


Top
 Profile  
 
PostPosted: Sat Sep 04, 2010 7:38 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 04, 2010 6:42 pm
Posts: 1
Thank you folks! You solved my issues as well!


Top
 Profile  
 
PostPosted: Sat Sep 11, 2010 1:17 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 11, 2010 1:11 pm
Posts: 2
Hi there,

I have downloaded the latest stable versions of joomla, xampp, PHP today and am having the exact same problem as the original poster.
Except that the php.ini file cannot be found anywhere!
I looked in Apache/bin, it's not there. Then I ran a search on my computer, which gave no results.
Any help wpuld be very much appreciated.

Kind Regards,

Geraldine


Top
 Profile  
 
PostPosted: Thu Sep 30, 2010 7:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 30, 2010 4:18 pm
Posts: 9
Hello All!

Quote:
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 'America/New_York' for '-4.0/DST' instead in C:\Inetpub\wwwroot\TIER1Web\Joomla\plugins\system\jalib20\core\ja.php on line 109 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 'America/New_York' for '-4.0/DST' instead in C:\Inetpub\wwwroot\TIER1Web\Joomla\plugins\system\jalib20\core\ja.php on line 109


I have updated both php.ini and date.php with the information listed on this post.

Joomla is running on a IIS server, <server administrator does not want to upgrade to apache>

I'm trying to understand what ja.php has to do with this error.

ja.php file is located in ...\Joomla\plugins\system\jalib20\core

i looked for the plugin Jalib20 and attempted to remove it but Its not listed as something removable.

For more info on the error please see this post - viewtopic.php?f=471&t=553236&p=2274220#p2274220


Top
 Profile  
 
PostPosted: Tue Oct 26, 2010 12:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 25, 2010 11:41 pm
Posts: 3
Hi, this is my problem:

Warning: strtotime() [function.strtotime]: 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 'America/New_York' for '-4.0/DST' instead in C:\xampp\htdocs\crystal\libraries\joomla\utilities\date.php on line 56

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. We selected 'America/New_York' for '-4.0/DST' instead in C:\xampp\htdocs\crystal\libraries\joomla\utilities\date.php on line 198

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. We selected 'America/New_York' for '-4.0/DST' instead in C:\xampp\htdocs\crystal\libraries\joomla\utilities\date.php on line 198

String 56 $this->_date = strtotime(gmdate("M d Y H:i:s", time()));

String 198 $date = ($this->_date !== false) ? date('Y-m-d H:i:s', $date) : null;

how i can modified? I don't know.... someone can help me please.


Top
 Profile  
 
PostPosted: Tue Oct 26, 2010 3:22 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 25, 2010 11:41 pm
Posts: 3
I have write in php.ini
date.timezone = 'America/New_York' for '-4.0/DST'
and now write me:

Warning: mktime() [function.mktime]: 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 'America/New_York' for '-4.0/DST' instead in C:\xampp\htdocs\evolution\libraries\joomla\utilities\date.php on line 117

Warning: strftime() [function.strftime]: 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 'America/New_York' for '-4.0/DST' instead in C:\xampp\htdocs\evolution\libraries\joomla\utilities\date.php on line 250

What can I do??


Top
 Profile  
 
PostPosted: Tue Oct 26, 2010 3:35 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 25, 2010 11:41 pm
Posts: 3
I have to probe write this too but not working...

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone = "America/New_York"


Top
 Profile  
 
PostPosted: Fri Nov 05, 2010 6:46 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Aug 17, 2006 8:24 pm
Posts: 737
Location: Canada
Wow...just reinstalled my OS and did a new install of Xampp, and Joomla for a site I am working on, and experienced this whole thing for the very first time in the years I've been using both...I have to say this is the most messed up thing ever.

Anyway, the only way I got mine to work is to add 'America/Los_Angeles' to the date in the xampp php.ini ....I tried Canada/Vancouver (which is where I am) and got the errors back, so I switched back to the America/Los_Angeles one and all functional again.

...like I said, this is the most messed up thing ever.

Also, one commented:
Quote:
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.

If that is a legitimate bug/error in the Joomla code, then this should be brought to the attention of the developers.


Top
 Profile  
 
PostPosted: Fri Nov 05, 2010 6:54 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18621
Location: Omaha, NE
GPixels wrote:
Anyway, the only way I got mine to work is to add 'America/Los_Angeles' to the date in the xampp php.ini ....I tried Canada/Vancouver (which is where I am) and got the errors back, so I switched back to the America/Los_Angeles one and all functional again.


Cause you should have used America/Vancouver see http://www.php.net/manual/en/timezones.america.php

_________________
Regards, Dave
http://www.kiwaniswest.org


Top
 Profile  
 
PostPosted: Fri Nov 05, 2010 7:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 30, 2010 4:18 pm
Posts: 9
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.


Top
 Profile  
 
PostPosted: Wed Nov 10, 2010 2:38 am 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Dec 13, 2008 9:30 pm
Posts: 3
andrisaick19 wrote:
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!!!

:D



Thanks Master, its fix my Problem :D :D "Two Tumbs Up"


It worked perfectly, I was using a jomlart T3 version and had the same issue. Thanks!


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 1:02 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Nov 12, 2010 1:28 am
Posts: 4
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!!!

:D


Thanks so much!!!!!!!!!!!


Top
 Profile  
 
PostPosted: Tue Nov 16, 2010 2:37 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Mar 19, 2007 2:43 pm
Posts: 4
I get the same error on a new joomla 1.5.22 installation and php 5.3 SO to fix it, of course nothing in this post worked.

I had the timezone set in php.ini and I'm on a live production server not XAMP

So to fix it I changed this in date.php from

Code:
   function __construct($date = 'now', $tzOffset = 0)
   {
      if ($date == 'now' || empty($date))
      {
         $this->_date = strtotime(gmdate("M d Y H:i:s", time()));
         return;
      }


to

Code:
function __construct($date = 'now', $tzOffset = 0)
   {
      date_default_timezone_set ("America/New_York");
      if ($date == 'now' || empty($date))
      {
         $this->_date = strtotime(gmdate("M d Y H:i:s", time()));
         return;
      }


I just added the function that the error kept asking for and that finally fixed my issue!


Top
 Profile  
 
PostPosted: Tue Nov 16, 2010 11:41 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 02, 2009 5:05 pm
Posts: 32
Location: Jersey UK
fsfweb You're a top fella.

That was the exact way to deal with the issue and kudos to you for attacking it logically.

MC


Top
 Profile  
 
PostPosted: Wed Nov 17, 2010 12:16 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Mar 19, 2007 2:43 pm
Posts: 4
Too bad they didn't fix that in the latest version, oh well, thanks btw!


Top
 Profile  
 
PostPosted: Thu Nov 18, 2010 6:00 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 02, 2009 5:05 pm
Posts: 32
Location: Jersey UK
My thoughts exactly.

Good luck.


Top
 Profile  
 
PostPosted: Sun Dec 12, 2010 8:10 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 11, 2010 7:00 am
Posts: 6
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!!!

:D

thanks a million! u save my life sir! :)


Top
 Profile  
 
PostPosted: Sun Dec 19, 2010 1:12 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Dec 19, 2010 1:07 pm
Posts: 4
Please someone help I have these types of error on my website (http://www.byheartsolution.com/).

Please Tell how to solve it as soon as possible.

Please Help........


{Warning: strtotime() [function.strtotime]: 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 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/byhearts/public_html/libraries/joomla/utilities/date.php on line 133

Warning: strtotime() [function.strtotime]: 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 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/byhearts/public_html/libraries/joomla/utilities/date.php on line 133

Warning: strtotime() [function.strtotime]: 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 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/byhearts/public_html/libraries/joomla/utilities/date.php on line 56

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. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/byhearts/public_html/libraries/joomla/utilities/date.php on line 198

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. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/byhearts/public_html/libraries/joomla/utilities/date.php on line 198}


Top
 Profile  
 
PostPosted: Sun Dec 19, 2010 2:28 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18621
Location: Omaha, NE
@nikhilchamp: Read this thread - your solution is provided.

_________________
Regards, Dave
http://www.kiwaniswest.org


Top
 Profile  
 
PostPosted: Fri Jan 21, 2011 6:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 28, 2010 1:17 am
Posts: 20
@ dhuelsmann: found this thread searching the internet.
THANKS ALOT! works perfect!


Top
 Profile  
 
PostPosted: Tue Mar 01, 2011 1:47 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Feb 23, 2011 12:58 am
Posts: 3
It is Feb 28th 2011. I have spent all day (literally the last 12 hours minus an hour total to eat and use the loo) trying to figure out why the install of joomla 1.5 was so impossible compared to the last time I installed it. Short version, had 1.5, went to 1.6, had problems, masters told me to use 1.5. Somewhere between the version changes, xampp changed the version of php they bundled in their piece. Between the forums of both joomla and xampp, I finally figured out all of the incompatibilities.
For any other frustrated newbies:
anything newer than xampp 1.7.1 uses a version of php that is not compatible w/ any joomla version. All the changing of php.ini files, and looking for library directories that don't actually exist, and searching out patches etc etc etc etc is an exercise in insanity.
Just remember when you download and install xampp, at least for windows xp, use 1.7.1 or 1.7.
Why joomla doesn't make this message the first thing you see on their download page is a question someone above my pay grade will have to answer. Now if you'll excuse me I'm going to kick my dog and beat my kids. >:(


Top
 Profile  
 
PostPosted: Thu Mar 03, 2011 2:54 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 17, 2009 8:45 pm
Posts: 6
fsfweb wrote:
I get the same error on a new joomla 1.5.22 installation and php 5.3 SO to fix it, of course nothing in this post worked.

I had the timezone set in php.ini and I'm on a live production server not XAMP

So to fix it I changed this in date.php from

I just added the function that the error kept asking for and that finally fixed my issue!


This solution worked for me, thanks fsfweb. Additionally I'm going to send this error to my hosting company, since it seems it may be a configuration issue with php 5.3


Top
 Profile  
 
PostPosted: Fri Apr 29, 2011 10:51 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 31, 2010 9:48 am
Posts: 2
Hi Guys,

I was having the same problem and solved it in this way:

I created the php.ini in the root folder (Joomla Root Folder) of the domain - ../httpdocs, or ../public_html, or ../htdocs

Code:
[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/London"
or whatever else your timezone is.

I have done this on all my servers as I had mirrored my sites on various domains. My solution worked on all.

Hope it helps you too. :)


Last edited by lancecunningham on Tue May 03, 2011 8:49 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue May 03, 2011 12:12 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 12, 2010 2:38 am
Posts: 22
Thanks. Worked for me as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3  Next



Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group