Opened 17 years ago

Closed 16 years ago

#1408 closed Bug (fixed)

connector.cgi (perl) throws xml error with dos style CR-LF newlines

Reported by: Friedrich Strohmaier Owned by:
Priority: Normal Milestone:
Component: Server : Perl Version: FCKeditor 2.5 Beta
Keywords: Confirmed Cc:

Description

connector.cgi throws errors with dos style CR-LF newlines and without the x-bit set as it is bundled in the tar.gz archive.

Screenshot and working file attached in tar.gz archive

Attachments (3)

FCKeditor-connector.cgi_dos.png (18.8 KB) - added by Friedrich Strohmaier 17 years ago.
screenshot with xml error
connector.cgi.tar.gz (1.6 KB) - added by Friedrich Strohmaier 17 years ago.
editor_filemanager_connectors_perl.tar.gz (9.6 KB) - added by Friedrich Strohmaier 17 years ago.
"connectors/perl" folder archive with properly setup not activated cgi files

Download all attachments as: .zip

Change History (7)

Changed 17 years ago by Friedrich Strohmaier

screenshot with xml error

Changed 17 years ago by Friedrich Strohmaier

Attachment: connector.cgi.tar.gz added

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Component: File BrowserServer : Perl

comment:2 Changed 17 years ago by Wojciech Olchawa

Keywords: Pending WorksForMe added; connector.cgi removed

Hi!

I'm not sure if I have understood your bug and if the attached file (connector.cgi) is the one you are using. If it isn't could you please give me more details about the bug. If the attached file is the file you are using you should uncomment or delete this line:

&SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/connector.cgi" file' ) ; (line 65)

and than the connector should work properly.

But again I'm not sure that I have understood the problem correctly so please let us know.

Best regards.

Tested using XAMPP for Windows 1.6.4, Perl 5.10 and FCKeditor SVN version

comment:3 in reply to:  2 Changed 17 years ago by Friedrich Strohmaier

Replying to w.olchawa:

Hi,

I'm not sure if I have understood your bug and if the attached file (connector.cgi) is the one you are using. If it isn't could you please give me more details about the bug.

First of all: I'm running a debian linux server, using the apache2 webserver and perl 5.8.8

If the attached file is the file you are using you should uncomment or delete this line:

> &SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/connector.cgi" file' ) ; (line 65)

and than the connector should work properly.

right, it _should_, but it won't :o))

Let's take the most recent package FCKeditor_2.6b.tar.gz

Extracting it by

tar -xzf FCKeditor_2.6b.tar.gz

results in a additional directory

fckeditor

now let's dive to the affected scripts connector.cgi and also effected upload.cgi

cd fckeditor/editor/filemanager/connectors/perl/

ls -l *.cgi
-r--r--r-- 1 www-data www-data 3621 2008-02-25 19:06 connector.cgi
-r--r--r-- 1 www-data www-data 3094 2008-02-25 19:06 upload.cgi

I have to perform the following steps to get it run:

  1. give files and current directory permission to be executable and writeable
    chmod -c u+wx connector.cgi upload.cgi .
    
    ls -l *.cgi
    -rwxr--r-- 1 www-data www-data 3621 2008-02-25 19:06 connector.cgi
    -rwxr--r-- 1 www-data www-data 3094 2008-02-25 19:06 upload.cgi
    

from now on apache2 is allowed to execute connector.cgi upload.cgi, which is _essential_ for delivering the service.

  1. change linefeeds in affected files from dos style (CRLF) to unix style (LF).
    dos2unix -bdv connector.cgi upload.cgi 
    
  2. comment "&SendError ...."

Step 1. is daily work done by an average experienced unix administrator if anything goes wrong with output of executables.

Step 3. _could_ be done after receiving the "correct" error.

_Not_ performing step 2. throws the xml error described above, which don't lead to useful conclusions.

But again I'm not sure that I have understood the problem correctly so please let us know.

I hope things are more clear now.

Tested using XAMPP for Windows 1.6.4, Perl 5.10 and FCKeditor SVN version

Ah I see: With that (Windows-) environment, You won't get the error.

I succeeded create "good" files using notepad++ editor (http://notepad-plus.sourceforge.net/uk/about.php)

Menu format->"convert to unix" (translated from german version).

If You are a vim adict (like me :o))) ":set ff=unix" might help.

I'll append archived perl directory containing properly set uplod.cgi and connector.cgi

Best regards and thanx for catching the bug :o))

Friedrich

Changed 17 years ago by Friedrich Strohmaier

"connectors/perl" folder archive with properly setup not activated cgi files

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added; Pending WorksForMe removed
Resolution: fixed
Status: newclosed

This one has been fixed with #1667.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy