|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-18 23:12 UTC] jani@php.net
[2009-01-19 05:12 UTC] iteam dot soft at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 07:00:01 2025 UTC |
Description: ------------ For about a week ago I had installed on my box Apache 2.2.10 with PHP 5.2.7. Beside this the php was compiled with FirebirdSql and Oracle Instant Client. On apache start I put a env variabile export NLS_DATE_FORMAT=DD.MM.YYYY On my application start point from PHP I also double ensure the NLS_DATE_FORMAT it's set so I put also putenv('NLS_DATE_FORMAT=DD.MM.YYYY'); Everything was ok and my application display the date format from oracle as I set it. All good. Last week ... I made upgrade to Apache 2.2.11 and PHP 5.28. After upgrade nothing change to my application or configuration only this applications (apacheand and php) as I mentioned above. From this point the date format that I was getting from Oracle was NOT what I set. The returned date format was in Oracle standard DD-M-RR. So I try everything .. recheck ... reset env variables .. put extra configuration for php ... but no result. The same bad date. I know I could use the alter session as a work-arround ... but this envolves running the alter session eache time user wants information from the database. The application it's huge and with a lot of users and it's running on the intranet system. So I preffer the PUTENV method. So all was ok until the upgrade from apache 2.2.10 to 2.2.11 and php 5.2.7 to 5.2.8 Reproduce code: --------------- I try all this ... at once and one by one ... no result. $_ENV["NLS_DATE_FORMAT"] = 'DD.MM.YYYY'; putenv('NLS_DATE_FORMAT=DD.MM.YYYY'); apache_setenv('NLS_DATE_FORMAT=DD.MM.YYYY'); Expected result: ---------------- The Oracle date format to be: 22.01.2009 Actual result: -------------- 22-JAN-09