Opened 18 years ago
Closed 18 years ago
#662 closed Bug (fixed)
Perl CGI samples are broken
| Reported by: | Owned by: | Wojciech 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 (3)
Change History (9)
comment:1 Changed 18 years ago by
| Reporter: | changed from Martin Kou to barts@… |
|---|
comment:2 Changed 18 years ago by
| Component: | General → Server : Perl |
|---|
comment:3 Changed 18 years ago by
| Keywords: | Confirmed HasPatch added |
|---|---|
| Version: | → SVN |
comment:4 Changed 18 years ago by
| Keywords: | Review? added; HasPatch removed |
|---|---|
| Owner: | set to Wojciech Olchawa |
Changed 18 years ago by
| Attachment: | 662_2.patch added |
|---|
comment:5 Changed 18 years ago by
| Keywords: | Review+ added; Review? removed |
|---|---|
| Milestone: | → FCKeditor 2.6 |

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.