1. Log into your cPanel account.
  2. Look for the MultiPHP INI Editor in the Software section of cPanel.
    Click on the MultiPHP INI Editor Option in cPanel
  3. Click on the Editor Mode tab at the top of this screen.
    Click on the Editor Mode Tab
  4. Select the domain or subdomain you want to activate error reporting within. The domain or subdomain you pick should be the one that the PHP script is running in.
    Select the Domain or Subdomain in the Drop-Down List.
  5. The editor window may have items listed in it, or it may be blank. Find and edit the following lines as shown (or add them if they don't exist)

    display_errors = On
    error_reporting = E_ALL

    The error_reporting line above will show all errors, notices and warnings for PHP scripts in that domain or subdomain. You can use one or more constants listed here separated by an ampersand (&) if you want to fine-tune the types of errors that get reported.

  6. Click Save to apply the changes you've just made.

Now you can access your PHP script and debug it. The errors you are looking for may be displayed on screen, written to an error_log file in the script's main directory or where ever the script chooses to write such errors (perhaps a log accessible from the admin area of the script).

Once you have fixed the issues reported by your PHP script, make sure you disable error reporting by going into the editor in cPanel and  set display_errors = Off
آیا این پاسخ به شما کمک کرد؟ 57 کاربر این را مفید یافتند (0 نظرات)