 | |  | | | Photopost Pro Installation & Upgrades If you're having install or upgrade problems |
July 13th, 2004, 03:55 PM
|
#1 (permalink)
| | Registered User
Join Date: Jul 2004
Posts: 7
| PHP Mail Problem
I have recently installed Photopost running on SuSe 9.1 with PHP and POSTFIX. When a user tries to register they get the following error....
Fatal error: Call to undefined function: mail() in /srv/www/htdocs/photopost/register.php on line 293
I have checked my php.ini file and it has the correct path to sendmail..
sendmail= /etc/sbin/sendmail
I have searched everywhere and emailed support but have not had any luck so far.
Thanks in advance,
JT
|
| |
July 13th, 2004, 04:10 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
You need to set your path to the command php is going to use for sendmail
|
| |
July 13th, 2004, 04:29 PM
|
#3 (permalink)
| | Registered User
Join Date: Jul 2004
Posts: 7
|
I thought I was by the sendmail=/usr/sbin/sendmail command in the Php.ini file. If that is not the case what do I need to put there?
Thanks
|
| |
July 13th, 2004, 04:43 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
Photopost simply uses the php mail function. You would need to contact your host to find out the mail path etc. If they do not have mail setup correctly for use with PHP there is not too much we can do.
|
| |
July 13th, 2004, 04:45 PM
|
#5 (permalink)
| | Registered User
Join Date: Jul 2004
Posts: 7
|
I am the host actually....That is the correct path and I am able to send and receive email, just not via php. I guess my question is there particular permissions needed on the /usr/sbin/sendmail file? What do people typically use for the command line in the php.ini file? Surely this isn't the first time someone has come across this.
|
| |
July 13th, 2004, 10:27 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
You have verified sendmail is where is and the path is correct in the php.ini
|
| |
July 14th, 2004, 08:39 AM
|
#7 (permalink)
| | Registered User
Join Date: Jul 2004
Posts: 7
|
yes, if you would like to see the error in action I will PM you the site.
|
| |
July 14th, 2004, 10:27 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
Many Many threads on the internet about this Quote:
So, we got this weird (and frustrating) error on our production server and I didn't find much help on Google at the time. We got to fix it, so now is the time to give back.
Executive summary: This error occurs because PHP couldn't find sendmail at compile time. So the mail function didn't get built, thank you. Here's what to do to fix it:
# If you compiled PHP before compiling (or installing) Sendmail, you just have to recompile PHP again (with Sendmail installed) and, hopefully, you're done.
# If you use QMail (that was our case), you have to fool PHP that Sendmail is actually there, using QMail's wrapper. Just do: ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail , recompile and, hopefully, you're done.
# You're using some other esoteric mail server which is not Sendmail. If it has a wrapper to Sendmail, try the QMail tip (doing a symbolic link to the wrapper). If you don't have a wrapper, well... you're on your own. Unless you really need to use that mail server, I recommend QMail or Postfix.
In all cases you must recompile. It's important to do a make clean and then do the whole configure/make/make install dance, otherwise you'll compile the same configuration (with no mail function) all over again. Yes, I did that twice, silly me.
I don't know exactly in which places PHP looks for Sendmail, but I know one of them is /usr/sbin/ (to make it clear, it looks for the file /usr/sbin/sendmail).
| Hope that helps.
|
| |
July 14th, 2004, 10:30 AM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
Also there is this Quote:
> I have defined it. Still no dice...that's why I'm posting.
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 .
| |
| |
July 14th, 2004, 02:46 PM
|
#10 (permalink)
| | Registered User
Join Date: Jul 2004
Posts: 7
|
Ok, I fixed it...I first uninstalled and reinstalled PHP using the YAST program but that still didn't fix my problem. I downloaded the latest PHP binary, compiled it, installed it and that seems to have fixed the problem. Not sure why it didn't work the first time because sendmail/postfix was installed before PHP was installed, none the less it is now working. Thanks for you help.
|
| |
July 14th, 2004, 02:48 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,947
|
No problem
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 04:05 AM. | |