PHPsystem ("ls-l", $ ret_var) returns 127 of the execution result

Source: Internet
Author: User
The execution result of PHPsystem (ls-l, $ ret_var) is 127. dear friends, the younger brother recently installed a lighttpd on the ARm board and configured PHP5.4, however, when I write a php file to call a local executable file, the returned value is 127, which is an error return value that does not find the command, now I am talking about how to put the test program C test in the directory/usr/bin where the local program can be executed by default. the system still returns the 127, absolute path, and the relative path has been tried, put PHP. you cannot see the error when debugging INI. You have also tried to modify the permissions of folders and files 755. What should I modify in PHP. INI. The safe_mode and with-exec-dir options are not available in version 5.4. thank you for your advice.


Reply to discussion (solution)

See
1. exec ()-Execute an external program
2. passthru ()-Execute an external program and display raw output
3. popen ()-open the process file pointer
4. escapeshellcmd ()-Escape shell metacharacters
5. pcntl_exec ()-execute the specified program in the current process space
6. backtick operator

? Warranty ?? :
1. php. ini? Is it disabled? Listed? Line letter?
2. quilt? The row file owner is the same as the php file owner.
3. quilt? Must the row file have 07xx? Limited

Is this problem solved?

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.