FAQ

On 08.08.2008, at 15:18, Marcus Boerger wrote:

helly Fri Aug 8 13:18:31 2008 UTC

Modified files:
/ZendEngine2 zend_execute_API.c
/php-src/main php.h
Log:
- PHP 5.3 todo, store error handling mode on stack when executing
internal
or overloaded functions and methods. The issue is that a function
might
set and rely on a certain mode and then calls another internal
function
which changes it again, probably changing it back to the normal mode.
With this change we need to drop all calls that change the mode
back to
normal using php_std_error_handling(). However there might be places
where someone wants to restore the last mode. If there is such a
case we
need to add two functions one to save and one to restore. I briefly
on
this and not all cases are clear, especially one in sqlite but that
seems
to be a rather misleading comment. Eitherway I chose to not drop
and mark
as deprecated for now.

Can you give me a list of the places you think need investigation? Or
better yet mail it to interals so that all ext authors can pick up on
this (and I can add it to the todo) list.

Does this conclude the following two todo items for you, or is
additional work necessary beyond handling those "odd" cases?:
- exception handling, two new functions and a modified one plus a
structure change (Marcus)
- change the error mode to prevent wrong error handling mode for inner
call in some cases (Marcus)

Also is there any changes that need to be made to the documentation as
a result of this change?

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

Search Discussions

  • Lukas Kahwe Smith at Aug 8, 2008 at 7:08 pm

    On 08.08.2008, at 15:18, Marcus Boerger wrote:

    helly Fri Aug 8 13:18:31 2008 UTC

    Modified files:
    /ZendEngine2 zend_execute_API.c
    /php-src/main php.h
    Log:
    - PHP 5.3 todo, store error handling mode on stack when executing
    internal
    or overloaded functions and methods. The issue is that a function
    might
    set and rely on a certain mode and then calls another internal
    function
    which changes it again, probably changing it back to the normal mode.
    With this change we need to drop all calls that change the mode back
    to
    normal using php_std_error_handling(). However there might be places
    where someone wants to restore the last mode. If there is such a
    case we
    need to add two functions one to save and one to restore. I briefly on
    this and not all cases are clear, especially one in sqlite but that
    seems
    to be a rather misleading comment. Eitherway I chose to not drop and
    mark
    as deprecated for now.

    Can you give me a list of the places you think need investigation? Or
    better yet mail it to interals so that all ext authors can pick up on
    this (and I can add it to the todo) list.

    Does this conclude the following two todo items for you, or is
    additional work necessary beyond handling those "odd" cases?:
    - exception handling, two new functions and a modified one plus a
    structure change (Marcus)
    - change the error mode to prevent wrong error handling mode for inner
    call in some cases (Marcus)

    Also is there any changes that need to be made to the documentation as
    a result of this change?

    regards,
    Lukas Kahwe Smith
    mls@pooteeweet.org
  • Lukas Kahwe Smith at Aug 8, 2008 at 7:09 pm

    On 08.08.2008, at 15:18, Marcus Boerger wrote:

    helly Fri Aug 8 13:18:31 2008 UTC

    Modified files:
    /ZendEngine2 zend_execute_API.c
    /php-src/main php.h
    Log:
    - PHP 5.3 todo, store error handling mode on stack when executing
    internal
    or overloaded functions and methods. The issue is that a function
    might
    set and rely on a certain mode and then calls another internal
    function
    which changes it again, probably changing it back to the normal mode.
    With this change we need to drop all calls that change the mode
    back to
    normal using php_std_error_handling(). However there might be places
    where someone wants to restore the last mode. If there is such a
    case we
    need to add two functions one to save and one to restore. I briefly
    on
    this and not all cases are clear, especially one in sqlite but that
    seems
    to be a rather misleading comment. Eitherway I chose to not drop
    and mark
    as deprecated for now.

    Can you give me a list of the places you think need investigation? Or
    better yet mail it to interals so that all ext authors can pick up on
    this (and I can add it to the todo) list.

    Does this conclude the following two todo items for you, or is
    additional work necessary beyond handling those "odd" cases?:
    - exception handling, two new functions and a modified one plus a
    structure change (Marcus)
    - change the error mode to prevent wrong error handling mode for inner
    call in some cases (Marcus)

    Also is there any changes that need to be made to the documentation as
    a result of this change?

    regards,
    Lukas Kahwe Smith
    mls@pooteeweet.org
  • Etienne Kneuss at Aug 8, 2008 at 8:02 pm
    Hello,
    On Fri, Aug 8, 2008 at 9:01 PM, Lukas Kahwe Smith wrote:
    On 08.08.2008, at 15:18, Marcus Boerger wrote:

    helly Fri Aug 8 13:18:31 2008 UTC

    Modified files:
    /ZendEngine2 zend_execute_API.c
    /php-src/main php.h
    Log:
    - PHP 5.3 todo, store error handling mode on stack when executing internal
    or overloaded functions and methods. The issue is that a function might
    set and rely on a certain mode and then calls another internal function
    which changes it again, probably changing it back to the normal mode.
    With this change we need to drop all calls that change the mode back to
    normal using php_std_error_handling(). However there might be places
    where someone wants to restore the last mode. If there is such a case we
    need to add two functions one to save and one to restore. I briefly on
    this and not all cases are clear, especially one in sqlite but that seems
    to be a rather misleading comment. Eitherway I chose to not drop and mark
    as deprecated for now.

    Can you give me a list of the places you think need investigation? Or better
    yet mail it to interals so that all ext authors can pick up on this (and I
    can add it to the todo) list.
    I took care of it by patching those ext already. See the other mail about it.
    Does this conclude the following two todo items for you, or is additional
    work necessary beyond handling those "odd" cases?:
    - exception handling, two new functions and a modified one plus a structure
    change (Marcus)
    - change the error mode to prevent wrong error handling mode for inner call
    in some cases (Marcus)

    Also is there any changes that need to be made to the documentation as a
    result of this change?
    Should have no effect worth documenting, at most it will fix
    unexpected behaviors.

    Regards.
    regards,
    Lukas Kahwe Smith
    mls@pooteeweet.org




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



    --
    Etienne Kneuss
    http://www.colder.ch

    Men never do evil so completely and cheerfully as
    when they do it from a religious conviction.
    -- Pascal
  • Marcus Boerger at Aug 8, 2008 at 8:25 pm
    Hello Lukas,

    Friday, August 8, 2008, 9:01:42 PM, you wrote:

    On 08.08.2008, at 15:18, Marcus Boerger wrote:

    helly Fri Aug 8 13:18:31 2008 UTC

    Modified files:
    /ZendEngine2 zend_execute_API.c
    /php-src/main php.h
    Log:
    - PHP 5.3 todo, store error handling mode on stack when executing
    internal
    or overloaded functions and methods. The issue is that a function
    might
    set and rely on a certain mode and then calls another internal
    function
    which changes it again, probably changing it back to the normal mode.
    With this change we need to drop all calls that change the mode
    back to
    normal using php_std_error_handling(). However there might be places
    where someone wants to restore the last mode. If there is such a
    case we
    need to add two functions one to save and one to restore. I briefly
    on
    this and not all cases are clear, especially one in sqlite but that
    seems
    to be a rather misleading comment. Eitherway I chose to not drop
    and mark
    as deprecated for now.
    Can you give me a list of the places you think need investigation? Or
    better yet mail it to interals so that all ext authors can pick up on
    this (and I can add it to the todo) list.
    Etienne did a brute force solution. Find all and fix them all. Anything
    that still produces a deprecated message should be addressed, even though
    as Etienne's patch showed nearly all work with the old functions in place.
    But I didn't provide the new functions without reason and got the very much
    appreciated help from Etienne for no reason either.
    Does this conclude the following two todo items for you, or is
    additional work necessary beyond handling those "odd" cases?:
    - exception handling, two new functions and a modified one plus a
    structure change (Marcus)
    No effect on this one, the patch is still on my machine and still not
    validated fully.
    - change the error mode to prevent wrong error handling mode for inner
    call in some cases (Marcus)
    Also is there any changes that need to be made to the documentation as
    a result of this change?
    As Etienne pointed out, the change adresses potential failures that some
    people might have expected in complex code designs with c level implemented
    callbacks. Mostlikely to be experienced with code that uses SQLite, PDO and
    or SPL extension. Well and that mysql wirdness still needs to be adressed,
    so Lukas you need to track that the mysql guys fix that one.

    Best regards,
    Marcus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedAug 8, '08 at 7:05p
activeAug 8, '08 at 8:25p
posts5
users3
websitephp.net

People

Translate

site design / logo © 2022 Grokbase