Home About Contact

phpMyBackupPro – Automated MySQL Backups

Posted by phorner On July 20, 2009

phpMyBackup prophpMyBackup Pro is an easy to use, free, web-based MySQL backup application. It can backup one or several databases, using compression like gzip, zip (or no compression) and can schedule backups. It can also backup directly to an FTP server or send the backups via email.

All of these features are presented in a management interface. A shell mode is also available for manual use or by cron script.

There are several language packages already available.

For more information: phpMyBackup Pro

Share

50+ PHP optimisation tips

Posted by phorner On July 15, 2009

PHPFor those of you who program in PHP, this list of PHP optimisation tips is invaluable. It’s an accumulation of accurate tips and provides references and citations for each and every one.

Some examples:

  1. Use sprintf instead of variables contained in double quotes, it’s about 10x faster.
  2. Use pre-calculations, set the maximum value for your for-loops before and not in the loop. ie: for ($x=0; $x < count($array); $x), this calls the count() function each time, use $max=count($array) instead before the for-loop starts.
  3. “else if” statements are faster than select statements aka case/switch.
  4. ++$i is faster than $ i++, so use pre-increment where possible.

… and many, many others.

I’ll definitely be applying all of these optimisations to my code in the future.

For more information: 50+ PHP optimisation tips revisited

Share

PHP functions in Javascript using PHP.JS

Posted by phorner On May 28, 2009

phpjsFor those of you, like me, who use PHP and Javascript regularly, PHP.JS is a great enhancement. PHP.JS is an open source project where PHP functions are ported to Javascript. This means that the PHP functionality is executed client-side which reduces the load on the server.

Some of the functions that have already been ported are:

  • md5()
  • date()
  • base64_decode()

As the library has become too big to include at once, and having users copy-paste functions to their projects can end up causing maintenance hell, the developers have created a compiler tool that allows programmers to select ONLY the functions they need, and wrap them up in a single php.js file.

Another benefit from this library is that it enhances the functionality of Javascript by adding functions that don’t exist natively in Javascript.

Definitely a great tool for developers.

For more information: PHP.JS

Share

phpMyAdmin 3.1.5 released

Posted by phorner On May 17, 2009

phpMyAdminphpMyAdmin 3.1.5 has been released. It is a bugfix-only version. Among the changes is a fix for PHP 5.3 compatibility.

For those of you who may not already know about phpMyAdmin, it is a free software tool written in PHP intended to handle the administration of MySQL.

Since version phpMyAdmin 3.x, support for PHP 4 has been dropped (as the official developers for PHP no longer support PHP 4 or earlier). If you still use PHP 4 on your server, then you can still use the phpMyAdmin 2.x series.

For more information: phpMyAdmin

Share

PHP Quick Profiler – the equivalent of Firebug for PHP

Posted by phorner On April 25, 2009

When writing PHP code and database queries, speed of execution and working out where the bottle necks are can be extremely time consuming. Filling your code with echo statements can be daunting. However, Ryan Campbell from Infinity Box Inc. (the creators of Wufoo, a HTML Form Builder), has developed PHP Quick Profiler (PQP), “a small tool (think Firebug for PHP) to provide profiling and debugging related information to developers without needing them to add a lot of programmatic overhead to their code.”

All that’s required is that you upload the necessary files to your project folder and include the PhpQuickProfiler.php file in your code. This will then enable the console, memory and file logging. Speed and database tracking require a bit more work, but can be implemented as well.

PHP Quick Profiler

The interface is encapsulated within PQP, removing the need to insert CSS or Javascript into your code. The PQP file does it all for you.

I’ll definitely be using this in future projects, and also using it to optimise some older projects. Highly recommended for PHP developers.

For more information: PHP Quick Profiler

Demo: PQP Demo

Share