dtfo55908 2015-03-07 07:57
浏览 67
已采纳

PHP文件没有从/ tmp移动

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条回答 默认 最新

  • duanchen6423 2015-03-07 23:44
    关注

    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).
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器