|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
execution of a program in php
I haVe a program written in C++ and is compiled, the program works, we've tested it out side of the web. My problem/question is, how can I execute the program via php? the program in quesiton takes a file called input.dat as input and outputs into a .ps file then converted to a gif.
the reason for all this file joking is because of the tools we are using. any ways, I can't get get php to execute the program. I've tried the exec() system() and passthru()commands in php but they don't execute it. I've checked this by touching all the files in the directory, then a minute later checking all the files that have been changed, none were except the one written by the php. Any help would be much appricated... |
|
#2
|
|||
|
|||
|
RE: execution of a program in php
Sounds to me like Safe Mode is on. With safe mode on, when you use all those functions you mentioned, you can only execute a program that resides in the safe_mode_exec_dir. Turning safe mode on and off and the safe_mode_exec_dir can be set in the php.ini file....
|
|
#3
|
|||
|
|||
|
RE: execution of a program in php
Thanks for the suggestion Matt, I checked my php.ini file for the safe mode and it was turned off. an intersting thing, I did a system("ls"); and it listed the files in the directory to the webpage. any other suggestions?
|
|
#4
|
|||
|
|||
|
RE: execution of a program in php
hmmm ... does anything get reported to your log files? If so what?
|
|
#5
|
|||
|
|||
|
RE: execution of a program in php
I'm a little bit new to php and linux, where might I find those log files at?
oh yeah, and what should I look for? |
|
#6
|
|||
|
|||
|
RE: execution of a program in php
ok, I think that helped me track it down, I found the error_log file and inside it it showed a bunch of permision denied where ever I wanted to change the files. I'm trying to get that to work and hopefully thats the problem, thanks EvilivE
|
|
#7
|
|||
|
|||
|
RE: execution of a program in php
I am not on a *nix box but I would think it would be something like:
/usr/var/web_server/logs/error.log Just a guess, but definately somewhere in the path where the web_server was installed. |
|
#8
|
|||
|
|||
|
RE: execution of a program in php
yeah, I found it and located teh problem, thanks. Problem was that the files weren't write enabled for others. Thanks again for the help EvilivE.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > execution of a program in php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|