Date: 08/13/00
- Next message: s.busch <email protected>: "[PHP-DEV] PHP 4.0 Bug #6136: Exception Handling"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #6039 Updated: PHP Crashed if class contain reference by other class"
- In reply to: Manuel Lemos: "[PHP-DEV] Re: PHP 4.0 Bug #6033 Updated: Can't open more than one non-persistent connections to the same database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Manuel,
> - ifx_errormsg() is causing memory leaks under both PHP3 and PHP4. You
> need to compile PHP enabling debug output to see this.
These are not "real" memory leaks. It is memory that is allocated by the
driver for the return value following the PHP guidelines using the
PHP "emalloc()" function.
This memory is released by the PHP engine on script end.
The debug build warns you because it could be real memory leaks.
I can suppress the warnings by using a variable on the stack, and letting
PHP copy the variable to the return value. This way the memory belongs to
PHP
and you get no warnings on script end. The net result is the same except
for the warnings.
>
> - When you call ifx_errormsg() after closing a connection in PHP3 it
> returns that connection does not exist but this does not happen under
> under PHP4. Isn't ifx_errormsg() supposed to return the last error
> message even if a connection is not established?
>
The current ifx.ec in the PHP3 CVS does not need a valid a connection
for ifx_errormsg().
PHP3 used (3.0.7 or so) to check for an existing connection in ifx_error() ,
but I removed that check long ago. You can still pass a connection id to
ifx_error(), but it is ignored.
As far as I know ifx_errormsg() never needed a connection, it does not take
a connection id as parameter but an optional error code. If you don't pass
an error code, it uses the last Informix error code if set, or SQLCODE.
So if ifx_errormsg() returns the error message "connection does not exist",
it means that this is *really* the last Informix error that occurred, and
that for some reason or other the PHP3 ifx driver tried to access the
connection you closed earlier, perhaps in the list destructor trying
to close an already closed connection (bug).
Danny
----- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: s.busch <email protected>: "[PHP-DEV] PHP 4.0 Bug #6136: Exception Handling"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #6039 Updated: PHP Crashed if class contain reference by other class"
- In reply to: Manuel Lemos: "[PHP-DEV] Re: PHP 4.0 Bug #6033 Updated: Can't open more than one non-persistent connections to the same database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

