View previous topic :: View next topic |
Author |
Message |
usalabs -
Joined: 14 Nov 2005 Posts: 18
|
Posted: Mon Jul 16, 2007 10:00 am Post subject: How do I setup X2 for cgi scripts? |
|
|
I have installed activeperl, and set the interpreter for perl.exe but the only 'type' settings are 'Standard, PHP style, and Activeperl ISAPI', I've tried using perl.exe on standard, (with extensions pl, and cgi) it threw an error 500 at me, when I try to execute a cgi script, the same with PHP style, then I tried the 'perlis.dll with the type 'Activeperl ISAPI' and every cgi script shows:-
Content-type: text/html
'D:\websites\forum\admin\adm.cgi' script produced no output
Is there anything that should go in the MIME section?, such as 'application/x-httpd-pl' and 'application/x-httpd-cgi' for it to work.
I've used PHP sucessfully, without the MIME setting. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Jul 16, 2007 7:32 pm Post subject: |
|
|
PHP already sends the Content MIME Type, while Perl does not. You have to manually tell Perl that it is to be used as HTML. Use "Standard" if you're not using Perl as an ISAPI module.
Example code:
Code: | #!perl
# Sample Perl Script
print "Content-Type: text/html\n\n";
print "Hello, World!"; |
|
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Jul 16, 2007 9:41 pm Post subject: Re: How do I setup X2 for cgi scripts? |
|
|
usalabs,
We strongly recommend that you do not use Perl ISAPI unless you are ready to tweak your scripts to work with it (most scripts will work fine with it but some of them won't unless you modify them).
So we suggest that you install Perl support as explained in http://www.aprelium.com/abyssws/perl.html .
If you receive Error 500, this usually means that your script contains an error (or has a problem). In such a case, inspect the cgi.log file for a detailed error report. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
usalabs -
Joined: 14 Nov 2005 Posts: 18
|
Posted: Tue Jul 17, 2007 2:10 am Post subject: Re: How do I setup X2 for cgi scripts? |
|
|
In my first post I said I had already installed activeperl and configured Abyss as directed from the above site.
aprelium wrote: | If you receive Error 500, this usually means that your script contains an error (or has a problem). In such a case, inspect the cgi.log file for a detailed error report. |
The error 500 is not from any scripts I create, but from professionally created scripts, it doesn't matter what cgi script I try to use. They work perfectly on my friends win2003 IIS6 server, but not on my system using Abyss.
Below is the CGI line of the CGI.log file, showing the error:-
CGI: [C:\Perl\bin\perl.exe installer.cgi ] URI: /trader/installer.cgi Broken pipe
And that was using the 'Standard' type in the scripting settings of Abyss. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jul 17, 2007 10:00 pm Post subject: Re: How do I setup X2 for cgi scripts? |
|
|
usalabs wrote: | The error 500 is not from any scripts I create, but from professionally created scripts, it doesn't matter what cgi script I try to use. They work perfectly on my friends win2003 IIS6 server, but not on my system using Abyss.
Below is the CGI line of the CGI.log file, showing the error:-
CGI: [C:\Perl\bin\perl.exe installer.cgi ] URI: /trader/installer.cgi Broken pipe
And that was using the 'Standard' type in the scripting settings of Abyss. |
The problem here occurs in Perl realm and is not caused by Abyss Web Server. The error 500 you get and the CGI log line mean that Abyss Web Server has launched Perl to run installer.cgi and that Perl failed to output anything (mainly because there is a problem with the script).
The fact that the script is written by a professional does not offer any guarantee about the absence of problems. It could be not well installed or some of its configuration parameters may be wrong.
Try running directly on the command line:
Code: | C:\Perl\bin\perl.exe installer.cgi |
Are there error messages? What output do you get? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
usalabs -
Joined: 14 Nov 2005 Posts: 18
|
Posted: Wed Jul 18, 2007 8:58 pm Post subject: |
|
|
Well, after paying a lot of bucks for a professional server installation engineer, to try and figure out the errors, he tried 50 cgi scripts with various Abyss configurations, and using the same configuration on IIS6, he came to the conclusion that cgi does not work in Abyss, every one of those 50 cgi scripts caused an internal server error, he said "1 or 2, possibily 3 scripts could be bad, but not all 50", he then tried all 50 scripts using IIS6 using the same perl interpreter, and every one of the 50 cgi scripts worked.
I may have discovered a serious flaw in the core of X2. |
|
Back to top |
|
 |
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Wed Jul 18, 2007 9:15 pm Post subject: |
|
|
Are you using an up to date version of Perl and Abyss? Have you followed the instructions on the Aperlium website? _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jul 18, 2007 10:52 pm Post subject: |
|
|
usalabs wrote: | I may have discovered a serious flaw in the core of X2. |
Or you could have discovered a serious flaw in the engineer diagnosis. :-)
Frankly speaking, CGI support has been available since version 1 (release in 2002). Do you think that out of hundreds of thousands of users, no one of them has ever run a CGI script and has never reported that back?
We've tested CGI/Perl and it works fine (we test it with every minor release). Several other members on this forum are Perl guys and use Abyss with CGI/Perl stuff. The fact that all 50 scripts fail to run suggest that you have a configuration problem (and not that Abyss is broken).
So we kindly ask you to provide us with at least one of these scripts and send us your abyss.conf file to check how CGI support is setup. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
usalabs -
Joined: 14 Nov 2005 Posts: 18
|
Posted: Thu Jul 19, 2007 3:19 am Post subject: |
|
|
I have zipped up a folder containing a few scripts that form an entire program, and (for security reasons), I removed certain details (such as usernames, passwords, etc etc) from the X2 config file, and pasted it as an rtf file for attachment.
The 2 files have been emailed to Aprelium |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jul 19, 2007 11:21 pm Post subject: |
|
|
usalabs,
We have reviewed your configuration and it seems that the whole issue was caused by a partially bad declaration of the Perl interpreter: In your configuration you have entered "cgi pl" (C G I <space> P L) as the extension handled by Perl. This is not exactly what you should put there.
So please delete that extension, and enter cgi (C G I) as the first extension, next add pl (P L) as the second one. Do not put them on the same line and at the same time. Otherwise Abyss Web Server will consider that files such as "test.cgi pl" are the only ones to be handled by Perl while "test.cgi" will be ignored and not processed (because ".cgi pl" is different from ".cgi" and ".pl").
So we suggest that you review the extensions part in http://www.aprelium.com/abyssws/perl.html :
Quote: | * Check Use the associated extensions to automatically update the Script Paths.
* Press Add in the Associated Extensions table.
* Enter pl in the Extension field and press OK.
* Press again Add in the Associated Extensions table.
* Enter cgi in the Extension field and press OK.
* Press OK |
(Note that you use the Add button twice and enter an extension, validate it, then enter the second).
We have installed X2, declared Perl as explained in http://www.aprelium.com/abyssws/perl.html, installed your script, and we were able to run it with no problems. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|