procmail
[Top] [All Lists]

Re: procmail: Piping to a PHP script.

2010-08-07 19:58:33
John-

1: Yes, I've set permissions to 777 on echo.php.

2: Absolutely.

On Sat, Aug 7, 2010 at 6:03 PM, John Simpson <john(_at_)swajime(_dot_)com> 
wrote:

On Sat, Aug 7, 2010 at 3:25 PM, Joel Lee 
<joel(_dot_)lee8(_at_)gmail(_dot_)com> wrote:
Thanks for the suggestions.  Unfortunately, this doesn't help.  When
commenting those lines out, it won't even run from the command line, with
the interpreter specified in the file or with the interpreter specified
in
the command line.  It seems that php expects to find those lines.  When
it
doesn't, it just echos back the entire contents of the file as source
code.

Thanks again.

On Fri, Aug 6, 2010 at 8:29 PM, John Simpson <john(_at_)swajime(_dot_)com> 
wrote:

You need to comment out lines 2 and 4 of echo.php


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail



I tested this before I posted it to the list:

john(_at_)system76-pc:~$ aptitude show php5-cli
Package: php5-cli
State: installed
 ...

john(_at_)system76-pc:~$ dpkg -L php5-cli
/.
/etc
/etc/php5
/etc/php5/cli
/usr
/usr/bin
/usr/bin/php5
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/php5.1.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php5-cli
/usr/share/doc
/usr/lib
/usr/lib/php5
/usr/lib/php5/20090626
/etc/php5/cli/conf.d
/usr/share/doc/php5-cli

john(_at_)system76-pc:~$ cat echo.php
#!/usr/bin/php
#<?php
echo "hi.";
#?>
john(_at_)system76-pc:~$ echo 'goodbye' | ./echo.php

#hi(_dot_)john(_at_)system76-pc:~$ ls -la /usr/bin/php
lrwxrwxrwx 1 root root 21 2010-08-06 20:23 /usr/bin/php ->
/etc/alternatives/php
john(_at_)system76-pc:~$ ls -la /etc/alternatives/php
lrwxrwxrwx 1 root root 13 2010-08-06 20:23 /etc/alternatives/php ->
/usr/bin/php5
john(_at_)system76-pc:~$

Two questions...
1) Is echo.php still set as executable?
2) Did you specify the full path to echo.php in your procmail script?

--
John Wesley Simpson
SwaJime's Cove℠
www.swajime.com

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail