Hey, so it would seem we broke jOpenSim by trying to use PHP 7.
The mysql_real_escape_string is no longer available in PHP 7 causing undefined function calls in jOpenSim.
Here is the entire error message;
11:19:48 - [jOpenSimProfile]: HandleAvatarClassifiedsRequest for 4660d5c8-a589-11e4-9866-00163e007790
11:19:48 - [jOpenSimProfile]: GenericXMLRPCRequest for method avatarclassifiedsrequest
11:19:49 - [jOpenSimProfile]: Unable to connect to Profile Server http://chimerazone.com/components/com_opensim/interface.php. Exception System.Net.WebException: The remote server returned an error: (500) Call to undefined function mysql_real_escape_string().
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) <0x41ca1410 + 0x00193> in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () <0x41c9d300 + 0x00053> in <filename unknown>:0
at Nwc.XmlRpc.XmlRpcRequest.Send (System.String url, Int32 timeout) <0x41dd0570 + 0x00239> in <filename unknown>:0
at jOpenSim.Profile.jOpenProfile.OpenProfileModule.GenericXMLRPCRequest (System.Collections.Hashtable ReqParams, System.String method) <0x45d28000 + 0x00153> in <filename unknown>:0
11:19:49 - [jOpenSimProfile]: RequestAvatarProperties for 4660d5c8-a589-11e4-9866-00163e007790
11:19:49 - [jOpenSimProfile]: GetProfileData for 4660d5c8-a589-11e4-9866-00163e007790
11:19:49 - [jOpenSimProfile]: GenericXMLRPCRequest for method avatar_properties_request
11:19:49 - [jOpenSimProfile]: Unable to connect to Profile Server http://chimerazone.com/components/com_opensim/interface.php. Exception System.Net.WebException: The remote server returned an error: (500) Call to undefined function mysql_real_escape_string().
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) <0x41ca1410 + 0x00193> in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () <0x41c9d300 + 0x00053> in <filename unknown>:0
at Nwc.XmlRpc.XmlRpcRequest.Send (System.String url, Int32 timeout) <0x41dd0570 + 0x00239> in <filename unknown>:0
at jOpenSim.Profile.jOpenProfile.OpenProfileModule.GenericXMLRPCRequest (System.Collections.Hashtable ReqParams, System.String method) <0x45d28000 + 0x00153> in <filename unknown>:0
11:19:49 - [jOpenSimProfile]: received Data:
11:19:49 - [jOpenSimProfile]: [avatarID]: 4660d5c8-a589-11e4-9866-00163e007790
11:19:49 - [jOpenSimProfile]: profileData[AboutText]:
11:19:49 - [jOpenSimProfile]: [Created]: 1/26/2015
11:19:49 - [jOpenSimProfile]: [charterMember]: System.Byte[]
11:19:49 - [jOpenSimProfile]: profileData[firstLifeAboutText]:
11:19:49 - [jOpenSimProfile]: [UserFlags]: 12
11:19:49 - [jOpenSimProfile]: profileData[firstLifeImage]: 00000000-0000-0000-0000-000000000000
11:19:49 - [jOpenSimProfile]: profileData[image]: 00000000-0000-0000-0000-000000000000
11:19:49 - [jOpenSimProfile]: profileData[profileUrl]:
11:19:49 - [jOpenSimProfile]: profileData[partner]: 00000000-0000-0000-0000-000000000000
What I am looking for is a simple way to replace that function and was wondering if you think the following would work as a quick temporary workaround.
function mysqlsafestring($string) {
// return mysql_real_escape_string(stripslashes($string));
if(is_array($string))
return array_map(__METHOD__, $string);
if(!empty($inp) && is_string($string)) {
return str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $string);
}
return $string;
}
This would replace the function in interface.php, currency.php and map.php
Thoughts?
Cheers!
Dave