Maybe you are taking to many steps in one time
First get syslog-ng working and logging to normal files. Then coach it into logging to MySQL. And as last, get that PHP monitoring app working with Apache not chrooted.
BTW the Perl p5-DBD modules also need the client side p5-DBI module. Do you have that one?