Re: Mayor problems with .qmail!

2001-02-11 Thread Halfdan Mouritzen



Vince Vielhaber wrote:
 
 On Sat, 10 Feb 2001, Chris Johnson wrote:
 
  On Sun, Feb 11, 2001 at 04:57:14AM +0100, Halfdan Mouritzen wrote:
   In the .qmail-robot file I've written
  
   |usr/hotel/topdog/WWW/temp/qmailtest.php
 
  Can you just go piping things into a php script and expect your PHP interpreter
  to spring into action to interpret the script for you? Isn't there supposed to
  be a web server involved somewhere? (Maybe you can do this, but it would come
  as a surprise to me.) What happens if you pipe the data into the script
  directly, without involving qmail?

Since PHP is built as an Apache module I recon that it gets
invoked even when I call the script from commend line.
(I can do it anyway)

 
 You can build PHP for command line use, but even from the command line
 the first thing it does is prints some html headers.  I never found a
 way to shut that off, but I also didn't try that hard.  I guess you can
 grep them out but the end result is why bother?
 
The first line of the file reads
# !/usr/local/bin/php -q

This ofcourse tells the server where to find the PHP
interpreter and the '-q' tells it to shut up, 
that it shouldn't output anything to stdout.

Anyway a PHP doesn't output anything if you don't use any
output functions (echo, print, header functions)

// Halfdan


 Vince.
 --
 ==
 Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
  128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
 Online Campground Directoryhttp://www.camping-usa.com
Online Giftshop Superstorehttp://www.cloudninegifts.com
 ==




Re: Mayor problems with .qmail!

2001-02-11 Thread Halfdan Mouritzen



Vince Vielhaber wrote:
 
 On Sun, 11 Feb 2001, Sean C Truman wrote:
 
  Just so you know.. this will disable the HTML output (Unless ofcourse its a
  PHP warning or Error).
 
  #!/usr/local/bin/php -q
 
 Yes, but in this case I believe it's desirable to turn the html off.
It certainly is.
If any HTML is output from the script, the shell will
terminate the script.
(Thats why I couldn't make my cron jobs work for a little while...)

// Halfdan

 
 Vince.
 --
 ==
 Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
  128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
 Online Campground Directoryhttp://www.camping-usa.com
Online Giftshop Superstorehttp://www.cloudninegifts.com
 ==

-- 
//
Halfdan Mouritzen
Director of multimedia design
[EMAIL PROTECTED]
http://www.topdog.dk
//



Re: Mayor problems with .qmail!

2001-02-11 Thread Halfdan Mouritzen

If proplerly written, no html will be shown even without the
-q flag.
At the same time you can use @ infront of any error returning functions
(like calling a database which could be unavaliable) 
The @ turns of error messages.

// Halfdan

Sean C Truman wrote:
 
 If your PHP is sending errors or warnings then there is something wrong with
 the code. If properly written NO HTML will be shown with the -q flag.
 
 Sean
 
 - Original Message -
 From: "Halfdan Mouritzen" [EMAIL PROTECTED]
 To: "Vince Vielhaber" [EMAIL PROTECTED]
 Cc: "Sean C Truman" [EMAIL PROTECTED]; "Chris Johnson"
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, February 11, 2001 1:02 PM
 Subject: Re: Mayor problems with .qmail!
 
 
 
  Vince Vielhaber wrote:
  
   On Sun, 11 Feb 2001, Sean C Truman wrote:
  
Just so you know.. this will disable the HTML output (Unless ofcourse
 its a
PHP warning or Error).
   
#!/usr/local/bin/php -q
  
   Yes, but in this case I believe it's desirable to turn the html off.
  It certainly is.
  If any HTML is output from the script, the shell will
  terminate the script.
  (Thats why I couldn't make my cron jobs work for a little while...)
 
  // Halfdan
 
  
   Vince.
   --
  
 ==
   Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]
 http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
   Online Campground Directoryhttp://www.camping-usa.com
  Online Giftshop Superstorehttp://www.cloudninegifts.com
  
 ======
 
  --
  //
  Halfdan Mouritzen
  Director of multimedia design
  [EMAIL PROTECTED]
  http://www.topdog.dk
  //
 

-- 
//
Halfdan Mouritzen
Director of multimedia design
[EMAIL PROTECTED]
http://www.topdog.dk
//



Mayor problems with .qmail!

2001-02-10 Thread Halfdan Mouritzen


Hi everyone,
I've spent at least three weeks trying
to make this stupid stunt work!
The thing is I've got a .qmail file
which is supposed to recieve email, send it to a php script which fiddles
around with it
and sends an answer back to the
sender.
So,
The mail address is [EMAIL PROTECTED]
I've got a file called ".qmail-robot"
in my home dir "usr/hotel/topdog/"
and a php file called "qmailtest.php
" in usr/hotel/topdog/WWW/temp/
In the .qmail-robot file I've written
|usr/hotel/topdog/WWW/temp/qmailtest.php
The .qmail files chmod is 400, since
it says in the qmail faq that it cant be group or world writable and it
cant be executable if
it contains program lines.
The qmailtest.php chmod is 777.
This looks right to me
BUT IT'S NOT WORKING!!!
:(
Can someone please help me?
I would aprciate the help so so
much, since I really don't know what to do, I've tried everything!

BTW this is the system stuff :
GNU bash, version 2.03.0(1)-release
(i386--freebsd3.4)