0
votes

In my link, the images are not displaying because they are not moving from /tmp to the specified dir. The php script pointers are correct and have verified that with file_exists(). Also the script to process the images was working correctly on my machine.

I have checked all php.ini settings defined in php.net; file_uploads, upload_max_filesize, upload_tmp_dir, post_max_size and max_input_time.

I have also checked file modes for /tmp, and the upload directories. All are verified to be 777.

I have checked php error_log and have no errors.

Any ideas appreciated, I have been at it for 6 hours with no progress...

Server / App Details: CentOS7, Apache 2.4.6, PHP 5.4.16, Laravel 4.2

Code Responsible for This:

public function createTN($image) {
    # Load Zebra Image Library
    require_once public_path().'/uploads/Zebra_Image.php';
    $destinationPath = public_path().'/uploads/thumbnails/';

    $tn = new Zebra_Image();
    $tn->source_path = $image->getRealPath();
    $tn->target_path = $destinationPath.$this->name.'.jpg';
    $tn->jpeg_quality = 60;
    $tn->preserve_aspect_ratio = true;
    $tn->enlarge_smaller_images = true;
    $tn->resize(100, 100, ZEBRA_IMAGE_CROP_CENTER);
}

PS: The public_path() is correct

1
Include a copy of your code we can see how it's set up. - Kirk Beard
give apache ownsership of the folder chown apache:apache ./foldername - chiliNUT
Just did that to ./uploads and verified the change with getfacl ./uploads...the owner is now apache but still no success - Rafael
The image urls in the page you linked to point to /uploads/smalls/some.jpg whereas your code seems to store in /uploads/thumbnails/some.jpg. Changing the url didn't help, but at least that seems to be wrong. The Laravel routing error would let me check rewrite rules as well. - ChristianM
@ChristianM hey I really appreciate your insight. My question has been semi answered here stackoverflow.com/questions/28920545/… it looks like I needed libgd - Rafael

1 Answers

0
votes

Make sure libgd is installed!

http://libgd.github.io/

http://php.net/manual/en/book.image.php

CentOS users

  1. yum install gd gd-devel php-gd
  2. Restart http server (in my case apache).