Connecting Tech Pros Worldwide Help | Site Map

problem in using system to run a program.

 
LinkBack Thread Tools Search this Thread
  #1  
Old October 18th, 2006, 04:55 PM
fAnSKyer
Guest
 
Posts: n/a
Default problem in using system to run a program.

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, 07:05 PM
pittendrigh
Guest
 
Posts: n/a
Default 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, 05:25 PM
fAnSKyer
Guest
 
Posts: n/a
Default 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, 02:45 PM
Colin Fine
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.