php-windows Digest 25 Jul 2009 15:55:14 -0000 Issue 3664

Topics (messages 29484 through 29486):

Re: Perplexing crash with 5.2.9+ php5ts.dll
        29484 by: Brad Waite
        29486 by: Brad Waite

fluorography Unleash lion inside you! knighterrant
        29485 by: Atieno Alden

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Richard Quadling wrote:
> 2009/7/24 Brad Waite <b...@wcubed.net>:
>> Richard Quadling wrote:
>>
>>> What happens if you try to run PHP from the command line?
>>>
>>> php -v
>> PHP 5.2.10 (cli) (built: Jun 17 2009 16:16:57)
>> Copyright (c) 1997-2009 The PHP Group
>> Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
>>    with Zend Debugger v5.2.15, Copyright (c) 1999-2008, by Zend Technologies
>>
>>> php -m
>> [PHP Modules]
>> bcmath
>> bz2
>> calendar
>> com_dotnet
>> ctype
>> curl
>> date
>> dom
>> filter
>> ftp
>> gd
>> hash
>> iconv
>> imap
>> json
>> libxml
>> mbstring
>> mcrypt
>> mysql
>> mysqli
>> odbc
>> openssl
>> pcre
>> PDO
>> pdo_mysql
>> PDO_ODBC
>> pdo_sqlite
>> Reflection
>> session
>> SimpleXML
>> soap
>> sockets
>> SPL
>> SQLite
>> standard
>> tokenizer
>> wddx
>> xml
>> xmlreader
>> xmlrpc
>> xmlwriter
>> xsl
>> Zend Debugger
>> zip
>> zlib
>>
>> [Zend Modules]
>> Zend Debugger
>>
>>> php --ini
>> Configuration File (php.ini) Path: C:\WINDOWS
>> Loaded Configuration File:         C:\Program Files\PHP\php.ini
>> Scan for additional .ini files in: (none)
>> Additional .ini files parsed:      (none)
>>
>>> Enable all the extensions you want.
>>>
>>> Can you make sure that in the ini file ...
>>>
>>> display_startup_errors = On
>>>
>>> just in case you are missing a really obvious error.
>> Yep, I've got all the logging enabled.  Nothing's showing up in the event 
>> log.
>>
> 
> OK, so far so good.
> 
> Now create a simple PHP script which you can run at the command line
> which you think will cause the issue.
> 
> If you can produce a simple test case, then allow us to run it to see
> if it is reproducible.
> 

So far simple tests have been unable to reproduce the issue.  I'll try to debug
the Drupal install to the point where I can isolate the breakage.

Thanks for the help so far.

--- End Message ---
--- Begin Message ---
Richard Quadling wrote:

> OK, so far so good.
> 
> Now create a simple PHP script which you can run at the command line
> which you think will cause the issue.
> 
> If you can produce a simple test case, then allow us to run it to see
> if it is reproducible.
> 

Okay, found the problem; it's with simplexml_load_string() and with some bad 
code.

simplexml_load_string() under 5.2.8 will return a proper SimpleXMLElement
object from a non-UTF-16-encoded bit of XML, even though the XML says that it
*is* encoded with UTF-16.

Under 5.2.9+, simplexml_load_string() tosses a warning and returns FALSE.

Apache was crashing because a poorly written SimpleXMLtoArray() function was
recursively calling itself without checking the arguments first.  I suspect it
simply ran out of memory, but I didn't step through it enough times to verify.

Here's a bit of code that can reproduce the "problem":


$xmlstr = '<?xml version="1.0" encoding="utf-16"?><foo
xmlns="http://www.foo.com/service";><bar name="foobar"></bar></foo>';
$xml = simplexml_load_string( $xmlstr, "SimpleXMLElement", LIBXML_NOCDATA );


Why the change in encoding-handling between the PHP versions?  I can't see
anything in the 5.2.9 Changelog that would affect this.

--- End Message ---
--- Begin Message ---
If she is tired of your night games you can rock her world using our products!

http://dwyceybgug.net/

residentiary indurated uninfluential jilted confiscation

--- End Message ---

Reply via email to