#23699 [Fbk->Opn]: mssql.datetimeconvert=0 option works randomly

From: Date: Mon, 19 May 2003 14:36:23 +0000
Subject: #23699 [Fbk->Opn]: mssql.datetimeconvert=0 option works randomly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39964@lists.php.net to get a copy of this message
 ID:               23699
 User updated by:  tomasz at biznespolska dot pl
 Reported By:      tomasz at biznespolska dot pl
-Status:           Feedback
+Status:           Open
 Bug Type:         MSSQL related
 Operating System: windows xp sp1
 PHP Version:      4.3.1
 New Comment:

Using:
PHP Version 4.3.2-RC3-dev
has solved problem.


Previous Comments:
------------------------------------------------------------------------

[2003-05-19 09:13:13] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2003-05-19 09:03:03] tomasz at biznespolska dot pl

I'm using: 

PHP 4.3.1 (as a module)
Apache2.0.45 
MS SQL Server 2000 (compatibility mode 70)
Windows XP Pro

Option mssql.datetimeconvert seems to work only randomly. This simple
script produces different results, when I reload page few times:

ini_set('mssql.datetimeconvert', 0);
$re = mssql_connect('GANYMEDE\GANYMEDE', 'user', 'pass');
mssql_select_db('bp');
ini_set('mssql.datetimeconvert', 0);
$sql = "SELECT TOP 10 addDate FROM c_content";
$re = mssql_query($sql);
$row = mssql_fetch_array($re);
ini_set('mssql.datetimeconvert', 0);

echo ($row['addDate']);

Once I get: "23 kwi 2003 14:11"
other time: "2003-04-23 14:11:09"

In this example addDate is datetime type.

Function phpinfo() tells that mssql.datetimeconvert = 0

I have tried to turn off option datetimeconvert in php.ini file, and
using ini_set() function. 

When I run php as cgi turning off this option doesn't work at all.

Sorry for my english ;-)

Regards,
Tomasz Ulanowski

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23699&edit=1



Thread (4 messages)

« previous php.bugs (#39964) next »