Re: [PHP] Calling PHP function from Perl - as external program

2002-02-07 Thread Analysis and Solutions

Hey Vaclav:

Vaclav Muchna wrote:
> 
> system('/fullpath/ob', '100');
> produce this message:
> 
> X-Powered-By: PHP/4.1.0
> Content-type: text/html
> No input file specified.
> 
> but, when i remove -q parametr from ob, it procude this message:
> 
> X-Powered-By: PHP/4.1.0
> Content-type: text/html
> #! /usr/bin/php
> 
> Params:
> 
> so, it is executed, but seem to be parsed by some other php in system (due
> to string output "#!/usr/bin/php"), but no parametrs are given.

But what does your "ob" script look like?  There may be an error in it
causing the "No input file specified" response.

Caio!

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Calling PHP function from Perl - as external program

2002-02-07 Thread Vaclav Muchna

Hi,

What i need 2 do is call some php script from perl code. I've whole site
written in Perl, and i'd like to use there adv. system written in PHP :-)

First i thought, that it will be easy. I've this codes:

*
perl function get_banner():

system('/fullpath/ob', '100');100 means parametr, which
specifies category

// system runs its firts parametr, and passes the rest of list as
parametrs.
// i also tried do it trough `/fullpath/oa.php 100`

*
php file /fullpath/ob

#!/usr/bin/php -q


of course, exec rights and standalone php are ok.


and only for test purposes i've also file oa
#!/bin/bash
echo $0 $1

-- that is start situation

in bash:

[neo@miesto lib]# ./oa bagr
./oa bagr

[neo@miesto lib]# ./ob bagr
Params: ./ob - bagr

so, it seem's everything works properly

when I call in perl this function:

system('/fullpath/oa', '100');

everything is ok

but, this

system('/fullpath/ob', '100');
produce this message:

X-Powered-By: PHP/4.1.0
Content-type: text/html
No input file specified.


but, when i remove -q parametr from ob, it procude this message:

X-Powered-By: PHP/4.1.0
Content-type: text/html
#! /usr/bin/php

Params:

so, it is executed, but seem to be parsed by some other php in system (due
to string output "#!/usr/bin/php"), but no parametrs are given.


If anybody has any idea, please help me ;-).
I have to note that i'm very beginner to the perl :-)

Thx

Vasek

PS. safemode is disabled.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php