Modify

Opened 8 years ago

Closed 6 years ago

Last modified 4 years ago

#7538 closed defect (invalid)

PHP5 timezones

Reported by: wowtorx@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: php5 date timezone Cc:

Description

The PHP5 time and date functions have problems with timezones. For instance, if the date.timezone value in php.ini is set to "Europe/Amsterdam", a call to date_default_timezone_get() results in a segmentation fault. If the timezone is "", phpinfo() results in a bad allocation error. Some other timezones (such as CET) result in "Bus error". The only timezone working for me so far is "UTC".

According to /etc/banner, I am using: KAMIKAZE (bleeding edge, r21838)

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by mhei

  • Resolution set to obsolete
  • Status changed from new to closed

I could not reproduce the bug with latest trunk (r26442). Please reopen if you have still trouble.

root@OpenWrt:/tmp# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (bleeding edge, r26442) ----------

...

root@OpenWrt:/tmp# grep timezone /etc/php.ini
date.timezone = "Europe/Amsterdam"
root@OpenWrt:/tmp# cat test.php
<?php
  echo date_default_timezone_get() . "\n";

root@OpenWrt:/tmp# php-cli test.php
Europe/Amsterdam


root@OpenWrt:/tmp# grep timezone /etc/php.ini
date.timezone = ""
root@OpenWrt:/tmp# php-cli test.php 

Warning: date_default_timezone_get(): 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 'UTC' for 'UTC/0.0/no DST' instead in
/tmp/test.php on line 2
UTC
root@OpenWrt:/tmp# 

comment:2 Changed 6 years ago by andre.saegerman@…

  • Resolution obsolete deleted
  • Status changed from closed to reopened

I still have fatal errors with PHP5 and date function ("Bus error" - "segmentation fault").
With PHP4 I don't experience this problems. See the posts at

https://forum.openwrt.org/viewtopic.php?pid=149791

comment:3 Changed 6 years ago by jow

  • Resolution set to invalid
  • Status changed from reopened to closed

Bus errors and segmentation faults hint at misconfiguration or memory problems, hardly related to the issue above.

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.