|  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
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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.


Add a Patch

Pull Requests

Add a Pull Request


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]
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;

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]
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 15:01:29 2024 UTC