Re: [campsite-support] Yet another Image upload error
  • Please run the command manually from bash:

    convert -sample 64x64 \
    /usr/local/campsite/www/foghorn/html/images/cms-image-000000061.gif \
    /usr/local/campsite/www/foghorn/html/images/thumbnails/cms-thumb-000000061.gif

    and check what error message do you receive. I suppose something is wrong with
    your ImageMagic installation.

    Regards,
    Mugur

    --- wrote:
    > Author: jimmybondo
    > Link: http://code.campware.org/phorum/read.php?8,4313,4313#msg-4313
    >
    --------------------------------------------------------------------------------
    >
    > Alright, so I did a fresh install with 2.6 with default settings all around.
    > Everything works just fine except the image uploads. I know it is a problem
    > with the php system() command, but I will explain my problem first.
    >
    > When I try to upload an image through campsite, I get this error:
    > ----
    > The system was unable to create the file
    >
    '/usr/local/campsite/www/foghorn/html/images/thumbnails/cms-thumb-000000062.jpg'.
    > Please check if the user 'apache' has permission to write to the directory
    > '/usr/local/campsite/www/foghorn/html/images/thumbnails'.
    > ----
    >
    > I checked all the permissions, and they are set for full 777 for the image
    > directories. Then I decided to test out the system() command to check for
    > problems. I wrote this little script to check:
    > ----
    > > $cmd = "convert -sample 64x64
    > /usr/local/campsite/www/foghorn/html/images/cms-image-000000061.gif
    >
    /usr/local/campsite/www/foghorn/html/images/thumbnails/cms-thumb-000000061.gif";
    > $lastline = system($cmd,$retval);
    > if
    >
    (file_exists("/usr/local/campsite/www/foghorn/html/images/thumbnails/cms-thumb-000000061.gif")){
    > echo "Created Sucessfully!";}
    > else{
    > echo "Error!Last Line:".$lastline."Retval:".$retval;}
    > ?>
    > ----
    >
    > Image 61 is there, but still no go, it pumped out this:
    > ----
    > Error!
    > Last Line:
    > Retval:127
    > ----
    >
    > Any ideas what it could be? I guessed that somehow php does not have write
    > permissions for the directory, but it has 777 permissions on it. All of you
    > have been a tremendous help, it is greatly appreciated!
    > Jim
    >
    > --
    > Sent from Campware Forums
    > http://code.campware.org/phorum
    >


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • 5 Comments sorted by
  • It ran just fine with no errors.
    Jim
  • Check if safe mode was set on in the PHP ini file; look for safe_mode directive
    and change the line to look like:

    safe_mode = Off

    Restart apache server.

    Hope this helps,
    Mugur

    --- wrote:
    > Author: jimmybondo
    > Link: http://code.campware.org/phorum/read.php?8,4323,4328#msg-4328
    >
    --------------------------------------------------------------------------------
    >
    > It ran just fine with no errors.
    > Jim
    >
    > --
    > Sent from Campware Forums
    > http://code.campware.org/phorum
    >


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • I checked, and safe mode is off.
    Jim
  • Could this error have something to do with a temporary folder for imagemagick? Perhaps there is a directory it is trying to write to along the way that apache does not have permissions to. How can I find this out?
    Jim
  • Fixed! The problem was that imagemagick was not installed in the correct directory, I merely had to change the command in Image.php to the correct path and it worked!
    Jim