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 1, 2, 3  Next
Author Message
PostPosted: Tue Jan 20, 2009 1:30 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jan 20, 2009 1:20 pm
Posts: 2
I am a new user of Joomla, have completed installing it running on Open Solaris 2008.05.

Joomla 1.5.9 production/stable
php 5.26

I installed with no sample pages/data.

Now I want to begin administering a site.

Logged into the Front Page Manager, and the following message appears:

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm in /opt/coolstack/apache2/htdocs/Joomla/libraries/joomla/utilities/date.php on line 56


I've looked through the Joomla site and googled, but I'm still unclear on what I need to do to eliminate this warning.

Can anybody tell me specifically, perhaps even step by step, where/how/what I need to change?

Thanks.


Top
 Profile  
 
PostPosted: Tue Jan 20, 2009 1:39 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18801
Location: Omaha, NE
Per this http://ezpedia.org/wiki/en/ez/php5_technical_notes, the problem is probably in the server's php.ini file:

The solution is to set date.timezone in php.ini, if the TZ environment variable isn't set:
Code:
[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/Brussels"

.. where "Europe/Brussels" was used as an example.

If you aren't the administrator of this site, you may need to communicate this information to him/her. I'd expect the admin does not see this, or it would have been fixed already.

If you can't get your administrator to fix the php.ini file, and 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

where "yourServerTimeZone" is one of timezones listed here: http://php.net/manual/timezones.php

For example :
Code:
php_value date.timezone Europe/Moscow
or
php_value date.timezone America/Chicago

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


Top
 Profile  
 
PostPosted: Wed Jan 21, 2009 2:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jan 20, 2009 1:20 pm
Posts: 2
Ah, ok.. duh..

Thanks alot... fixed it :)

And nice to meet a Joomla master ....

I'm looking forward to seeing how well this can serve my needs.


Thanks again.


Top
 Profile  
 
PostPosted: Tue Aug 11, 2009 11:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 11, 2009 11:15 am
Posts: 3
Hi there. I have the same problem but not really sure how to change it, can you help please.


The code for me should be "Europe/London" as im in the UK.

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


Top
 Profile  
 
PostPosted: Wed Aug 12, 2009 6:54 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 11, 2009 11:15 am
Posts: 3
Well I seem to have fixed it, doing a complete uninstall then a reinstall and checked the php.ini file and it had the Code:

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


But now I cannot see menu items and getting theses error messages:

Warning: Parameter 4 to JHTMLMenu::treerecurse() expected to be a reference, value given in C:\xampp\htdocs\Joomla15\libraries\joomla\html\html.php on line 87

Warning: array_slice() expects parameter 1 to be array, null given in C:\xampp\htdocs\Joomla15\administrator\components\com_menus\models\list.php on line 143

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\Joomla15\administrator\components\com_menus\models\list.php on line 147

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\Joomla15\administrator\components\com_menus\views\list\view.php on line 65


I'am working to the Joomla! 1.5 Quick Start Guide. Anyone have any ideas?


Top
 Profile  
 
PostPosted: Wed Aug 12, 2009 7:04 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 11, 2009 11:15 am
Posts: 3
Fixed it with this patch: http://joomlacode.org/gf/project/joomla ... m_id=17293


Top
 Profile  
 
PostPosted: Mon Aug 31, 2009 9:47 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 29, 2009 3:54 pm
Posts: 31
I've tried the patch, I've tried changing in php.ini

Neither is working. Any other solutions?

Edited to add:

When I added " " around Europe/City it worked just fine.


Top
 Profile  
 
PostPosted: Mon Sep 21, 2009 10:09 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jun 27, 2009 10:21 am
Posts: 19
Hello. The solution for me was that it was a compatibility issue (PHP 5.3 not being compatible with Joomla) See this post...
viewtopic.php?p=1810330


Top
 Profile  
 
PostPosted: Sun Jan 17, 2010 11:24 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 13, 2009 4:52 am
Posts: 104
Location: Dhaka,Bangladesh.
Thanks for @"dhuelsmann" .
Its a gr8 solution for my server.
It works fine !!!!!!!!!!
:D :D :D :D :D :D

_________________
K@Z@L. http://www.thechuadanga.comhttp://people.joomla.org/groups/viewgroup/514-Joomla+Bangladesh.html
Abacus Bangladesh NMC LTD.kazal318631@gmail.com *** Cell: +8801818318631


Top
 Profile  
 
PostPosted: Tue Mar 02, 2010 10:08 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Mar 02, 2010 10:03 am
Posts: 1
uh, in what file do i need to put this code in: php_value date.timezone Europe/Moscow?

the htacces or php.ini and where in the file..??

thanks,


Top
 Profile  
 
PostPosted: Tue Mar 02, 2010 1:49 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18801
Location: Omaha, NE
dhuelsmann wrote:
The solution is to set date.timezone in php.ini
Anywhere will work if it is not already there.

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


Top
 Profile  
 
PostPosted: Sun Mar 07, 2010 4:35 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Mar 07, 2010 4:32 pm
Posts: 4
i know next to nothing about joomla and php and whatever :/
what exactly do i do to fix this problem?
like what progrrams do i use and stuff?


Top
 Profile  
 
PostPosted: Mon Mar 15, 2010 11:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Apr 04, 2008 8:26 pm
Posts: 3
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


Top
 Profile  
 
PostPosted: Wed Mar 17, 2010 4:23 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 17, 2010 3:59 am
Posts: 1
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"


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 12:25 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 18, 2010 6:24 pm
Posts: 34
Did I do this right? I'm still getting the error.

Should also mention that when i ditched the underscore from constructs none of my links worked.

Edit: I compared a past php.ini with the changes i just made and they are identical.

What would happen if I took php.php, php.ini, and .htaccess from my remote site and pasted them into my localhost directories? My remote site works but my local site has this error, their must be something I can do.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 7:14 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Apr 04, 2008 8:26 pm
Posts: 3
TKM

Look at line 52. Notice how "__construct" has a very long underscore(__). There are actually two underscores. Delete only ONE of the underscores (_). The result should look like this

function _construct(

Notice how the underscore is now shorter. Save and reload.

As for the date.timezone = "America/Edmonton", just make sure that there is no semi-colon before that line of code.


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 9:23 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 18, 2010 6:24 pm
Posts: 34
kanji2000 wrote:
TKM

Look at line 52. Notice how "__construct" has a very long underscore(__). There are actually two underscores. Delete only ONE of the underscores (_). The result should look like this

function _construct(

Notice how the underscore is now shorter. Save and reload.

As for the date.timezone = "America/Edmonton", just make sure that there is no semi-colon before that line of code.


Strangely, removing the the extra underscore disconnected all of my links. Removing both crashed the hole site. As per my last post, all it needed was a reboot, to recognize the change to date.timezone = "".


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 9:42 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Apr 04, 2008 8:26 pm
Posts: 3
Ah, I see. So you removed only one underscore and it disconnected your links. That's not good. Sorry to hear that. Not sure why but it made all my error messages disappear. Weird. Time for more testing...

Happy Coding! :D


Top
 Profile  
 
PostPosted: Wed Apr 28, 2010 7:32 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Oct 01, 2006 12:44 am
Posts: 14
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


Thank You :) :D


Top
 Profile  
 
PostPosted: Wed Apr 28, 2010 10:05 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Jul 30, 2008 6:56 am
Posts: 4
Greetings,

After installing the latest version of Joomla locally, I too experienced "Warning: date () [function.date]: It is not safe to Rely on the system's..." errors all over the screen. I tried the double underscore fix, but this killed the default links with 404 Page Not Found Errors, so I guess the double underscore is not a actually a bug after all.

I finally got it working (thanks to dhuelsmann) by editing the date.timezone line in the php.ini file (it was ;commented out) and this worked perfectly. If you are also experiencing this error, simply edit the date.timezone line in your php.ini file, or at least remove the ; comment at the start of the line. Don't forget to stop and restart the Apache server for the changes to take affect.

All the best,

Shane.


Top
 Profile  
 
PostPosted: Sun May 09, 2010 5:11 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun May 09, 2010 5:00 pm
Posts: 1
A class __construct() function should have 2 underscores.
See http://www.php.net/manual/en/language.oop5.decon.php

Do not change JDate's __construct(), as was suggested in kanji2000's post.


Top
 Profile  
 
PostPosted: Mon May 17, 2010 7:41 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Dec 03, 2009 9:45 am
Posts: 134
dhuelsmann wrote:
Per this http://ezpedia.org/wiki/en/ez/php5_technical_notes, the problem is probably in the server's php.ini file:

The solution is to set date.timezone in php.ini, if the TZ environment variable isn't set:
Code:
[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/Brussels"

.. where "Europe/Brussels" was used as an example.

If you aren't the administrator of this site, you may need to communicate this information to him/her. I'd expect the admin does not see this, or it would have been fixed already.

If you can't get your administrator to fix the php.ini file, and 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

where "yourServerTimeZone" is one of timezones listed here: http://php.net/manual/timezones.php

For example :
Code:
php_value date.timezone Europe/Moscow
or
php_value date.timezone America/Chicago


Hey dhuelsmann! I had the same problem and your explanation helped me fix it. Just wanted to say thanks a lot!


Top
 Profile  
 
PostPosted: Tue May 18, 2010 4:55 am 
Joomla! Intern
Joomla! Intern

Joined: Sun Feb 14, 2010 10:56 pm
Posts: 61
I had this error and have discovered one very important step that was mentioned in the passing. You must Stop/Start Apache in the XAMPP Control Panel. This fixed my problem, my php.ini file was alreaduy correct so there was no need to make any other alterations.


Top
 Profile  
 
PostPosted: Thu May 20, 2010 4:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu May 20, 2010 4:47 pm
Posts: 2
Hello,

I am having the same issue here, on a joomla site that is already online.

I use joomla 1.5.15 and the PHP environment is 5.3.2

I have tried both of the solutions suggested (htaccess and php.ini), but without success.

Can anybody think of something else to check or modify ?

Thanks in advance.


Top
 Profile  
 
PostPosted: Thu May 20, 2010 5:34 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu May 20, 2010 4:47 pm
Posts: 2
Allright, after double-checking with the server admin person, turned out the culprit WAS the php.ini file.

So this solution worked for me as well! :-)


Top
 Profile  
 
PostPosted: Fri Jul 16, 2010 10:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 14, 2008 11:14 pm
Posts: 7
Thanks!
FYI: To set PHP timezone on OSX Snow Leopard:
http://www.macosxhints.com/article.php?story=20090831101932728


Top
 Profile  
 
PostPosted: Sun Jul 18, 2010 7:04 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jul 18, 2010 6:40 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

This really works! Thanks so much :-) Ciao


Top
 Profile  
 
PostPosted: Sun Jul 18, 2010 7:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jul 18, 2010 6:40 am
Posts: 4
WOW - this really works, thanks so much :-)


Top
 Profile  
 
PostPosted: Thu Jul 22, 2010 6:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jul 22, 2010 6:46 pm
Posts: 1
If none of the above solutions work for you,
try editing utilities/date.php file to include the following line.

putenv("TZ=America/New_York");


Ofourse inside <?php ?>.

njoy coding
Mohan


Top
 Profile  
 
PostPosted: Tue Aug 17, 2010 7:13 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 17, 2010 7:05 pm
Posts: 1
In my case I was using XAMPP server portable edition (Windows) and I just did the followings:

1. searched for php.ini file in the extracted files
2. After openning php.ini I using Ctrl+F searched for "[Date]"
3. I added the line bellow [Date]: date.timezone = "Asia/Dhaka"

After restarting Apache, the problem solved!


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



Who is online

Users browsing this forum: No registered users and 11 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