Internet Explorer (IE8,IE9) slow page load due to Flash and ONSPEED sliprt.dll

Client complained about slow internet page loads. They use Windows Vista and Internet Explorer 8 and to date it had been fine. When I looked at the problem it was just like the browser was stalled trying to connect to a down host. It would take minutes to load a page and was basically unusable. Very frustrating because Opera and Firefox both worked fine.

I got them working temporarily on Opera and arranged to pick up the laptop when they went on holiday for a few days. Back at base I tried a few things which did not work

  • IE8 -> IE9 upgrade
  • IE9 -> IE8 downgrade (uninstall IE9)
  • ONSpeed uninstall and re-install

and then I just got the feeling that flash was a problem. I downloaded the flash installer (which is a downloader not the full application) and tried to run this.

I got an error message about sliprt.dll was not found e.g. This program can’t start because sliprt.dll is missing from your computer.  Try reinstalling the program to fix this problem. The sliprt.dll is part of the Slipstream which is used by ONSPEED. This is HTTP cache/accelerator. The dll does exist in \Windows so obviously some other problem and the error message is due to a missing program call.

I then downloaded the full flash install file ( see http://forums.adobe.com/thread/889580 ) for both Internet Explorer and for “Other Browsers”.

These ran OK and installed without error. This cleared my Internet Explorer stalling and running slow problem and now IE8 is working fine. I upgraded to IE9 and that is also working fine. I was also able to upgrade to Windows 7 Home Premium (using upgrade disk) and the laptop remained stable.

May not work for you but it fixed my client problem.

vTiger CRM missing language file causes Sorry! Attempt to access restricted file.

When you add a new user (in vTiger CRM v5.4.0) then it is possible that you can select a language setting e.g. “English GB” that has a non-existent translation file. If you do this then that user will get the error message,

Sorry! Attempt to access restricted file.

on a blank screen after they log on. They will stay in this state forever until the logon cookie is removed or the language file is created. The language files exist under the path,

include/language

To fix this you must either

  • upload the correct language file or
  • use another browser and go in as a working user e.g. admin and reset the language to a known working language e.g. English US or
  • clone the include/language/en_us.php to the correct file name e.g. en_gb.php. To identify what file is needed you can add a print_r($filepath); to the include/utils/CommonUtils.php file function checkFileAccessForInclusion() around line 2817 onwards but before the die(). You can’t keep that debug code in place as the ajax javascript breaks but it will tell you what language filename it is after.

That should solve this first-day-of-use problem.

FreeSWITCH dialplan system and null strings

In a FreeSWITCH dialplan the application action system is used to execute system e.g. shell commands. You can also use the returned result from a system command to set a dialplan variable e.g.,

<action application="set" data="result=${system myscript.sh"/>

The problem is that if the system directive does not return a null terminated string then extra garbage can end up in the data variable in the dialplan.

So your shell script must explicitly terminate any strings in its output. Normally this won’t be a problem but if you are using piped results and awk then you can end up with no null.

In your awk print you must use printf as follows,

awk '{ printf "%s%c", $1, 0 }'

That will print your string (e.g. $1 field) and then print the number 0 as a character. This in effect fakes what is returned as a string that is null terminated.

Here is the FreeSWITCH wiki on the dialplan use,

http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system

Here are some of my examples as used in custom feature codes,

http://www.openmutual.org/resources/freeswitch-custom-features/

 

Fixing lost CMOS on Acer Aspire One

Now it is summer then computer equipment can overheat. An odd problem appeared on an Acer Aspire One model ZG5 also known as the AOA 150 after it got run on a bed. If you are going to watch movies or do work in bed then I recommend to everyone that you buy one of those melamine tea trays and turn the tray upside down and then use that as a laptop support. When the Acer powered up then it had no display. It had power and the hard disk unparked as if to start up but nothing like normal booting activity and always a blank screen. Over-enthusiastically I pulled this computer apart before I looked around for a less screw-driver related fix. The laptop is easy to dismantle once you know how to remove the keyboard (I have already replaced this before – there are no screws but three tabs that are just above the top row of keys and you click these in. The keyboard is then removed, taking care to unclick the flexible ribbon). But I digress and re-assembled it and did this Acer emergency BIOS recovery trick which is detailed on the ACER web site here,

http://support.acer.com/acerpanam/netbook/0000/acer/aspireoneaoa110/aspireoneaoa110faq22.shtml

 

  1. format a USB key using Windows FAT. Probably work with FAT32 but I used FAT. I used an old 1 GByte key but probably any size would work. It does not have to be bootable – just formatted.
  2. download the latest BIOS ZIP file from the Acer website at http://support.acer-euro.com/drivers/notebook/as_one_150.html  This will currently be v.3314.zip
  3. unzip this BIOS zip file contents into the USB key
  4. rename the ZG5_3114.fd to a new file name ZG5IA32.FD (it must be that name). You should now have at least this ZG5IA32.FD file you renamed and the FLASHIT.EXE Note that the file names are case insensitive – this is DOS.
  5. Insert the USB key into the left hand USB port on the broken Acer.
  6. Insert the Power socket
  7. Hold down the Fn and the Esc keys and then push on the power button as normal keeping the Fn+Esc keys pressed.
  8. The power light will go on then flash and the USB key activity light may also blink. Once the power light has flickered then you can release the Fn+Esc
  9. After all the lights have stopped blinking then it is finished. It should reboot by itself and then it will now be working fine. You will have to reset the date/time.

If it still doesn’t work but it still has the power coming on then retry the process above to make sure you are doing all the steps right as this should fix this problem.

 

 

Resetting Plesk subscription Renewal date to never suspend

If you have a virtual host with Plesk Parallels for your own use then you might accidental setup your subscriptions to expire which is a bit annoying for internal users that have no need for billing related expirations. Though you may change the Service Plan to never expire this does not update existing subscriptions and they will remain with an expiry date.

To remove this expiry date you must first set the service plan to have an unlimited Validity period (see bottom of the setting page for the service plan) and then go into each subscription that has a renewal date i.e. it is not “—” and customise the Expiration date to be unlimited.

This will now lock that subscription but it will have no Renewal date. Now you click the Unlock and Sync and this subscription is now back in sync with the service plan with no renewal/expiration date.

Do this for each subscription that you do not bill clients for.

Unintended consequences – shopping bags

Like many we avoid the throwaway plastic shopping bags but have been driven to use the large re-usable ones. But the law of unintended consequences has happened and we now use these reusable bags for so many things we wonder where they have been all our lives,

  • they are great to carry computer desktops. Much easier than by hand but check sizes first.
  • Can be used to carry flat screens as well. Obviously not old CRTs but not many of those left.
  • perfect for network cables and other odds and ends that can’t be carried easily
  • ad hoc toy containers or a solution to clear a desk
  • laundry bags both to and from the washer and onto the line
  • to take recycled bottles and plastic to the the recycling bins
  • wood carriers to bring in firewood

Oh and shopping.

 

 

Using error_log() with print_r() to gracefully debug PHP

When debugging php code (especially Open Source code you have not written yourself) then to get a feeling of what is passed around when it doesn’t work I find that the print_r() function is very useful.

Trouble is that if you just throw in print_r() into the code where you think it is faulty then you can upset json, AJAX or your web page layouts as the print_r() splatters stuff to your displayed web page or in some cases the PHP file is not going to a browser (e.g. the PayPal IPN notify).

The trick is to throw it at the error log as follows e.g. if I was tracing what $number was being set to then I would use….

error_log(print_r($number,true));

note that you MUST set that print_r() option to “true” so that it returns a string. This string is then sent to the error_log() function which formats it with referrer details and puts it into the Apache error log.

Where does it end up ? Well on my test system on a non-vHost it is /var/log/apache2/error.log and on a vHosted server it is :/var/www/vhosts/<domain name>/statistics/logs/error_log so on your own system it will be a similar Apache error log file. Just tail that file to see what the messages are which will be something like this (in this example the $number was “2008” so the output for that error log message was,

[Sun Jan 01 13:21:12 2012] [error] [client 192.168.2.2] 2008, referer: http://19
2.168.2.250/bluebox/index.php/numbermanager/index

To synchronize the log messages with your testing then just look at the logging time.

Using audacity to create auto attendant /IVR prompts (low cost)

If you are getting someone to say the script (or yourself !) in-house and want a low-cost recording solution without a professional sound recording setup then I use Audacity with an ordinary microphone from a VOIP headset and a few tweaks. Audacity is a good Open Source digital audio recorder and effects processor.

I use a piece of A4/Letter (80gsm) photocopy/LASER copier paper between your mouth and the microphone. This will de-pop your speech. It makes a dramatic difference. Just hold the paper from the bottom so you can still see over it to read the script on your computer screen but don’t have the paper touch the microphone or your mouth (lips, beard, moustache etc).

Open Audacity and set the project rate to 16000 Hz and the input as 1 (Mono) Input. The input is in the Device toolbar (See View->Toolbar -> Device toolbar to make sure it is displayed).

Have your script visible on the computer screen, the de-popper paper held in one hand between the microphone and your mouth and click the record button.

Wait a few seconds to get the background noise (i.e. allow the microphone to pick up the ambient noise because we need to remove this later) then speak your script at a normal pace. At the end leave a few seconds of silence and then click the stop button.

Now select the starting silence (not your words or any clicks from your mouse button at the very start) and click the option Effect->Noise removal and then click the option button in the noise removal Step 1 of “Get noise profile”. It remembers this so now select ALL the audio and then redo the Effect -> Noise removal and take the defaults and click OK.

If you listen it should now be dead silent between words and phrases that you say.

Now select the silence at the start and use the scissor tool to cut this. Select the end silence and use the scissor tool to cut that. Note that you might see a tiny click at the start and end which is the mouse click when you clicked the Record button. Cut this out as well.

That is about all you need to do. Save this as a Audacity PROJECT and then export it as a 16 bit PCM wav file. Upload this and see if it works for you. If the volume is too low then re-open the Audacity project and use the Effect->Amplify to adjust this and then re-save as a new WAV file.

Other tricks are to use Bass boost effect to give your voice some gravitas or to use pitch controls, though you do risk sounding artificial if you alter it too much.