1 (edited by Amadiere 2005-02-16 10:54)

Topic: PHP 4.0.6 Compatility

Hi,
I'm having a few issues with PunBB, or more specifically, my altered version. I'm currently trying to install PunBB on a Solaris Box with PHP Version 4.0.6.... The minimum version for PunBB is 4.1.0. I'm told that there is no easy way to update the Solaris box without considerable downtime (or they don't want to wink ) - so I'm left with 2 alternatives: Alter PunBB to be 4.0.6 compliant, or don't use PunBB.

Well, I like PunBB. It's perfect for the job (unusually, the word perfect in this situation isn't far from the truth) - so I wanted to try the downgrade. I first went about replacing all those pesky $_SERVER, $_POST globals etc. with their $HTTP_*_VARS counterparts. These occasionally required globalising. I also had to alter the install script to remove the version check which was only available in 4.1.0 anyway (I saw the other post about this and it made me laugh! proves your still human Rickard!).

I then had problems with the forums working up until certain points and then I would get "page cannot be displayed" errors - not PHP warnings, notices, errors etc (which definately would be the normal scenario). I traced these down, after quite a bit of time to be caused by array_map and unbuffered mysql queries. (much time would probably have been saved had I used the php changelog to see the diffs between 4.0.6 and 4.1.0.... but my brain clearly wasn't on that path unfortunately. I look now and it warns me in 4.1 that array_map and unbuffered queries cause PHP to crash - which must be why it's a page cannot be displayed and not normal php errors.

Anyway, all these are fixed now and I can't cause the forums to crash.... except I can.... but only by using it quite a bit. There appears to now be only one bug, but this bug is inconsistant from what I can guess at present. I can use the forums as normal, post, reply, view the admin, change settings, but then I'll hit a page, e.g. The "userlist" and the register.php have caused it to die a "page cannot be displayed" death. However, if i click refresh (resend data if needed) - no problems.... Try it again. no problems, go back, try the same route again, no problems...

Basically - I have no idea how to replicate the error (page-cannot-be-displayed) except to use it quite a bit and hope (!!) it dies.

I know this isn't a supported topic as to my modifications, but I'm just appealing for help basically and seeing if anyone has had similar problems in the past? Specifically - does anyone have this running on php with a version of 4.1.0 exactly? If so, then my presumptions will be that it was definately a change between 4.0.6 and 4.1.0 thats causing my heartache.

Thanks in advance for any pointers, help etc anyone can throw my way!

p.s. $unbuffered always = false in my code now, so it never runs an unbuffered query. and Array_map has been replaced in all instances with a for each statement that does the same task.

Re: PHP 4.0.6 Compatility

Hmm, if you get "Page cannot be displayed", I would guess it's still a crash or something like that. What does your webserver access log say? Does it log the requests that fail?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by Amadiere 2005-02-18 13:35)

Re: PHP 4.0.6 Compatility

Sorry for my slow reply - I was not around yesterday.
There is no entries in the log for the access or errors at all... sad

edit: well - there are, but not referencing the time that it dies.

Re: PHP 4.0.6 Compatility

it seems like i'm having the same problem, so i disabled unbuffered queries. the forum would only show the topic post on the first page of a multipage replied topic. i don't get any errors. if i run the sql statement without through a sql client, i get all the proper posts. the server runs mysql 4.0.22 and php 4.3.10.