Well, I have a very strange error, that happens only some times, randomly : i'm suddenly not able anymore to use the php mail() fonction : Warning: mail(): Could not execute mail delivery program Then I rehash Apache ( /etc/init.d/httpd reload ), and it works fine again. My PHP configuration is OK, and my mail server too. When I execute my PHP script from the shell, there's no problem and the mail is sent. It's why it's an Apache problem, I'm quite sure. If it could help, my PHP is installed as a CGI module, and I'm running Apache with -DSSL attribute and all the modules dynamically configured Note : The error has occured on my 2 servers, that have the same apache configuration. I saw on some forums that some guys had the same problem, but i couldnt find any solution. Could you help ? Thank you very much !
Would be nice if you could find out, *why* the mail delivery program could not be started. Without that info we can only guess here. Thanks.
But how could I ? I've just this error message, and nothing else. Nothing special in error_log or cgi.log My mail program works fine, as i can use it from shell, but through apache, it bugs sometimes. It's not a load problem because my second server is new and there's no load on it. And the weirdest : /etc/init/httpd reload, and it works again...
Hmm. I don't know how to get the error code from PHP. The technical flow is about: * pipe program (or get error) * write to pipe (or get error) * close pipe (or get error) One of these errors you hit. We must know, which one. I can imagine that you hit system limits, either number of open files or number of forked processes. What does ulimit -a say within the apache environment say?
Well as I told you my new server has a really low load, there are only a few requests per hour, and everything is logged into access_log, so i dont think its a system memory problem or something like that... And the problem is that it's working now, so i cant test anything, but would you have any idea of what i should do the next time it happens ?
Hello, I've identified the problem : Apache is unable to fork, and its why the mail program doesnt work. What should I do to avoid that ? Which parameters should I adjust in my config ? Thanks