Category «Uncategorised»

PHP Tutorial

If you are wanting to learn PHP, you could make a start with the Guru99 PHP Tutorial for Beginners PHP is the most popular scripting language on the web. Without PHP Facebook, Yahoo, Google wouldn’t have existed. The course is geared to make you a PHP pro. Once you digest all the basics, the course …

In defence of singleton

t has become fashionable to condemn the singleton pattern. Apart from specific complaints, it is said to be not OO. Now what I’m going to provide is not a general response to general remarks, it is a PHP specific response to attacks on singleton. It’s based on my own actual development experience. To get some …

Analysis of URL

If your PHP software is going to be installed by other people without any personal intervention, some tricky problems arise. You probably need to figure out how the site is being accessed – it is not just a matter of domain names pointing to web sites. There can be different mechanisms for access, such as …

Useful command for Subversion

If you develop software, it’s quite likely that you use Subversion. I found the following command at Snipplr and wanted to record it so that I could easily find it again. Sometimes it is convenient to remove all the Subversion hidden files from a directory structure – it isn’t always convenient to export from the …

MVC Problems in PHP

Once people are aware of it, few disagree with the general idea of MVC. But differing interpretations and practical implementation problems tend to create disputes. I want to discuss the particular problems of creating HTML in PHP. First a quick review of what MVC was originally about. The idea was that at the heart of …

Autoload in complex systems

It’s very tedious keeping track of code modules, and the PHP 5 ability to autoload them is a great boon. But in a complex system, such as a CMS, multiple software applications have to coexist, and this places demands on autoload techniques. In some environments, the system autoloader must come last. We’ll fix that in …

Joomla Session Problem

Please don’t think I spend all my time looking at Joomla. But a friend was struggling with a problem where every attempt to login to the admin side of a site failed to achieve a login, but also failed to show any kind of diagnostic. What could block the Joomla admin login? We diagnosed the …

Another Joomla installer problem

There is a problem with the PHP function gunzip() which in early versions of PHP 5 is known to have made large and unnecessary memory demands in some circumstances. This error is liable to be triggered by Joomla for some PHP versions in the 5.1.x range. Also, there is a problem with some of the …

Well used singletons are GOOD!

Pejorative comments about singleton classes abound. All they seem to me to have proved is the age old truth of software: all techniques can be used badly. Earlier, I looked at Steve Yegge’s complaints about singletons. Now I’m reviewing a set of objections attributed to Brian Button by Scott Densmore. FIrst, I have to point …

Using powerful PHP array functions

There is a wealth of useful power in the PHP array functions. They are generally much more efficient than writing your own PHP code, since they are compiled. Not that I’m against PHP being an interpreted language, there are a lot of advantages in that. But you should still take advantage of efficiency where it …

Design by Dave Mcpoland