Discussion:
How to make Apache allow an executable to run?
(too old to reply)
t***@gmail.com
2012-08-09 01:05:34 UTC
Permalink
Hey guys,

I am just wondering what I can do in this situation.
I have this simple web page, through which I want to invoke a program that leaves a file on site.
For your information, this web page itself can write (it saves uploaded files in a specific location in the server).
But the problem is that when I invoke the program via the web page, it doesn't produce a file in the same specific location the web page succeeded to leave a file.

Simply speaking, my situation is
a web page can save a file to folder A,
but when the web page invokes a program to leave a file in the folder, it can't.
And the question is 
how I can make the program to do so when it's invoked by the web page?

Thanks,
HJ.
patpro ~ patrick proniewski
2012-08-09 04:46:21 UTC
Permalink
Post by t***@gmail.com
Hey guys,
I am just wondering what I can do in this situation.
I have this simple web page, through which I want to invoke a program that
leaves a file on site.
For your information, this web page itself can write (it saves uploaded files
in a specific location in the server).
But the problem is that when I invoke the program via the web page, it
doesn't produce a file in the same specific location the web page succeeded
to leave a file.
Simply speaking, my situation is
a web page can save a file to folder A,
but when the web page invokes a program to leave a file in the folder, it can't.
And the question is 
how I can make the program to do so when it's invoked by the web page?
Thanks,
HJ.
use a language like php to invoque your command (exec, systemŠ functions
are made for that).

patpro
--
A vendre : KVM IP 16 ports APC
http://patpro.net/blog/index.php/2008/01/12/133
thejustpark
2012-08-09 05:27:17 UTC
Permalink
Post by t***@gmail.com
Hey guys,
I am just wondering what I can do in this situation.
I have this simple web page, through which I want to invoke a program that
leaves a file on site.
For your information, this web page itself can write (it saves uploaded files
in a specific location in the server).
But the problem is that when I invoke the program via the web page, it
doesn't produce a file in the same specific location the web page succeeded
to leave a file.
Simply speaking, my situation is
a web page can save a file to folder A,
but when the web page invokes a program to leave a file in the folder, it
can't.
And the question is 
how I can make the program to do so when it's invoked by the web page?
Thanks,
HJ.
use a language like php to invoque your command (exec, systemŠ functions
are made for that).
patpro
--
A vendre : KVM IP 16 ports APC
http://patpro.net/blog/index.php/2008/01/12/133
Sorry I didn't make myself clear.
I did use system function in php.
The problem was that when the system call is done with the program, it doesn't leave the file.

So for test, I edited the program to only leave a test file, without doing actual work, and had the web page to call the program using system function. It has run but it doesn't leave the test file. My guess is that there is a kind of permission setting that blocks the program to write files. But again, the web page itself can write a file. It's just that when the web page system calls a local program to do so, it fails.

I am still stuck with this, please help me out.

Thanks,
HJ.
patpro ~ Patrick Proniewski
2012-08-09 08:35:50 UTC
Permalink
Post by thejustpark
Sorry I didn't make myself clear.
I did use system function in php.
The problem was that when the system call is done with the program, it
doesn't leave the file.
So for test, I edited the program to only leave a test file, without doing
actual work, and had the web page to call the program using system function.
It has run but it doesn't leave the test file. My guess is that there is a
kind of permission setting that blocks the program to write files. But again,
the web page itself can write a file. It's just that when the web page system
calls a local program to do so, it fails.
I am still stuck with this, please help me out.
It's not an apache problem, it's a php problem.
increase the error logs for php, and see what it says.

patpro

Continue reading on narkive:
Loading...