[PHP-DEV] Bug #12620 Updated: PHP.exe is causing access violations when shutting down

2002-02-04 Thread peterd

 ID:   12620
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Windows NT 4 Server
 PHP Version:  4.0.6


Previous Comments:


[2001-08-13 11:22:43] [EMAIL PROTECTED]

PHP is still crashing in shutdown_memory_manager() although I've now
found that if I compile PHP with ZEND_DISABLE_MEMORY_CACHE set to 1,
the problems don't occur.

I'm still unable to provide a short section of code that reproduces the
problem as doing something as simple as adding 

echo "hello"; 

to a page that crashes can stop it from crashing.  

If I remove a function that isn't even called it can sometimes stop
crashing, other times it continues to crash no matter what you change,
it seems quite random but if a page crashes it does it consistently. 
It's just that changing them in the slightest way can seem to alter the
behaviour significantly

Does anyone know anything that might cause the memory manager to fail
like this, or even if compiling PHP with ZEND_DISABLE_MEMORY_CACHE 1 is
a reasonable thing to do?



[2001-08-07 09:19:52] [EMAIL PROTECTED]

I've been using the v4.06 windows binaries from this site and have been
suffering repeated crashes as PHP closes down.  

The crash is either reported as just in PHP and other times
OLEMainThreadWndName is reported in the error.  It varies between write
and read violations too.

I've traced through the code and have tracked it down to an access
violation in the function shutdown_memory_manager().

Also when using the win32 debug build of PHP the error does not occur,
only with the release version.

The app I'm working on has database connections and uses COM objects. 
The error seems to be slightly related to the database side although
I've not been able to produce a small section of code that causes the
same error.  I'm using the ADODB wrapper for database access although
the same error has occurred when using the built-in ODBC functions.

I can't see that I'm doing anything wrong but there's definitely
something that PHP isn't liking.

Below is the main function I use to get results from a database, when
all the code is commented out inside this function the error doesn't
occur but a lot of other stuff in the app doesn't happen either so that
doesn't say much really.  Is there anything blatantly wrong with the
code below?

function GetDirectoryQueryResults($szSQL)
{
$objConn = &ADONewConnection('ado');

$objConn->Connect("Directory");

$objRS = &$objConn->Execute($szSQL);

if (!$objRS->EOF) 
$retval = &$objRS->GetRows();


$objRS->Close();
$objConn->Close();

return $retval;
}



Cheers!





-- 
Edit this bug report at http://bugs.php.net/?id=12620&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Bug #13433: Returning Booleans from COM is broken in 407

2001-09-25 Thread peterd

From: [EMAIL PROTECTED]
Operating system: Windows NT 4 Server
PHP version:  4.0CVS-2001-09-25
PHP Bug Type: COM related
Bug description:  Returning Booleans from COM is broken in 407

In PHP 4.07 (RC1, RC2 and latest snapshot, standard windows build)
returning a boolean from a COM object is broken.

I reported this on PHP-QA a while ago but there was no response to it. 
That report was primarily to do with returning booleans from a database
accessed via an ADO COM object.  But now I've found it's true for all
booleans.

When you have a COM object returning a boolean, testing that boolean for
'trueness' fails.

The following script:

TestFunc();// Simple function that just returns TRUE

var_dump($arg);

if ($arg == TRUE)
   echo "arg is true";
elseif ($arg == FALSE)
   echo "arg is false";
else
   echo "arg is something else";

if ($arg)
  echo "arg is true, but not equal to true";
?>

produces this output:

>bool(true)
>arg is something else
>
>arg is true, but not equal to true
>

Basically, if you test for equality to 'true' it fails, but it's also not
false.  But if you just test directly on the value it works fine.

I stepped through the source and it appears to be due to the way comparison
of booleans is done.  The COM object returns a boolean by creating a
Variant of type BOOL and value -1.  whereas PHP creates a boolean of type
BOOL and value 1.  The comparison then messes up due to this, I think.

I've also tried this with PHP 4.06 and the problem doesn't occur in that
version
-- 
Edit bug report at: http://bugs.php.net/?id=13433&edit=1


-- 
PHP Development Mailing List 
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 #13148 Updated: Can't get data out of a ADO database with ADODB when using 4.07RC1

2001-09-07 Thread peterd

ID: 13148
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: *Database Functions
Operating System: Windows NT 4 Server
PHP Version: 4.0.6


Previous Comments:


[2001-09-05 09:13:47] [EMAIL PROTECTED]

Hi,

I've been using ADODB with the default windows build of PHP v4.06 to retrieve data 
from an Access database using ADO.

Everything worked fine under PHP 4.06 but when trying out 4.07RC1 no data is returned 
only empty recordsets.  It still works for odbc databases just not for ADO and a few 
others.

I reported this as a bug to John Lim at his ADODB bug report site but he said he 
hasn't tested 4.07 yet and to report it here.

Here's a simple script that under PHP 4.06 works fine but no data is returned at all 
under PHP 4.07RC1.

Note: It uses an access database set up with a system DSN called testDB and the 
database has one table (Table1) with two fields in it.

Connect("testDB");
$objRS = $objConn->Execute($szSQL);

if (!$objRS->EOF)
echo "got some data";
else
echo "didn't get any data";

rs2html($objRS, 'border=2 cellpadding=3', array('Number','Test Text'));

// close the database connections
$objRS->Close();
$objConn->Close();

?>

Under PHP 4.06 you get: "got some data" and then the HTML table output from rs2html.

Under PHP 4.07RC1 you just get: "didn't get any data"





Edit this bug report at http://bugs.php.net/?id=13148&edit=1


-- 
PHP Development Mailing List 
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 #13148 Updated: Can't get data out of a ADO database with ADODB when using 4.07RC1

2001-09-07 Thread peterd

ID: 13148
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *Database Functions
Operating System: Windows NT 4 Server
PHP Version: 4.0.6
New Comment:

I've just tried out the same thing with the new 4.07 release candidate 2 build and it 
works fine now.

Whatever the problem was it's been fixed.  Thankyou

The improvement in speed over 4.06 is also amazing!

Previous Comments:


[2001-09-05 09:13:47] [EMAIL PROTECTED]

Hi,

I've been using ADODB with the default windows build of PHP v4.06 to retrieve data 
from an Access database using ADO.

Everything worked fine under PHP 4.06 but when trying out 4.07RC1 no data is returned 
only empty recordsets.  It still works for odbc databases just not for ADO and a few 
others.

I reported this as a bug to John Lim at his ADODB bug report site but he said he 
hasn't tested 4.07 yet and to report it here.

Here's a simple script that under PHP 4.06 works fine but no data is returned at all 
under PHP 4.07RC1.

Note: It uses an access database set up with a system DSN called testDB and the 
database has one table (Table1) with two fields in it.

Connect("testDB");
$objRS = $objConn->Execute($szSQL);

if (!$objRS->EOF)
echo "got some data";
else
echo "didn't get any data";

rs2html($objRS, 'border=2 cellpadding=3', array('Number','Test Text'));

// close the database connections
$objRS->Close();
$objConn->Close();

?>

Under PHP 4.06 you get: "got some data" and then the HTML table output from rs2html.

Under PHP 4.07RC1 you just get: "didn't get any data"





Edit this bug report at http://bugs.php.net/?id=13148&edit=1


-- 
PHP Development Mailing List 
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 #13148: Can't get data out of a ADO database with ADODB when using 4.07RC1

2001-09-05 Thread peterd

From: [EMAIL PROTECTED]
Operating system: Windows NT 4 Server
PHP version:  4.0.6
PHP Bug Type: *Database Functions
Bug description:  Can't get data out of a ADO database with ADODB when using 4.07RC1

Hi,

I've been using ADODB with the default windows build of PHP v4.06 to
retrieve data from an Access database using ADO.

Everything worked fine under PHP 4.06 but when trying out 4.07RC1 no data
is returned only empty recordsets.  It still works for odbc databases just
not for ADO and a few others.

I reported this as a bug to John Lim at his ADODB bug report site but he
said he hasn't tested 4.07 yet and to report it here.

Here's a simple script that under PHP 4.06 works fine but no data is
returned at all under PHP 4.07RC1.

Note: It uses an access database set up with a system DSN called testDB and
the database has one table (Table1) with two fields in it.

Connect("testDB");
$objRS = $objConn->Execute($szSQL);

if (!$objRS->EOF)
echo "got some data";
else
echo "didn't get any data";

rs2html($objRS, 'border=2 cellpadding=3', array('Number','Test Text'));

// close the database connections
$objRS->Close();
$objConn->Close();

?>

Under PHP 4.06 you get: "got some data" and then the HTML table output from
rs2html.

Under PHP 4.07RC1 you just get: "didn't get any data"
-- 
Edit bug report at: http://bugs.php.net/?id=13148&edit=1


-- 
PHP Development Mailing List 
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 #12620 Updated: PHP.exe is causing access violations when shutting down

2001-08-13 Thread peterd

ID: 12620
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproducible crash
Operating System: Windows NT 4 Server
PHP Version: 4.0.6
New Comment:

PHP is still crashing in shutdown_memory_manager() although I've now found that if I 
compile PHP with ZEND_DISABLE_MEMORY_CACHE set to 1, the problems don't occur.

I'm still unable to provide a short section of code that reproduces the problem as 
doing something as simple as adding 

echo "hello"; 

to a page that crashes can stop it from crashing.  

If I remove a function that isn't even called it can sometimes stop crashing, other 
times it continues to crash no matter what you change, it seems quite random but if a 
page crashes it does it consistently.  It's just that changing them in the slightest 
way can seem to alter the behaviour significantly

Does anyone know anything that might cause the memory manager to fail like this, or 
even if compiling PHP with ZEND_DISABLE_MEMORY_CACHE 1 is a reasonable thing to do?

Previous Comments:


[2001-08-07 09:19:52] [EMAIL PROTECTED]

I've been using the v4.06 windows binaries from this site and have been suffering 
repeated crashes as PHP closes down.  

The crash is either reported as just in PHP and other times OLEMainThreadWndName is 
reported in the error.  It varies between write and read violations too.

I've traced through the code and have tracked it down to an access violation in the 
function shutdown_memory_manager().

Also when using the win32 debug build of PHP the error does not occur, only with the 
release version.

The app I'm working on has database connections and uses COM objects.  The error seems 
to be slightly related to the database side although I've not been able to produce a 
small section of code that causes the same error.  I'm using the ADODB wrapper for 
database access although the same error has occurred when using the built-in ODBC 
functions.

I can't see that I'm doing anything wrong but there's definitely something that PHP 
isn't liking.

Below is the main function I use to get results from a database, when all the code is 
commented out inside this function the error doesn't occur but a lot of other stuff in 
the app doesn't happen either so that doesn't say much really.  Is there anything 
blatantly wrong with the code below?

function GetDirectoryQueryResults($szSQL)
{
$objConn = &ADONewConnection('ado');

$objConn->Connect("Directory");

$objRS = &$objConn->Execute($szSQL);

if (!$objRS->EOF) 
$retval = &$objRS->GetRows();


$objRS->Close();
$objConn->Close();

return $retval;
}



Cheers!






Edit this bug report at http://bugs.php.net/?id=12620&edit=1


-- 
PHP Development Mailing List 
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 #12620: PHP.exe is causing access violations when shutting down

2001-08-07 Thread peterd

From: [EMAIL PROTECTED]
Operating system: Windows NT 4 Server
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  PHP.exe is causing access violations when shutting down

I've been using the v4.06 windows binaries from this site and have been
suffering repeated crashes as PHP closes down.  

The crash is either reported as just in PHP and other times
OLEMainThreadWndName is reported in the error.  It varies between write and
read violations too.

I've traced through the code and have tracked it down to an access
violation in the function shutdown_memory_manager().

Also when using the win32 debug build of PHP the error does not occur, only
with the release version.

The app I'm working on has database connections and uses COM objects.  The
error seems to be slightly related to the database side although I've not
been able to produce a small section of code that causes the same error. 
I'm using the ADODB wrapper for database access although the same error has
occurred when using the built-in ODBC functions.

I can't see that I'm doing anything wrong but there's definitely something
that PHP isn't liking.

Below is the main function I use to get results from a database, when all
the code is commented out inside this function the error doesn't occur but
a lot of other stuff in the app doesn't happen either so that doesn't say
much really.  Is there anything blatantly wrong with the code below?

function GetDirectoryQueryResults($szSQL)
{
$objConn = &ADONewConnection('ado');

$objConn->Connect("Directory");

$objRS = &$objConn->Execute($szSQL);

if (!$objRS->EOF) 
$retval = &$objRS->GetRows();


$objRS->Close();
$objConn->Close();

return $retval;
}



Cheers!

-- 
Edit bug report at: http://bugs.php.net/?id=12620&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]