Error after installation "Warning: date():"

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Error after installation "Warning: date():"

Postby dzidek23 » Wed Jul 20, 2011 6:21 am

Hi,

just yesterday I've installed PivotX 2.2.5, it does work but I have a strange message on top of every page:
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 'Europe/London' for 'BST/1.0/DST' instead in /mnt/pliki/www/pivotx/modules/module_spamkiller.php on line 20


here you can find phpinfo

http://80.6.204.178/index2.php

I'm using flat file instead of mysql, and it is installed on FreeNAS 0.7

any suggestions? any help much appreciated
dzidek23
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am

Re: Error after installation "Warning: date():"

Postby Harm10 » Wed Jul 20, 2011 11:13 am

To be absolutely sure that is not something within PivotX please install latest version (2.2.6). Get it here: http://pivotx.net/
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Error after installation "Warning: date():"

Postby dzidek23 » Wed Jul 20, 2011 8:12 pm

unfortunately, ver. 2.2.6 does exactly the same thing...

... sorted for now... but there must be more gentle way of solving it...

edit module_spamkiller.php

simply add:

date_default_timezone_set('Europe/London');


right above:

$GLOBALS['spamkiller_log'] = $spamkiller_log = dirname(dirname(__FILE__))."/db/spamkiller.".date("Y-m").".log";

and supported time zones are here:

http://www.php.net/manual/en/timezones.php
dzidek23
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am

Re: Error after installation "Warning: date():"

Postby Wim » Wed Jul 20, 2011 8:44 pm

It's a php issue. You have to set date.timezone to a valid timezone in your php.ini file. See the php documentation
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Error after installation "Warning: date():"

Postby Harm10 » Wed Jul 20, 2011 8:48 pm

A cleaner way to set your timezone (if you need it) is adding to your .htaccess file":
php_value date.timezone "Europe/Amsterdam" or whatever your timezone is.
I assume you can't edit your php.ini?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Error after installation "Warning: date():"

Postby dzidek23 » Thu Jul 21, 2011 12:07 pm

i do have access to php.ini and .htt* files but may be it would be easier if there will be a question during instalation process (user creation) of where in the world you are and set it up permanently in the flat file?

that would make systems and people life easier...

bearing mind system like my (freeNAS) are capable of presenting pivotX as they should but changing system files is a nightmare.

by the way, I found PivotX just few days ago but I'm realy pleased with it, nice work.
dzidek23
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am

Re: Error after installation "Warning: date():"

Postby Harm10 » Thu Jul 21, 2011 2:44 pm

In the setting of your installation you can specify the time offset under Configuration / Date/Time.

Changing the predelivered .htaccess file the PivotX folder is also needed when you want specific forms of URL rewrite that you also choose during install.
The same thing when you are upgrading from Pivot the predecessor of PivotX. So doing it all automatic is nice but not always doable.

Maybe it would be an idea to add a commented out line in the same .htaccess file so people could be aware that it is possible to influence.

On the other hand feel free to add it to the feedback http://pivotx.uservoice.com/forums/13610-general so people can tell development what they want...... ;)
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron