Author Topic: Installing 1.2.3+nb with most recent vers. of PHP  (Read 2223 times)

ShadowRaven

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
    • ShadowGuard: DragonLore
Installing 1.2.3+nb with most recent vers. of PHP
« on: April 21, 2012, 06:28:51 am »
Just did a clean install of 1.2.3+nb and it threw out two warning errors(was still able to finish the install though):

Quote
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/xxxx/public_html/lotgd/game/lib/errorhandling.php on line 33

and the other one is the same warning except for it was for the function split().

the latest PHP version (v5.4.0) removed magic_quotes and depreciated split() function.

I dont know if this has been fix in the next 1.2.4 version so I thought I should mention it.

Someone on the other forum post a solution to fix this:

Quote
Fix set_magic_quotes_runtime() .
Code: [Select]
#
#-----[ OPEN ]-----
#
lib/errorhandling.php

#
#-----[ FIND ]-----
#
# Line: 33
#
set_magic_quotes_runtime(0);

#
#-----[ REPLACE WITH ]-----
#
//set_magic_quotes_runtime(0);

Fix split().
Code: [Select]
#
#-----[ OPEN ]-----
#
prefs.php

#
#-----[ FIND ]-----
#
# Line: 233
#
$type = split(",", $x[0]);

#
#-----[ REPLACE WITH ]-----
#
//$type = split(",", $x[0]);
$type = explode(",", $x[0]);

#
#-----[ OPEN ]-----
#
events.php

#
#-----[ FIND ]-----
#
# Line: 47
#
$array = split(":", $specialinc);

#
#-----[ REPLACE WITH ]-----
#
//$array = split(":", $specialinc);
$array = explode(":", $specialinc);

#
#-----[ OPEN ]-----
#
pageparts.php

#
#-----[ FIND ]-----
#
# Line: 71
#
$s = split("x",$size); 
(find both instances)
#
#-----[ REPLACE WITH ]-----
#
//$s = split("x",$size);
$s = explode("x",$size);   

#
#-----[ OPEN ]-----
#
pullurl.php

#
#-----[ FIND ]-----
#
# Line: 31
#
$val = split("\n", $ret);

#
#-----[ REPLACE WITH ]-----
#
//$val = split("\n", $ret);
$val = explode("\n", $ret);


#
#-----[ OPEN ]-----
#
showform.php

#
#-----[ FIND ]-----
#
# Line: 27
#
$info = split(",", $v);

#
#-----[ REPLACE WITH ]-----
#
//$info = split(",", $v);
$info = explode(",", $v);

#
#-----[ FIND ]-----
#
# Line: 31
#
$info = split(",",$val);

#
#-----[ REPLACE WITH ]-----
#
//$info = split(",",$val);
$info = explode(",",$val);


Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 318
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Installing 1.2.3+nb with most recent vers. of PHP
« Reply #1 on: July 02, 2012, 05:54:47 am »
removed those in the current version :) 1.2.4 hopefully got all splits () and whatnot.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro