New Site: Lizzie Lane – Hand Selected Beautiful Jewellery and Gifts
Today I completed work on another customer's site: Lizzie Lane - Hand Selected Beautiful Jewellery and Gifts.
My tasks were to develop some custom templates for it's Thesis based theme, many Shopp modifications including fixing an XSS issue in Shopp, making Shopp work with SSL (something it does not do out of the box), some CSS work and various other Shopp modifications.
WordPress Auto Install Script for cPanel
I have released version one of my WordPress Auto Install Script for cPanel.
This script can be run from /scripts/postwwwacct to automatically download, install WordPress and create the required database and database username.
No 3rd party licenses, scripts, FTP sessions. No outdated versions, always grabs the latest version from WordPress.org
This script is available upon request for £50. Get in touch for details.
Installing FFmpeg and ffmpeg-php on CentOS
Whilst installing FFmpeg and ffmpeg-php for a client that required server-side MP4 processing, I ran into a few errors.
The error I came across was while compiling ffmpeg-php
TimThumb upscale fix: stop timthumb from upscaling small images
Ever found that TimThumb is upscaling your small images and looking crap? As of version 2.8.1 TimThumb does not check if the image is smaller than the specified proportions before resizing.
Here's a fix thanks to Rein Aris, slightly updated to work with version 2.8.1
Embedding Videos with TinyMCE
By default TinyMCE strips out any code that you would use to embed videos or Flash into your site. To allow videos to be embedded you need to change how TinyMCE init's.
Mainly, the valid_elements, extended_valid_elements & valid_child_elements parts of the code.
Use the following code
How to install the nslookup, host OR dig commands in Linux?
Sometimes you are unable to use the nslookup, host OR dig command on your Linux server and receives the following message
- -bash: nslookup: command not found -bash: host: command not found -bash: dig: command not found
The reason is the package required for the commands to work isn’t installed during the OS installation.
These are all DNS related commands useful to check the DNS report of a domain/IP.
You need to install the package bind-utils which offer the commands like nslookup, host, dig and others.
SSH to your server as root and execute
- yum install bind-utils
Done!
Make an SEO friendly URL in PHP
Just like WordPress creates it's slugs or friendly URLs, I had to write some code to achieve the same for a customer running a custom web application.
Here's how I did it.
[Snippet] Whois Client on CentOS
I can never remember how to install a whois client on CentOS.
- yum install jwhois
Thats it!
PHP Header Redirects
There's a few ways to redirect a page in PHP. Well, two. A right and a wrong.
Wrong Way
Right way
This is evident on IIS6 and IIS7 where the wrong redirect will just fail.
Even if you are not using IIS6 or IIS7 its good practice to set the headers correctly and exit the script.



