Ticket #662 (closed Bug: fixed)
Perl CGI samples are broken
| Reported by: | barts@… | Owned by: | w.olchawa |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6 |
| Component: | Server : Perl | Version: | SVN (FCKeditor) - Retired |
| Keywords: | SF Confirmed Review+ | Cc: |
Description
Each of the _samples/perl/sample*.cgi programs includes code to override the value of $BasePath. The value for the override is computed by manipulating $ENV{'PATH_INFO'}, but it ought to be manipulating $ENV{'REQUEST_URI'} instead.
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1208788&group_id=75348&atid=543653
Attachments
Change History
comment:3 Changed 5 years ago by w.olchawa
- Keywords Confirmed HasPatch added
- Version set to SVN
Hi!
I've encountered a problem in the perl examples as well. The GetServerPath function didn't find a correct server path and as a result I couldn't load the editor. Changing $ENV{'PATH_INFO'} to $ENV{'REQUEST_URI'} solve the problem. I'm not a perl expert but I think the function should be changed according to you suggestions. So the GetServerPath function would be:
sub GetServerPath
{
my $dir;
if($DefServerPath) {
$dir = $DefServerPath;
} else {
if($ENV{'REQUEST_URI'}) {
$dir = $ENV{'REQUEST_URI'};
} elsif($ENV{'FILEPATH_INFO'}) {
$dir = $ENV{'FILEPATH_INFO'};
}
}
return($dir);
}
Thank you for investigating and enjoy working with FCKeditor.
Best regards.
comment:4 Changed 5 years ago by w.olchawa
- Keywords Review? added; HasPatch removed
- Owner set to w.olchawa
comment:5 Changed 5 years ago by wwalc
- Keywords Review+ added; Review? removed
- Milestone set to FCKeditor 2.6
Changed 5 years ago by w.olchawa
- Attachment 662_3.patch added
Corrected little mistakes in _whatsnew.html
