RE: [mod-security-users] chroot and other problems
Brought to you by:
victorhora,
zimmerletw
|
From: L. C. L. <CL...@Xy...> - 2004-01-28 19:23:31
|
In answer to (1): The problem is that the MySQL library functions in PHP are configured to connect to "localhost", which means using the socket file created by the local MySQL process. And since the socket file is outside of the SecChrootDir "jail", it cannot be "seen" by the PHP code. I too has this problem when I used SecChrootDir, and all I needed to do was configure the PHP code on my Apache server to use "127.0.0.1" instead of "localhost", which forces the PHP MySQL libraries to use TCP instead of the local socket file. I also had to tweak the MySQL user accounts to accept connections from "us...@lo...", which is the name that the 127.0.0.1 IP address resolves to. HTH! - Christopher -----Original Message----- From: Bart [mailto:ba...@so...] Sent: Monday, January 26, 2004 2:52 AM To: mod...@li... Subject: [mod-security-users] chroot and other problems 1. I chrooted apache in standard way. There was no problem. Then I used mod_security to chroot "normal" apache I set in httpd.conf SecChrootDir /chroot/httpd but Apache return error no mysql.sock in /var/lib/mysql/mysql.sock cant write to /tmp/ ... The file mysql.sock exists and /tmp/ has 777 rights. Where is the problem? 2. Can I use mail() php function with mod_security chrooted apache? It was major problem that I decided no tto use chrooted apache 3. Additionaly I would like to test mod_security at all without chroot I added this config to my httpd.conf http://cvs.sourceforge.net/viewcvs.py/*checkout*/mod-security/mod_security/h ttpd.conf.example-full?content-type=text%2Fplain&rev=1.7 After restarting apache I cant logon with my authentication php script. I use session(). How to resolve this. Barti ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ mod-security-users mailing list mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-security-users |