The PHP error log records any issues that occur during the PHP processing portion of a page load. Issues reported here are usually caused by an application’s code, configuration, or content. The log records issues with requests from both browsers and the command line, unlike the FPM error log, which records server-level issues with the management of PHP processes from web requests only.
Custom PHP scripts that execute separately from Drupal must include the Acquia require line, which sets the logging location, in order for errors to be logged to the PHP error log.
For a list of the log files handled by Acquia Cloud, including accessing these log files, log file retention, and their locations, see About Acquia Cloud logging. You can also review information about how to streaming PHP error log entries in real time from your browser.
Parsing the log file
The following line is a representative example of the data written into your website's PHP error log:
[04-Jan-2017 14:29:27 America/New_York] PHP Fatal error: Allowed memory size of 367001600 bytes exhausted (tried to allocate 352591872 bytes) in /full/path/to/module/notification.php on line 504 request_id="v-0000zzzz-d2b4-0000-b3a4-129zzzzd8266"
Each of the items in the PHP error log is noted in the following table, along with its description:
||The date and time of the request.|
||Type of message, indicating severity.|
||Full text of error message|
||A unique ID attached to this request by the load balancer, which appears in several Acquia Cloud log files — for more information, see Using HTTP request IDs|