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

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

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用