Connecting Tech Pros Worldwide Forums | Help | Site Map

problem in using system to run a program.

fAnSKyer
Guest
 
Posts: n/a
#1: Oct 18 '06
I am using

system('GPA.exe ' . $filename);

to run a program GPA.exe

this program do the following things.
../GPA.exe filename.txt
and will generate another file

HOWEVER, the problem is, there is no new file generated and I doesn't
get an exception.
I don't know why. Can somebody give me a clue?

Sorry for posting such silly questions, I am really new to PHP.

Thanks a lot


pittendrigh
Guest
 
Posts: n/a
#2: Oct 18 '06

re: problem in using system to run a program.


It is possible the exe expects to deposit the newly
created file in "the current directory"
.......which in the web-server context ends up undefined,
or perhaps defaulting to an illegal area.

exe sounds like windows stuff, which I try hard to know
little about. But that sort of trouble often happens on
a unix-like system.

(when you run the program the user is you.
When the webserver runs the program the 'user'
has another definition and another permission set)

fAnSKyer
Guest
 
Posts: n/a
#3: Oct 19 '06

re: problem in using system to run a program.


That make sense.I am currently using linux to implement this.
but do you know how to solve this?

Thanks a lot
Cheers

fAnS.
pittendrigh wrote:
Quote:
It is possible the exe expects to deposit the newly
created file in "the current directory"
......which in the web-server context ends up undefined,
or perhaps defaulting to an illegal area.
>
exe sounds like windows stuff, which I try hard to know
little about. But that sort of trouble often happens on
a unix-like system.
>
(when you run the program the user is you.
When the webserver runs the program the 'user'
has another definition and another permission set)
Colin Fine
Guest
 
Posts: n/a
#4: Oct 21 '06

re: problem in using system to run a program.


fAnSKyer wrote:
Quote:
That make sense.I am currently using linux to implement this.
but do you know how to solve this?
>
Thanks a lot
Cheers
>
fAnS.
pittendrigh wrote:
Quote:
>It is possible the exe expects to deposit the newly
>created file in "the current directory"
>......which in the web-server context ends up undefined,
>or perhaps defaulting to an illegal area.
>>
>exe sounds like windows stuff, which I try hard to know
>little about. But that sort of trouble often happens on
>a unix-like system.
>>
>(when you run the program the user is you.
> When the webserver runs the program the 'user'
> has another definition and another permission set)
>
You're running a .exe file on Linux?

This might be a silly question, but do you know that
../GPA.exe filename.txt
actually works?

Colin
Closed Thread