1
Mamba
Migrating to PHP5
  • 2007/7/1 19:11

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


I'm migrating to another server, and they have PHP5.

Because of that, I'm running into problems with blank pages on some modules, e.g. xdirectory, xoopsgallery, and xoopspoll. The problem is the even if I have Debugging on, XOOPS doesn't show any errors.

I was able to fix xoopspoll by changing HTTP_GET_VARS to _GET and HTTP_POST_VARS to _POST, but the others still don't work.

What other typical issues do we have when trying to update modules to PHP5. Are there any major show stoppers I should be aware of?

Could we have a list of modules that have been successfully tested under PHP5? Could we have a Wiki for info on how to updated individual modules to PHP5?

I just don't want to waste a lot of time reinventing the wheel...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

2
Dave_L
Re: Migrating to PHP5
  • 2007/7/1 21:42

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You may have already seen this: Migrating from PHP 4 to PHP 5 / Backward Incompatible Changes

One item I didn't see on that page is that only a simple variable should be used as the parameter for "return", if the function result is to be used as a reference.

Example:

// Incorrect
function &foo()
{
...
return (
$x $y);
}

// Correct
function &foo()
{
...
$rtn $x $y;
return 
$rtn;
}


Actually, I'm not sure if this is a PHP 5 - specific issue, or if it was introduced in a late release of PHP 4.

Login

Who's Online

271 user(s) are online (183 user(s) are browsing Support Forums)


Members: 0


Guests: 271


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits