How to get exec function to run image creation command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sameer z
    New Member
    • Nov 2010
    • 2

    How to get exec function to run image creation command

    Hi,
    I want create images from the pdf,so install image magic and ghost script. The problem is that i can create images from command line using "convert file.pdf[0] image.jpg" but i can not run using exce.When i echo it,it return '1'.

    have dream day
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    exec() seems to prefer using the full system path name

    Comment

    • clain
      New Member
      • Feb 2007
      • 79

      #3
      When Echo-ing its returning the success value i.e 1.

      so the image is created .. now you need to find the actual path where the image is created ...

      Comment

      • code green
        Recognized Expert Top Contributor
        • Mar 2007
        • 1726

        #4
        When Echo-ing its returning the success value i.e 1.
        sameer does not state what is being echoed.
        The return status of exec is actually passed back in the third parameter of the function.
        The return value is supposed to be the "last line from the result of the command"

        Comment

        • sameer z
          New Member
          • Nov 2010
          • 2

          #5
          Thank you very much for replay,
          Still it is not working,i check the log of apache it show the "/var/root/Desktop/ImageMagick-6.6.4/bin/convert: Permission denied
          ".I run php in Mac,i did not install from source but just set the path for command as you u can see in error.
          But i can run "ls -l" commands.Php safe mode is off.


          any other information you need then provide you.
          Once again Thank You.

          Comment

          Working...