Re: Debugging custom streams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jared Williams wrote:

-----Original Message-----
From: Jochem Maas [mailto:jochem@xxxxxxxxxxxxx] Sent: 10 February 2006 14:17
To: Jared.Williams@xxxxxxxxxxxx
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Debugging custom streams

Jared Williams wrote:

Hi,
Short version, is there any way of listing all open

resources from
within a PHP script? Think I may have a problem relating to

the object/resource shutdown order within PHP, but cant see which custom stream handler still has an open resource.

why not let your zip class keep a list of opened streams (I can't
imagine that it's not doing that already) and write a function which
will output a list of 'registered' stream resources that are still open
[mis]using ftell() or feof() to check which streams are still 'active'.




...



I don't suppose that your closing a stream twice?
[ once with fclose() and one inside $zip->close() ]


$zip->close() doesn't (yet) ensure that internal streams are closed. So don't think it can be that.

was worth a guess :-)


unset($zip);

I get an application exception on PHP shutdown, though

the zip file is valid with 2 files.
what exactly is the exception?



---------------------------
php.exe - Application Error
---------------------------
The instruction at "0x100ac22f" referenced memory at "0x0000004c". The memory could not be "read". Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK Cancel ---------------------------

I have the same thing occur on windows machines with some setups (running certain code)
- and the same situation where the code seems to work regardless of the error.

I would suspect that it's an internal 'bug' and that there is nothing you can do at the
php level to fix it (at least there is nothing you should need to do - made there _is_ actually
something you can do at the php level).

have you tried running the code on a linux machine? (maybe using strace or gdb) - personally
I only use windows for preliminary development, all production machines are linux (and the odd
errors/exceptions that popup in windows never seem to have a corresponding problem in linux)



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux