You are here: Re: [PHP] Extern Executions (Perl) « PHP « IT news, forums, messages
Re: [PHP] Extern Executions (Perl)

Posted by Andy Pieters on 04/08/05 19:17

HI

Suggestion 1: configure apache to parse files with php extension thru php
binary
Suggestion 2: place a shebang on the start of the php file
like
#! /usr/bin/php
Suggestion 3: rewrite your script and have the php script call the perl ;-)

Tada

Andy

On Friday 08 April 2005 07:05, Eli wrote:
> with some parameters.
> When running the perl program throu unix shell, then perl executes the
> PHP program as expected, and returns its output.
> When running the perl program throu Apache (using cgi-bin on a browser),
> then perl opens the PHP file for reading and doesn't execute the PHP
> script, and returns the PHP code of the script.
>
> The Perl line trying to execute the PHP script is:
>
> open (PIPE,"./my_prog.php $arg1 $arg2 |");
> while (<PIPE>)
> $res=$res.$_;
> print "got:\n",$res;
>
> Does anyone have any clue why Perl behaves differently on different
> enviorments?
> OR: does anyone have a suggestion for a stable solution?
>
> -thanks, Eli

--
Registered Linux User Number 379093
--
Feel free to check out these few
php utilities that I released under the GPL2 and
that are meant for use with a php cli binary:
http://www.vlaamse-kern.com/sas/
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация