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)
Change History (7)
Changed 17 years ago by
Attachment: | FCKeditor-connector.cgi_dos.png added |
---|
Changed 17 years ago by
Attachment: | connector.cgi.tar.gz added |
---|
comment:1 Changed 17 years ago by
Component: | File Browser → Server : Perl |
---|
comment:2 follow-up: 3 Changed 17 years ago by
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 Changed 17 years ago by
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:
- 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.
- change linefeeds in affected files from dos style (CRLF) to unix style (LF).
dos2unix -bdv connector.cgi upload.cgi
- 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
Attachment: | editor_filemanager_connectors_perl.tar.gz added |
---|
"connectors/perl" folder archive with properly setup not activated cgi files
comment:4 Changed 16 years ago by
Keywords: | Confirmed added; Pending WorksForMe removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This one has been fixed with #1667.
screenshot with xml error