Title: PHP problem with images upload
Last modified: August 22, 2016

---

# PHP problem with images upload

 *  [christianxrojas](https://wordpress.org/support/users/christianxrojas/)
 * (@christianxrojas)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-problem-with-images-upload/)
 * Hello,
    I’ve been having trouble uploading images through Magic Fields 2.
 * The problem is that, when we upload an image, it has to go to this locations:
 * /var/www/lifeboxset.com/wp-content/files_mf/
    /var/www/lifeboxset.com/wp-content/
   files_mf/cache
 * The files appear to be there, but they do not work. The images look broken and
   invisible. Examples:
 * [http://www.lifeboxset.com/wp-content/files_mf/cache/th_4a54a93031f4c119950098790773b991_1415810520ct.jpg](http://www.lifeboxset.com/wp-content/files_mf/cache/th_4a54a93031f4c119950098790773b991_1415810520ct.jpg)
   
   [http://www.lifeboxset.com/wp-content/files_mf/cache/th_4a54a93031f4c119950098790773b991_1415809474plantsvszombies.jpg](http://www.lifeboxset.com/wp-content/files_mf/cache/th_4a54a93031f4c119950098790773b991_1415809474plantsvszombies.jpg)
 * Our server consultant sent us the following diagnosis:
 * ————
 * We are seeing the following error messages from your php.log file about this 
   plugin:
 * Nov 12 09:21:12: PHP Warning: imagecreatefromstring(): Empty string or invalid
   image in /var/www/lifeboxset.com/wp-content/plugins/magic-fields-2/MF_thumb.php
   on line 112
    Nov 12 09:21:12: PHP Warning: imagecopyresampled() expects parameter
   2 to be resource, boolean given in /var/www/lifeboxset.com/wp-content/plugins/
   magic-fields-2/MF_thumb.php on line 113 Nov 12 09:21:12: PHP Warning: imagedestroy()
   expects parameter 1 to be resource, boolean given in /var/www/lifeboxset.com/
   wp-content/plugins/magic-fields-2/MF_thumb.php on line 120
 * ————
 * How can I fix the problem?
 * Thank you,
    Chris.
 * [https://wordpress.org/plugins/magic-fields-2/](https://wordpress.org/plugins/magic-fields-2/)

Viewing 1 replies (of 1 total)

 *  [Magenta Cuda](https://wordpress.org/support/users/magenta-cuda/)
 * (@magenta-cuda)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-problem-with-images-upload/#post-5475656)
 * I downloaded [your file](http://www.lifeboxset.com/wp-content/files_mf/1415810520ct.jpg)
   and was able to successfully upload it and create the thumbnail. I am running
   PHP Version 5.4.14 and my GD library is:` [GD Version] => bundled (2.0.34 compatible)
   [
   FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] =>[
   GIF Read Support] => 1 [GIF Create Support] => 1 [JPEG Support] => 1 [PNG Support]
   => 1 [WBMP Support] => 1 [XPM Support] => 1 [XBM Support] => 1 [JIS-mapped Japanese
   Font Support] => ` Since, it does work on my environment there must be some difference
   between you environment and mine. mc

Viewing 1 replies (of 1 total)

The topic ‘PHP problem with images upload’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/magic-fields-2.svg)
 * [Magic Fields 2](https://wordpress.org/plugins/magic-fields-2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-fields-2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-fields-2/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-fields-2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-fields-2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-fields-2/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Magenta Cuda](https://wordpress.org/support/users/magenta-cuda/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/php-problem-with-images-upload/#post-5475656)
 * Status: not resolved