The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Sendmail Probem

Discussion in 'E-mail Discussions' started by demomen, Jun 6, 2005.

  1. demomen

    demomen Well-Known Member

    Joined:
    Sep 25, 2004
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    PHP Outgoing Script Email Probem

    Hi, last night my kernal was upgraded, however now PHP mail from scripts, do not send out any mail. Do you know what could have happened there.
     
    #1 demomen, Jun 6, 2005
    Last edited: Jun 6, 2005
  2. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Try searching forum with....php+sendmail as it has been covered many times.
     
  3. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    Normaly php and cgi scripts works as user nobody.

    Could you please check the following option in WHM >> Server Setup >> Tweak Settings >> Mail and untick the following check box

    [Prevent the user 'nobody' from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)]

    May be it will help you to solve this issue.

    Let me know the status.
     
  4. wstbch

    wstbch Member

    Joined:
    Sep 2, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    this might be a dumb question, but where is "WHM"... i cant find it in my cpanel
     
  5. wstbch

    wstbch Member

    Joined:
    Sep 2, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    ok i found WHM.. www.domain.com/whm

    but how do i login? is this only for the server host?
     
  6. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    yes, you need to be root to access the whm, else u r a reseller.. but with lesser privileges.
     
  7. tiggerific

    tiggerific Active Member

    Joined:
    Nov 5, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    Ok, well I know the answer to this question as to why mail isn't being sent out (I think) but I don't know how to fix it.

    I have several servers that were recently upgraded to cPanel 10.6 and I found the reason that mail is not working on most of my mailing list scripts and other php scripts, is because the scripts themselves have functions hard-coded in them to call a php file in the background using

    '/usr/local/php filename.php'

    for example.

    These scripts have all been running fine until the upgrades, and now, they will only call the php file if I change it to

    '/usr/local/bin/php filename.php'

    upon further investigation... there is no "php" in the /usr/local directory. I've tried to create symlinks but that hasn't resolved the problem.

    So, if anyone knows what the "php" in /usr/local/ SHOULD be, could they please let me know.

    Thanks.
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The only places that you should have a php binary (on a standard cPanel install) is /usr/bin/php and /usr/local/bin/php.
     
  9. tiggerific

    tiggerific Active Member

    Joined:
    Nov 5, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    Oh damn... I keep getting those 2 mixed up when I'm typing stuff. I'll try again...

    Ok, these scripts have the following hardcoded in them:

    `/usr/bin/php filename.php'

    Which no longer work since the cPanel 10.6 upgrade. However, changing the scripts to

    `/usr/local/bin/php filename.php'

    DOES work.

    The problem is - I don't want to go through hundreds of files on dozens of domains across 8 different servers modifying that one line in each file!

    I do have a "php" in /usr/bin but for some reason, it's no longer being picked up properly.
    Any assistance in resolving this would be appreciated.
     
  10. tiggerific

    tiggerific Active Member

    Joined:
    Nov 5, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    Ok, found that a forced apache update to PHP version 4.10 has fixed the issue. (It was previously running 4.10 and didn't want to have more changes to deal with).

    Thanks for your help anyway.
     
Loading...

Share This Page