PHP mail() function not working..

Discussion in 'Plesk 7.1 Reloaded Troubleshooting and Problems' started by willlangford, Jul 22, 2004.

  1. willlangford

    willlangford Tera Poster

    Messages:
    288
    Hello,
    Today I noticed sence I have upgraded that the PHP mail function isnt working. Anyone else having this error?

    Thanks,

    ~William
     
  2. LDKS

    LDKS Kilo Poster

    Messages:
    70
    This already hapening to me.

    This was because sendmail was deleted from one of their default directories (I say one, because I had to copy it from another place to this other dir), but since I had this problem some time ago I don't remember what was the dir.

    EDIT: Take a look if you have a copy of sendmail in both directories below:

    /var/qmail/bin/sendmail
    /usr/sbin/sendmail
     
  3. willlangford

    willlangford Tera Poster

    Messages:
    288
    here is what i get..

    [root@badass will]# cd /var/qmail/bin/sendmail
    bash: cd: /var/qmail/bin/sendmail: Not a directory
    [root@badass will]# cd
    [root@badass root]#
    [root@badass root]# cd /usr/sbin/sendmail
    bash: cd: /usr/sbin/sendmail: Not a directory
    [root@badass root]#


    Anyone know why its gone??

    ~William
     
  4. EnigmaX

    EnigmaX Tera Poster

    Messages:
    381
    not directories..

    They are not directories but files, go to cd /var/qmail/bin and
    do a 'ls -al sendmail' and see if it's there and you do the same in /usr/sbin/...
     
  5. willlangford

    willlangford Tera Poster

    Messages:
    288
    Hello,
    Yes I have sendmail in both of those directories. What do i need to do to make it work now?

    thanks,

    ~William
     
  6. RexAdmin

    RexAdmin Guest

    Just type following as root in your shell:

    ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
    ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

    Good luck.
     
  7. willlangford

    willlangford Tera Poster

    Messages:
    288
    i dont think it worked..here is waht i got:

    [root@badass will]# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
    ln: `/usr/lib/sendmail': File exists
    [root@badass will]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
    ln: `/usr/sbin/sendmail': File exists
    [root@badass will]#


    thanks.

    ~William
     
  8. RexAdmin

    RexAdmin Guest

    On which files are pointing those two:

    ls -l /usr/lib/sendmail
    ls -l /usr/sbin/sendmail
     
  9. willlangford

    willlangford Tera Poster

    Messages:
    288
    what do you mean? i dont get what ur saying..sorry sometimes im slow.
    ~William
     
  10. RexAdmin

    RexAdmin Guest

    Well, just cut and paste in terminal:


    ls -l /usr/lib/sendmail
    ls -l /usr/sbin/sendmail
     
  11. Traged1

    Traged1 Guru

    Messages:
    1,085
    Check your /etc/php.ini for the sendmail command, should be set to /usr/sbin/sendmail and not sendmail -t -i
     
  12. EnigmaX

    EnigmaX Tera Poster

    Messages:
    381
    php() function w/php.ini issue...

    File: php.ini
    Code:
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = /usr/sbin/sendmail -t -i
    
    All come with -t -i at the end; for the rest, do you all have the
    '-t -i' or not? Should I remove it. I do not have any mail() that
    I know of...
     
  13. Traged1

    Traged1 Guru

    Messages:
    1,085
    It depends on your setup with the sendmail wrapper.

    We use a script to monitor sendmail connections and limit them to gaurd against bulk mailings, and then pass the mail along to the actual MTA sendmail wrapper if the email is found to be good. IE: /var/qmail/bin/sendmail or qmail-inject . In this case sendmail -t -i will not work. If you have a default qmail setup I believe the -t -i should be ok, but if you are having trouble try removing it and then restarting httpd /etc/init.d/httpd restart
    Maybe that will help?
     

Share This Page