Posted on: 2007/8/28 22:25
Re: Moving to Php5 - XOOPS Compatibility - Garrath's List - Testing
XOOPS PHP 5 Testing
I've gotten dragged into the issue of XOOPS compatibility with PHP5. I moved a customer's XOOPS site from my ISP's server to the customer's server and ran into some problems. Both servers were running PHP 4. Curl-modified modules failed on the customer's server due to an old version of curl. So, they set up a new server running the latest versions of programs (including curl), but more XOOPS modules failed until the (local) value for long arrays was enabled (Php_Flag register_long_arrays On). That server is running PHP5 as an Apache module. So, under PHP5 in that case, that's a workaround.
However, while allowing new fully-hosted domains to be either PHP4 or PHP5, my ISP has made PHP5 the standard and is preparing for PHP6. They run PHP5 (and PHP4) in CGI mode.
So, today I set up a new domain with my ISP using PHP5 and moved an XOOPS demo site from a PHP4 domain to the new PHP5 domain, and started testing for compatibility. So far, all the modules that I'd been using except one fail. My list is below.
Note that by default for PHP5, my ISP disables register_globals (which cannot be enabled), magic_quotes_gpc, and register_long_arrays. To enable magic_quotes_gpc requires installing a custom version of PHP5 and modifying that copy of php.ini. I found no mention whether that technical workaround also is possible for register_long_arrays. (htaccess may be used on my customer's server for changing these settings, since PHP5 runs as an Apache module.)
My ISP notes that register_globals and register_long_arrays will not exist in PHP6.
XOOPS version 2.0.16
These modules are NOT compatible with PHP5:
Headlines 1 (xoopsheadlines) - cannot edit
Links 1.1 (mylinks) - cannot edit
FAQ 1.1 (xoopsfaq) - cannot edit
News 1.1 (news) - comments link no-op, cannot edit
Sections 1 (sections) - cannot edit
Polls 1 (xoopspoll) - cannot edit
PopnupBlog 1.33 - cannot edit (latest version does not mention anything about PHP5?)
Stockbox 0.1 (stockquotes) - no-op (even with curl fix for fopen disable)
These modules appear okay:
Liaise 1.26 (liaise)
Update 8/28/2007 6:00pm PDT
I read some about the differences between globals / superglobals for PHP4 and PHP5, and tried a "simpleton's" approach to repairing some modules. So far, I "fixed" stockquotes 0.1 and xoopsheadlines 1 by replacing $HTTP_GET_VARS with $_GET and $HTTP_POST_VARS with $_POST.