![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
System call works or not depending on 'who' runs the programI'm not sure if this is more of a linux, shell, apache server or c++ question.
For the last few years I've written some c++ programs that act as the cgi of a webpage that generates weather images. The c++ executables are nothing long or fancy, they write out some html and respond to form input. The programs also contain just a couple of system calls including a call to some other c++ programs to create an image file from raw data (that will then be used in the html that follows). Something like: system("path/my_image_drawing_executable arg1 arg2 arg3"); This has worked fine so far, but I've run into a problem with a recent implementation on a different machine. If I log onto the machine and run the cgi program (a c++ exec.) manually from the command line the whole thing runs fine. But if someone runs the same program 'coming in' from the outside through the web server it doesn't work. The cgi program does execute and does everything it should except it ignores the system calls. Took me awhile to figure out what was happening, but I finally just commented out all of the system calls and put in the block: CPP / C++ / C Code:
and indeed when I run it manually from the command line I get 'System Ready' and then when I run the exact same program with the exact same args by typing it in a URL it gives me a 'System Not There' message. I'm guessing some sort of shell, permission, apache issue? All of my cgi files,dir,etc are permission 775 so they should be readable and executeable by all. Unless apache is overriding something. Thanks a bunch for any advice, theories, etc. you might have. Brian Kaney |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Will pay through Paypal if somebody helps me. | paritoshcool | Assembly Language | 0 | 27-Nov-2007 22:27 |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| How to read particular memory location ? | realnapster | C Programming Language | 10 | 10-May-2006 09:11 |
| [TUTORIAL] Calling an external program in C (Linux) | dsmith | C Programming Language | 4 | 22-Apr-2005 13:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The