Could you not use :

or(header("Location: local/or/absolute/path/to/exit_script.php"));

In the exit_script.php do [embed] some perl stuff - (Soz a bit vague, 
but you get the idea)

Hope that is of help - if not, then feel free to call me 'dumbass' ;-)
Cheers.

Russ

On Thu, 10 May 2001 18:27:33 -0400 Dave VanAuken 
<[EMAIL PROTECTED]> wrote:

> this particular instance of call is from a radius server (perl or C),
> so it is not interacting with the web server at all, no browsers...  a
> shell script for all intents and purposes, which parses the db for the
> required aiuthentication info and processes the request accordingly
> (along with other tasks).
> 
> perl scripts for example, can exit back to the calling program with a
> return code or value.  for example, the following when called by
> another program will return a 0
> 
>       #!/usr/bin/perl
>       $ret=0;
>       exit $ret;
> 
> if conditions are not met, you can pass a "failure" notice to the
> calling program depending on the value returned.
> 
> would like to do the same with the php script, but it returns the
> variable prior to exiting (ie printing it to the screen) rather than
> passing it back
> 
> Dave
> 
> 
> >-----Original Message-----
> >From: Miles Thompson [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, May 10, 2001 4:16 PM
> >To: Dave VanAuken
> >Subject: RE: [PHP-DB] exit code generation, php shell
> >script/standalone
> >
> >
> >Dave,
> >
> >I'm just free associating here, so these suggestions may be
> >worthless:
> >
> >If you are calling the PHP script as a CGI program does it
> >return different
> >values if you cause it to "die" or "exit" vs. successful
> >completion? I'm
> >not talking about the die message.
> >
> >If you are calling it from within the web browser (sic.) use
> >phpinfo() to
> >see if any http_vars would serve. (Or if IIS, whatever the
> >equivalents are.)
> >
> >Maybe you could fake this with a header() call.
> >
> >Miles
> >
> >
> >At 03:06 PM 5/10/01 -0400, you wrote:
> >>did try it,  no go.  Tried a number of permutations, but it doesn't
> >>seem to want to actually return the exit code...  just prints it to
> >>the screen (in terminal mode) which is pretty and all, but
> >not what I
> >>need :)
> >>
> >>just wondering is a solution exists and i just can't see the forest
> >>for the trees.
> >>
> >>Dave
> >>
> >> >-----Original Message-----
> >> >From: Miles Thompson<clipped>
> >> >
> >> >Dave,
> >> >
> >> >You can return a value from a function ...
> >> >
> >> >function dosomething( para1, para2 )
> >> >{
> >> >    code here
> >> >    which depending on success or failure sets $reflag to 0 or 1
> >> >    return $retflag;
> >> >}
> >> >
> >> >So now the question is "Can we return a value from a
> >> >script?" Hell, I don't
> >> >know, why not just try it?
> >> >My gut feeling is that it would go to the browser, not to
> >> >the calling program.
> >> >Interesting question.
> >> >
> >> >Cheers - Miles
> >> >
> >> >http:/www.php.net
> >> >At 02:26 PM 5/10/01 -0400, Dave wrote:
> >> >>to tie in web based scripts and database updates with some
> >> >server side
> >> >>authentication issues, we need to have a PHP script be
> >called from
> >> >>another program.  The program expects a return or exit
> >value to be
> >> >>transmitted back on completion or termination of the script.  0
> >> >>indicating success and anything else indicating failure
> >> >>
> >> >>PHP has exit() and die() which, all though you can place a
> >> >variable or
> >> >>string in
> >> >>it, only prints it to the screen (or other output
> >target) prior to
> >> >>killing itself, and does not send an exit code as would a
> >> >perl script
> >> >>
> >> >>is there any way to generate a exit code on the
> >completion of a php
> >> >>script that will be  interpreted by the program or CGI
> >calling the
> >> >>script, even if it is code to wrap the PHP script in yet
> >> >another perl
> >> >>shell.  We need to send some variables back from the PHP
> >> >script to the
> >> >>terminal as open text (just printed to the screen), but the
> >> >program is
> >> >>specifically waiting for the exit code.
> >> >>
> >> >>really want to avoide writing a perl/dbi script to carry out this
> >> >>function.
> >> >>
> >> >>Appreciate any insight
> >> >>
> >> >>Dave
> >><clipped>
> >>
> >>
> >>--
> >>PHP Database Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>To contact the list administrators, e-mail:
> >[EMAIL PROTECTED]
> >
> >
> >
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

#-------------------------------------------------------#
                                
  "Believe nothing - consider everything"       
  
  Russ Michell
  Anglia Polytechnic University Webteam
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam
  t: +44 (0)1223 363271 x 2331

  www.theruss.com
                        
#-------------------------------------------------------#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to