apache - Error executing a program using system() from PHP: terminate called after throwing an instance of 'std::logic_error' -


Here is a piece of code in my index.php

   Php / * CMD One program is subtle by other people, which I do not know much / $ CMD = "FullPath / CMD"; $ Retirement = 0; System ($ cmd, retired); ? & Gt; & Lt; P id = "return" & gt; & Lt ;? Php echo $ rate? & Gt; & Lt; / P & gt;  

If I run the program in a command line like this: $ absolutepat / cmd and then resonance $? I get 0, which is correct

If I run index.php in the command line like this: php -f index.php me And

In the output, which is correct.

However, if I open the web page (both Chrome and IE) in the browser, then give me the & lt; P id = 'return' & gt; 134 & lt; / P & gt; and error message:

The end of 'std :: logic_error' is said after throwing an example - what (): the original string: _ S_construct null valid is not valid

The problem looks like this one which I've found stackoverflow: While exception is thrown is different.

If return_var argument exists, return status: div class = "post-text" Itemprop = "text">

The executed command will be written to this va, therefore, the return status is 134. Since 128, the situation outside, i.e., 128 + n where n is a small positive number usually means that the programmable crashed with 'N'. . Therefore, this is indicative 6. According to, signal 6 means 'cancellation signal'.

So, I guess, external programs can not be run by the $ cmd browser.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -