PHPology.co.uk Collective of freelance web developers and designers

  • Blog

    For the latest information on what I am working on, what I am doing or even my random thoughts, click on the articles below.

  • PHP sessions and garbage collection on Windows 2008 - 19 Apr 2012

    This week one of our Windows 2008 servers was slowly grinding to a halt and after 2 days of running tests (via Rackspace) various options were thrown to work out what was going on.

    A hard disk scan was arranged, RAM checks, faults in network issues, etc, etc.

    Then the engineer at Rackspace pointed out that within the WindowsTemp folder, there was over 1million session files in that folder and COULD have potentially be causing an issue.

    First thing that came into my mind was, why was PHP Garbage Collection not working, even though by default it was set to 1% chance of clearance, it should have certainly kicked in from 2011.

    After spending 2/3hours deleting the files, Google search commenced, various blogs went by and to my mind I thought "its surely a permissions problem against the Temp folder", which PHP could read/write to but not delete.

    Rather than playing with the Windows Temp folder, I updated the PHP.ini file and moved the sessions tmp folder into the main PHP folder itself within Program Files.

    Assigned the usual permissions, mainly IIS_IUSR, with full control and refreshed my website. Received an error “permission denied”. Baffled at this point to why it would fail, I set the usual permissions I would to a public facing website that needs to write to a folder.
    More searching occurred and just randomly reading a forum thread, someone mentioned, “Assign the Users” user also with “Full permissions”. I noticed that the Windows Temp folder did have this permission BUT no read/write/full control was checked.

    Now my sessions are appearing in its new location, I also took the advantage of moving the PHP error log out of Windows Temp also and that seems to be populating also (not a good thing).

    Prior to leaving late at night, I did have 3000 session files in that folder but come 8:30am and reviewing that folder again, it was 140 odd files.

    BASICALLY GARBAGE COLLECTION WAS NOW WORKING :-)

    Now I am waiting for the load to increase on the server to see if all this has basically solved my load issue problem.

  • Facebook Open Graph META Tags - 28 Feb 2012

    Although I have used the FB Open Graph META tags before, more so when sharing URL's of everything I have developed, the META tags came in useful when I wanted a personalised description and image to appear on my FB wall.

  • Google Analytics - bespoke event tracking - 21 Oct 2011

    Recently, and its been a while since I did it, had to basically assign some bespoke Google Analytics tracking to various links on a website I was working on.

  • JQuery Ajax "invalid label" issue - 16 May 2011

    Had this issue where when I made an ajax call with JQuery 1.5.0, Firebug would throw an error saying "Invalid label".

  • General timezone list for MYSQL - 15 Mar 2011

    Today I had to create short list of timezones for a project I was working on and basically created a list that I used within a MYSQL database, which I hope saves someone else the hassle. Once in database, it can be used in selectlists using PHP, etc.

  • Thickbox from content loaded via AJAX using jquery - 09 Mar 2011

    Working on a project called Can You Draw The Internet? I was hit with a problem with my thickbox modal when content was loaded via AJAX. The thickbox modal would appear twice as the function TB_init() would be initiated twice. 

  • Disable open_basedir in Plesk - 09 Mar 2011

    From time to time there will be a situation where you would need to disable open_basedir if you are hosting with Plesk.

  • Load Content While Scrolling With jQuery - 26 Oct 2010

    Working on this art gallery competition project for Internet Week where one of the request was:
    "Rather then have pagination links, can we have it so that when the user scrolls to the bottom of the browser, new content is loaded in?"

  • PHP Simple_XML with namespaces - 05 Jul 2010

    Had to read in an external RSS file from T3 and needed to drill into the "content" node which had a namespace. Using traditional ways of echoing out this node was not working so searching the net found a nice simple solution.

  • Cufón and screen readers - 18 Jun 2010

    Working on a new project and one of the questions asked by the client was "will Cufon work with screen readers?", as accessibility needs to be considered.

  • Customize Disqus CSS - 04 Jan 2010

    During the Xmas period, a Word Press blog I was working on required the use of Disqus widgets.

  • HTML Special Characters - 12 Nov 2009

    Whilst coding HTML newsletters, found a very useful list of special HTML characters from WebMonkey. Hope you guys find it useful.

  • Top 50 Shopping Carts - 25 Aug 2009

    Sooo chuffed, one of our clients just notified us that a custom built shopping cart we built was rated 5 out of 50 recently:

  • Multisorting columns in a 3D array with PHP - 04 Aug 2009

    Today (Tuesday 4th Auguest '09) was put in a situation where I had to reorder one of the columns from my 3D array and initially started to use array_multisort as described on php.net.
    Getting annoyed that it was not giving me what I needed, I started to read through the comments others had left, and tried cagret at gmail dot com example which worked a treat for me.

  • Rackspace Cloud API - 16 Jul 2009

    Yesterday I was told that we were using the Rackspace Cloud server to store our files rather than on the local server itself.

  • wmode equals transparent - 24 Jun 2009

    Working on this flash website for Virgin Media and ran into an issue with @ symbols appearing as " in Firefox and Chrome with flash parameter wmode="transparent" enabled. Works totally fine in IE 7  (not tested other IE browsers).

  • Freelance Web Developer in London and Ilford - 13 Mar 2009

    Ilford, east of London is the area I live in. If you are near or live in that surrounding and are looking for some one who can help you locally then you have came right place. Just give me a call or drop an email; you will get an instant reply from me.

  • Freelance PHP developer wanted - 12 Dec 2008

    I need a freelance PHP developer to work on a new web application for approx 2 to 3 months. The developer will join a small team based on site in central London, England, close to Liverpool Street Station who are already working on the project. Must have excellent skills in PHP and MySQL integration and be experienced in working with a large and complex database structures. Must provide own computer to work on, with connection to our onsite server. Experience in Google maps, geocoding, address databases and video uploading would be an advantage.

  • New websites launched - 12 Dec 2008

    Been keeping myself busy with these 3 projects which over the week have been put live.

  • Drum and Bass at Church - 25 Nov 2008

    Any one for drum and bass at church, check this out, will make you laugh out loud.

  • Been in hiding - 19 Nov 2008

    Man, its been a hectic few weeks since I've been back, trying to find work here and there, all good though, got loads going on at the moment. At times I feel like I am a women, you know multi tasking and all that with loads of projects lol.

  • Comments

    0 comment(s)

    Be the first to comment!

    Add your comment
    Name*:
    Email*:
    Website URL (including full path e.g. http://www.yourwebsite.com/):
    Comment* (html/script tags will be removed):
    What do you see below?: