Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
CGI in iw-bin
Freedom
Hi:
TS 6.1
OS: Solaris 2.8
I have a CGI program in iw-bin, a file test operator is used to check a file exist:
if (! -e $arg_in)
The file, which has an absolue path from /iwmnt, can be seen in command line and standalone perl script, but not in the CGI program.
Any ideas?
thanks a lot!
Find more posts tagged with
Comments
nipper
Who does this CGI run as ? it may not have permission to read the directories.
Adam Stoller
Is this a custom menu item? a cgitask in a workflow? or something else?
If it is a custom menu item - please show the entry for it in the ui_custom.xml file.
If it is a cgitask script - please show the command entry for it from the wft.
It would help us (who can't see your program in action in its environment) if you added debugging above the code line you showed which prints out the value of $arg_in - followed by the output from doing an /bin/ls -l of the exact same value.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Freedom
here is the entry in ui_custom.xml
<action-list id="iw.ccpro.filesys.menubar">
<menu id="iw.ccpro.edit.menu">
<link id="cu.report_menu_item.CEOD"
label="CEOD"
description="CEOD"
url="/../iw-bin/wdpro_menu.ipl/transformer.pl"
target="_blank"
operationID="cu.ccpro.CEOD.op">
</link>
I added two lines in the CGI,
my $cmd_str1 = "/bin/ls -l $arg_in";
my $rtn_str1 = `$cmd_str1`;
print FH "The cmd is \"$cmd_str1\"\n ";
print FH "The ls is \"$rtn_str1\"\n ";
output it in the log file, here is what is in the log:
The cmd is "/bin/ls -l /.iwmnt/default/main/german-sites/de.pg.com/WORKAREA/Content/docs/presse/pressemeldungen/03_09_unicef/index.shtml"
The ls is ""
Thanks for your help
Freedom
BTW, i change the command retrun in the CGI code to:
my $rtn_str1 = `$cmd_str1 2>&1`;
I got following error in the log:
The file ls is "/.iwmnt/default/main/german-sites/de.pg.com/WORKAREA/Content/docs/presse/pressemeldungen/03_09_unicef/index.shtml: I/O error
But i can use /bin/ls from the command to list the file
Thanks
Adam Stoller
Try making the indicated change below, running make_toolkit.ipl (or whatever the correct command is in 6.1) and see if this fixes the problem.
<action-list id="iw.ccpro.filesys.menubar">
<menu id="iw.ccpro.edit.menu">
<link id="cu.report_menu_item.CEOD"
label="CEOD"
description="CEOD"
url="/../iw-bin/
iw_cgi_wrapper.cgi/
wdpro_menu.ipl/transformer.pl"
target="_blank"
operationID="cu.ccpro.CEOD.op">
</link>
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com