You are here: Interesting problem in PHP and Squirrelmail « PHP « IT news, forums, messages
Interesting problem in PHP and Squirrelmail

Posted by Mark on 01/18/06 22:36

I am working on an XML serializer module for PHP. It will allow session
information to be stored as XML in the database. While this sounds like
self promotion, and it probably is a bit, it is needed to make sense of why
I am doing this. Anyway, the XML stream is so that I can use PHP session
data outside of PHP. I'm working on a PostgreSQL function to extract the
PHP session information when it is stored as this format of XML.

Anyway, to make a long story short, I was crashing badly with certain pages
in squirrelmail. I suspected it was endlessly recursing over a few
variables. Not the immediate predecessor either, but a couple back which
would be hard to find unless you scanned the recursion stack.

So, I added this capability in the serializer, and low and behold, I found
that squirrelmail was using a self referencing hierarchy. Which looked
something like this:

messages->1126708752->544->entities->4->parent->entities

Where the "messages" variable had an item "1126708752" which had an item
"544" etc. etc.

The first "entities" variable was in fact the same pointer as the second
"entities" pointer in the chain.

Here's a point of debate, should this sort of behavior be allowed? If it is
allowable, how does one support it in any sort of serialized methodology? I
have a few ideas but none very pretty. I'm pretty sure it causes problems
in regular PHP as these sorts of pages sometimes have problems anyway.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация