Can't compare two .htaccess files anymore

Can't compare two .htaccess files anymore

2
NewbieNewbie
2

    Nov 11, 2016#1

    I'm using UC from Dreamweaver to compare local with remote files. Works since many years just fine. Just now (must have been introduced in one of the latest updates) it does not work anymore with .htaccess files. The remote file is downloaded for comparison, but it's always empty. The downloaded file is a 0 byte file, although on the server it is - for testing purposes - the same file as locally. All other file extensions I tried work as they did before.

    My System:
    Windows 10-64
    UC Version 16.00.0.44

    6,603548
    Grand MasterGrand Master
    6,603548

      Nov 12, 2016#2

      First a small introduction on differences in file name interpretation between Windows and Unix/Linux/Mac OS X.

      On Windows everything left of last point in name of a file is interpreted as file name and everything right of last point as file extension whereby the last point itself is sometimes added to file extension and sometimes not. .htaccess is for example interpreted on Windows by Windows command interpreter (cmd.exe) as file with no file name with file extension .htaccess.

      On Unix/Linux/Mac OS X a directory/file starting with a point is treated as hidden directory/file as there is no hidden attribute on Unix/Linux file systems like existing for Windows file systems. So for Unix/Linux the file .htaccess is a file with file name .htaccess with no file extension being a hidden file.

      The general file name evaluating functions written by me interpret also .htaccess as name of a file which has .htaccess as file name and no file extension.

      I used 32-bit UltraCompare Professional v16.00.0.44 on Windows 7 SP1 x64 and ran a text comparison with on left side specifying a .htaccess file downloaded from a Unix server using FTP with path and file name entered directly in text comparison window and on right side specifying a local .htaccess with path and file name also entered directly. This text comparison worked fine. The .htaccess file downloaded with FTP using passive transfer mode because of firewall blocking data channel establishment from Unix server to my Windows machine was completely displayed in UltraCompare.

      Next I entered -al in edit field LIST Command Filter on tab Server in FTP/SFTP Account Manager to get later also hidden directories/files listed. On this tab there is also Passive Transfers (for firewalls) which was checked already as otherwise I would not get any data from FTP server.

      I closed the current text comparison session and started a new one. This time I used the button Open from FTP on left side to open the FTP Open dialog, clicked on button Open First, selected the file .htaccess being visible because of list command option -al configured before and opened the file. Then I opened wit button Open on right side also the local .htaccess and ran the text comparison. It worked again without any problem.

      Last I executed from with a command prompt window with current directory being program files directory of UltraCompare the command

      Code: Select all

      uc -t "FTP::AccountName\/www|.htaccess" "C:\Temp\Test\.htaccess"
      This command line resulted in starting uc.com as being the first file matching the file name search pattern uc.* and having a file extension defined in environment variable PATHEXT found in current directory or any directory defined in environment variable PATH which on my computer does not contain the UltraCompare program files directory because I removed it with a batch script automatically after every installation of UC. uc.com passed the parameters to uc.exe which successfully downloaded the file .htaccess from server, compared it with the local .htaccess and displayed both files. After exiting UltraCompare Professional also uc.com terminated.

      So either you have not configured UltraCompare good in Dreamweaver, or your FTP account is not good configured (passive transfer, list hidden files), or your FTP server blocks any remote access on for security critical file .htaccess at least for the user account configured in FTP/SFTP account manager of UC for this FTP/SFTP account.

      I suggest to enable in File - Settings - FTP (Ribbon Mode) respectively Options - Configuration - FTP (Toolbar/Menu Mode) the setting Show FTP log in output window, run the comparison and look on FTP log in output window if there is a line with a hint what could be the reason for getting always an empty .htaccess file displayed.
      Best regards from an UC/UE/UES for Windows user from Austria