Cloud Platform

PHP error logs

The PHP error log (php-errors.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 infrastructure-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 log files handled by Cloud Platform, including information about accessing the log files, log file retention, and their locations, see About Cloud Platform logging. You can also review information about how to stream PHP error log entries in real time from your browser.

Note for log forwarding users

Acquia’s log forwarding feature adds information to the beginning of each line that is forwarded to an external service. For more information, see File formats in forwarded log files.

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:

PositionDataDescription
0[04-Jan-2017 14:29:27 America/New_York]The date and time of the request.
1PHP Fatal errorType of message, indicating severity.
2Allowed memory size of 367001600 bytes exhausted (tried to allocate 352591872 bytes) in /full/path/to/module/notification.php on line 504Full text of error message. For more information, see Troubleshooting the error “Allowed memory size of X bytes exhausted”.
3request_id="v-0000zzzz-d2b4-0000-b3a4-129zzzzd8266"A unique ID attached to this request by the load balancer, which appears in several Cloud Platform log files. For more information, see Using HTTP request IDs.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Cloud Platform common questions