10 Replies Latest reply on Mar 13, 2008 12:59 PM by (Sean_DeMerchant)

    File list recordset incomplete list

    MoCleveland Level 1
      I've inserted the File List Recordset component in a page that I am trying to list all of the images in a folder.

      I'm not getting any errors when I run the page but, the list that is generated cuts off some of the filenames of the files. Usually the first couple of filenames are correct then it will cut off part of the name and the extension.

      Anyone else have this problem?

      Thanks.
        • 1. Re: File list recordset incomplete list
          Günter Schenk Level 4
          Hi Maurice,

          ADDT´s File List Recordset (respectively the related function) doesn´t truncate file names, so it must be something else -- can you provide a link to that page in question to have us see what might be causing that ?

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: File list recordset incomplete list
            Level 1
            Can you post some examples of the truncations? What platform (Windows or Linux) are you using?
            • 3. Re: File list recordset incomplete list
              MoCleveland Level 1
              Ok, I'm using a windows server running apache 2 and PHP 4.3
              Here is an example of the file list I get: (all are jpg's)

              sevenDayCh008_f.jpg
              sevenDayCh007_f.jpg
              sevenDayCh006_f.jpg
              sevenDayCh005_f.jpg
              sevenDayCh004_f.jpg
              sevenDayCh003_f.jpg
              sevenDayCh002_f.jpg
              sevenDayCh001_f.jpg
              saigonFinal02_f.jpg
              saigonFinal01_f.jpg
              mayfieldLofts018_f.
              mayfieldLofts017_f.
              mayfieldLofts016_f.
              mayfieldLofts015_f.

              As you can see it cuts off the file extension but leaves the period but thats not consistent either sometimes it cuts off more of the name.

              Is there a PHP setting that could be causing this?
              • 4. Re: File list recordset incomplete list
                Günter Schenk Level 4
                Hi Maurice,

                --------
                Ok, I'm using a windows server running apache 2 and PHP 4.3
                --------

                Not sure if this does cause your issue, but the ADDT system requirements say that PHP 4.4.0 or later is required.

                Cheers,
                Günter Schenk
                Adobe Community Expert, Dreamweaver
                • 5. Re: File list recordset incomplete list
                  MoCleveland Level 1
                  Ahh, that could be it. I'll have to upgrade and see if the problem persists.

                  Thanks.
                  • 6. Re: File list recordset incomplete list
                    Günter Schenk Level 4
                    Maurice,

                    how many chars did you define for the column that´s holding the image names ?

                    Cheers,
                    Günter Schenk
                    Adobe Community Expert, Dreamweaver
                    • 7. Re: File list recordset incomplete list
                      MoCleveland Level 1
                      OK, I just finished upgrading to PHP 4.4.7 and it didn't fix the problem.

                      I'm not sure what you mean by how many chars did I define for that column. I'm not using a table to display the data and its a fake recordset so how do I define the number of char in a column?

                      Thanks.
                      • 8. Re: File list recordset incomplete list
                        Günter Schenk Level 4
                        -----
                        I'm not using a table to display the data and its a fake recordset so how do I define the number of char in a column?
                        -----

                        I just thought you´d store the file names in some table column.

                        It´s indeed weird that the filename truncation seems to start after exactly 19 chars -- is this reprodicable for all file names ?

                        Cheers,
                        Günter Schenk
                        Adobe Community Expert, Dreamweaver
                        • 9. Re: File list recordset incomplete list
                          MoCleveland Level 1
                          I tried moving the files to a different folder and it displayed them correctly.

                          The folder that doesn't work properly is 5 levels deep, I wonder if thats the problem. (ie. /folder1/folder2/folder3/folder4/folder5 )

                          The folder that did work is only 2 levels deep.
                          • 10. Re: File list recordset incomplete list
                            Level 1
                            Some software (actually lots on Windows and not so much on Unix/Linux boxes) that I have run into over the years has 256 character limits on paths which has some relation to operating system libraries.

                            This should not be an issue w/ PHP, but it could be due to the usage of system libraries. How many characters long are the paths? Can you share some of the full paths?

                            Here I would go with Gunter and seriously suggest checking your database configuration for the table. You cannot use a VARCHAR for paths over 255 characters long in MySQL and you should instead use a TEXT type datatype for strings over 255 characters which could potentially truncate them.

                            The following info is extracted for reference on TEXT type sizes. Please refer to the correct manual version for your version of MySQL.

                            Extracted From: http://dev.mysql.com/doc/refman/5.0/en/string-type-overview.html

                            TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]

                            A TEXT column with a maximum length of 255 (28 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TINYTEXT value is stored using a one-byte length prefix that indicates the number of bytes in the value.

                            TEXT[(M)]

                            A TEXT column with a maximum length of 65,535 (216 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TEXT value is stored using a two-byte length prefix that indicates the number of bytes in the value.

                            An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest TEXT type large enough to hold values M characters long.

                            MEDIUMTEXT

                            A TEXT column with a maximum length of 16,777,215 (224 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each MEDIUMTEXT value is stored using a three-byte length prefix that indicates the number of bytes in the value.

                            LONGTEXT

                            A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 1) characters.