Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

error logs after migrating to php 7.1

Comments

4 comments

  • cPanelMichael
    Hello @baronn,
    Then whilst testing another part of the site I navigated to see if a url was indeed showing a 403 error which it was. Inadvertently I ran into a 500 error (it was navigating to the wp-settings.php url of my wordpress install) all that's working as expected. I then popped over to see my error log files, one in public_html and other under /home/ again they were empty..

    The "500" and "403" error codes relate to Apache, and thus will appear in your Apache domain access logs (the ones you can see under the logs directory). The "error_log" files within your account's home directory (or any directories beneath it with PHP scripts) will only include PHP error messages. To verify PHP error logging is working as intended, you could intentionally produce a PHP error with a PHP script installed in the public_html directory. EX: How to intentionally cause a fatal error in PHP script? Thank you.
    0
  • baronn
    @cPanelMichael thanks for the reply. I tested what you sent by looking at creating intentionally creating an error. So i folloed the guide on link prvided. Created 2 files just in case: File no 1 was: myerrors.php which included: File no2 was myerrors1.php which included: I navigated to both of the files in turn and each time i got a blank page (expected result). I then went and checked my error log files. the one in the home directory in this location: /home/(domainname)/logs/ has this log file:domain_co_uk.php.error.log and that indeed has logged those 2 errors: [28-Dec-2017 12:18:40 UTC] PHP Fatal error: Oops! in /home/domain/public_html/myerror.php on line 1 [28-Dec-2017 12:21:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function noSuchFunction() in /home/domain/public_html/myerror1.php:1 Stack trace: #0 {main} thrown in /home/domain/public_html/myerror1.php on line 1 BUT the 2 files my original question relates to which are located here: /home/domain_name/error_log and /home/domain_name/public_html/error_log Those 2 files in those locations have not recorded the errors. Again before moving to php7.1 they were working fine and both files were recording errors. As I stated, after moving to php7.1 I downloaded the error_log files (as file manager wouldn't show me them) viewed them in notepad++, deleted the contents and re uploaded them to the same locations. Both the files have the 0777 permissions set. Don't understand why they are now not recording any errors...
    0
  • cPanelMichael
    Both the files have the 0777 permissions set

    Hello, The permissions on those files should be set to 0644. If the issue persists after updating the permissions, feel free to open a support ticket using the link in my signature so we can take a closer look. Thank you.
    0
  • baronn
    i corrected the permissions and they are still not populating. Thanks will open a ticket...
    0

Please sign in to leave a comment.