@Nerigal
I have to make a distinction between two parts in your post.
The first statement is
i have the same issue and your answer doesn't make any sense in a shared hosting environment
in multiple situations, with this setup, logrotate is cannot help the problem
if you have 300 clients flooding the same log file, logrotate cannot help it
and I must say that
logrotate actually will help, but only in the sense that the amount and size of logs is reduced.
In essence, that is part of the solution to your problem........... but NOT the full solution.
The second statement is
and its not my job to manage all single php errors from all shared hosting clients on all servers i manage so is it possible to split the logging per domain and inside their hosting path, by default, so the used space by the logging is calculated in their hosting plan instead of /var/log
and I must say that it
certainly is NOT recommended to put log entries, normally placed in /var/log, in domain related directories that are to a high degree accessible.
In essence, it might be possible, but why sharing information about the state and setup of your server? Your clients will not value it and/or get the wrong impression, whilst the average hacker is enjoying the information about errors, which are essentially weaknesses in your server eco-environment.
Simply stated, specific information is only for the eyes of the sysadmin.
Let us return to a more sane approache and
tackle the root cause of the problem: usage of PHP 5.6 or any other outdated PHP version.
The quintessence of the log entries is "error" and "warning" entries, as a result of a very outdated PHP version, which is not supported by the code on the server.
If you are using outdated PHP version on your server, you are
certain to get huge PHP related log files, with lots of errors and warnings.
In conclusion, the
simple solution would be updating to more recent PHP versions, preferably PHP 7.2.x (and sometimes, PHP 7.1.x is more backwards compatible).
If updating is not an option, then it certainly is NOT an option to maintain PHP 5.6 based applications in any hosting environment and
certainly NOT a shared hosting environment, since PHP 5.6 is very vulnerable from the perspective of security (!) .
Hope the above helps a bit.....
Regards........