#18537 [Fbk->Opn]: calling php from perl only gives "No input file specified."

From: Date: Fri, 02 Aug 2002 08:59:17 +0000
Subject: #18537 [Fbk->Opn]: calling php from perl only gives "No input file specified."
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15790@lists.php.net to get a copy of this message
ID: 18537 User updated by: s.lemke@infoworxx.de Reported By: s.lemke@infoworxx.de -Status: Feedback +Status: Open Bug Type: *General Issues Operating System: Suse Linux 7.3 PHP Version: 4.2.2 New Comment: Hello, if hvried it this way... ButInd teoutput-buffering function of php - my application is very complex and for some reasons I cannot detect at the beginning of the script if a redirect (with the Header/Location command) is necessary. Regards, Sebastian Previous Comments: ------------------------------------------------------------------------ [2002-07-25 20:16:39] sniper@php.net This works fine fore me with PHP 4.3.0-dev and PHP 4.2.2: #!/usr/bin/perl open(OUTPUTFILE, "| /usr/local/bin/php"); select(OUTPUTFILE); print "Content-type: text/html\n\n"; print "test\n"; print "<?php phpinfo(); ?>\n"; close(OUTPUTFILE); exit; --- ------------------------------------------------------------------------ [2002-07-25 16:31:13] s.lemke@infoworxx.de Hi Can I detect inside my php script if the php binary is running in cli mode ? And can I redefine the "Header" command ? regards, Sebastian ------------------------------------------------------------------------ [2002-07-25 04:29:24] derick@php.net You can alsways echo the headers out yourself: <?php echo "Content-type: text/html\r\n"; ?> Derick ------------------------------------------------------------------------ [2002-07-25 03:14:51] s.lemke@infoworxx.de Hi, at first of all, thanks for your fast answer. I have tried it yesterday - calling php and processing the output of my perl script works when I am using the cli-feature - but as described in the manual the "Header" functions does not work. Therefore I need an cgi-version which is capable of being started in the described way. Is this possible or are there any other possiblities to get this running ? Regards, Sebastian ------------------------------------------------------------------------ [2002-07-24 09:33:49] edink@php.net That could be because php detects cgi env. variables present and tries to act accordingly. Could you try compiling php with --enable-cli and copy sapi/cli/php from you php build tree into /usr/local/bin/php? You can get more information about the differences between cgi and cli versions of php on http://www.php.net/manual/en/features.commandline.php ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18537 -- Edit this bug report at http://bugs.php.net/?id=18537&edit=1

« previous php.bugs (#15790) next »