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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 + 39 = ?
Subscribe to this entry?

 
 [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-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 17:05:44 2022 UTC