Entries Tagged ‘PHP’

PHP Lightweight Mobile Device Device Detection

>After experimenting with various methods of mobile device detection, I’ve eventually come up with what I think is a quick and easy solution which can be done in just three lines of code. $mobile = 0; $devices = array(‘iPhone’, ‘Android’, ‘Windows Phone’, ‘iPod’, ‘webOS’, ‘Symbian’, ‘BlackBerry’); foreach($devices as $device) if (strstr($ua, $device) == true) $mobile = […]

How To Fix Moodle Gradebook Not Saving Grades

>Yesterday afternoon I had a couple of unconfirmed reports that the gradebook within Moodle wasn’t saving all of the submitted grades via the quick grading interface. After testing and confirming myself, I found that by drilling down into the individual groups and then marking worked just fine. Off I went to do a bit of […]

Performance Checking ob_start(“ob_gzhandler”) in PHP

>Since there seems to be a small debate on the Internet as to the usefulness of ob_start(“ob_gzhandler”) in PHP, I thought that I would conduct a little experiment of my own to see if in the real world it actually does make any difference. There is a valid argument that running this will actually introduce […]

PHP 5.4.1 LDAPS Fix

>After taking a bit of a break from blogging, I decided that it was time that I should do something again. Anyway, last month I took a stab at upgrading PHP to version 5.4, which contained some nice little features and performance improvements. Almost everything went fine, apart from one little thing which made me roll […]

Correct Silly HTML Mistakes

>For those of you that have read my blog, you will know that I’m a little OCD about website performance – and so should you be. If your website becomes the source of frustration for an end user, more often than not you will lose your viewer and since the choice on the web is […]

PHP: mysql_fetch_assoc Vs. mysql_fetch_array

>Recently I’ve been doing a lot of work to optimise my work so that pages load more quickly and server load is reduced. When I was looking through to my database calls, typically I’ve always used the mysql_fetch_assoc function because it always returned less data than the mysql_fetch array which actually returns two arrays – one which […]

PHP 5.4 On The Way

>Earlier this month PHP 5.4 RC1 was released to the general public. No big deal you might be thinking, but actually I noticed a small change in the latest release that could potentially be of massive help. The note specifies ‘Added class member access on instantiation (e.g. (new Foo)->bar())’ which could be very handy if […]

Installing PEAR on Windows

> This really is just a short quick guide on how to install PEAR manually on a Windows box. There are currently multiple ways of setting PEAR up, and I’m going to show you my preferred way, only because it’s easy to fault find in case anything goes wrong. For those who don’t know what […]

If PHP Were British…

>I’ve just come across this great article from AddedBytes which is quite frankly, brilliant! It’s a bit tongue in cheek but very funny if you read through the article. Taken from the article: When Rasmus Lerdorf first put PHP together, he – quite sensibly, despite his heritage – chose not to write it in Greenlandic […]

PHP 5.2 ISAPI to PHP 5.3 FastCGI

>If like me it took you a little while to move from ISAPI with IIS to using FastCGI then fear not, you aren’t alone. Being honest, ISAPI with IIS went very well together as it was fast and very easy to setup. Future versions of PHP no longer support ISAPI as of version 5.3, so you […]

  • Categories

  • Social

  • Tag Sphere

  • Recommended

  • Archives

Get Adobe Flash player