Linux, Apache, Nginx, MySQL, Javascript and PHP
Install APC for PHP on Debian 5 Lenny
I have recently moved from hosting on a CentOS box to Debian and needed to install PHP’s APC opcode
Fetching data using PHP and PDO with bound placeholders
This post shows how to fetch data from a MySQL database using PHP’s PDO library with bound placeholders. This
Changing exim4 settings with Debian 5 Lenny
Exim4 is a mail transfer agent for sending and receiving emails on a server. This post looks at how
Remove webkit border on input on focus
When a text input has focus it is slightly highlighted in Firefox and Internet Explorer and much more so
Exiting from within a PHP exception
This is the final post in my series about PHP exceptions and looks at how when an exception occurs,
.htaccess condition to prevent missing CSS, JS, image urls being parsed by SilverStripe
The default .htaccess file for SilverStripe runs all URLs that do not belong to actual files on the filesystem
Changing the default message of the day with Debian 5 Lenny
When you first log in to a default install of a Debian 5 Lenny machine from the command line you’ll
An alternative to ORDER BY RAND() for MySQL
I’ve posted previously about how to randomly order a resultset with MySQL using RAND() but
Load JSON data with jQuery
JSON data can be retrieved using AJAX from a server either using jQuery’s .ajax() function or the shorthand $.getJSON()
Converting an array to JSON data with PHP
PHP’s json_encode function converts a PHP variable into a JSON string which can then be used in Javascript,
Cross browser transparency
The CSS3 standard introduces the opacity property for making elements opaque or transparent. Older browser also have support for
Get the filename extension with PHP
I’ve covered how to get the filename and directory name from a full path with PHP
Load JSON data with jQuery, PHP and MySQL
This post shows how to populate a select box based on the value of the another, by getting JSON
MySQL’s LIMIT syntax can be slow for large offsets
A couple of weeks ago I posted an alternative to ORDER BY
Dynamically load a Javascript file with jQuery
jQuery’s $.getScript() function is a shorthand wrapper to $.ajax() which easily allows remote Javascript to be loaded into the
PHP shebang
I’ve posted a number of times in the past about how it is possible to run PHP scripts from
Example table for MySQL
In my MySQL posts I’ve tended to use fruit in my example tables, so in this post will standardize
Get an element’s position relative to the document with jQuery
jQuery’s .offset() method returns an offset containing the top and left co-ordinates of the element top-left position relative to