Call to undefined function mail()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CoralineSage

    Call to undefined function mail()

    Hi All,

    I'm running a bulleting board in PHP and everytime a new user
    registers s/he is supposed to receive an email confirmation. After
    filling out the registration form and clicking on submit I get the
    following error message:

    Fatal error: Call to undefined function: mail() in
    /usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

    From what I've read I needed to have sendmail running, and it is. and
    I needed to add my sendmail path to the php.ini file, which I also
    did:

    ; For Unix only. You may supply arguments as well (default: sendmail
    -t -i).
    sendmail_path =/usr/bin/sendmail

    Also, I tried to add my mail server IP address for SMTP, even though
    it says Fro win32 only....but I wanted to use my mailserver to send
    emails

    I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
    from RedHat.

    Originally I had unninstalled the sendmail package b/c it was hanging
    when I started my machine. I then installed PHP 4.3.4 and then when I
    realized I needed sendmail to use the feature from the bulletin board
    I reinstalled it.

    Any thoughts/suggestions? I appreciate any help.

    sincerely,
    CoralineSage
  • Justin Koivisto

    #2
    Re: Call to undefined function mail()

    CoralineSage wrote:
    [color=blue]
    > Hi All,
    >
    > I'm running a bulleting board in PHP and everytime a new user
    > registers s/he is supposed to receive an email confirmation. After
    > filling out the registration form and clicking on submit I get the
    > following error message:
    >
    > Fatal error: Call to undefined function: mail() in
    > /usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212
    >
    > From what I've read I needed to have sendmail running, and it is. and
    > I needed to add my sendmail path to the php.ini file, which I also
    > did:
    >
    > ; For Unix only. You may supply arguments as well (default: sendmail
    > -t -i).
    > sendmail_path =/usr/bin/sendmail
    >
    > Also, I tried to add my mail server IP address for SMTP, even though
    > it says Fro win32 only....but I wanted to use my mailserver to send
    > emails
    >
    > I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
    > from RedHat.
    >
    > Originally I had unninstalled the sendmail package b/c it was hanging
    > when I started my machine. I then installed PHP 4.3.4 and then when I
    > realized I needed sendmail to use the feature from the bulletin board
    > I reinstalled it.
    >
    > Any thoughts/suggestions? I appreciate any help.[/color]

    Did you try re-building PHP after you re-installed sendmail? My guess is
    that when you compiled php, there were no headers available for building
    the mail function. Unless someone else has a better idea, it's worth a
    try... start from ./configure

    --
    Justin Koivisto - spam@koivi.com
    PHP POSTERS: Please use comp.lang.php for PHP related questions,
    alt.php* groups are not recommended.
    Official Google SERPs SEO Competition: http://www.koivi.com/serps.php

    Comment

    • CountScubula

      #3
      Re: Call to undefined function mail()

      It was hanging most likely becouse it was trying to find its host name, your
      can hard code it in /etc/mail/sendmail.cf

      --
      Mike Bradley
      http://www.gzentools.com -- free online php tools
      "CoralineSa ge" <FVZYSWBYIPBW@s pammotel.com> wrote in message
      news:9d066669.0 402120818.4c4e0 cba@posting.goo gle.com...[color=blue]
      > Hi All,
      >
      > I'm running a bulleting board in PHP and everytime a new user
      > registers s/he is supposed to receive an email confirmation. After
      > filling out the registration form and clicking on submit I get the
      > following error message:
      >
      > Fatal error: Call to undefined function: mail() in
      > /usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212
      >
      > From what I've read I needed to have sendmail running, and it is. and
      > I needed to add my sendmail path to the php.ini file, which I also
      > did:
      >
      > ; For Unix only. You may supply arguments as well (default: sendmail
      > -t -i).
      > sendmail_path =/usr/bin/sendmail
      >
      > Also, I tried to add my mail server IP address for SMTP, even though
      > it says Fro win32 only....but I wanted to use my mailserver to send
      > emails
      >
      > I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
      > from RedHat.
      >
      > Originally I had unninstalled the sendmail package b/c it was hanging
      > when I started my machine. I then installed PHP 4.3.4 and then when I
      > realized I needed sendmail to use the feature from the bulletin board
      > I reinstalled it.
      >
      > Any thoughts/suggestions? I appreciate any help.
      >
      > sincerely,
      > CoralineSage[/color]


      Comment

      • CoralineSage

        #4
        Re: Call to undefined function mail()

        Justin Koivisto <spam@koivi.com > wrote in message news:<iQOWb.285 $sS3.7660@news7 .onvoy.net>...[color=blue]
        > CoralineSage wrote:
        >[color=green]
        > > Hi All,
        > >
        > > I'm running a bulleting board in PHP and everytime a new user
        > > registers s/he is supposed to receive an email confirmation. After
        > > filling out the registration form and clicking on submit I get the
        > > following error message:
        > >
        > > Fatal error: Call to undefined function: mail() in
        > > /usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212
        > >
        > > From what I've read I needed to have sendmail running, and it is. and
        > > I needed to add my sendmail path to the php.ini file, which I also
        > > did:
        > >
        > > ; For Unix only. You may supply arguments as well (default: sendmail
        > > -t -i).
        > > sendmail_path =/usr/bin/sendmail
        > >
        > > Also, I tried to add my mail server IP address for SMTP, even though
        > > it says Fro win32 only....but I wanted to use my mailserver to send
        > > emails
        > >
        > > I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
        > > from RedHat.
        > >
        > > Originally I had unninstalled the sendmail package b/c it was hanging
        > > when I started my machine. I then installed PHP 4.3.4 and then when I
        > > realized I needed sendmail to use the feature from the bulletin board
        > > I reinstalled it.
        > >
        > > Any thoughts/suggestions? I appreciate any help.[/color]
        >
        > Did you try re-building PHP after you re-installed sendmail? My guess is
        > that when you compiled php, there were no headers available for building
        > the mail function. Unless someone else has a better idea, it's worth a
        > try... start from ./configure[/color]

        Actually, yes. I found this suggestion elsewhere yesterday and tried
        re-building PHP...it still didn't work :( Thanks for the suggestion
        though.

        CoralineSage

        Comment

        • CoralineSage

          #5
          Re: Call to undefined function mail()

          Yes, I read that somewhere. I will try hard coding it, even though I
          haven't had problems after the re-install. Thanks for replying Mike.

          sincerely,
          CoralineSage


          "CountScubu la" <me@scantek.hot mail.com> wrote in message news:<rCQWb.243 66$mm.3654@news svr25.news.prod igy.com>...[color=blue]
          > It was hanging most likely becouse it was trying to find its host name, your
          > can hard code it in /etc/mail/sendmail.cf
          >
          > --
          > Mike Bradley
          > http://www.gzentools.com -- free online php tools
          > "CoralineSa ge" <FVZYSWBYIPBW@s pammotel.com> wrote in message
          > news:9d066669.0 402120818.4c4e0 cba@posting.goo gle.com...[color=green]
          > > Hi All,
          > >
          > > I'm running a bulleting board in PHP and everytime a new user
          > > registers s/he is supposed to receive an email confirmation. After
          > > filling out the registration form and clicking on submit I get the
          > > following error message:
          > >
          > > Fatal error: Call to undefined function: mail() in
          > > /usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212
          > >
          > > From what I've read I needed to have sendmail running, and it is. and
          > > I needed to add my sendmail path to the php.ini file, which I also
          > > did:
          > >
          > > ; For Unix only. You may supply arguments as well (default: sendmail
          > > -t -i).
          > > sendmail_path =/usr/bin/sendmail
          > >
          > > Also, I tried to add my mail server IP address for SMTP, even though
          > > it says Fro win32 only....but I wanted to use my mailserver to send
          > > emails
          > >
          > > I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
          > > from RedHat.
          > >
          > > Originally I had unninstalled the sendmail package b/c it was hanging
          > > when I started my machine. I then installed PHP 4.3.4 and then when I
          > > realized I needed sendmail to use the feature from the bulletin board
          > > I reinstalled it.
          > >
          > > Any thoughts/suggestions? I appreciate any help.
          > >
          > > sincerely,
          > > CoralineSage[/color][/color]

          Comment

          Working...