Skip to main content

PHP Display Errors on Command Line

Comments

5 comments

  • cPanelMichael
    Hello :) Are you running the PHP command as "root" or an individual users? Does it work if you use the command with the "-d" flag? EX:
    php -d display_errors /path/to/file.php
    Thank you.
    0
  • flashweb
    Running as root as i am making a script that alert me when some one login to cpanel. I got it working with php -n option (no php.ini)
    root@server74 [~]# php -d display_errors 1.php root@server74 [~]# php -d display_errors=on 1.php root@server74 [~]# cat 1.php
    0
  • cPanelMichael
    New Running as root as i am making a script that alert me when some one login to cpanel.

    I am happy to see you were able to address the issue. One feature that might interest you is the ability for users can enable login notifications in the "Contact Information" area inside of cPanel. Thank you.
    0
  • flashweb
    I am happy to see you were able to address the issue. One feature that might interest you is the ability for users can enable login notifications in the "Contact Information" area inside of cPanel. Thank you.

    Thanks, i never know this is possible. Is there anyway root can enable this for all users by default ? Also enforce a password policy, so passwords get changed. Many (including me) never changed passwords. Having to change password changed every 60 days like banks will keep the internet as a whole safe :)
    0
  • cPanelMichael
    Hello :) 1. There are no options to enable this for all accounts, but the setting is stored in "/home/$username/.cpanel/contactinfo" as the following entry when enabled:
    "notify_account_login": 1
    Thus, you could develop a custom code that adds or modifies this entry in the same file for each account. 2. We do have a password aging feature that's documented at:
    0

Please sign in to leave a comment.