Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ctl command calls in tpls using iwgen
Sunil Mugalavally
I seem to notice that the system() calls don't execute in TS 5.5.2 in presentation templates while generate where as it works on regenerate.
This used to work fine in TS 5.0.1
The system call here executes a .vbs
Does any body have any idea about this.
Find more posts tagged with
Comments
Migrateduser
I am assuming since you are running vbs you are using windows.
Can you generate the file from the command line?
It may be a case of the system running out of resources in its process space. Since the generate is usually a cgi that spawns another process there could be a limit there. Another possibility is lack of access or user permissions. Do you see any errors in the TeamSite logs, or in the webserver logs?
Does you vbs run at all, or does it just not complete what it needs to do? Is the environment properly available for the vbs? (Perhaps the manner that a generate vs. a preview is called results in a different environment set up) Can you run other non-VBS external programs within the template?
Sunil Mugalavally
Yes, I am on windows.
I am able to generate the file from command line.
Well, I don't see any errors in the Teamsite logs or web server logs.
Actually the vbs doesn't run while generate while it executes on regenerate. So this tells me that the environment is set up to run vbs through cscript.exe.
I just tested some perl code which uses 'use LWP::UserAgent;'
and 'use HTTP::Request;'
The HTTP::Request object is used to request a web page. Even here this doesn't work on a generate while it works on a regenerate.
Is it a issue wit perms??
Migrateduser
What command are you using to generate or regenerate?
iwgen and iwregen? Or iwpt_compile.ipl?
If you generate the same file again, does it run? (i.e. if instead of using the regenerate command, you use the generate command and specify an existing name.)
Have you tried running iwpt_compile.ipl with the -ocode option? This will generate a script that you can run that may shed some additional light on why it doesn't work.
Sunil Mugalavally
I used the iwgen, and iwpt_compile.ipl with -ocode and -ofile arguments to generate the file.
If i generate the same file again, it changes the time stamp. This tells me that it has run. But in any case the calls to external programs never execute.
Also here is some code below which uses the HTTP::Request object to GET a web page.
use LWP::UserAgent;
use HTTP::Request;
open(FILE, ">c:/iw-home/tmp/test.txt");
my $user_agent = LWP::UserAgent->new();
my $request;
if ( $request = $user_agent->request( HTTP::Request->new("GET", "
http://www.yahoo.com")
) )
{
if ($request->is_success) {
#yahoo!!!
print FILE "yahoo!!!";
} else {
# bummer :-(
print FILE "bummer !!!";
}
}
close (FILE);
The code fails to executes on a generate from (generate button in DCT as well as iwgen command line) but succeeds when i regenerate (file->Regenerate Page).
I am wondering if any out of process calls never execute in 'iwgen' generate.
Hope this info helps.
Thanks