#23167 [Fbk->NoF]: Apache fails when field of some recordset is passed to "switch" operator.
| From: | sniper@php.net | Date: | Mon, 21 Apr 2003 14:22:34 +0000 |
| Subject: | #23167 [Fbk->NoF]: Apache fails when field of some recordset is passed to "switch" operator. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37960@lists.php.net to get a copy of this message | ||
ID: 23167
Updated by: sniper@php.net
Reported By: rart at mail dot ru
-Status: Feedback
+Status: No Feedback
Bug Type: MSSQL related
Operating System: Windows XP
PHP Version: 4.3.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-04-11 19:32:03] magnus@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
Alot have changed since 4.3.1 and this might be fixed.
------------------------------------------------------------------------
[2003-04-11 09:36:33] rart at mail dot ru
If I passed the recordset's field to the "switch" operator then Apache
fails:
----- cut here (begin) -----
Apache.exe has encountered a problem and needs to close. We are sorry
for the inconvenience.
szAppName : Apache.exe szAppVer : 0.0.0.0 szModName : ntdll.dll
szModVer : 5.1.2600.1106 offset : 00001d24
----- cut here (end) -----
The following script can be used to reproduce the problem:
----- cut here (begin) -----
<?
// establish connection to database
$conn = new COM("ADODB.Connection");
$conn->ConnectionString =
"driver={SQL Server}; " .
"server=127.0.0.1; " .
"database=mydatabase; " .
"uid=sa; " .
"Trusted_Connection=Yes";
$conn->ConnectionTimeout = 15;
$conn->CommandTimeout = 30;
$conn->Open();
// select some data
$rset = new COM("ADODB.Recordset");
$rset = $conn->Execute("select myfield from mytable");
if (!$rset->eof)
{
// on the line below Apache will be failed
switch ($rset->fields["myfield"]->value)
{
// ...
}
}
?>
----- cut here (end) -----
This problem can be avoided in the following way:
----- cut here (begin) -----
$value = $rset->fields["myfield"]->value;
switch ($value)
{
// ...
}
----- cut here (end) -----
As far as I can see this is the PHP's bug. Please let me know if I
wrong. Below is some information about my workstation:
MS Windows XP Professional SP1
MS SQL Server 2000 SP3
Apache 1.3.27 (installed like a service)
PHP 4.3.1
If you need some additional information (e.g. some settings from
"php.ini") please feel free to ask me.
Best regards, Artem Rodygin.
-----------
Rhonda Ltd.
Vladivostok
Russia
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23167&edit=1