![]() |
Chrooting
I'm currently playing around with the chroot function, but can't seem to figure out how to load php.ini
I've tried lots of ways, none worked yet. Is there a trick? Current build: Code:
./configure' '--prefix=/opt/lsws/chroot/usr' '--with-litespeed' '--with-config-file-path=../php' ... |
New problem... How do you get MySQL to work in a chroot environment?
|
Well after some research I found you can change the MySQL sock to the tmp location in the chroot, but can't get MySQL to restart. Is it typically better to reinstall MySQL in the chroot?
|
Changing the MYSQL socket location wont make MySQL to fail.
I think it is not a easy task to install MySQL in chroot, and it is not necessary. |
is there a certain location i should change the MySQL sock to? I've been setting it in the tmp under the chroot, but MySQL like fails to start when i change it.
|
check your mysql server log for errors. maybe a permission problem?
|
Code:
host:~# ls -la /opt/lsws/chroot/tmpCode:
[client]When attempting to log in via phpMyAdmin: #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) |
You actually solved the problem in your first post. Think chroot. ;)
Basically, what we need to do is tell php how to connect to MySQL in the chroot. Open your php.ini and scroll down looking for [MySQL] and set the following: Code:
mysql.default_socket = /tmp/mysqld.sock |
Thanks, worked.
On a side note, I guess if you compiled PHP after I changed the socked location then I would not need to make the php.ini edit? |
| All times are GMT -7. The time now is 05:25 AM. |