Lighttpd beware of default php session path permissionNovember 13, 2010 by: upa_kid
Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site.
This path is defined in /etc/php.ini file and all data related to a particular session will be stored in a file in the directory specified by the session.save_path option.
After installing phpMyAdmin I was able to login but unable to select or modify tables. First, I thought I made some configuration errors, and then I reinstalled phpMyAdmin again. It was not working at all.
Finally, log file scripts.log (php error log file) provides me the answer. It was full of following errors:
[26-Jul-2006 13:35:22] PHP Warning: Unknown: open(/var/lib/php/session/sess_lLFJ,tk9eFs5PGtWKKf559oKFM3, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[26-Jul-2006 13:35:22] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
[26-Jul-2006 13:35:40] PHP Warning: Unknown: open(/var/lib/php/session/sess_lLFJ,tk9eFs5PGtWKKf559oKFM3, O_RDWR) failed: Permission denied (13) in Unknown on line 0
/var/lib/php/ has root:apache write permission combination. Since I had migrated from Apache to lighttpd web server, I just forgot to set correct permission for session directory (php.ini – session.save_path directive). To change file owner and group permission you need to use chown command as follows:
# chown root:lighttpd /var/lib/php/ -R
Now phpMyAdmin is working fine.
Squid 2.6 stable issues
On a related note, there are some serious issues with Squid v2.6Stable1. This version is badly broken. It was sending few client browser error 400 (no log was generated for these errors) or does not display images at all causing problem for 500+ users (and not to mention lots of headache for me). Therefore, I had to switch back to 2.5.STABLE13. Thanks to backup, I was able to switch back within 15 minutes to old versionHave you found this script useful? Please support author by PayPal donation.
- PHP Log All Errors to a Log File to Get Detailed Information
- PHP Include File
- PHP Error Handling
- PHP Error and Logging Functions
- Howto display error message instantly when command fails
- Lighttpd deny access to certain files
- PHP libxml Functions
- Quick ‘n’ Easy LAMP Server For CentOS/RHEL
- Troubleshooting Lighttpd Chrooted RedHat PHP Version 5.1.6-20.el5_2.1
- How to install LAMP and Phpmyadmin in opensuse 11.3