Netjuke on PHP5 · 2005-08-26 16:34
This became troublesome for me, and I barely managed to find the solution for fixing up Netjuke to work on PHP5 using a Google cache of a post on the Netjuke site (which is currently down, and has been for a while).
These instructions have been tested on 1.0-rc1 and 1.0-rc2. As found in the cache, I'll post it here so it isn't lost when the cache disappears. I'd like to thank Daniel Stammler for the work. You can download Netjuke here.
My configuration is: Win XP SP1
Apache 2.0.48 / Php 5.0.0b2 as module / Mysql 4.0.16
I had to change some things in order to make it work:
== adodb.inc.php ====================
==> I don't know if it is important, but added for PHP5 compatibility
93 if (strnatcmp(PHP_VERSION,'5.0.0')>=0) {
94 define('ADODB_PHPVER',0x5000);
95 } else if (strnatcmp(PHP_VERSION,'4.3.0')>=0) {
96 define('ADODB_PHPVER',0x4300);
==> Changed from / to \ as it did'nt load the mysql
driver (I think there must be another way as I might
lose compatibility with Linux based servers. I will
check with this magic quote thing...)
3165 return @include_once(ADODB_DIR."\drivers\adodb-".$ADODB_Database.".inc.php");
== adodb-mysql.inc.php ====================
==> Changed from &GetRowAssoc to
GetRowAssoc (generated a fatal error on passing
variables as reference)
447 function GetRowAssoc($upper = true)
== inc-common.php ====================
==> Changed because it asked to upgrade from
PHP 5.0.0 to PHP 4.1.0 or higher!!!
19 if (((int) substr (PHP_VERSION, 0, 1)) * 10 + ((int) substr (PHP_VERSION, 2, 1))<41)
==> Changed PRIVATE to JUKE_PRIVATEas it was
issuing a parse error with T_PRIVATE conflict
681 if ( (JUKE_PRIVATE == true) && ($NETJUKE_SESSION_VARS["email"] == "") ) {
== login.php ====================
==> Changed PRIVATE to JUKE_PRIVATE as it was
creating a Parse error with T_PRIVATE
4 define( "JUKE_PRIVATE", false );
Well, that's what I did. I am not an Apache/Php
configuration specialist. Maybe there is something
in the configuration that I missed that lead to those
changes or not. If you have some time and
advises... All I can say is that it works great and
that netjuke is what I was looking for since a long
time. Great job
I hope those informations are helpful
_______________
Daniel Stammler
As a small note, if your installing Netjuke on Linux, you don't need the second change to adodb.inc.php.