Find the answer to your Linux question:
Results 1 to 10 of 10
Hi I have installed Apache version 1.3.33 with php and I am getting this error on a page Fatal error: Call to undefined function: mail() in /usr/local/apache/htdocs/includes/config.inc.php on line 88 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33

    Apache - Fatal error:... [Sloved]


    Hi

    I have installed Apache version 1.3.33 with php and I am getting this error on a page

    Fatal error: Call to undefined function: mail() in /usr/local/apache/htdocs/includes/config.inc.php on line 88

    can any one help me fix it?


    Thanks

    PayableOnDeath

  2. #2
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    you have not compiled php/mod_php with support for the mail function it seems, what version of php are you running?
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    am using php 4

    with config
    Code:
    ./configure \
    --with-apxs=/usr/local/apache/bin/apxs \
    --disable-debug \
    --enable-ftp \
    --enable-inline-optimization \
    --enable-magic-quotes \
    --enable-mbstring \
    --enable-mm=shared \
    --enable-safe-mode \
    --enable-track-vars \
    --enable-trans-sid \
    --enable-wddx=shared \
    --enable-xml \
    --enable-sockets \
    --with-dom \
    --with-gd \
    --with-gettext \
    --with-mysql=/usr/local/mysql \
    --with-regex=system \
    --with-xml \
    --with-zlib-dir=/usr/lib
    Thanks

    PayableOnDeath

  4. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    try ./configure --help to see a list of possible flags, there should be one like

    --enable-mail

    or something of the like, I know that in gentoo you need the proper USE configured, so it is a compilable option
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  5. #5
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    Cant find an enable mail in the ./configure --help

  6. #6
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    buggerrr, Alright, I'm gonna go sift through the php docs, and see what I can't dig up, can you also check to see what your mod_php was configured with?

    I know this is a little 'Chicken or Egg"ish, but if you could get a copy of squirrelmail or phpBB, they both have nice configuration checkers in squirrelmail its /apacheroot/squirrelmail/configtest.ph p and the install script in phpBB i think test for mail functionality. Might give us a little better idea of where to look.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  7. #7
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    hi

    Dont have mod_php have a mod_php4 thou am guessing its the same

    and was do with the following config
    Code:
    ./configure \
    --with-apxs=/usr/local/apache/bin/apxs \
    --disable-debug \
    --enable-ftp \
    --enable-inline-optimization \
    --enable-magic-quotes \
    --enable-mbstring \
    --enable-mm=shared \
    --enable-safe-mode \
    --enable-track-vars \
    --enable-trans-sid \
    --enable-wddx=shared \
    --enable-xml \
    --enable-sockets \
    --with-dom \
    --with-gd \
    --with-gettext \
    --with-mysql=/usr/local/mysql \
    --with-regex=system \
    --with-xml \
    --with-zlib-dir=/usr/lib

    I was talking to someone and they said to install sendmail and recompile php I have done that and have re started apache but still not working

    Thanks

    PayableOnDeath

  8. #8
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Maybe, this link would help
    http://in.php.net/manual/en/ref.mail.php

    This is the documentation of the mail() function from php.

    Also, there is one more thing that you could check - is the mail() function disabled in your php.ini?

    There is a directive in php.ini - disable_functions - which takes a comma-separated list of function names.

    This is what my php.ini says:
    ; This directive allows you to disable certain functions for security reasons.
    ; It receives a comma-delimited list of function names. This directive is
    ; *NOT* affected by whether Safe Mode is turned On or Off.
    disable_functions =

    ; This directive allows you to disable certain classes for security reasons.
    ; It receives a comma-delimited list of class names. This directive is
    ; *NOT* affected by whether Safe Mode is turned On or Off.
    disable_classes =
    As you can see, there is disable_classes too, if you plan to use some SMTP-related classes (like those from PEAR) and they've been disabled
    The Unforgiven
    Registered Linux User #358564

  9. #9
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    hi

    will have a look at that link

    my php.ini is the same as your with nothing disabled

    I just did a phpinfo file and it showed up

    Code:
    sendmail_from       no value
    sendmail_path        /usr/sbin/sendmail 
    serialize_precision  100 
    SMTP                     localhost
    smtp_port              25
    so it must be picking up something to do with the mail

    could it have something to do with zend Optimizer? I have it installed aswell should have said about in the first post but just remembered about it

    Thanks

    PayableOnDeath

  10. #10
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    I have fixed it now all working

    Thanks all for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •