ID: 47128 User updated by: iteam dot soft at gmail dot com Reported By: iteam dot soft at gmail dot com Status: Bogus Bug Type: *General Issues Operating System: Red Hat 8.0 PHP Version: 5.2.8 New Comment:
The configuration of apache and php it's ok. Everything works the same except this date issue. I also ... installed again the php 5.2.7 with apache 2.2.11 and the date work just fine now ... with the "bad" configuration. The configuration files I keep ... and just replace the initials one. If ... it's something wrong with my configuration ... which I don't see how it's possible for my server ... can you give me a hint. Previous Comments: ------------------------------------------------------------------------ [2009-01-18 23:12:07] [email protected] And you immediately assume your bad configuration is a bug in PHP..pff.. ------------------------------------------------------------------------ [2009-01-16 14:55:23] iteam dot soft at gmail dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47128&edit=1
