|
Posted by Jochem Maas on 10/08/11 11:14
Cas wrote:
> Tried the newest libXML stable release (2.6.19) and recompiled mod_php with it
> but I still have get the error:
>
> Warning: Couldn't fetch DOMDocument in
> /var/www/localhost/htdocs/pluxbox/test.php on line 20
> foo
>
> May I ask what your system specs are? (OS, PHP and libXML version).
sure, I only ran the code locally yesterday:
WinXPHome + latest WAMP release (php5.0.4) (no idea what version of libxml2 that contains)
you keep mentioning libxml.... but I was pretty sure that php5's xml stuff is
all based on libxml2.
sorry I can't be of more help right now.
>
> Greetings,
> Cas
>
> On 4/25/05, Cas <thecas@gmail.com> wrote:
>
>>On both systems i use libxml 2.6.18, both Gentoo (2005.0) machines. I
>>asked in the irc channels if more people could run my script to be
>>sure it wasn't my system and two of the two people also had the
>>problem (dunno what their systems are, but one runned PHP 5.0.4). I
>>think it's weird I get different errors on my both systems what indeed
>>does suggest (at least one of) my system(s) are/is borked cause both
>>are PHP 5.0.3 and libXML 2.6.18.
>>I'm now updating to libXML 2.6.19 to see if it will fix my problem,
>>otherwise i will indeed work around the problem. My best suggestion is
>>to write the DOMDocument to a random filename and pass the name
>>through the sessions instead of the real dom object.
>>Any better solutions are more then welcome!
>>
>>Greetings,
>>Cas
>>
>>
>>On 4/25/05, Jochem Maas <jochem@iamjochem.com> wrote:
>>
>>>Cas wrote:
>>>
>>>>Hi,
>>>>
>>>>I'm trying to read a (XML object) DOMDocument from an session but when I
>>>>try to do this from another page then where it's declared, it can't be read it.
>>>>I _can_ read the DOMDocument on the same page out of the session.
>>>>and also print_r(_SESSION); shows it still is a DOMDocument on all pages.
>>>>
>>>>The attached file shows the problem. I get different results running
>>>>the script on
>>>>PHP 5.0.3 and 5.0.4 servers (all linux).
>>>>My expected result is that the DOMDocument is printed out when submit is hit,
>>>>but instead it gives different results:
>>>>
>>>>Fatal error: Call to a member function saveXML() on a non-object in
>>>>/var/www/localhost/htdocs/dom_session.php on line 21
>>>>and
>>>>
>>>>Warning: Couldn't fetch DOMDocument in
>>>>/var/www/localhost/htdocs/dom_session.php on line 21
>>>
>>>I had a look at you problem... and I found it impossible to reproduce the
>>>errors or warnings - this leads me to believe that something on your system(s)
>>>is ****ed, libxml2 would a good place to start looking....
>>>
>>>BUT,
>>>
>>>even though I managed to retrieve the DomDocument object from the session
>>>on the second/subsequent requests the object stored in the session did not
>>>contain the XML string that was originally loaded.... so that
>>>$_SESSION['dom']->saveXML() return NULL. which is not what I would expect but maybe
>>>its correct behaviour.
>>>
>>>anyway if you get so far as to see the same behaviour as I do you may have something
>>>solid to report as a bug (or at least post a question here, or possibly on internals)
>>>otherwise you're looking at refactoring you code to work around the problem
>>>
>>>
>>>>I thought it was a bug in PHP and opened a bug report allready but it's closed.
>>>>http://bugs.php.net/?id=32825
>>>>
>>>>Does anyone has an idea what could be wrong with it?
>>>>
>>>>Thanks in advance,
>>>>
>>>>Caspar Adriani
>>>>
>>>>
>>>
>>>
>>--
>>http://www.getfirefox.com/
>>
>
>
>
Navigation:
[Reply to this message]
|