I have spent a lot time by searching and trying different options but with no luck :( phpThumb is working like a charm on development machine but on server it fails with no error.I am using ajaxForm to upload image.

                $phpThumb->setSourceData($thumb_source_path);
                $phpThumb->setParameter('w', 180);
                $phpThumb->setParameter('h', 160);
                $phpThumb->setParameter('zc', true);
                $output_filename = $imgThumbPath;
                if ($phpThumb->GenerateThumbnail()) { 

                    if ($phpThumb->RenderToFile($output_filename))
                    {

                    }
                } else {

                    echo 'Failed:<pre>'.$phpThumb->fatalerror."\n\n".implode("\n\n", $phpThumb->debugmessages).'</pre>';
                }

phpThumb.demo.check.php result

有帮助吗?

解决方案

I was not getting error because of @ImageCreateFromString($RawImageData); After removing @ I got to know that problem was related to memory_limit. My problem solved setting memory_limit to -1 for infinite allocation.

Thanks

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top