Undocumented programmers are detained after the ――linux can run normally, the PHP system will not run when called! Solution Solutions

Source: Internet
Author: User
Undocumented programmers are detained after ――linux can function properly, and the PHP system does not run when called!!!!!
My own CLI program, which works under Linux (with parameters), but cannot be executed with the help of a PHP exec call,
Also, the returned array is not empty with the isset test, and the output has no data.
To be sure, Linux and PHP are OK, because the other programs are normal, called this one.

What's going on? Where does this problem start? Never met before.

A little urgent, to submit the source right away!!!!!!!!!!!!

I have a soft test of the DS certificate, should not be detained it, haha ...

------Solution--------------------
Try using the system call
------Solution--------------------
is not a user rights problem AH
------Solution--------------------
In other words, the operation of the PHP exec is not a general problem, I have tried to test the code is dead or alive can not ... Finally had to give up
------Solution--------------------
Permission set to-rwxr-xr-x

Open all the wrong information and see what's wrong with the report!
------Solution--------------------
discuss
The code is not good, and it won't be a problem.
I use PHP splicing with the parameters of the command is the original mode of copy on Linux run is possible, and get the correct output.

------Solution--------------------
Not only user rights, but also the operating environment, there may be differences, so you have to put the exec () that line of code out AH.

Although the real reason is not necessarily here, although this does not necessarily solve your problem, but you can not let everyone guess what you do to judge the reason?
------Solution--------------------
It is almost certain that your a.out has performed some taboo operations in the case of-l 3.

BTW: When $result = False will appear "isset ($result) = = 1 and Print_r ($result) is empty" situation, this is nothing strange.
------Solution--------------------
Explore
It is almost certain that your a.out has performed some taboo operations in the case of-l 3.

BTW: When $result = False will appear "isset ($result) = = 1 and Print_r ($result) is empty" situation, this is nothing strange.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.