[PHP-DEV] PHP 4.0 Bug #10144 Updated: Resource not properly freed after type intval(resource) type case
ID: 10144 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: OCI8 related Description: Resource not properly freed after type intval(resource) type case Fixed in latest cvs, thanks guys!!! Previous Comments: --- [2001-04-03 14:23:30] [EMAIL PROTECTED] Summary: WinNT, Apache 1.3.19, recent snap, php_oci8.dll (possibly other db resources also) Resource not releasted after casting to an integer. Don't know if this the the culprit to my Apache server on windows constantly crashing, but suspect it may be playing a role in it. ?php $connection = OCIPLogon (scott,tiger,orcl); echo brFirst round:br; $statement=OCIParse ($connection, select user from dual); //$result_value=intval($statement); //CULPABLE. echo var_dump($statement).brFreedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; echo brSecond round:br; $statement=OCIParse ($connection, select user from dual); $result_value=intval($statement); //CULPRIT echo var_dump($statement).brNot Freedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; ? Outputs: First round: resource(2) of type (oci8 statement) Freed resource(2) of type (Unknown) Second round: resource(3) of type (oci8 statement) Not Freed resource(3) of type (oci8 statement) In the second round, the resource is not freed. My Redhat Linux box (php 4.0.4pl1) doesn't crash, but the Windows version... Well... Background info: Thought it would be a good idea to use Manuel Lemos' Metabase. Works great on Linux. That's where I developed this app, but now I need to migrate to a Windows platform and it's crashing like crazy. Metabase's classes use an intval($resource) as a place holder, in an array of statement_info so that you can run mutiple queries. Metabase can keeps track of its queries this way (for OCI at least). The crashes experienced catestrophic, but threads aren't closing up shop properly. Bug #9857 came about because a constant would be still be defined the next page refresh. Haven't been able to reproduce this in a short code segment w/out starting up metabase classes. After using Metabase on windows however, all kinds of weirdness ensues. Apache performs illegal instructions after every other refresh w/oci8 then. -Joe Shmengie -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Full Bug description available at: http://bugs.php.net/?id=10144 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #10144 Updated: Resource not properly freed after type intval(resource) type case
ID: 10144 User Update by: [EMAIL PROTECTED] Old-Status: Open Status: Duplicate Bug Type: OCI8 related Description: Resource not properly freed after type intval(resource) type case Previous Comments: --- [2001-04-03 14:23:30] [EMAIL PROTECTED] Summary: WinNT, Apache 1.3.19, recent snap, php_oci8.dll (possibly other db resources also) Resource not releasted after casting to an integer. Don't know if this the the culprit to my Apache server on windows constantly crashing, but suspect it may be playing a role in it. ?php $connection = OCIPLogon (scott,tiger,orcl); echo brFirst round:br; $statement=OCIParse ($connection, select user from dual); //$result_value=intval($statement); //CULPABLE. echo var_dump($statement).brFreedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; echo brSecond round:br; $statement=OCIParse ($connection, select user from dual); $result_value=intval($statement); //CULPRIT echo var_dump($statement).brNot Freedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; ? Outputs: First round: resource(2) of type (oci8 statement) Freed resource(2) of type (Unknown) Second round: resource(3) of type (oci8 statement) Not Freed resource(3) of type (oci8 statement) In the second round, the resource is not freed. My Redhat Linux box (php 4.0.4pl1) doesn't crash, but the Windows version... Well... Background info: Thought it would be a good idea to use Manuel Lemos' Metabase. Works great on Linux. That's where I developed this app, but now I need to migrate to a Windows platform and it's crashing like crazy. Metabase's classes use an intval($resource) as a place holder, in an array of statement_info so that you can run mutiple queries. Metabase can keeps track of its queries this way (for OCI at least). The crashes experienced catestrophic, but threads aren't closing up shop properly. Bug #9857 came about because a constant would be still be defined the next page refresh. Haven't been able to reproduce this in a short code segment w/out starting up metabase classes. After using Metabase on windows however, all kinds of weirdness ensues. Apache performs illegal instructions after every other refresh w/oci8 then. -Joe Shmengie -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Full Bug description available at: http://bugs.php.net/?id=10144 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #10144 Updated: Resource not properly freed after type intval(resource) type case
ID: 10144 User Update by: [EMAIL PROTECTED] Old-Status: Duplicate Status: Closed Bug Type: OCI8 related Description: Resource not properly freed after type intval(resource) type case Previous Comments: --- [2001-04-03 14:23:30] [EMAIL PROTECTED] Summary: WinNT, Apache 1.3.19, recent snap, php_oci8.dll (possibly other db resources also) Resource not releasted after casting to an integer. Don't know if this the the culprit to my Apache server on windows constantly crashing, but suspect it may be playing a role in it. ?php $connection = OCIPLogon (scott,tiger,orcl); echo brFirst round:br; $statement=OCIParse ($connection, select user from dual); //$result_value=intval($statement); //CULPABLE. echo var_dump($statement).brFreedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; echo brSecond round:br; $statement=OCIParse ($connection, select user from dual); $result_value=intval($statement); //CULPRIT echo var_dump($statement).brNot Freedbr; @OCIFreeStatement($statement); echo var_dump($statement).br; ? Outputs: First round: resource(2) of type (oci8 statement) Freed resource(2) of type (Unknown) Second round: resource(3) of type (oci8 statement) Not Freed resource(3) of type (oci8 statement) In the second round, the resource is not freed. My Redhat Linux box (php 4.0.4pl1) doesn't crash, but the Windows version... Well... Background info: Thought it would be a good idea to use Manuel Lemos' Metabase. Works great on Linux. That's where I developed this app, but now I need to migrate to a Windows platform and it's crashing like crazy. Metabase's classes use an intval($resource) as a place holder, in an array of statement_info so that you can run mutiple queries. Metabase can keeps track of its queries this way (for OCI at least). The crashes experienced catestrophic, but threads aren't closing up shop properly. Bug #9857 came about because a constant would be still be defined the next page refresh. Haven't been able to reproduce this in a short code segment w/out starting up metabase classes. After using Metabase on windows however, all kinds of weirdness ensues. Apache performs illegal instructions after every other refresh w/oci8 then. -Joe Shmengie -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Full Bug description available at: http://bugs.php.net/?id=10144 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #10544: if(!($res=OCIPLogon(...))
From: [EMAIL PROTECTED] Operating system: linux and nt PHP version: 4.0 Latest CVS (28/04/2001) PHP Bug Type: Scripting Engine problem Bug description: if(!($res=OCIPLogon(...)) -- Edit Bug report at: http://bugs.php.net/?id=10544edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9857 Updated: define(named_constant)
ID: 9857 User Update by: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: IIS related Description: define("named_constant") Making this change in oci8.c #ifdef ZTS #define PHP_OCI_INIT_MODE OCI_DEFAULT /* OCI_DEFAULT was OCI_THREADED on the above line*/ #else #define PHP_OCI_INIT_MODE OCI_DEFAULT #endif Now the defined() does not have a problem. This makes me reasonably sure that it is OCI8 walking on other memory. By changing OCI_THREADED to OCI_DEFAULT oci does not use it's own memory sharing features in threaded environments. This removes any benifit that may be gained by a threaded environment, but also cause PHP not to crash. I find the PHP not crashing much more productive. ;-) Will have to work on OCI source to take advantage of threaded environments. Think it will be a major re-write of OCI8.c for this, because other attemts of a quick source fix have been unsuccessful. For now, this works. joebrown podiatryfl.com Previous Comments: --- [2001-04-07 17:29:17] [EMAIL PROTECTED] User feedback: -- I'm using the latest snapshot's on win32. Getting some needed practice with MSVC... I think the problem is that OCI is walking on TSRM local storage. I haven't been able to verify it, but my gut says it's so. --- [2001-04-06 23:57:54] [EMAIL PROTECTED] Are you using PHP 4.0.1? If so, could you please try with the latest release, 4.0.4pl1? --Jani --- [2001-03-29 01:34:23] [EMAIL PROTECTED] Taking a shot in the dark, hoping this bug comes to sombody who "knows" attention. Prior comments are somewhat misleading. I'm using OCI8, and also Manuel Lemos' Metabase. Parusing through the source, I've noticed that there are some constants defined for OCI8 (which are documented): eg: REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT); I question this CONST_PERSISTENT value. Is it possible that the persistence is helping non persistent constants (in the php code) strattle the void between pages? BTW: what does _zval_dtor in the source mean? Specifically, "dtor" --- [2001-03-26 17:46:42] [EMAIL PROTECTED] A define on php4isapi has a tendency to bleed over to the next page load. refresh and a completely different page have retain a defined constant. eg: test1.php ? define("anything",1); echo (defined("anything")?"anything defined":"anything not defined"); ? test2.php echo (defined("anything")?"anything defined":"anything not defined"); after pointing browser at test1.php test 2.php contains "anything defined", instead of "not" --- [2001-03-20 01:15:49] [EMAIL PROTECTED] With this code at the top of an include file, the results are unpretictable. if(!defined("METABASE_MYSQL_INCLUDED")) { define("METABASE_MYSQL_INCLUDED",1); ...rest of include file... } require_once(); seems to work though. --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=9857 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #10144: Resource not properly freed after type intval(resource) type case
From: [EMAIL PROTECTED] Operating system: NT, Linux PHP version: 4.0 Latest CVS (01/04/2001) PHP Bug Type: OCI8 related Bug description: Resource not properly freed after type intval(resource) type case Summary: WinNT, Apache 1.3.19, recent snap, php_oci8.dll (possibly other db resources also) Resource not releasted after casting to an integer. Don't know if this the the culprit to my Apache server on windows constantly crashing, but suspect it may be playing a role in it. ?php $connection = OCIPLogon ("scott","tiger","orcl"); echo "brFirst round:br"; $statement=OCIParse ($connection, "select user from dual"); //$result_value=intval($statement); //CULPABLE. echo var_dump($statement)."brFreedbr"; @OCIFreeStatement($statement); echo var_dump($statement)."br"; echo "brSecond round:br"; $statement=OCIParse ($connection, "select user from dual"); $result_value=intval($statement); //CULPRIT echo var_dump($statement)."brNot Freedbr"; @OCIFreeStatement($statement); echo var_dump($statement)."br"; ? Outputs: First round: resource(2) of type (oci8 statement) Freed resource(2) of type (Unknown) Second round: resource(3) of type (oci8 statement) Not Freed resource(3) of type (oci8 statement) In the second round, the resource is not freed. My Redhat Linux box (php 4.0.4pl1) doesn't crash, but the Windows version... Well... Background info: Thought it would be a good idea to use Manuel Lemos' Metabase. Works great on Linux. That's where I developed this app, but now I need to migrate to a Windows platform and it's crashing like crazy. Metabase's classes use an intval($resource) as a place holder, in an array of statement_info so that you can run mutiple queries. Metabase can keeps track of its queries this way (for OCI at least). The crashes experienced catestrophic, but threads aren't closing up shop properly. Bug #9857 came about because a constant would be still be defined the next page refresh. Haven't been able to reproduce this in a short code segment w/out starting up metabase classes. After using Metabase on windows however, all kinds of weirdness ensues. Apache performs illegal instructions after every other refresh w/oci8 then. -Joe "Shmengie" -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Edit Bug report at: http://bugs.php.net/?id=10144edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9857 Updated: define(named_constant)
ID: 9857 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: IIS related Description: define("named_constant") Taking a shot in the dark, hoping this bug comes to sombody who "knows" attention. Prior comments are somewhat misleading. I'm using OCI8, and also Manuel Lemos' Metabase. Parusing through the source, I've noticed that there are some constants defined for OCI8 (which are documented): eg: REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT); I question this CONST_PERSISTENT value. Is it possible that the persistence is helping non persistent constants (in the php code) strattle the void between pages? BTW: what does _zval_dtor in the source mean? Specifically, "dtor" Previous Comments: --- [2001-03-26 17:46:42] [EMAIL PROTECTED] A define on php4isapi has a tendency to bleed over to the next page load. refresh and a completely different page have retain a defined constant. eg: test1.php ? define("anything",1); echo (defined("anything")?"anything defined":"anything not defined"); ? test2.php echo (defined("anything")?"anything defined":"anything not defined"); after pointing browser at test1.php test 2.php contains "anything defined", instead of "not" --- [2001-03-20 01:15:49] [EMAIL PROTECTED] With this code at the top of an include file, the results are unpretictable. if(!defined("METABASE_MYSQL_INCLUDED")) { define("METABASE_MYSQL_INCLUDED",1); ...rest of include file... } require_once(); seems to work though. --- Full Bug description available at: http://bugs.php.net/?id=9857 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9857 Updated: define(named_constant)
ID: 9857 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: IIS related Description: define("named_constant") A define on php4isapi has a tendency to bleed over to the next page load. refresh and a completely different page have retain a defined constant. eg: test1.php ? define("anything",1); echo (defined("anything")?"anything defined":"anything not defined"); ? test2.php echo (defined("anything")?"anything defined":"anything not defined"); after pointing browser at test1.php test 2.php contains "anything defined", instead of "not" Previous Comments: --- [2001-03-20 01:15:49] [EMAIL PROTECTED] With this code at the top of an include file, the results are unpretictable. if(!defined("METABASE_MYSQL_INCLUDED")) { define("METABASE_MYSQL_INCLUDED",1); ...rest of include file... } require_once(); seems to work though. --- Full Bug description available at: http://bugs.php.net/?id=9857 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9964 Updated: Unresolved symbols
ID: 9964 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Description: Unresolved symbols I was trying to build with php.dsw workspace. phpts.dsw compiles right up. Must have neglected to read the instructions. Leaving this ticket open, because I think php4.dsw should be removed from the distribution, unless it serves some other purpose. Previous Comments: --- [2001-03-24 01:12:25] [EMAIL PROTECTED] Trying to build php from recent cvs snaps php4-200103231245 and one from a day earlier. Compile is smooth, except for a few unresolved symbols: Linking... Creating library ..Debug/php4nts_debug.lib and object ..Debug/php4nts_debug.exp internal_functions_win32.obj : error LNK2001: unresolved external symbol _VARIANT_module_entry COM.obj : error LNK2001: unresolved external symbol _php_char_to_OLECHAR COM.obj : error LNK2001: unresolved external symbol _php_OLECHAR_to_char COM.obj : error LNK2001: unresolved external symbol _php_pval_to_variant COM.obj : error LNK2001: unresolved external symbol _php_variant_to_pval ..Debugphp4nts_debug.dll : fatal error LNK1120: 5 unresolved externals Error executing link.exe. php4nts_debug.dll - 6 error(s), 0 warning(s) --- Full Bug description available at: http://bugs.php.net/?id=9964 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9964: Unresolved symbols
From: [EMAIL PROTECTED] Operating system: Win NT 4.0 PHP version: 4.0 Latest CVS (24/03/2001) PHP Bug Type: Compile Failure Bug description: Unresolved symbols Trying to build php from recent cvs snaps php4-200103231245 and one from a day earlier. Compile is smooth, except for a few unresolved symbols: Linking... Creating library ..\Debug/php4nts_debug.lib and object ..\Debug/php4nts_debug.exp internal_functions_win32.obj : error LNK2001: unresolved external symbol _VARIANT_module_entry COM.obj : error LNK2001: unresolved external symbol _php_char_to_OLECHAR COM.obj : error LNK2001: unresolved external symbol _php_OLECHAR_to_char COM.obj : error LNK2001: unresolved external symbol _php_pval_to_variant COM.obj : error LNK2001: unresolved external symbol _php_variant_to_pval ..\Debug\php4nts_debug.dll : fatal error LNK1120: 5 unresolved externals Error executing link.exe. php4nts_debug.dll - 6 error(s), 0 warning(s) -- Edit Bug report at: http://bugs.php.net/?id=9964edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9857: define(named_constant)
From: [EMAIL PROTECTED] Operating system: winNT IIS4 PHP version: 4.0.1 PHP Bug Type: IIS related Bug description: define("named_constant") With this code at the top of an include file, the results are unpretictable. if(!defined("METABASE_MYSQL_INCLUDED")) { define("METABASE_MYSQL_INCLUDED",1); ...rest of include file... } require_once(); seems to work though. -- Edit Bug report at: http://bugs.php.net/?id=9857edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]