Announcement

#1 2012-12-01 19:33:17

Apostruk
Member
2012-12-01
5

[resolved] Issue updating from PHP 5.2 to 5.4

I'm currently using Piwigo 2.4.5 
After migrating from PHP 5.2 to 5.4 on my web hosting service, I now get the following four error statements relating to date/time standards.

Strict Standards: 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 'EST/-5.0/no DST' instead in /homepages/3/d207524226/htdocs/piwigo/admin/intro.php on line 128

Strict Standards: 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 'EST/-5.0/no DST' instead in /homepages/3/d207524226/htdocs/piwigo/include/functions.inc.php on line 526

Strict Standards: 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 'EST/-5.0/no DST' instead in /homepages/3/d207524226/htdocs/piwigo/include/functions.inc.php on line 526

Warning: Cannot modify header information - headers already sent by (output started at /homepages/3/d207524226/htdocs/piwigo/admin/intro.php:128) in /homepages/3/d207524226/htdocs/piwigo/include/page_header.php on line 105

Has anyone else had this issue and how can it get resolved?

Offline

 

#2 2012-12-01 21:11:05

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Issue updating from PHP 5.2 to 5.4

Offline

 

#3 2012-12-01 21:50:09

pewe
Member
2012-03-16
439

Re: [resolved] Issue updating from PHP 5.2 to 5.4

I simply put a php.ini file in the Piwigo root directory containing the following
----
date.timezone = Europe/London
-----

Although not all servers allows this override to work (especially shared servers) it worked on mine ;-)

Offline

 

#4 2012-12-01 22:02:06

Apostruk
Member
2012-12-01
5

Re: [resolved] Issue updating from PHP 5.2 to 5.4

I'm certainly willing to try the two previous suggestions of either having my hosting provider change the php.ini configuration setting, or adding my own php.ini file in the Piwigo root directory.

However, I'm puzzled as to why this issue did not show up when I was using PHP 5.2 on my provider's server.  My provider is moving to PHP 5.4 in a few months, and therefore I need to resolve any issue with my applications before this deadline.

Offline

 

#5 2012-12-01 22:07:06

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Issue updating from PHP 5.2 to 5.4

As far as I have seen it, this bug only appears when you upgrade from PHP 5.2 to PHP 5.3+

Offline

 

#6 2012-12-02 18:14:52

Apostruk
Member
2012-12-01
5

Re: [resolved] Issue updating from PHP 5.2 to 5.4

Well, the problem is now resolved after I included the following php.ini file in the root of my application.

date.timezone = America/Vancouver
date/time support enabled
Timezone Database internal

The last two lines were added for good measure.

Thank you all for your assistance with this issue.

I trust that the good folks who look after PHP will work to remove this timezone bug in a future update.

Offline

 

#7 2012-12-05 20:57:58

Apostruk
Member
2012-12-01
5

Re: [resolved] Issue updating from PHP 5.2 to 5.4

One final comment to add to this thread:

Because the php.ini file in the root of the application is not recursive,
the date.timezone issue does occasionally reappear.

To solve this problem, I added the following line in the database.inc.php file
found in the local-config folder:

date_default_timezone_set('America/Vancouver');

Offline

 

#8 2012-12-05 21:50:33

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Issue updating from PHP 5.2 to 5.4

Apostruk wrote:

To solve this problem, I added the following line in the database.inc.php file
found in the local-config folder:

date_default_timezone_set('America/Vancouver');

did you try to set this line in the local config config.inc.php, (or with Local Files editor)?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#9 2012-12-06 00:29:51

Apostruk
Member
2012-12-01
5

Re: [resolved] Issue updating from PHP 5.2 to 5.4

I don't have a config.inc.php file in my local/config folder, but only
database.inc.php and index.php.  I set this line in the database.inc.php file with the
editor provided with my FTP host.

Offline

 

#10 2012-12-06 00:33:28

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Issue updating from PHP 5.2 to 5.4

Apostruk wrote:

I don't have a config.inc.php file in my local/config folder, but only
database.inc.php and index.php.  I set this line in the database.inc.php file with the
editor provided with my FTP host.

flop25 wrote:

(or with Local Files editor)?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2014-01-23 09:06:29

rickx123456
Guest

Re: [resolved] Issue updating from PHP 5.2 to 5.4

I am using godaddy and they have an internal one click install for Piwigo, you get the UTC errors (now they use PHP 5.4)... I have been using Piwigo for a few years now, since I change servers within godaddy my web site has been getting errors, and I was locked out of doing anything within the admin Page, not to mention the website looked horrible and full of errors, so i decided to see what would happen with a clean install; today with the latest version of Piwigo, less errors but still UTC and Header errors, I have been in all of the old posts and finally, I found this old one and it worked!!! I am using a clean install and will re-upload all photos (over 30,000 of them).  I hope this helps anyone else with this problem (see the old thread below).. Also, Piwgo should be aware that the one click install that Godaddy offers now, doesn't function properly.  Piwigo is the best available free photo software available period! Thanks Piwigo......

    Apostruk wrote:

    To solve this problem, I added the following line in the database.inc.php file
    found in the local-config folder:

    date_default_timezone_set('America/Vancouver');

 

#12 2015-05-01 04:46:10

Spaldam
Guest

Re: [resolved] Issue updating from PHP 5.2 to 5.4

This worked:

To solve this problem, I added the following line in the database.inc.php file
found in the local-config folder:

date_default_timezone_set('America/Vancouver');

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact