Re: [PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-25 Thread Maciek Sokolewicz

On 23-10-2012 23:54, Steven Pogue wrote:

Dan,
I assume you meant to add a system() call into it...if so, here is what
was presented.

-rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py
-rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py


Steve


Hey Steve,

first of all: don't top-post.
Secondly: no, he didn't. Dan used the backtick operator (`) which is the 
same as calling system on its parameter.


ie:
`ls -l`
is equal to writing
shell_exec('ls -l')

( http://www.php.net/manual/en/language.operators.execution.php )


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-25 Thread tamouse mailing lists
On Thu, Oct 25, 2012 at 5:32 AM, Maciek Sokolewicz
maciek.sokolew...@gmail.com wrote:
 On 23-10-2012 23:54, Steven Pogue wrote:

 Dan,
 I assume you meant to add a system() call into it...if so, here is what
 was presented.

 -rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py
 -rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py


 Steve

 Hey Steve,

 first of all: don't top-post.
 Secondly: no, he didn't. Dan used the backtick operator (`) which is the
 same as calling system on its parameter.

 ie:
 `ls -l`
 is equal to writing
 shell_exec('ls -l')

 ( http://www.php.net/manual/en/language.operators.execution.php )

I have lost the backtick operator so many times, I've stopped using
it, using shell_exec instead.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-23 Thread Steven Pogue
Has anyone been successful at using the above on a RHEL 6.2 environment? I 
am able to use Postfix using the php.ini SENDMAIL_PATH but when I bring 
down PostFix, start Apache James and switch the sendmail_path value to 
point to the Apache James 2.3.2 provided wrapper 
(/opt/james-2.3.2/bin/sendmail.py) the return code on mail() indicates it 
failed and no record of the wrapper being invoked.

Calling the wrapper directly from the command-line works as expected so 
the problem is somewhere between PHP and the sendmail_path invocation.


Thanks,
Steve

Re: [PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 5:00 PM, Steven Pogue spo...@us.ibm.com wrote:
 Has anyone been successful at using the above on a RHEL 6.2 environment? I
 am able to use Postfix using the php.ini SENDMAIL_PATH but when I bring
 down PostFix, start Apache James and switch the sendmail_path value to
 point to the Apache James 2.3.2 provided wrapper
 (/opt/james-2.3.2/bin/sendmail.py) the return code on mail() indicates it
 failed and no record of the wrapper being invoked.

 Calling the wrapper directly from the command-line works as expected so
 the problem is somewhere between PHP and the sendmail_path invocation.

What is the output of the following code?

?php
echo 'pre'.PHP_EOL;
echo trim(`ls -al /opt/james-2.3.2/bin/sendmail.py`).PHP_EOL;
echo '/pre'.PHP_EOL;
?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-23 Thread Steven Pogue
Dan,
I assume you meant to add a system() call into it...if so, here is what 
was presented.

-rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py
-rwxrwxrwx. 1 root root 3878 Sep  6 14:45 /opt/james-2.3.2/bin/sendmail.py


Steve



From:
Daniel Brown danbr...@php.net
To:
Steven Pogue/Raleigh/IBM@IBMUS
Cc:
php-general@lists.php.net
Date:
10/23/2012 05:24 PM
Subject:
Re: [PHP] Help using PHP 5.3.3 mail() with Apache James
Sent by:
paras...@gmail.com



On Tue, Oct 23, 2012 at 5:00 PM, Steven Pogue spo...@us.ibm.com wrote:
 Has anyone been successful at using the above on a RHEL 6.2 environment? 
I
 am able to use Postfix using the php.ini SENDMAIL_PATH but when I bring
 down PostFix, start Apache James and switch the sendmail_path value to
 point to the Apache James 2.3.2 provided wrapper
 (/opt/james-2.3.2/bin/sendmail.py) the return code on mail() indicates 
it
 failed and no record of the wrapper being invoked.

 Calling the wrapper directly from the command-line works as expected so
 the problem is somewhere between PHP and the sendmail_path invocation.

What is the output of the following code?

?php
echo 'pre'.PHP_EOL;
echo trim(`ls -al /opt/james-2.3.2/bin/sendmail.py`).PHP_EOL;
echo '/pre'.PHP_EOL;
?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/