Web Hosting Talk







View Full Version : PHP Array Problem


ServerSonic
10-05-2002, 09:09 AM
Hello everyone,

On my server, polls made with phpBB, multiple parts of postnuke, and apparantly some things in xoops all have experienced this error in the past few days. It seems to be a server issue rather than a software issue...

Whenever an item is added to an array in PHP, it deletes a certain portion of the previous item(s) characters from the beginning. The best I can explain this is to have you go to my phpBB forum test at http://www.serversonic.com/phpBB and try posting a new thread with a poll in it. Add more than one option and you will begin to see what I am talking about.

Also if you go to www.dmcstop.com you will see how this problem has botched up the menu on that site.

Does *anyone* have a clue on how to help me with this? I have been working on locating the source of this problem for literally 12+ hours. If anyone has an idea, *PLEASE* IM me at SSonicHelp on AIM, ICQ 16865386, or jordan@serversonic.com (or the obvious, post here). I would really appreciate it:)

TIA

ServerSonic
10-05-2002, 10:48 AM
One of my clients was nice enough to forward some information regarding this on to me....

Sure... The problem is with PHP 4.2.3's mbstring extension. The new code that they implemented for that extension (they re-wrote it) is incorrect...

Check the configure statement. If you see something in there about mbstring (like --enable-mbstring, or possibly another line) and if you do have PHP 4.2.3, then you will be having problems similar to what I was having (most likely). If this is the case, there are three resolutions to this problem... Otherwise, I suppose you're having another issue so the below is not necessarily going to fix it.

The first is to downgrade PHP to 4.2.2. This isn't a hard thing to do (as the same configuration used for PHP 4.2.3 can be used for 4.2.2) and will of course solve the problems with mbstring.

The second is to download the latest version of PHP from http://snaps.php.net/ and install that. Again, you can use the same configuration of PHP on that build, but there is the possibility of other new bugs that have been introduced as the "snaps" are builds that are made every few hours from the most recent code. And have NOT been tested.

The last option, is to patch the bad code to make it work right again, then re-build and re-install PHP 4.2.3. Instructions to do that are located here: http://forum.rackshack.net/showthread.php?s=&postid=65508#post65289 (should be a post by python_dev.)

So the problem is fixed, hope no one else has this problem:)

vSector
10-05-2002, 08:18 PM
wow... i hope you gave that client a free month :-)

Those types problems can be sooo hard to find.

ServerSonic
10-05-2002, 08:30 PM
Actually the client has multiple accounts with me so I upgraded all of his accounts to the next plan level. The value of that will be much more than just a free month after about 2-3 months:)