Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to undefined function: mail()ema


Guest

Recommended Posts

Firstly I have to say this is a brilliant tool for ecommerce, great work and applause for the developers.

 

I have setup oscommerce on SuSE 9.1 default install, all updates and patches done.

 

I have installed Apache2, and php4, I also have sendmail installed (not postfix)

 

The error I am receiving is:

Fatal error: Call to undefined function: mail() in /srv/www/htdocs/catalog/includes/classes/email.php on line 502

 

According to one fix I found I needed to recompile and install php4 after send mail is installed, which I did, I removed php4 and reinstalled sendmail.

 

I then reinstalled sendmail from the suse installation interface(YAST)

 

I then tried again to add an account, it failed as it did before with the error:

 

Fatal error: Call to undefined function: mail() in /srv/www/htdocs/catalog/includes/classes/email.php on line 502

 

I have found that intermittently I can go to http://localhost/catalog/admin/ and select "tools" send email" and can get a successful message stating it has sent the mail, though it never arrives, if I retry I get the same failure above (error on 502).

 

I then removed php4 for the suse installation interface and compiled php4 from source, this also gave the same error.

 

I have rebooted the server and tried all with the same results.

 

I have checked php.ini and added the line sendmail_path =/usr/sbin/sendmail

 

this didnt help so I changed it to sendmail_path =sendmail

 

Same results.

 

Is there any resolution to this? I have pretty much exausted all my ideas.

 

I would prefer to not compile apache from source if I can help it as the suse updater for 9.1 only works on apache2.

 

 

Regards,

 

DamienK

Link to comment
Share on other sites

Damien -

 

The only other advice I've found is to add the sendmail path when recompiling PHP.

 

Usually this happens with RedHat installations of PHP compiled manually

by a non-root user. What happens is that PHP configure does not find

sendmail program in the PATH and disables the mail function. The

solution is to rebuild PHP adding first to the PATH the directory where

the sendmail executable can be found, usually /usr/lib/sendmail but that

often that is a link to /usr/sbin/sendmail .

Link to comment
Share on other sites

ok, that sounds logical, but as a complete dunce how would I do that?

 

configure --with-sendmail?

 

Sorry to be so stupid, but this is a new zone for me, PHP is something I really need to pay a little more attention to.

 

Regards

 

DamienK

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...