advert

Sunday, 15 July 2012

Squid windowsupdate

Equium P300-16T repair.


Just for my record.

Successfully repaired notebook screen & back-light.
New system W7 installation + other original SW.
W7 had driver problem with SD card reader. It needs o2 driver.

Timescale:

- 1h screen repair.
- 1 day new system + other SW.
Most time due to slow M$ updating.
To avoid sluggish M$ updates in future I changed Squid proxy conf.

refresh_pattern -i .*\windowsupdate\.microsoft\.com/.*  43200 100% 100800 override-expire reload-into-ims ignore-no-cache

Any better idea for quicker or beeter SQUID updates? Please comment.

Tuesday, 10 July 2012

Squirrelmail Cannot redeclare hex2bin()

Introduction

This article describes how I resolved problem with Squirrelmail after upgrade PHP lang.


System:
FreeBSD 8.2-STABLE amd64
Apache/2.2.22
PHP 5.4.3
SquirrelMail version 1.4.22


Problem:

Squirrel mail just hanged and there were only blank page.

httpd-error.log:
PHP Fatal error:  Cannot redeclare hex2bin() in /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php on line 104


Resolve the problem:
I found that there is "simple" problem. We need just rename all occurrences of hex2bin with "convertHex2bin"

Prerequisites:
Rename all occurrences of hex2bin with "convertHex2bin"

Step 1

Find "hex2bin"

/usr/local/www/squirrelmail
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 94 function hex2bin( $data ) {
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 138     $txt = mf_keyED( hex2bin( $txt ) );
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 94 function hex2bin( $data ) {
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 138     $txt = mf_keyED( hex2bin( $txt ) );
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 94 function hex2bin( $data ) {
FILE /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php
LINE 138     $txt = mf_keyED( hex2bin( $txt ) );

Step 2
Rename all with sed

sed -i '' "s/hex2bin/convertHex2bin/g" /usr/local/www/squirrelmail/plugins/mail_fetch/functions.php


References:
http://www.morpheushosting.sk/squirrelmail-cannot-redeclare-hex2bin/