Error 1
How to Reset Password in Joomla / Open Reality or any other CMS via MySQL Running in XAMPP
If you are trying to run some demo CMS like Joomal or Drupal (Open Reality in my case) you might get stuck at the place where you need to enter the admin password and user name at th
e backend. They send you the initial password to the email address you provide. Since, you run the whole thing with localhost as your server you wont be able to send/receive emails.
Workaround
The workaround is that you can reset the password of the reset admin password by using the md5 function in MySql. (source)
Error 2
How to remove the "Deprecated: Function ereg_replace() is deprecated" error.
It's nothing to worry about. The new version of php doesn't support ereg_replace() function. Go to the line where this function is used and replace it with 'preg_replace()'. (source). This eventually leads to a new error..
preg_replace() [function.preg-replace]: No ending delimiter ';' found in
will post a workaround if I get one..:
Update [Solution] : Actually there are some syntax difference between preg_replace() and ereg_repalce().
I had to add delimiters to line 144 of the function below
function make_db_extra_safe ($input) // handles data going into the db
{
global $conn;
$output = strip_tags($input); // strips out all tags
$output = preg_replace (";", "", $output); //LINE 144
$output = $conn->qstr($output, get_magic_quotes_gpc());
$output = trim($output);
return $output;
}
AND MADE IT AS GIVEN BELOW:
function make_db_extra_safe ($input) // handles data going into the db
{
global $conn;
$output = strip_tags($input); // strips out all tags
$output = preg_replace ("/;/", "", $output); //LINE 144
$output = $conn->qstr($output, get_magic_quotes_gpc());
$output = trim($output);
return $output;
}
Solved. :)
Comments
Post a Comment