Web programmer may be executed in Iran

This is just not sensible to me. This is, perhaps, a result of an overly-conservative interpretation of religious doctrines.

Execution of web programmer in Iran may be imminent

A computer programmer from Canada faces imminent execution in Iran for the actions of another person, which he had no control over, a human rights group says.

Saeed Malekpour wrote a program to upload photos to the Internet, an accomplishment that could cost him his life, Amnesty International reported Friday. Authorities in the Islamic Republic claimed his program was used by someone else to upload pornography and charged him with “insulting and desecrating Islam.”

Source: CNN

Perhaps as a web programmer I feel more for him.

How to install PHP GeoIP in CentOS

I assume you already have PEAR/PECL available. I am using the CentOS’s stock PHP. First you need to update your channels:

[code lang=”bash”]kahwee:~ kahwee$ sudo pear update-channels
Updating channel “doc.php.net”
Channel “doc.php.net” is up to date
Updating channel “pear.php.net”
Channel “pear.php.net” is up to date
Updating channel “pecl.php.net”
Channel “pecl.php.net” is up to date[/code]

Continue reading “How to install PHP GeoIP in CentOS”

How to let PHP send emails

PHP not sending emails? You need a mail transfer agent (MTA). If you’re in the Ubuntu platform, you can use postfix for this:

[code lang=”bash”]sudo apt-get install postfix[/code]

You can read on more information here.

Previously my Contact Form 7 WordPress plugin didn’t work, it works fine after I install and configured postfix. I can’t go through the specifics of the configuration with you since yours would probably differ. I selected “Internet Site” and press the return key (Enter) all the way selecting the default options. On doing so, Contact Form 7 starts to work already.

Should you need to configure postfix again, you can reconfigure too:

[code lang=”bash”]sudo dpkg-reconfigure postfix[/code]

Contact Form 7 uses WP_Mail which uses PHP’s mail() function. If you do need to troubleshoot, try sending emails with mail().

If you need additional configuration, you may need to update the following:

  • Settings SMTP and smtp_port need to be set in your php.ini
  • Also, either set the sendmail_from setting in php.ini, or pass it as an additional header.

I did not have to configure anything more than postfix. I am using Ubuntu server, on nginx web server.