Hi,

I'm having a very strange problem with PHP on my server. When a user tries to send an 
e-mail message using the mail() function, it returns the error:

Could not execute mail delivery program

I'm running PHP 4.3.3, Apache 1.3.29 and Qmail on a Solaris system. I'm using the 
correct sendmail path (/var/qmail/bin/qmail-inject). It works perfectly on my other 
Solaris server with the same configuration.

Even when I change the sendmail_path to the default value or an intentionally 
incorrect path, the error remains the same.

After looking around in the source code for the PHP engine, I found that this error 
originates from a problem with the popen call. So I set up a small php file to call 
popen directly:

<?php
$handle = popen ("/usr/bin/date", "r");
?>

This gives me the following error:

PHP Warning: popen(/usr/bin/date,r): Too many open files

Apparently this is the root cause for the mail() problem, but even if I increase my 
max file handles count from 256 to 1024, it still gives the same error. PHP is the 
only application which complains about "Too many open files" and it compains all the 
time. Even when the server load is very low.

I'm stuck. I really wouldn't know what to try next. Can anyone offer any suggestions?

Thanks in advance for your help.

Regards,

Jeroen.

-- 

Oxcart Software B.V.
Van Speijkstraat 48
2518 GD  Den Haag

Tel: +31 70 3655875
Fax: +31 70 3659675

http://www.oxcart.com/

Reply via email to