Troubleshooting Lighttpd Chrooted RedHat PHP Version 5.1.6-20.el5_2.1

Posted on in Categories CentOS, GNU/Open source, kernel, lighttpd, Linux, Linux distribution, php, RedHat/Fedora Linux, Troubleshooting last updated October 1, 2008

It appears that latest php version 5.1.6-20.el5_2.1 under RHEL / CentOS Linux v5.2 has made some major changes. As a result choort jail setup using previous instructions no longer works. PHP is crashing with segmentation fault errors. So I had to trace php errors using strace command.

mod_compress: Lighttpd Gzip Compression To Improve Download and Browsing Speed

Posted on in Categories Apache, High performance computing, Howto, lighttpd, Linux, News, php, UNIX last updated April 26, 2008

Gzip compression reduces response times by reducing the size of the HTTP response. This document describes gzipping http traffic which can reduces the response size by about 70%. Approximately 90% of today’s Internet traffic travels through browsers that claim to support compression.

Lighttpd webserver wordpress image uploading problem – offers inline.php as download options

Posted on in Categories lighttpd, Linux, RedHat/Fedora Linux, Tips, Troubleshooting, UNIX last updated June 9, 2007

You can easily upload small files but large upload fails and offers inline.php as download option.

This error is caused because of improper php configuration. Make sure upload_tmp_dir is set and webserver user such as httpd/nobody/lighttpd can write to this directory.
$ grep upload_tmp_dir /etc/php.ini
OR
$ grep -iR upload_tmp_dir /etc/php/
Set upload_tmp_dir to /tmp or /var/tmp:
upload_tmp_dir = /var/tmp
Also set:
session.save_path = "/var/lib/php/sessions"
Next make sure web sever can write to temporary upload directory (only use this in chrooted jail):
# chown lighttpd:lighttpd /var/tmp
Now you should able to upload files. A final note if you need to upload files larger than 2MB set maximum allowed size for uploaded files using upload_max_filesize directive:
upload_max_filesize = 5M
Save and close the file. As usual restart lighttpd to make changes:
# /etc/init.d/lighttpd restart
OR
# systemctl restart lighttpd
Verify it:
# tail -f /var/log/messages
# tail -f /var/log/lighttpd/error.log