hello.cgi 500 Internal Server Error (DA 1.28.0)

Mark_S

Verified User
Joined
Sep 14, 2006
Messages
67
500 Internal Server Error

This is weired ?
I can only imagine that its down to a recent DA update to 128.0

This first come to light as a client asked for the path to perl.

So i uploaded a hello.pl - hello.cgi

the first line is
#!/usr/local/bin/perl < - Failed
#!/usr/bin/perl <- Failed

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

What is confusing that i have a an old forum that
is is CGI baised and it still runs with out problems.
It does seem to be any new scripts wont work?

Any help would be appreciated,
I'm a noobie,
so if you need more info can you tell where i would find it :)

Thanks Mark.

p.s after a search i have looked for extra headers,
and check the obvious (hopefully).
 
Are you attempting to run these scripts from the web (through a browser)? If so then the problem is NOT in the shebang line; the program should be run by apache.

The best thing to do is watch your site-specific logs while attempting to access the script.

Jeff
 
Yes that correct,
i'm trying to get hello.cgi via IE7
Client is using FF

I dont run any cgi any more on my domain on the server,
so i didnt exactly see when this happend.

But as above i do have cgi forums and there
still working fine (There only there as i upgraded the
forum software to php, so there more for refrence).

I'm not sure what i should be looking for in the server logs,
or which log to look in.

Or which one could give any clues,
you advice would be appreciated.

Thanks Mark.
 
Check the log at:

/var/log/httpd/domains/example.com.error.log

where of course you replace example.com with your domain name.

But since you wrote this:
I dont run any cgi any more on my domain on the server,
so i didnt exactly see when this happend.
you should probably check first to see if CGI is enabled for the domain. You do that in the reseller control panel; first find the username for the domain, then click on the Modify button and look for the CGI atrtibute.

Jeff
 
Ugraded to DA 1.128.1

Sorry for not replying earlier,
ive been testing a few things out.

And it seems that the issue is to do with uploading
via the DA control panel.

If i FTP my hello.cgi it works
but if i upload it via DA Control panel it fails
with the errors in my first post.
chmod = 755

---------------
Advice please.

When i edit Custom HTTPD Configurations and add
Options +ExecCGI

This should allow the CGI SCRIPTS to run out side the cgi-bin folder.

I have this Options +ExecCGI under my domain1
and works ok.

but if i try it under a diffrent account it wont work,
am i missing somthing.

Do i have to restart a service or does it take time to filter
through?

I dont think its ISP lagg times as i can upload a modified
text file and the changes are instant.

Thanks in advance Mark.
 
I'm not sure of the limitations of the custom httpd configurations. You might want to post the whole contents of the custom httpd configuration window.

(If you do, please post it as an attached text file.)

Jeff
 
Sorry i havent got back to you just yet,
i will post back as soon as i can.

Just a quick one :
It was sugessted to me that leaving CGI enabled
is asking for more toruble than its worth,
as it can be heavy on resorses.

Is that true?
 
Everything uses resources. Do you want your clients to be able to run cgi scripts (.pl, .cgi)? If so then you enable it.

If not, you don't.

Jeff
 
Back
Top