Skip to main content

OpenReality (De) Bugging


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

Popular posts from this blog

Building Autonomous Drone with Raspberry Pi and APM 2.8

I am a total newbie to hardware and was pushing my limits to see how far I can reach on with hardware projects (which sparked my interest lately). I have set out on a very ambitions mission  to control a drone from raspberry pi .I began the research for this around 2 months ago and had brought a raspberry pi, drone body kit and apm flight controller. The key difference of this project from common drone projects is that I'm trying to avoid the use of and RC and instead use the raspberry pi to control it.  Hardware Ins tallation Setup: I am using APM 2.8 and Mission Planner. I am using RPi 3 to control the APM 2.8 via Telem port of APM I am planning to power the apm via the battery to ESC (Electronic Speed Controllers) Now, documenting my steps below: Day 1 Watch Tutorial To get started with APM flight controller, I watched this video tutorial [1] which gives a gentle introduction about APM board.  Setup APM board and Calibrate Sensors I downloaded the APM Missi

Hadoop The Definitive Guide [Book] - Study Notes

Chap-1- Meet Hadoop Requirement and adoption in yahoo. A framework that can scale to the web. Map and Reduce acitivity and features like data locality. Can be applied with a variety of algorithms Huge data processing can beat good algorithms Chap-2 - MapReduce The Map Java class and Reducer Java class The Job java class Jobtracker and tasktracker Hadoop reduces the input to input splits or just splits Map tasks write the intermediate output to local disks, so that they can be discarded after use. Outputs of Reduce tasks are stored in HDFS Combiner function can be run on map output, and the combiner functions output forms the input to the reduce function Hadoop streaming proivide hadoop apis in languages other than Java Chap-3 - The Hadoop Distributed Filesystem Fault tolerant solution. Same data written at multiple places. Filesystems that manage the storage across a network of machines are called distributed filesystems. Blocks - a block size is the minim

Adafruit GFX - How to change line spacing in text?

  You may want to update the line spacing to be a little lower than default due to small screen size on IoT devices. I faced this challenge while working on a Watchy hobby project. You may have used a font generator or just using the default fonts and got a *.h file that has the details of the font. In that case just change the last integer value in the PROGMEM variable.