Connecting Tech Pros Worldwide Help | Site Map

problem in using system to run a program.

  #1  
Old October 18th, 2006, 05:55 PM
fAnSKyer
Guest
 
Posts: n/a
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

  #2  
Old October 18th, 2006, 08:05 PM
pittendrigh
Guest
 
Posts: n/a

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)

  #3  
Old October 19th, 2006, 06:25 PM
fAnSKyer
Guest
 
Posts: n/a

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)
  #4  
Old October 21st, 2006, 03:45 PM
Colin Fine
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PLEASE HELP Trying to use SSH programmatically to run program on remote host cpptutor2000@yahoo.com answers 4 February 21st, 2006 09:05 PM
Problem in .NET Remoting with Client Activated Objects(CAO) Deepal answers 3 November 15th, 2005 08:42 PM
Problem in .NET Remoting with Client Activated Objects(CAO) Deepal answers 0 November 15th, 2005 08:41 PM
"Cannot run program" error with Web, Web Services apps. Chris answers 1 November 15th, 2005 04:27 PM