You need to fix the default MySQL Socket address, in Apache it is /var/lib/mysql/mysql.sock, in LSWS it is /var/tmp/mysql.sock.
lsphp could not find a valid php.ini, maybe due to permission problem. Anyway, you can change the commnd of lsphp external app to give the path of php.ini with command...