php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15437 using querries on a database type SELECT * FROM [$tablename] crashes PHP
Submitted: 2002-02-07 16:38 UTC Modified: 2002-06-02 19:57 UTC
Votes:6
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: loginx at linkadmin dot org Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.1.1 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: loginx at linkadmin dot org
New email:
PHP Version: OS:

 

 [2002-02-07 16:38 UTC] loginx at linkadmin dot org
Using the latest PHP version on a Windows 2000 box,
I have been able to connect to the MS SQL server 2000
(v7.0) and select the right database, on another script,
I am able to write data into the database with no problem
with an INSERT statement, however, the SELECT statement
doesn't return a value causing the script to time out,
therefore, I applied the method of using square braquets
around the table name, which causes every single
time I execute this script a crash from PHP.exe



Xavier Spriet.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-01 16:51 UTC] andrew at andrew dot co dot il
I've identical problem with MS SQL Server too. Access violation at 0x00000000 - without any physical address at all.
 [2002-06-02 16:37 UTC] k.schroeder@php.net
Please post some source to reproduce this.

Regards, Kai
 [2002-06-02 19:43 UTC] loginx at linkadmin dot org
I have stopped using Windows 2000 for developement, therefore can't reproduce the crash, the code used to produce it in the first time was something really similar to this:

$query = "SELECT * FROM [Table1] WHERE User = '$user'";

$connx = mssql_connect($host, $user, $pass) or die("Unable to reach $host");

$result = mssql_query($query, $connx);
$depth = mssql_num_rows($result);

for ($i = 0; $i < $depth; $i++) {
    $i_user = mssql_result($result, $i, "User");
    echo $i_user;
}
mssql_close($connx);


That's pretty much about it.
The problem might have been fixed since... this bug report was posted months ago and produced with php 4.1.1 and not 4.1.0.
 [2002-06-02 19:54 UTC] sniper@php.net
reclassified. (maybe this should be closed? if you're not using windows or not experiencing this problem anymore? )

 [2002-06-02 19:57 UTC] loginx at linkadmin dot org
Absolutely, unless someone is still experiencing the problem, I don't mind having this bug report closed.
Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC