php - shell_exec not executing sh file for inkscape command -


एक.श

  #! bin / bash कमांड = "सीपी 357.svg 000.svg" गूंज "कमांड निष्पादित"; Exec $ आदेश;    

निष्पादित करके sh one.sh चलाता है और यहां तक ​​कि php shell_exec ("sh one.sh") में; काम करता है ठीक है।

दो.श

  #! Bin / bash कमांड = "/ usr / bin / inkscape -f 357.svg -e 357.png" गूंज कमांड "; Exec $ आदेश;   

शेल से sh two.sh ठीक काम करता है

लेकिन php का उपयोग shell_exec ("sh निष्पादन नहीं करना

कोई भी बता सकता है कि वह क्यों निष्पादित नहीं कर रहा है?

प्रयास करें:

  गूंज shell_exec ("sh two.sh 2" gt; & amp; 1; ")"   

और देखें कि आउटपुट क्या है, हो सकता है कि यह आपको अनुमति अस्वीकृत त्रुटि देगा। संभव है कि आप जिस उपयोगकर्ता के साथ चल रहे हैं उसे जांचना (शायद www-data की तरह कुछ)

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -