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:
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.
MySQL Replication Sample Chapter (PDF)
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.
MySQL Replication Sample Chapter (PDF)
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/
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.
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.
٢٠٠٤/٠٧/١٤
٢٠٠٤/٠٧/١٢
Amavisd + Spamassassin + ClamAV
Installing amavisd+Spamassassin+clamav
Updating ClamAV virus defintation, every hour!:
Changing clamav setting to work as vscan user, same as amavisd:
Configuraing amavisd:
Enabling clamavd and amavisd to start automatically:
After testing ClamAV, and amavisd, configure postfix to use amavisd:
# 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
Configuraing amavisd:
# cp /usr/local/etc/amavisd.conf-dist /usr/local/etc/amavisd.conf
# vi /usr/local/etc/amavisd.conf
... $mydomain = 'rayed.com';
... $virus_admin = "rayed\@$mydomain";
... $spam_admin = "rayed\@$mydomain";
... $final_spam_destiny = D_PASS;
... $banned_filename_re ... # change this to what ever you like
... @av_scanners ... # uncomment clamav section
... #$QUARANTINEDIR = '/var/virusmails'; # comment QUARANTINEDIR
Enabling clamavd and amavisd to start automatically:
# vi /etc/rc.conf
... # Add the following lines
... amavisd_enable="YES"
... clamav_clamd_enable="YES"
# /usr/local/etc/rc.d/clamav-clamd.sh start
# /usr/local/etc/rc.d/amavisd.sh start
After testing ClamAV, and amavisd, configure postfix to use amavisd:
# vi /usr/local/etc/postfix/master.conf
-------------------------------------
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-------------------------------------
# vi /usr/local/etc/postfix/main.cf
... content_filter=smtp-amavis:[127.0.0.1]:10024
# postfix reload