#1408: connector.cgi (perl) throws xml error with dos style CR-LF newlines
----------------------------+-----------------------------------------------
Reporter: bitsfritz | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: Server : Perl | Version: FCKeditor 2.5 Beta
Resolution: | Keywords: Pending WorksForMe
----------------------------+-----------------------------------------------
Comment (by bitsfritz):
Replying to [comment:2 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.
2. change linefeeds in affected files from dos style (CRLF) to unix style
(LF).
{{{
dos2unix -bdv connector.cgi upload.cgi
}}}
3. 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
--
Ticket URL: <http://dev.fckeditor.net/ticket/1408#comment:3>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac