We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27716
    • 126 Posts
    Hi Guys,

    Im trying to run a command from linux from within a snippet, with no joy so far.

    Any guidance on how to do this? So far the approach ive tried is adding the below command into a snippet

    exec('convert http://domain.com/image.jpg /var/www/imageOutput.jpg');

    Ive tried shell_exec also with no joy.

    Any assistance appreciated.
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      Any reason why you don't use phpthumbof to handle the image conversions? Also if shell_exec isn't working your host may have it disabled.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 37393
        • 68 Posts
        Probably because your host have disabled shell access in the php.ini, i wouldn't think that they'd enable it for you since having shell access enabled is a huge security risk.

        I've seen people posting on many forums that they were hacked and that they had discovered a r57shell within their userdir with lots of wierd files, most of them have had luck because shell access were disabled by their host. [ed. note: bowkilled last edited this post 14 years, 3 months ago.]
          IntoVPS - VPS hosting service with super-fast response.
          If MODx does not suit your needs then you have a lack of imagination.