[php+postfix] mail() functie werkt niet (undefined function)

Pagina: 1
Acties:

  • mahi
  • Registratie: Juni 2001
  • Laatst online: 03-10-2025

mahi

God bless GoT

Topicstarter
Hoi mensen,

Ik heb 'zonet' Gentoo op m'n oude Pentium gezwierd en ben nu bezig met het installeren & configureren van de software die ik nodig heb. En zoals gewoonlijk kom ik natuurlijk weer wat problemen tegen. Ik heb Apache + mod_php geïnstalleerd. Dit werkt reeds perfect voor zover ik kan beoordelen (PHP-pagina's worden correct verwerkt), op een klein detail na: Als ik mail() gebruik in een PHP-script dan geeft ie een fout. Bijvoorbeeld:
PHP:
1
2
3
4
<?
  echo "hello world";
  mail("mijnemail@mijnprovider.com", "test", "test");
?>
geeft in de browser:
hello world
Fatal error: Call to undefined function: mail() in
/home/httpd/htdocs/test.php on line 3
De gebruikte mailserver is Postfix welke door PHP als sendmail-kloon gebruikt kan worden (bij anderen werkt het toch :). Postfix werkt overigens want wanneer ik op de console het volgende typ:
code:
1
echo "test" | /usr/sbin/sendmail "mijnemail@mijnprovider.com"
dan krijg ik dat mailtje correct aan... In php.ini staat:
code:
1
sendmail_path = "/usr/sbin/sendmail -t -i"
en phpinfo() toont dat deze instelling overgenomen is.

Iemand enig idee wat er mis gaat?

Voor alle duidelijkheid nog wat versie informatie:
- Apache 1.3.27
- PHP 4.3.0
- Postfix 2.0.3

A bus station is where a bus stops. A train station is where a train stops... On my desk I have a workstation.


  • HGM
  • Registratie: April 2000
  • Niet online

HGM

Met dezelfde instellingen werkt het bij mij wel goed. Misschien PHP opnieuw compilen??

  • MAZZA
  • Registratie: Januari 2000
  • Laatst online: 10:06

MAZZA

Barbie is er weer!

HGM schreef op 15 februari 2003 @ 12:28:
Met dezelfde instellingen werkt het bij mij wel goed. Misschien PHP opnieuw compilen??
Zo da's drastisch...

Ontopic: Hoe heb je je php gecompiled?

phpinfo() ---> Configure command.

  • mahi
  • Registratie: Juni 2001
  • Laatst online: 03-10-2025

mahi

God bless GoT

Topicstarter
Gentoo's Portage package manager heeft de instellingen gezet, maar als ik naar de output van phpinfo() kijk dan lijkt dat op 't eerste oog toch juist te staan (ik ben er geen expert in hoor :) ):

'./configure' '--prefix=/usr' '--with-bz2' '--enable-ftp' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-gd-native-ttf' '--enable-mime-magic' '--enable-wddx' '--enable-dbase' '--with-zlib=yes' '--with-iconv' '--enable-bcmath' '--enable-sysvsem' '--enable-exif' '--with-gd' '--enable-sysvshm' '--enable-sockets' '--enable-calendar' '--enable-trans-sid' '--enable-safe-mode' '--enable-versioning' '--enable-track-vars' '--enable-inline-optimization' '--with-config-file-path=/etc/php4' '--host=i586-pc-linux-gnu' '--without-readline' '--with-pam' '--with-gettext' '--with-openssl' '--with-gdbm=/usr' '--with-db3=/usr' '--with-mysql=/usr' '--with-ttf' '--with-t1lib' '--with-pdflib=/usr' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-zlib' '--with-zlib-dir=/usr/lib' '--with-exec-dir=/usr/bin' '--with-apxs=/usr/sbin/apxs' '--with-xml' '--with-dom' '--with-mcrypt' '--with-mhash' '--disable-posix-threads'

Maar ik heb eigenlijk gewoon de Gentoo handleiding gevolgd voor het installeren van Apache + mod_php + postfix. Ik veronderstel dat die handleiding wel correct is want vele andere Gentoo gebruikers schijnen mijn probleem niet te hebben.

[ Voor 21% gewijzigd door mahi op 15-02-2003 13:05 . Reden: typo ]

A bus station is where a bus stops. A train station is where a train stops... On my desk I have a workstation.


  • mahi
  • Registratie: Juni 2001
  • Laatst online: 03-10-2025

mahi

God bless GoT

Topicstarter
Het lijkt misschien inderdaad drastisch, maar ik heb gewoon mod_php opnieuw gecompileerd zoals "HGM" reeds voorstelde. En wonder boven wonder... Nu werkt het wel. Vraag me niet waarom want ik heb niets anders gedaan dan voorheen, maar het gaat :)

A bus station is where a bus stops. A train station is where a train stops... On my desk I have a workstation.