Jump to content

moejoe22

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by moejoe22

  1. Yea, it has +x permissions.
  2. safe_mode Off Off safe_mode_exec_dir no value no value
  3. It's a linux server, I don't know the version.. I also don't own the server. Yes, I have it, which setting would you like to view?
  4. Yep same folder, I will move later for security reasons.. now I just want them to work.
  5. Yes, I can use system, exec to run simple commands like echo or execute simple scripts. I think the problem is that the c/c++ program has different ownership while the php has ownership of apache.. I don't know how to get apache to send a signal to a program that it doesn't own.
  6. According to what you wrote, $error == "" is true unless there is at least one error, whichever the first error that is triggered will set $error to something not "". By testing if( $error != "" ) at the end will only be true if at least one error is found. I can at least tell you the elseif( $error != "") will not run after an error has been triggered in your elseif sequence and, from just that snippet of code, it will not run if an error isn't triggered. Elseif will leave a line of elseif conditions once ONE of them has been triggered. If you had a sequence of 10 elseifs and the last 5 were true, only the 5th would've execute code and the rest would have not been touched.
  7. I think it's a logic error.. if($error != "") { echo $error; } Try that instead perhaps? I think what is going on is that, in long line of elseif, once one gets triggered it doesn't execute any more if conditions.
  8. I am trying to get php to send a signal to a concurrently running c/c++ program. I have tried several ways of attempting this but every time the php route fails. I can from terminal send the appropriate signal and the c/c++ program(s) will acknowledge receiving the signal (I have custom handlers written for them) but when I try through php it does nothing. Here's an example of some of the things I've tried: $y = `./sendsig`; system("./sendsig", $x); system("./sikil", $z); exec("./sendsig"); sendsig is a shell script I wrote that when run from terminal sends the right signal to the c/c++ prog and the program acknowledges the signal. $y = `./siint`; system("./siint", $x); system("./siint", $z); exec("./"siint); siint is another c program that I wrote that sends the right signal to the c/c++ program and it acknowledges the signal being received (only when I run siint from terminal.. from php it blunders). $pid = `pgrep ex`; // this line doesn't work atm so I have $pid set by hand to the process of the c/c++ program $y = `kill -10 $pid`; system("kill -10 $pid", $x); exec("./sendsig"); Is the direct route I tried getting php to send the signal itself, and that didn't work at all. Does anyone have any ideas? I'm running out of options to get php to send a signal to a program.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.