On 7/5/07, Daniel Brown <parasane@xxxxxxxxx> wrote:
On 7/5/07, web2@xxxxxxxxxxxxxx <web2@xxxxxxxxxxxxxx> wrote: > Chris a écrit : > > web2 wrote: > >> Chris a écrit : > >>> > >>>>> Try this: > >>>>> <? > >>>>> $email = "test@xxxxx"; > >>>>> $headers = "From: ".$email."\r\n"; > >>>>> $headers .= "X-Mailer: PHP/".phpversion()."\r\n"; > >>>>> if(mail("test2@xxxxx","essai","test",$headers)) { > >>>>> echo "OK: ".ini_get('sendmail_path'); > >>>>> } else { > >>>>> echo "NOK: ".ini_get('sendmail_path'); > >>>>> } > >>>>> ?> > >>>>> > >>>>> Note > >>>>> > >>>> Same result : "NOK /usr/lib/sendmail -t -i" > >>>> I think the problem is not in the test script. > >>>> > >>> > >>> > >>> Is that the right path? Normally it's /usr/sbin/sendmail not /usr/lib . > >>> > >> Yes, /usr/sbin/sendmail is a link to /usr/lib/sendmail. > >> > >> I've made tests and with the php binary (php -f myscript.php), the > >> mail is send. > >> It only doesn't work with the apache module (libphp5.so)... > >> > >> So, it confirms that the script and the PHP configuration (php.ini) > >> are OK. > > > > Are you running SeLinux by any chance? Check your /var/log/messages > > and/or /var/log/syslog to see if they provide any answers. > > > I'm not running SeLinux, I'm using Solaris 10 (AMD64), and I've checked > syslog and messages but there's nothing... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Is your script being run via the CLI or the web? -- Daniel P. Brown
he's running it on the web, as the CLI worked ;) Did you try to su to the PHP user first and then try to send the mail with the CLI? Sounds like a permission issue... Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php