Tag Archives: error

jQuery Draggable, Droppable and Sortable User Interface not working in Internet Explorer 9 (IE 9) CodeUnit 18 APR 2011

I received a bit of a nasty shock when by sheer chance, one of the project managers updated their machines and got Internet Explorer 9 installed in the process, only to instantly come back to me and announce that the drag and drop features on our web project no longer worked – at all.

A quick look around, and indeed all the draggable, droppable and sortable interfaces that come with our use of the awesome jQuery and jQuery UI libraries were all of a sudden not working under IE 9. The other browsers, IE 8 included, still worked fine, but not this new beast of a browser.

Thankfully though, a quick look about on the jQuery UI support forums yielded the fact that a) this was indeed a bug that has long been identified, and b) that the bug fix ticket around it has since been resolved and closed.

See http://forum.jquery.com/topic/jquery-ui-does-not-work-on-ie9 .

So how do you sort out the problem then? Well if you can, you need to upgrade to the latest version of the jQuery UI library. The fix has now been in since version 1.8.6, so anything higher will resolve the issue.

And now for a big sigh of relief :)

Related Link: http://forum.jquery.com/topic/jquery-ui-does-not-work-on-ie9

PHP: File Upload Error Code CodeUnit 21 NOV 2010

When handling file uploads via enctype=”multipart/form-data” forms in PHP, you’ll be pleased to know that PHP doesn’t just leave you high and dry but instead returns some pretty helpful error codes to let you know when something goes wrong.

The following is a comprehensive listing of the error codes returned by the upload process:

(Note, these can be access from $_FILES[‘#inputname#’][‘error’])

  • UPLOAD_ERR_OK – Value: 0; There is no error, the file uploaded with success.
  • UPLOAD_ERR_INI_SIZE – Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.
  • UPLOAD_ERR_FORM_SIZE – Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
  • UPLOAD_ERR_PARTIAL – Value: 3; The uploaded file was only partially uploaded.
  • UPLOAD_ERR_NO_FILE – Value: 4; No file was uploaded.
  • UPLOAD_ERR_NO_TMP_DIR – Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.
  • UPLOAD_ERR_CANT_WRITE – Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.
  • UPLOAD_ERR_EXTENSION – Value: 8; File upload stopped by extension. Introduced in PHP 5.2.0.

And there you go, now you know! :)

MySQL: Got a packet bigger than ‘max_allowed_packet’ bytes Error Tips, Tricks and Tutorials 30 SEP 2010

mysql-girl-black-halter-topI came across a nasty little bug in my image upload to MySQL blob in base 64 encode function the other day – basically the database was spitting back the following error to me:

Error code: 1153 – Got a packet bigger than ‘max_allowed_packet’ bytes

So of course I looked it up.

It turns out that MySQL views a single SQL statement as a communication packet, with a built in limit of 1GB. However, servers usually have a set maximum packet size they are allowed to accept and clients a maximum packet size they are allowed to send, both of which is controlled by a variable called max_allowed_packet. If it receives a packet bigger than this limit, the server will spit back a 1153 error and close the connection.

If you wish to check what your current maximum packet size is, run the following query:

SHOW VARIABLES LIKE ‘max_allowed_packet’

Of course, you would also want to increase these limits at some point in time, something which is easily achieved like so:

To increase a client program’s default, run: shell> mysql –max_allowed_packet=32MB.

To increase a server’s default, run: shell> mysqld –max_allowed_packet=16M.

Note that this is fairly safe to increase this value as memory is allocated only when needed. So now you know! :)

The Difference Between Include and Require in PHP CodeUnit 11 JUN 2010

Just a quickie today, but a fairly important one at that. What is the difference between using include or require when pulling in data or functions from outside files into your main script in PHP?

Well the answer lies in how the two different methods handle failures. If a file is not found by require(), it will trigger a fatal error and thus kill the main script, preventing any further execution. Include() however will simply trigger a non-fatal warning and then continue with the main script execution.

Obviously it then lies with you as to which one you choose to use for your project. If for example your script is pulling in multiple bits of data and can continue pulling data even if one of the included bits of data can’t be found, then make use of include(). If however the included file contains an important function crucial to the page loading in the first place, then rather opt for a require()!

Simple, but an important distinction to take into consideration! :)

Shutting Down – Again and Again My Life 20 APR 2010

Aaargh, so frustrating! I mentioned a while ago that my newish PC back at home kind of packed up on me some time back, completely losing its video output as a start.

Listening to it and plugging it into various other display sources, I concluded that the onboard graphics must have gone and so looked around on the Internet before settling on a new graphics card which I subsequently ordered from Take 2 for around R500.

A short wait and the card arrived, which I eagerly plugged into the board, proclaimed “There, that should fix it” and hit the power switch, only to see… well nothing. The new graphics card had not solved the problem, meaning that my diagnosis had obviousy been wrong. Doh!

So anyway, this weekend I made some time to try and sort out the issue, taking the machine completely apart and giving it a good dust out, as well as checking and tightening all the connectors and screws that I can find!

With a “Well, maybe this will sort it out”, I hit the power switch and lo and behold, all of a sudden I had video out again – awesome except for the fact that it only lasted a minute or two before the machine without warning simply lost power.

Booting it up again, it became apparent that this was now the new problem and that the video outage had most likely simply been symptom of this new problem.

The losing power thing seems to happen completely at random – it can happen as the machine is still booting up, it can happen while Ubuntu is still busy starting up, or it can strike just as you start thinking that the problem has sorted itself out and open a website to check what might be causing the problem.

At first I thought that maybe the power supply wasn’t pushing out enough power and that the devices were too much for it to handle, so I systematically began unplugging components but to no avail.

So out came the screwdriver and back into the box I dove, giving everything another good dust-over before removing the Power Supply Unit (PSU) and completely taking that apart, cleaning every bit and piece as I came across it.

Slapping everything back together again and hitting the power button proved to be completely… futile.

Sigh. So the power was still coming and going sporadically so I had to make the call as to whether I thought it the PSU or motherboard which is the problem child. Looking at the board I couldn’t see any problem, no popped capacitors or anything like that and so hopped into my car and drove through to Computer Mania at Somerset Mall where I slapped down R600 and bought a nice and shiny 600W power supply that comes with a giant fan and looks pretty damn spiffy.

Back home I installed the new PSU, booted the machine up and yay, “Seems like that sorted it out” – until the machine shut itself down again just ten minutes later.

So the problem still isn’t solved and my ability to diagnose hardware issues lies in complete tatters. Chantelle keeps urging me just to take it in and have it fixed, but my pride as a man simply won’t allow me to do that.

It’s now a personal challenge for me, and one that is bringing no end of frustration. The question now of course is – should I look at the RAM as being faulty or is it the whole damn motherboard itself?

Decisions, decisions…

Fix a snom 300 VoIP Phone NR Error CodeUnit 17 MAR 2010

We currently use snom 300 VoIP phones here in the office and the other day I was asked to troubleshoot a phone that had all of a sudden stopped working. The error that it was coming up with was NR and every number that you tried to dial would result in a ‘forbidden’ error message showing up on the phone.

Now NR stands for Not Registered in snom language and so logging onto the phone’s web interface configuration utility (simply point your browser to the IP address listed on your phone <- grab it by going to the Information -> IPAdr menu option on the phone), I was able to see from the System Information page that the Identity 1 Status was yielding an authentication error.

The next step was to access the Identity 1 menu option and on loading up the page, I could immediately see that the password field for the Login Information had been cleared, meaning that in order to fix the problem I simply needed to re-enter the secret set on the server for that particular extension.

Easy as pie really.

Use Trash? WordPress 2.9.2 Upgrade Time Then! CodeUnit 17 FEB 2010

Do you make use of the nifty little trash feature recently introduced in WordPress 2.9 that allows you to “delete” or “trash” posts to a recycle bin from which you can then choose to permanently delete or restore at a later date?

Well if the answer is yes then it is probably a good idea to quickly update your installation version to the newly released 2.9.2 version in order to protect yourself against a nasty little bug introduced with this great new bit of functionality!

The problem is that in introducing this new core bit of functionality, developers somehow forgot to properly integrate it within WordPress’ security framework and as such were left with a situation whereby any authenticated user, no matter what rights they have (e.g. they could even be a simple subscriber), can access the trash of any other user – meaning that if you have any sensitive posts that you previously trashed, they would have in fact still pretty much been open for anyone to see.

If you still aren’t on the same page with me as to why you need to upgrade to this patched version ASAP, let me put it to you a little differently. Let us say for example you work for a boss, but being a disgruntled employee, you type up a post on the company blog revealing to the world all the naughty kinkiness you got up to your boss’ daughter. Thankfully though, a moment of sanity prevailed and you trashed the post before publishing it, so it never saw the light of day – whew! However, if the bug was still active and your boss entered the blog to add a new post or such, he would be able to read what you had previously trashed and make no doubt about it – you would now be standing out there in the cold in the unemployment line.

So do yourself a favour. Upgrade to WordPress 2.9.2 today! :)

Related Link: http://wordpress.org/development/2010/02/wordpress-2-9-2/

Novell GroupWise CCSW32.DLL Error Software & Sites 08 JAN 2008

GroupWiseAnyone using an automatically installed copy of GroupWise as their mail client (like us here at UCT) might occasionally come across the following error message on startup:

This application has failed to start because ccsw32.dll was not found. Re-installing the application may fix this problem.

Of course, re-installing GroupWise achieves squat, so I had to look up the cause and solution for this error before it drove me nuts. Thankfully though, the guys at Novell Technical Support have pinpointed the problem and let us in on the fix.

Firstly, the problem crops up with Novell GroupWise 6.5 and Novell Client v4.91 for Windows 2000/XP. The problem appears to be that the NMAS component is only partially installed by the NW Client, which means that not all the files were correctly assigned on install. The solution? Pretty simple actually.

Rename the C:\WindowsSystem32
wsso.dll
to C:\WindowsSystem32ccsw32.dll.

That’s it. Simply start up GroupWise once more and you’ll be happy to find that the annoying error message is now lost forever.