Problem Uploading a File Whose Filename Contains an Apostrophe

Last post 08-22-2011, 10:32 AM by LenJacobson. 4 replies.
Sort Posts: Previous Next
  •  08-16-2011, 8:58 PM 69589

    Problem Uploading a File Whose Filename Contains an Apostrophe

    I have encountered two bugs pertaining to the attempt to upload a file whose filename contains an apostrophe.
     
    1. The "progress" message that appears during the upload process  and the display of the filename with the green checkmark after the file has been uploaded both display a double-quote instead of the apostrophe.  For example, if the filename is "Dan O'Connor.jpg", one sees

           Dan O"Connor.jpg

      in these messages.

    2. On my (PC-based) test server, the file is uploaded with the correct filename:  Dan O'Connor.jpg

      On the (Linux) production server, the file is uploaded with the filename:  'Connor.jpg.  That is, the first characters of the filename, "Dan O", are simply dropped.

    Is this a known bug?  Is there a way to avoid these problems?
  •  08-17-2011, 8:09 AM 69641 in reply to 69589

    Re: Problem Uploading a File Whose Filename Contains an Apostrophe

    Hi LenJacobson,
     
    We are investigating this issue, once issue is resolved, I will keep you posted.
     
    Regards,
     
    Ken
  •  08-17-2011, 10:03 AM 69648 in reply to 69641

    Re: Problem Uploading a File Whose Filename Contains an Apostrophe

    Ken,
     
    I did some searching on the web for this issue and came up with a very good discussion.  Please see:
     
     
    Using the information in this article, I checked the value of 'magic_quotes_gpc' on both my test server and my production server.  The test server value was 'off' while the production server value was 'on'.
     
    When I changed the value of 'magic_quotes_gpc' on my test server to 'on', the (almost) identical truncation of the file name occurred.  The only difference was that on the production server, the truncation of the filename stopped just before the apostrophe, resulting in the uploaded file having a filename of 'Connor.jpg.  On the test server, with 'magic_quotes_gpc = on', the trucation INCLUDED the apostrophe, resulting in the uploaded file having a filename of Connor.jpg.
     
    (I have encountered other examples of my PC-based test server treating apostrophes different from my Linux-based production server.  So that's not an issue for me.)
     
    Bottom line is that it would appear that this "bug" is caused by the setting of 'magic_quotes_gpc' on my production server.
     
    I then turned to my production server and modified the 'magic_quotes_gpc' setting, turning it to 'off'.  Thereafter, files whose filename included an apostrophe uploaded with no problem (other than the misleading display of the filename with the double-quote rather than the apostrophe).
     
    The PHP manual for 'magic_quotes_gpc' says that this setting will be deprecated in PHP 5.3.  I know that it wasn't, since my two test servers use that variable and they are running PHP 5.3.5 and 5.3.6.  But I do understand that it will soon be deprecated.  I am not certain what that effectively means for your code or mine.
     
     
    Questions
     
    1. Do you intend to pursue this issue?
    2. Will I be notified of any changes to your code?
    3. Will you be pursuing a fix for the misleading display of the filename with the double-quote instead of the apostrophe?
     
    Thank you very much.
  •  08-22-2011, 1:53 AM 69751 in reply to 69648

    Re: Problem Uploading a File Whose Filename Contains an Apostrophe

    Hi LenJacobson,
     
    We have fixed this issue, please download the latest version and try again.
     
    Latest version downloads http://cutesoft.net/downloads/folders/52443/download.aspx
     
    Regards,
     
    Ken
  •  08-22-2011, 10:32 AM 69759 in reply to 69751

    Re: Problem Uploading a File Whose Filename Contains an Apostrophe

    Thanks very much, Ken.  It works fine now.
View as RSS news feed in XML