httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene <httpd.subscr...@infosatgeomatica.com>
Subject Re[2]: [users@httpd] Execution of a CGI --> creates a new window on "Windows XP"
Date Tue, 21 Sep 2004 18:34:00 GMT
Hello Pat, tell the truth I never used perl like executable. It was always
running with Apache. In your case when apperas new window, your script
just calls the parser application perl.exe. But application didnt
do nothing with your script. I think maybe your perl module is configured
incorrectly.
I use this in my httpd.conf on Windows (XP and also 2003):
LoadFile "C:/server/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
...
<IfModule mod_perl.c>
PerlRequire "C:/server/apache2/conf/startup.pl"
# for ModPerl::Registry scripts
Alias /perl/ "C:/server/apache2/perl/"
<Location /perl>
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
</Location>
</IfModule>

Thats all that you need to run perl on your machine with Apache.
To test if the parser works (maybe something damaged physically), you
can try this O'Reilly's example:
#!perl -l
print       "start main running here";
die         "main now dying here\n";
die         "XXX: not reached\n";
END         { print "1st END: done running"   }
CHECK       { print "1st CHECK: done compiling" }
INIT        { print "1st INIT: started running"  }
END         { print "2nd END: done running"   }
BEGIN       { print "1st BEGIN: still compiling" }
INIT        { print "2nd INIT: started running"  }
BEGIN       { print "2nd BEGIN: still compiling" }
CHECK       { print "2nd CHECK: done compiling" }
END         { print "3rd END: done running"   }

To run it you should call it from your CMD.exe, or from the *.bat
file:
perl C:/location/of/this/script/script.pl
Dont forget to configure properly path to the script.
You can also enter all this and run just in cmd.exe terminal, if
you wish.
If this script works then the problem is with your Apache configuration.

Hope this helps.



Tuesday, September 21, 2004, 9:25:43 AM, you wrote:

> Eugene wrote:

> Thanks  Eugene,


> In fact, the Perl bin path was in the PATH env. variable!
> I tried to  adjust the #! line with the full path of Perl (and use -w
> perl option ) but I still have a new window created, but the title is
> "c:\Perl\bin\perl.exe".

> I've also tried to use "start ..." or "cmd ...", or my script `TT.pl`
directly ->> the title of the window changes ("xxxx\system32\cmd.exe) 
> but  the window is always created!

> Thanks

> Pat.

>>Hello Pat, try to put the path to your Perl/bin in the PATH Environment
>>Variable: C:\server\Perl\bin (for example) or
>>My computer->Properties->Advanced->Environment Variables->Path
>>Add there your perl/bin location.
>>CMD.exe its Windows command line interface (almost like terminal on
>>Linux8-)(dont kill me for that comparison)) When there is no
>>associated with your executables parsers - Windows calls this command
>>interface all the time. If you dont want to change your $PATH then
>>replace #!perl string in your script with
>>#!C:\path\to\your\perl-bin directory\perl. I suggest to use also 'perl -w' instead
>>of just 'perl' especially on Windows.
>>
>>Monday, September 20, 2004, 7:43:15 AM, you wrote:
>>
>>  
>>
>>>Hi,
>>>    
>>>
>>
>>  
>>
>>>I was using Apache V2.0.50-win32-x86, on Windows 98 without any problem
>>>but I encountered the following problem on "Windows XP".
>>>    
>>>
>>
>>  
>>
>>>To summarize, I have a cgi script written in Perl, that calls other
>>>scripts or programs  (see   script example below):
>>>when I run this script from Windows XP Internet Explorer, a new empty
>>>window appears with title "C:\WINDOWS\SYSTEM32\CMD.EXE'.
>>>(this was not the case on Windows 98, neither on Linux).
>>>Why does this window appear?
>>>Is it due to the way I am calling the script (I tried  START "" /B  perl
>>>TT.pl     without any success!!)
>>>Is it due to my configuration file?
>>>    
>>>
>>
>>  
>>
>>>The result is OK but this is really unconfortable because my application
>>>calls cgi script very often.
>>>    
>>>
>>
>>
>>  
>>
>>>Many thanks,
>>>    
>>>
>>
>>  
>>
>>>Pat.
>>>    
>>>
>>
>>
>>  
>>
>>>PS:
>>>Example of scripts : (running AC.cgi leads to open a new empty window !!)
>>>    
>>>
>>
>>  
>>
>>>1/ CGI script (AC.cgi)
>>>    
>>>
>>
>>  
>>
>>>#!perl
>>>print "Content-type: text/html\n\n\n";
>>>print "IN AC \n";
>>>@TAB = `perl TT.pl`;                                      ##### I tried
>>>to use START "" /B  perl TT.pl     without any success!!
>>>print @TAB;
>>>print "END AC \n";
>>>    
>>>
>>
>>  
>>
>>>2/ called Perl program (TT.pl)
>>>    
>>>
>>
>>  
>>
>>>#!perl
>>>print "IN TT \n";
>>>sleep 2;
>>>print "END TT \n";
>>>    
>>>
>>
>>
>>
>>
>>
>>
>>  
>>
>>>---------------------------------------------------------------------
>>>The official User-To-User support forum of the Apache HTTP Server Project.
>>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>For additional commands, e-mail: users-help@httpd.apache.org
>>>    
>>>
>>
>>
>>
>>  
>>



> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



-- 
Best regards,
 Eugene                            mailto:httpd.subscribe@infosatgeomatica.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message