php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3035 odbc_prepare causes crash
Submitted: 1999-12-23 20:50 UTC Modified: 2000-07-23 02:33 UTC
From: alexp at semaphore dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 3 OS: AIX version 4.3.2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexp at semaphore dot com
New email:
PHP Version: OS:

 

 [1999-12-23 20:50 UTC] alexp at semaphore dot com
php configured as apache module. Apache ver. 1.3.9. DB2 version 6.1

./configure --with-apache=<apache dir> --with-ibm-db2=<db2 dir> 

The httpd.conf file has the following additions

php_flag track_errors on
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

The error occurs when I used the odbc_prepare function
like this:

$connection = odbc_pconnec("db","username","password");
$stmt = odbc_prepare($connection,"SELECT * FROM NON_EXISTENT_TABLE");
odbc_execute($stmt,&$row);
echo "data=".current($row);

Since the table I am querying from doesn't exist it should return an error, but it doesn't. It does one of two things kind of randomly. It will either cause the browser to display -> server returned an invalid or unrecongnized response. Or it won't display any error message and then when you try to execute the statement it will say :

Warning: No array passed to odbc_execute() in /home/httpd/htdocs/development/test.php on line 7

Warning: Variable passed to current() is not an array or object in /home/httpd/htdocs/development/test.php on line 8

And it does each one pretty randomly. If I hit the refresh button over and over each time might return either output. If I put that code in a function and then call the function it gives me the - server returned invalid or unrecognized or invalid response error every time though.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 02:33 UTC] zak at cvs dot php dot net
I have not noted any other bug reports involving this problem with later releases of PHP on AIX.

Please upgrade to the latest version of PHP.
If the error still occurs, please open a new bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 09:01:31 2024 UTC