Thursday 3 May 2012

Increase PHP script execution time with ini_set()

To change (usually increase for processing or uploading large files) the PHP script execution time with ini_set() use the following:

ini_set('max_execution_time', 120); // 120 seconds / 2 minutes

Wednesday 18 April 2012

Embeded YouTube video appears over other layers

We just had a situation where a drop down menu layer was appearing behind an embeded YouTube video despite having a high z-index specified.  Firefox PC was showing the layer correctly but Chrome, IE 9 and Safari were not.

Adding the wmode variable to the video call and setting to opaque resolved this:  ?wmode=opaque

Friday 16 September 2011

404 Page not working on MODx IIS7.5 web.config

If you are trying to setup MODx Revolution to show a custom 404 error page and are running on IIS7.5 but the web server sends the default local 404 error document to the browser instead check the httpErrors setting in your web.config file:

If you have <httpErrors> try changing the errorMode to Detailed:


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed">
            <remove statusCode="404" subStatusCode="-1" />
            <remove statusCode="405" subStatusCode="-1" />
            <error statusCode="405" prefixLanguageFilePath="" path="405.htm" responseMode="File" />
            <error statusCode="404" prefixLanguageFilePath="" path="404.htm" responseMode="File" />
        </httpErrors>

    </system.webServer>
</configuration>

Thursday 10 February 2011

How to get a custom Facebook URL

To get a custom Facebook URL eg. www.facebook.com/my-url simply request your choice of URL from: http://www.facebook.com/username/

All verified Facebook users are eligible to claim usernames and this requires that you have a verified account, which can be done via SMS when you request your custom URL.

If your choice of URL is not available the system lets you search for other options. Take care when confirming your choice or URL as it cannot be changed at a later date.

For more information see http://www.facebook.com/help?page=897

Saturday 6 November 2010

Microsoft Access Database Error - '80004005' file already in use

The 80004005 error noted below can be caused by insufficient security permissions:
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.
/site/index.asp, line 7
Possible resolutions for this include:

  • Ensuring the relevant IUSR account hase write permissions for the database file and the directory it is contained within

Monday 1 November 2010

Plesk 9.5 Default Server Repository Location on Windows Server 2008 64bit

To find the default Server Repository location on Windows Server 2008 64 bit take a look in the registry for:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PLESK\PSA Config\Config
If you cannot locate this try searching for PSA Config or DUMP_D.

The value for DUMP_D is likely to be something like:
C:\Program Files (x86)\Parallels\Plesk\Backup
Domain files, mail, databases are held individually in zip archives eg:
C:\Program Files (x86)\Parallels\Plesk\Backup\domains\undergroundgraphics.com

Looking for the Plesk Server Repository location for Windows 32bit or Linux 32/64 bit editions?  Take a look at How do I change the default Plesk Backup Repository location?

Run Google Maps GUnload() function with jQuery or Prototype

Typically the method used to run the Google Maps GUnload() function would be to place it in the body tag:

<body onunload="GUnload()">

But what can you do if you can't access the body tag directly?  Other options are available if you happen to be using using a javascript library such as jQuery or Prototype.

For jQuery use:

$(window).unload( function () { GUnload(); } );

For Prototype use:

Event.observe(window, "unload", GUnload);