Lighttpd / Apache : Run Xcache in Chrooted Jail

Posted on in Categories CentOS, Debian Linux, Gentoo Linux, Howto, lighttpd, Linux, php, RedHat/Fedora Linux last updated November 26, 2007

Recently I wrote about installing and running Xcache under Red hat enterprise Linux and CentOS Linux. By default Xcache use /dev/zero for caching. All you have to do is create /dev/zero in chrooted jail. Type the following command (assuming that your jail is located at /lighttpd.jail directory):
# mkdir -p /lighttpd.jail/dev
# mknod -m 666 /lighttpd.jail/dev/zero c 1 5

Just restart your web server and xcache should work under chrooted lighttpd web server.

Install PHP Pear Mail / SMTP package on CentOS / Red Hat Enterprise Linux

Posted on in Categories CentOS, Howto, Linux, php, RedHat/Fedora Linux, Sys admin, Troubleshooting last updated October 20, 2007

Recently I’ve noticed that Redhat removed support for following php pear packages:

a) NET/SMTP : An implementation of the SMTP protocol

b) Mail : Class that provides multiple interfaces for sending emails

c) Net/Socke : Network Socket Interface

The simplest solution is downloading and installs these files from php pear repo.

Step # 1: Download files

Use wget command to download all files:
# cd /tmp
# wget http://download.pear.php.net/package/Mail-1.1.14.tgz
# wget http://download.pear.php.net/package/Net_SMTP-1.2.10.tgz
# http://download.pear.php.net/package/Net_Socket-1.0.8.tgz

Untar all files:
# tar -zxvf Mail-1.1.14.tgz
# tar -zxvf Net_SMTP-1.2.10.tgz
# tar -zxvf Net_Socket-1.0.8.tgz

Step # 2: Install files

Simply copy file to your webroot such as /www/usr/share/pear or standard location such as /usr/share/pear:
# cd /usr/share/pear
# mkdir Net
# cd Net
# cp /tmp/Net_SMTP-1.2.10/SMTP.php .
# cp /tmp/Net_Socket-1.0.8/Socket.php .
# cd ..
# cp -avr /tmp/Mail-1.1.14/Mail/ .
# cp -avr /tmp/Mail-1.1.14/Mail.php .

Step # 3: Test SMTP email

Now you have required files, all you have to do is send email using authenticated smtp server.

How to: Run and install PHP FastCGI on Microsoft IIS Server

Posted on in Categories php, Windows, Windows server last updated October 10, 2007

FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. I’m very big fan of FastCGI. Almost all my Apache / Lighttpd servers are powered by php FastCGI.

Today Microsoft announced the official release of their FastCGI extension for IIS server version 5.1 and 6.0. New FastCGI module should improves the performance and reliability of PHP on Windows operating system.

Since early 2006, Microsoft and Zend have been working together on a technical collaboration with the PHP community to significantly enhance the reliability and performance of PHP on Windows Server 2003 and Windows Server 2008. As part of this collaboration, the IIS product group has been working on a new component for IIS6 and IIS7 called FastCGI Extension which will enable IIS to much more effectively host PHP applications.

=> Using FastCGI to Host PHP Applications on IIS 6.0 and IIS 5.1

PHP Log All Errors to a Log File to Get Detailed Information

Posted on in Categories Apache, Howto, lighttpd, Linux, php, Security, UNIX last updated March 28, 2016

PHP offers simple but effective solution to log all errors to a log fiie.
On all production web server you must turn off displaying error to end users via a web browser. Remember PHP gives out lots of information about path, database schema and all other sort of sensitive information. You are strongly advised to use error logging in place of error displaying on production web sites. The idea is quite simple only developer should able to see php error log.
Continue reading “PHP Log All Errors to a Log File to Get Detailed Information”