EXEC (), PassThru ()-There is a problem when invoking the system command

Source: Internet
Author: User
PHP file calls the system command, in the terminal directly execute the PHP file can be executed, in the Web server access to this file is not responding, what is the problem. Permission issues? Or what ...

Reply content:

PHP file calls the system command, in the terminal directly execute the PHP file can be executed, in the Web server access to this file is not responding, what is the problem. Permission issues? Or what ...

Should be a question of permissions

I just ran into a similar problem, and you said you couldn't execute the ffmpeg command, but I couldn't execute the command that generated the picture.
We are all command line under direct execution can be successful, PHP call is not the case, right. and ordinary commands can be successful.
I think the common denominator of our problem is that we all need to generate files.
In my case, I created a new directory under the Apache Default Web directory, put the PHP file in it, but did not give the directory permission to write, but only the PHP file inside the permissions, and then never find the reason.
Just try to give the entire directory permission to write, you can succeed.
I don't know if you have a similar situation. If not, it could also be a php.ini configuration problem, such as Safe_mode=off not configured.
Hope to help you ~

  • Related Article

    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.