473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SuSE 9.1 - mail() function disabled in PHP ??

This one has me stumped.

How did SuSE disable the mail() function in their RPM'd version of PHP?
( This is their install-version of PHP with RPMs not what you download
from PHP.net )

I have an application that emails people a message, and now having installed
my PHP application on my customer's machine it doesn't work, giving an error
message that the mail() function is not defined.

I'd like to know if it's something in the config on the machine that I can
simply turn it on, or do I need to simply recompile PHP? I'd like to not
have to recompile PHP as SuSE have already saved me a lot of work. Typically
I compile PHP and Apache but want to keep this machine as out-of-the-box.

Here's their config:

'./configure' '--prefix=/usr' '--datadir=/usr/share/php'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share'
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin'
'--disable-debug' '--enable-inline-optimization' '--enable-memory-limit'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild'
'--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli'
'--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork'
'i586-suse-linux'

I'm using sessions just fine too, despite the configure directives.

Help!

:-)

-DG-

Jul 17 '05 #1
4 4801
Data Goob wrote:
This one has me stumped.

How did SuSE disable the mail() function in their RPM'd version of
PHP? ( This is their install-version of PHP with RPMs not what you
download from PHP.net )

I have an application that emails people a message, and now having
installed my PHP application on my customer's machine it doesn't
work, giving an error message that the mail() function is not defined.

I'd like to know if it's something in the config on the machine that
I can simply turn it on, or do I need to simply recompile PHP? I'd
like to not have to recompile PHP as SuSE have already saved me a lot
of work. Typically I compile PHP and Apache but want to keep this
machine as out-of-the-box.
Here's their config:

'./configure' '--prefix=/usr' '--datadir=/usr/share/php'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share'
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin'
'--disable-debug' '--enable-inline-optimization'
'--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sigchild' '--disable-ctype' '--disable-session'
'--without-mysql' '--disable-cli' '--without-pear' '--with-openssl'
'--with-apxs2=/usr/sbin/apxs2-prefork' 'i586-suse-linux'

I'm using sessions just fine too, despite the configure directives.

Dunno why the sessions work regardless of config, but...
If safe mode is enabled, restrictions apply to what system commands and
programs can be spawned/started from PHP, see
http://nl.php.net/manual/en/features...#ini.safe-mode

Perhaps here you'll find something useful ? HTH
Pjotr
Jul 17 '05 #2
Hello,

On 10/10/2004 05:26 PM, Data Goob wrote:
How did SuSE disable the mail() function in their RPM'd version of PHP?
( This is their install-version of PHP with RPMs not what you download
from PHP.net )

I have an application that emails people a message, and now having
installed
my PHP application on my customer's machine it doesn't work, giving an
error
message that the mail() function is not defined.

I'd like to know if it's something in the config on the machine that I can
simply turn it on, or do I need to simply recompile PHP? I'd like to not
have to recompile PHP as SuSE have already saved me a lot of work.


This happens when the configure script is not able to find the sendmail
executable . Usually it happens when the configure script is run by
another user besides root, but RPM installation seems not be the case.

Meanwhile I got some reports by other users telling me that the mail
function is disabled on their systems despite the sendmail executable is
in place. I suspect it is a bug in PHP build system.

You may want to take a look at phpinfo() function output and see what
sendmail_path option says and check whether the sendmail executable
exists on the specified path.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #3
Manuel,

Thanks for this information, and thanks also to Pjotr, you both have
been very helpful.

I checked the sendmail setting, grepped for disable, all that jazz,
and seeing as how it was a customer's machine, had limited time to
screw around with getting things working. Very disappointed in the
SuSE 9.1 Professional RPMs, because they save me a lot of time not
having to compile everything. The disappointment is in mail() not
working. This was the very thing I needed working.

So I went and compiled Apache 2.0.52, and php 4.3.9, and
they are working correctly. But it now means there's two PHP's and
two Apache2 versions of servers on the system. Mine went into
/usr/local/apache2 and defaults for PHP simply because I couldn't
risk overlaying the RPM version in the event the compiled version
had problems. I wish SuSE would follow the defaults so that
compiled-upgrades will overlay older releases without a lot of
hunting for the settings and configs. The configs from the RPMs
were no good to me, plus SuSE went nuts with cutting up the
httpd.conf in to Includes, to make it even more time consuming
trying to figure out where everything is. It was a great idea
but a real pain in the ass.

Anyway... THANKS!

-DG-

Manuel Lemos wrote:
Hello,

On 10/10/2004 05:26 PM, Data Goob wrote:
How did SuSE disable the mail() function in their RPM'd version of PHP?
( This is their install-version of PHP with RPMs not what you download
from PHP.net )

I have an application that emails people a message, and now having
installed
my PHP application on my customer's machine it doesn't work, giving an
error
message that the mail() function is not defined.

I'd like to know if it's something in the config on the machine that I
can
simply turn it on, or do I need to simply recompile PHP? I'd like to not
have to recompile PHP as SuSE have already saved me a lot of work.

This happens when the configure script is not able to find the sendmail
executable . Usually it happens when the configure script is run by
another user besides root, but RPM installation seems not be the case.

Meanwhile I got some reports by other users telling me that the mail
function is disabled on their systems despite the sendmail executable is
in place. I suspect it is a bug in PHP build system.

You may want to take a look at phpinfo() function output and see what
sendmail_path option says and check whether the sendmail executable
exists on the specified path.


Jul 17 '05 #4
Hello,

On 10/11/2004 07:51 PM, Data Goob wrote:
I checked the sendmail setting, grepped for disable, all that jazz,
and seeing as how it was a customer's machine, had limited time to
screw around with getting things working. Very disappointed in the
SuSE 9.1 Professional RPMs, because they save me a lot of time not
having to compile everything. The disappointment is in mail() not
working. This was the very thing I needed working.


It is probably not Suse's fault. You may want to contact the Suse person
that builds these RPMs so he can figure a workaround for the problem.
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: guillaume | last post by:
hello from france, I want to edit a list of customers dynamically and each row contains an input text with the name of customer and link to update the name the link calls the javascript ...
6
by: marcelf3 | last post by:
Hello.. This page opens a window with some information, but everytime the user changes a field in the parent window, the child window needs to be closed. These 2 functions were supposed to do the...
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: Rick | last post by:
Does anyone have any recommendations for setting kernel.shmmax and/or some of the other kernel parms that affect DB2, on a system that has 24-32GB of RAM available? I am also looking for a good...
2
by: Gellert, Andre | last post by:
Hi everybody, currenty we use Suse Linux 9 and the rpms with 7.4.0 downloaded from ftp://ftp.gmd.de/mirrors2/suse/ftp.suse.com/people/max/postgresql-7.4/ . I don't know how to contact the person...
2
by: SmoothJazz | last post by:
Hi All! I am wanting to setup/run PostgreSQL on my server (a SuSE Linux 9.2 distro) but I'm not quite sure which way to go. I have a few books on PostgreSQL but they don't seem to match the...
3
by: Scott Evans | last post by:
Hi! I have been asked to add some functionality to an existing web site. The user would like to have a form that would email them the results of the form. Really easy stuff to do, usually. I...
2
by: Lev Elbert | last post by:
Hi, all! I have to make a custom email module, based on the standard one. The custom module has to be able to work with extremely large mails (1GB +), having memory "footprint" much smaller....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.