Hi
Below are sections of a script that I have running on two servers and the configs are also below. The problem is on one server either script runs ok, but on the other server errors on generated on the ereg_re-place lines, and I have had to ad the \ in the line at the strart and end. Is this to do with how php is setup or version? Strange how it works on one and not another, all suggestions appreciated, thanks.
Roy.
Server 1 (works ok)
Perl 5.006001
MySQL 3.23.56
PHP 4.2.2
Apache 1.3.26 (Debian)
Server 2 (don't work)
Perl 5.008
MySQL 3.23.58
PHP 4.3.8
Apache 2.0.50 (Red Hat Enterprise)
Original Version.....
{
$res = $user->addUser($POST["username"],$POST["email"], $_POST["agree"]);
if ($res == 99)
{
//$SESSION['username'] = $POST["username"];
$tp = ereg_replace("{LA_JOIN_SUCCESS}", JOIN_SUCCESS, $tp);
$tp = ereg_replace("{LA_JOIN_SUCCESS_2}", JOIN_SUCCESS_2, $tp);
$tp = ereg_replace("{LA_MAKE_PROFILE}", MAKE_PROFILE, $tp);
echo $tp;
}
My Amended version.
{
$res = $user->addUser($POST["username"],$POST["email"], $_POST["agree"]);
if ($res == 99)
{
//$SESSION['username'] = $POST["username"];
$tp = ereg_replace("{LA_JOIN_SUCCESS}", JOIN_SUCCESS, $tp);
$tp = ereg_replace("{LA_JOIN_SUCCESS_2}", JOIN_SUCCESS_2, $tp);
$tp = ereg_replace("{LA_MAKE_PROFILE}", MAKE_PROFILE, $tp);
echo $tp;
}