I\'m not experienced in PHP and I had problems logging out big arrays using error_log
and print_r
.
I was told here to chan
The main thing here, is that log_errors_max_len
seems pretty useless in this situation. PHP manual states that:
This length is applied to logged errors, displayed errors and also to $php_errormsg, but not to explicitly called functions such as error_log()
The only solution I was able to find so far is to use:
error_log("Long error message...", 3, CUSTOM_LOG_FILE);
The second parameter of error_log()
allows you to redirect message to a custom file. So, the last parameter should be a path to a custom log file.
This way I'm getting full error message and, what might be more important for someone, non ASCII characters are clearly readable there (not sure though, might be my bad, but when I'm logging them with standard log file - I get things like \xd0\xbf
).
Make sure to set the configuration at the top of your page like this.
<?php
ini_set("log_errors_max_len", 0);
?>
See also this question. Might it be the issue you have?