Hey I'am currently working on a cronjob that is supposed to submit data to the master server. I've been digging into other cronjob files that are being shipped with ISPConfig and found that they often use: Code: $app->dbmaster->query($query and so on...); However, when I use this approach the data is not being inserted into the table of the master server. While using $app->db->query the query works just fine. So inserting locally works which also means the query is actually fine. What am I missing there that my query can't be inserted into the table of the master server? The table is not a original ISPConfig table but an own/custom. edit: Or do I have an understanding problem there. Could it be rather more that $app->dbmaster->query will only work when it is executed on the master server itself and not on a slave?
Ahh thanks for the hint, I've finally found the issue. The ispcsrv<number> user of the slave didn't have the permissions to access the table of the master, but the host was also wrong, after I've moved my VM and changed the ip addresses... btw Will this approach of accessing/modifying data (via $app->dbmaster->query) still exists in ISPConfig 3.2 or is it about to be dropped with 3.2?
Direct database access will probably be replaced with a more restrictive API which will be HTTPS/REST based.