Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP mail() function is disabled, yet script can send out e-mails

Discussion in 'E-mail Discussion' started by postcd, Nov 17, 2016.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    I have "Prevent “nobody” from sending mail" set to On, but e-mail is sent out despite php file with code
    shows that "mail" is within disabled functions.

    I set it to disabled by adding following to the end of /usr/local/lib/php.ini
    the mailing script is at /home/mycpanelnamehere/public_html/subdomain/name/dir/scriptname.php

    The sender is mycpanelnamehere@myserverhostname.tld

    Not sure why?

    Can i modify that cpanel and set its mailing limit to 0?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know which PHP handler is configured for the account, and if the system uses EasyApache 3, or EasyApache 4?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    392
    Likes Received:
    11
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    @cPanelMichael
    PHP handler is SuPHP
    EasyApache 3 is used.

    @ruzbehraja
    here is those log entries from exim_mainlog
    thank you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    With suPHP, the PHP processes arn't run as the nobody user, so the "Prevent “nobody” from sending mail" option would not apply in this case.

    Also, could you verify if any custom php.ini files exist within the affected account?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    php.ini is not anywhere within /home/CpanelAccountName/ or its subdirectories.
    no .htaccess file contains phrasse "mail"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice