Follow us

We moved to a new domain and host, in order to have our very own blog.
You can follow us there. The new domain is http://www.SOSBrigadeSite.net/

0 comments  

Upgrading Fireboard to Kunena, Fireboard to Kunena migration

As the development of Fireboard came to it's end, it's successor named Kunena is rising now. Some major changes:

  • lots of security issues fixed
  • better integration with Community Builder
  • PDF Display fixed
  • fixed searches
  • fixed pagination
  • fixed RSS in Joomla! 1.0.x w/o SEF
So here are the points you need to keep to when migrating your Fireboard data to Kunena.

  1. Backup your site (database and files)!
    soon I will publish an tutorial on backing up your site using cPanel and MySQL Administrator.
  2. Check which version of Fireboard you are using. If the version is previous to 1.0.5 then you need to do 3, if your version is> or = 1.0.5 then go directly to 4.
  3. Install  com_fbconverter_v1.0.5_b162_2008-09-20.zip , and then uninstall it. It only prepares your database tables to work with newer versions of Fireboard. (DO NOT install this component if you already have Kunena installed - converting will fail)
  4. Uninstall Fireboard from your Joomla! administration panel. (The data about forum users, posts and upload will remain intact hidden in the database, so don’t worry)
  5. Install your fresh and shiny Kunena.

0 comments  

Securing your queries to database from SQL injection with PHP

For escaping dangerous characters in the information you put into queries you can use the following function to check and sanitarize them: 



function quote_smart($value)
{  // Stripslashes
  if (get_magic_quotes_gpc()) {
      $value = stripslashes($value);
  }
  // Quote if not a number or a numeric string
  if ($value instanceof string  || !is_numeric($value)) {
      $value = '"' . mysql_real_escape_string($value) . '"';
  }
  return $value;
}

so your queries look like:

mysql_query("SELECT `id`, `username`, `password` 
FROM `users` 
WHERE `username`= ".quote_smart($username));



0 comments  

Joomfish 2.0.3 on Joomla! 1.5.10 overloads CPU (+benchmark)

We installed the new version of Joom!fish on our sites. After a few hours our host automatically set chmod 000 on the index.php file of our Joomla! installation due to CPU overload.
After reading this post i was able to put a stopwatch on the site. It's the only type of PHP benchmarking technique that gives you consistent results. When using microtime() function results are often too different, varying from 0.01s to 2.0s per script execution.
I have benchmarked all enabled modules on the site using the technique in the post mentioned above. After a few hours of work was able to see the mod_mainmenu was giving the main load on the server, therefore taking most of the time of the whole script execution (about 0.14s). We were not sure if the hosting company isn't lying to us or if there is not an error in their cpu-load meters. So we moved to site to another hosting company for less than an hour. The site overloaded their processor too. After that due to reading a few opinions on the new Joomfish and the mod_mainmenu benchmark we decided to uninstall Joomfish on the moved site. CPU load decreased by 25% and time for execution got from max value of 0.25s to 0.15s.
  • with Joom!Fish over 100% load of CPU allowed
- time to parse page0.25 sec
  • Joom!Fish uninstalled CPU load goes -25%
- time to parse page 0.15 sec

We are looking for ways to fix the problem with Joomfish because we need it on our site. I will post as soon as we solve the problem.

2 comments