PHP文件不会从/ tmp中移动 [英] PHP Files are not moving from /tmp

查看:247
本文介绍了PHP文件不会从/ tmp中移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的链接,该图片无法显示,因为他们没有从 / tmp目录移动到指定的目录。 PHP脚本的指针是正确的,已验证与 file_exists()。另外要处理图像的剧本是我的机器上正常工作。

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.

http://www.classifiedtestbed.com/advertisements/2

我已经检查在php.net中定义的所有的php.ini设置;的 file_uploads,upload_max_filesize的,upload_tmp_dir,post_max_size要和max_input_time设置

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.

我也检查了 / tmp目录文件模式,以及上传目录。所有被证实是777。

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

我已经检查PHP Error_log和没有错误。

I have checked php error_log and have no errors.

任何想法AP preciated,我一直盯着它,没有发生6小时... ...

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

服务器/软件详情:
CentOS7,阿帕奇2.4.6,PHP 5.4.16,Laravel 4.2

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

code负责此:

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:在 public_path()正确

推荐答案

http://libgd.github.io/

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


  1. 百胜安装GD GD-DEVEL PHP-GD

  2. 重新启动HTTP服务器(在我的案件的Apache)。

这篇关于PHP文件不会从/ tmp中移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆