<?xml version="1.0" encoding="utf-8"?>
<!-- generator="CMF " -->
<rss version="0.91">
    <channel>
        <title>verot.net - class.upload.php forum</title>
        <description><![CDATA[class.upload.php latest posts on verot.net]]></description>
        <link>http://www.verot.net/</link>
        <lastBuildDate>Fri, 12 Mar 2010 16:14:48</lastBuildDate>
        <generator>CMF </generator>
        <item>
            <title>Problems uploading images with extra dots (.)</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3769</link>
            <description><![CDATA[<i>by Marcelo, 1 day, 14 hours ago<br />4 replies, last reply 17 hours, 41 minutes ago</i><br /><br />Hi fellas,<br /><br />I'm reporting an error which ocurred to me so many times.<br />If you upload a image with the name like AAA_BBB.21.jpg causes an error (Error in creating JPEG image from source.)]]></description>
            <author>Marcelo</author>
            <pubDate>Thu, 11 Mar 2010 00:57:00</pubDate>
        </item>
        <item>
            <title>Multiple image upload filenames</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3764</link>
            <description><![CDATA[<i>by Matt, 3 days, 6 hours ago<br />3 replies, last reply 2 days, 23 hours ago</i><br /><br />Hi,<br /><br />I have successfully implemented this class to upload 6 images as per the examples given in the FAQ on this site and also storing the correct filename in my database table.  My question relates to an update record page that I have, that allows for the changing of images associated with a record.  As each image name is stored in a separate field in the table I am having difficulty updating the correct field with the correct image name.  This I believe is down to the fact that not all images are being replaced and therefore the $_FILES array has empty records depending on which images were selected to be changed.  Having carried out some testing on the contents of the arrays during this process, I am still none the wiser so I am hoping that someone maybe able to point me in the right direction.  <br /><br />Here is my code:<br /><pre class="code php">// create an array here to hold file names
$uploaded = array();

foreach ($files as $file) {
  $handle = new Upload($file);
  if ($handle->uploaded) {
    // create a little array for this set of pictures
    $this_upload = array();
      
    $handle->file_safe_name 	= true;
    $handle->file_auto_rename   = true;
	$handle->file_max_size 		= '512000';
	$handle->allowed			= array('image/jpeg', 'image/jpg');
    $handle->Process($dir_dest);
    
    if ($handle->processed) {
      echo $handle->file_dst_name;
      // store the image filename  
      $this_upload['image'] = $handle->file_dst_name;
    } else {
      echo 'error : ' . $handle->error;
    }
    
    // add this set of pictures to the main array
    $uploaded[] = $this_upload;
  }
}</pre><br />Many thanks for your help.<br /><br />Matt]]></description>
            <author>Matt</author>
            <pubDate>Tue, 09 Mar 2010 09:02:00</pubDate>
        </item>
        <item>
            <title>Can't display local file</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3757</link>
            <description><![CDATA[<i>by Kim, 1 week, 2 days ago<br />6 replies, last reply 1 week, 1 day ago</i><br /><br />Hello,<br /><br />I use a script to show images. I can upload images fine but when I try to show them I get an error message. I don't do any processing to the image. I just need to pull from the server and show on a web page.<br /><br />The code to output local image<br /><pre class="code php">$img = new upload($imgurl);
header('Content-type: ' . $img->file_src_mime);
echo $img->Process();</pre><br />Log<br /><i>system information<br />- class version : 0.29<br />- operating system : FreeBSD<br />- PHP version : 4.4.9<br />- GD version : 2.0.28<br />- supported image types : png jpg gif bmp<br />- open_basedir : no restriction<br />- language : en_GB<br />source is a local file /home/lifespa/uploads/pics/11_svclogo_226116.jpg<br />- local file name OK<br />determining MIME type<br />- Checking MIME type with Fileinfo PECL extension<br />Fileinfo PECL extension not available<br />- Checking MIME type with UNIX file() command<br />MIME type detected as image/jpeg by UNIX file() command<br />- MIME validated as image/jpeg<br />source variables<br />- You can use all these before calling process()<br />file_src_name : 11_svclogo_226116.jpg<br />file_src_name_body : 11_svclogo_226116<br />file_src_name_ext : jpg<br />file_src_pathname : /home/lifespa/uploads/pics/11_svclogo_226116.jpg<br />file_src_mime : image/jpeg<br />file_src_size : 4909 (max= 52428800)<br />file_src_error : 0<br />- source file is an image<br />image_src_x : 150<br />image_src_y : 137<br />image_src_pixels : 20550<br />image_src_type : jpg<br />image_src_bits : 8</i><br /><br />Please let me know what I can do to get the images to show.<br /><br />Thanks<br />Kim Carr]]></description>
            <author>Kim</author>
            <pubDate>Wed, 03 Mar 2010 07:51:00</pubDate>
        </item>
        <item>
            <title>PNG Image upload</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3753</link>
            <description><![CDATA[<i>by Galal ALy, 2 weeks, 4 days ago<br />2 replies, last reply 2 weeks, 3 days ago</i><br /><br />Hello,<br /><br />I used your magnificent class to upload images and create thumbs. It's working except for the PNG large images. example <a href="http://www.atgc.org/XLinkage/ath-chrom4-map.out.bit.large.png" target="_blank">this one</a>. <br /><br />The problem is : the thumb created for png large file has the same width and the same height as the original file .. here is the code for the upload and the thumb : <br /><br /><pre class="code php">$myimg->file_overwrit      = true;
$myimg->image_convert      = 'jpg';
$myimg->file_new_name_body = "photo_$id";
$myimg->Process('../images');
if(!($myimg->processed))
    return false;
$myimg->image_resize       = true;
$myimg->file_overwrite     = true;
$myimg->image_convert      = 'jpg';
$myimg->file_new_name_body = "thumb_$id";
$myimg->image_x            = 120;
$myimg->image_y            = 120;
$myimg->Process('../thumbs');
if($myimg->processed)
    return true;
else
    return false;</pre>]]></description>
            <author>Galal ALy</author>
            <pubDate>Sun, 21 Feb 2010 15:59:00</pubDate>
        </item>
        <item>
            <title>Problem with the directory</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3751</link>
            <description><![CDATA[<i>by Straffon, 3 weeks ago<br />1 reply, last reply 3 weeks ago</i><br /><br />Hi Colin,<br /><br />I've a problem trying to set the directory path on different server type's. I mean on Linux, Windows, etc.<br />Can you help me to find a path out of the www. I mean that where the files get saved are on a different directory than the inetpub/wwwroot/ (for IIS) or wwww (for Apache)<br />Thats because the security risks of having the files on the "public folder".<br />I Hope you can help me.<br />Thanks a lot.]]></description>
            <author>Straffon</author>
            <pubDate>Thu, 18 Feb 2010 18:00:00</pubDate>
        </item>
        <item>
            <title>Problems with image size</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3746</link>
            <description><![CDATA[<i>by Nicola, 3 weeks, 3 days ago<br />4 replies, last reply 3 weeks, 3 days ago</i><br /><br />Hi,<br />i'm not able to process images bigger than 100/120KByets.<br />I've read about server memory issues, but my memory setting limit is 128M<br />Chan you help me?<br /><br />This is the log<br /><i>system information<br />- class version           : 0.27<br />- GD version              : 2.0<br />- supported image types   : png jpg gif bmp<br />- open_basedir            : no restriction<br />- language                : en_GB<br />source is an uploaded file<br />- upload OK<br />- file name OK<br />- MIME type detected as image/jpeg by UNIX file() command<br />- source variables<br />    file_src_name         : 226k.jpg<br />    file_src_name_body    : 226k<br />    file_src_name_ext     : jpg<br />    file_src_pathname     : /tmp/phpcnD5u3<br />    file_src_mime         : image/jpeg<br />    file_src_size         : 231884 (max= 33554432)<br />    file_src_error        : 0<br />- source file is an image<br />    image_src_x           : 2000<br />    image_src_y           : 2791<br />    image_src_pixels      : 5582000<br />    image_src_type        : jpg<br />    image_src_bits        : 8<br />process file to test/<br />- file size OK<br />- file mime OK : image/jpeg<br />- file name safe format<br />- destination variables<br />    file_dst_path         : test/<br />    file_dst_name_body    : 226k<br />    file_dst_name_ext     : jpg<br />- image operation, keep extension<br />- checking for auto_rename<br />- destination file details<br />    file_dst_name         : 226k.jpg<br />    file_dst_pathname     : test/226k.jpg<br />- 226k.jpg doesn't exist already<br />- image resizing or conversion wanted<br />process file to test/<br />- file size OK<br />- file mime OK : image/jpeg<br />- file name safe format<br />- destination variables<br />    file_dst_path         : test/<br />    file_dst_name_body    : 226k<br />    file_dst_name_ext     : jpg<br />- image operation, keep extension<br />- checking for auto_rename<br />- destination file details<br />    file_dst_name         : 226k.jpg<br />    file_dst_pathname     : test/226k.jpg<br />- 226k.jpg doesn't exist already<br />- image resizing or conversion wanted<br />cleanup<br />- delete temp file /tmp/phpcnD5u3</i>]]></description>
            <author>Nicola</author>
            <pubDate>Mon, 15 Feb 2010 15:39:00</pubDate>
        </item>
        <item>
            <title>Cropping from X to Y</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3742</link>
            <description><![CDATA[<i>by Mikee, 3 weeks, 6 days ago<br />3 replies, last reply 3 weeks, 5 days ago</i><br /><br />Hi,<br />How to crop image from one dimsenstion to other.<br /><br />For example from position 50,50 to 100,100 (like position of axis of arithmetic).]]></description>
            <author>Mikee</author>
            <pubDate>Sat, 13 Feb 2010 03:17:00</pubDate>
        </item>
        <item>
            <title>Problem with resize</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3739</link>
            <description><![CDATA[<i>by Jacek, 1 month ago<br />2 replies, last reply 4 weeks, 1 day ago</i><br /><br />Hello,<br /><br />I have problem with resize or rotate etc.. Upload work fine, rename also. <br /><br />My log:<br /><i>system information<br />- class version : 0.29<br />- operating system : Linux<br />- PHP version : 5.2.9<br />- GD version : GD not present<br />- supported image types : none<br />- open_basedir : no restriction<br />- language : en_GB<br />source is an uploaded file<br />- upload OK<br />- file name OK<br />determining MIME type<br />- Checking MIME type with Fileinfo PECL extension<br />    Fileinfo PECL extension not available<br />- Checking MIME type with UNIX file() command<br />    MIME type detected as image/jpeg by UNIX file() command<br />- MIME validated as image/jpeg<br />source variables<br />- You can use all these before calling process()<br />    file_src_name : brak.jpg<br />    file_src_name_body : brak<br />    file_src_name_ext : jpg<br />    file_src_pathname : /tmp/phpcmSFzf<br />    file_src_mime : image/jpeg<br />    file_src_size : 34017 (max= 2097152)<br />    file_src_error : 0<br />process file to /var/www/html/test/class_upload/test/<br />- file size OK<br />- file mime OK : image/jpeg<br />- new file name body : image_res<br />- file name safe format<br />- destination variables<br />    file_dst_path : /var/www/html/test/class_upload/test/<br />    file_dst_name_body : image_res<br />    file_dst_name_ext : jpg<br />- no image operation, keep extension<br />- checking for auto_rename<br />- destination file details<br />    file_dst_name : image_res.jpg<br />    file_dst_pathname : /var/www/html/test/class_upload/test/image_res.jpg<br />- image_res.jpg doesn't exist already<br />- no image processing wanted<br />- process OK<br />cleanup<br />- delete temp file /tmp/phpcmSFzf</i>]]></description>
            <author>Jacek</author>
            <pubDate>Wed, 10 Feb 2010 09:08:00</pubDate>
        </item>
        <item>
            <title>Resize - Ratio_Y Doesn't seem to work!</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3733</link>
            <description><![CDATA[<i>by Patrick, 1 month ago<br />4 replies, last reply 1 month ago</i><br /><br />Hi Colin,<br /><br />I am using<br /><pre class="code php">if ($handle->uploaded) 
{ // OK - the temporary file has arrived on the server
    $handle->file_new_name_body 	= $new_pic_name;
    $handle->image_resize		= true;
    $handle->image_ratio_y		= true;
    $handle->image_x			= 450;
    $handle->allowed			= array('image/*');</pre><br />very similar to your example but the picture ratio when loaded is not correct - it appears squashed in the vertical - any ideas?<br /><br />Regards.<br />Patrick.<br />PS. I've downloaded the latest version 0.29.]]></description>
            <author>Patrick</author>
            <pubDate>Thu, 04 Feb 2010 11:08:00</pubDate>
        </item>
        <item>
            <title>class.upload.php version 0.29 released</title>
            <link>http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=3732</link>
            <description><![CDATA[<i>by colin, 1 month ago<br />0 replies</i><br /><br /><span class="right"><img width="150" height="100" border="0" align="right" alt="0.29" title="0.29" src="res/sample3.png" /></span>I am pleased to announce the release of the version 0.29 of the script <a href="http://www.verot.net/php_class_upload.htm" >class.upload.php</a>. The class is now compatible with PHP 5.3. MIME detection is stronger, and more documented. Malicious images cannot be uploaded. Check out some <a href="http://www.verot.net/php_class_upload_samples.htm" >demo samples</a>.<br /><br /><b>Version 0.29 changelog</b><br /><span class="small">- added protection against malicious images<br />    - added zip and torrent MIME type<br />    - replaced split() with explode()<br />    - initialise image_dst_x/y with image_src_x/y<br />    - removed <em>mime_fileinfo</em>, <em>mime_file</em>, <em>mime_magic</em> and <em>mime_getimagesize</em> from the docs since they are used before <em>process</em>()<br />    - added more extensions and MIME types<br />    - improved MIME type validation<br />    - improved logging</span>]]></description>
            <author>colin</author>
            <pubDate>Wed, 03 Feb 2010 15:47:00</pubDate>
        </item>
    </channel>
</rss>
