English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This code returns an error: 'script produced no output'. Can anyone tell me why?

print "Content-type: text/html\n\n";

if (exists &page_test) { &page_test; }

sub page_test
{
print "test";
}

Note: this is on an IIS server, and yes other code works, but I just cant get code with 'exists' to work.

2007-08-02 06:30:08 · 1 answers · asked by malachi_1616 3 in Computers & Internet Programming & Design

1 answers

I uploaded your exact code to my server, gave the correct path to perl and it worked first time. My server is not IIS.

So your code is fine.

That now leaves the path to perl and server configuration.

Have you contacted your host and reported this? (Is it you?)

Your path to perl is probably ok because you say you've had code working and running already so it must be that the server is not properly configured for CGI, even though it can run some scripts.

So now try renaming the file to .pl and then run it to test.

If that works then the server needs to be configured properly for CGI.

2007-08-02 08:21:30 · answer #1 · answered by E.M.Bed 5 · 0 1

fedest.com, questions and answers