Store php error or exception logs into database.