ID: 11621 Comment by: zeke at mothtamer dot com Reported By: tomas dot salamon at signum dot cz Status: Bogus Bug Type: MSSQL related Operating System: Windows NT, Windows 2000 PHP Version: 4.0.5 New Comment:
I have the same problem when connecting to a remote SQL Server database. I'm running: PHP 4.3.2 / Apache 1.3 on Windows 2000 Server I got past the 500 Internal server errors by making sure to close all my connections, but the second msquery call fails, every time. I have to open a new connection for each query. Previous Comments: ------------------------------------------------------------------------ [2002-05-24 20:18:58] [EMAIL PROTECTED] Thank you for taking the time to report a problem with PHP. Unfortunately your version of PHP is too old -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. ------------------------------------------------------------------------ [2001-06-22 15:25:19] tomas dot salamon at signum dot cz Hi! I am using PHP application on Windows NT platform and it is very unstable while using MSSQL functions. I have tried all IIS5, IIS4 and Apache for Win32 servers, both CGI/ISAPI versions of PHP. The best situation is on IIS5/Windows 2000, where application is relatively stable. It is not possible to use persistent connections anyway (I get "500 Internal server error" or "PHP has encountered an Access Violation at 73342FC3" immediately). There is worse situation on Windows NT, especially on IIS4. There it is not possible to use the application, because PHP returns error messages almost everytime and very often is crushes server, so I get system error message "0x0000005 Access violation..." and it is neccessary to restart the web-server service. There is a bit better situation on Apache, but PHP is also very unstable in both CGI/module versions. As I checked, the most problems appears in mssql_query function. I have partially "solved" a problem, when I defined own functions, which open a database connection every time before calling respective function and closes it immediately after executing it. For example: function unidb_query($query) { [EMAIL PROTECTED](dbMainName,dbMainUser,dbMainPass); @mssql_select_db(dbMainData,$link); [EMAIL PROTECTED]($query,$link); @mssql_close($link); return $result; } This solution was successful, the number of crushes is much lower, but it is not a good solution at all, because of performance and lucidity reasons. Crashes are also more frequent, when I get some error or message from SQL server, e.g. constraint conflict, etc. I think the problem will be something like stack or heap overflow, because problems are "cumulating" - when I don't get a crash after the first error message, I will get it certainly after the second one. When I do not close a database connection after some action (mainly query), it is very probable, I get a crash during next action. Even if I do not use persistent connections, I get a crash, when I send a query in a new page, when there was not closed connection while parsing some page before. Also, when I look in system Task window, memory occupied by Apache or Inetsrv service is growing. A bug should be in MSSQL library, because, when I am using ODBC library, PHP is more stable (but not absolutely stable), but I cannot use ODBC in my application because of some another reasons. I have tested it on three computers, the problems were very similar, computers are working well in other tasks. Regards, Tomas Salamon [EMAIL PROTECTED] Signum CZ s.r.o. Czech Republic ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11621&edit=1
