SMPP client rewritten in PHP
Today I ported my Python SMPP client library to PHP, I had to redesign the whole library because the old design was very bad, and with the new design it became very small, and trivial library.
Most of my work was on a library to convert between window-1256 charset used by most Arabic computers, to UTF-16 (big endian) used by GSM phones.
The new SMPP library supports long and flash messages, you can try it from SAUDI NET Portal.
Supporting long, and flash SMS
Today Abdullah Aldosari my coworker insisted on working on long SMSs, he kept dreaming of them the last couple of days, so we sat together today, and we figured out how to do it.
It was fairly simple, in fact I found an old code that I wrote for sending operator logos which use this feature! Abdullah also searched for the way to send flash SMS, it was even simpler, all you need is to set a flag when sending the SMS and that’s it.
These new features will be introduced to SAUDI NET portal after proper testing (i.e. tomorrow 🙂
We are using a protocol called SMPP it is used to communicate with the SMS Center, the SMPP client library we are using is currently written in Python language, I am thinking of rewriting it in PHP as soon as I find a good way to convert between character sets.
FreeBSD port for PHP supports dynamic extensions
In the past when you forget to add a PHP extension in FreeBSD you have to recompile the whole thing, but now PHP port support dynamic extensions, in fact PHP port doesn’t allow you to add any extensions, you have to add these extensions using a separate port.
There is one wrapper port called /usr/ports/lang/php4-extensions/ which will allow you to select modules to install.
Very nice indeed, even when I spent long time to figure out how to add extensions.
Change PHPMyAdmin to view Arabic on English interface
I love phpmyadmin, it is a web interface for MySQL DB server, I usually use the English interface, but the problem with English interface that it doesn’t show Arabic string, of course you can change the whole interface to Arabic, but I don’t understand anything from that interface.
So I played with PHPMyAdmin code so I can use English interface but using Arabic character set, here is how to do it:
# vi lang/english-iso-8859-1.inc.php
... change: $charset = 'iso-8859-1';
... to: $charset = 'windows-1256';
MySQL replication is so simple
I just configured my first MySQL replication, it is very simple to configure, few configuration steps and it is done.
The hardest thing is to figure the location of MySQL configuration file my.cnf under my FreeBSD, it doesn’t exists by default so you have to create it your self, it can be many place, I choosed /var/db/mysql/my.cnf to make reside with the datafiles.
You can find a sample chapter from Jeremy Zawodny book, High Performance MySQL.
My wife had a lasik surgery
It took around 15 minutes, it was little painfull in the first day, her vision is somehow blurry, the doctor says the blur will go away in the next 10 days.
Lasik if you don’t know it is a surgery to correct the vision.
http://lasik.bab.com/
More about my car accident
Today the traffic department called me to telling that they found the car with the description I gave, but the color wasn’t silver it was gray! So they called me to change the paper I signed earlier.
Silver and gray is there really any difference between the two!?
The name of the guy who hit me and ran away was Abdullah Mohammed Alsalem.
PHP5 relaeased
With many amazing new features, is it going to be the defacto scripting language!
Amavisd + Spamassassin + ClamAV
Installing amavisd+Spamassassin+clamav
# cd /usr/ports/security/amavisd-new/
# make install
# cd /usr/ports/security/clamav/
# make install
Updating ClamAV virus defintation, every hour!:
# vi /usr/local/etc/freshclam.conf
... HTTPProxyServer proxy.saudi.net.sa
... HTTPProxyPort 8080
# freshclam
# crontab -e
... 43 * * * * /usr/local/bin/freshclam --quiet
Changing clamav setting to work as vscan user, same as amavisd:
# vi /usr/local/etc/clamav.conf
... # Change User to match amavid user
... User vscan
# chown -R vscan:vscan /var/run/clamav