LiveZilla Live Help

Knowledgebase

cgi-Bin 500 Internal Server Error

The "500 Internal Server Error" is likely to be the most common error message you will see while debugging your scripts. Unfortunately, it is also a very generalized error message, which reveals little other than that there is some problem with the script.

To locate the problem or problems, a systematic approach is needed. First and foremost, you should take care to always do the following: If you are uploading the script to your server via FTP, always make sure you have done so in ASCII format.

If your FTP client autodetects, make sure it knows that .cgi and .pl files are ASCII files. Uploading in BINARY format will cause problems.

Make sure the first line of your script is the path to Perl, and that it is correct.

It should look like:
#!/bin/perl
which is the path to Perl 5.

If you are still getting the 500 error you can get the web server to send the reason for the error to your browser by using the CGI::Carp module.

Enter the line:
use CGI::Carp qw(fatalsToBrowser);
after the #!/bin/perl line.

When the script encounters an error, you will get a message like,
"Software error: Error description at .script.pl line 6."
which will give you the location of the line containing the error.

Other points

When debugging a program you will generally need to place print statements in strategic locations, to see how the flow of the program is working. You might add one inside an if/then statement for instance, so that you can see if the statement is being evaluated as true or false.

Problems sending email from scripts

If your cgi scripts need to send email from the server they need to be configured to use the Easyspace mail program 'easymail'. The reason for this is that we do not support direct sendmail access.

This means that where your script requires the path to sendmail or $mailprog for easymail this should be entered as:
/bin/easymail

Easymail requires that a valid email address is submitted to make up the From: email header, if your script runs OK but no message is sent it will normally be because the email address used as the From: email address is not valid.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Email Error Messages (Views: 352)
Time Out Errors (Views: 319)

Powered by WHMCompleteSolution

Language:

Quick Navigation

Search



We cater all kinds of hosting needs from individual Web Hosting, Virtual Server Hosting to Dedicated Servers for individuals, medium scale and corporate entrepreneurs. Econs is also offering remote server management services and hosting consultancy to other hosting service providers and ISPs in Pakistan and different countries.

Website designing and development
Now a days almost no business can survive and perform well without a good looking profiessional website. If you are spending a lot on marketing of your business but donot have a proper professional website you are bound to get losses. For this reason Econs provides for its clients not only the hosting facility but also the facility of professional website deisgning and development. Econs is a leading web design and development company not only in pakistan but all across the world. During the past one year Econs has completed and delivered around 500 web deisgning/development projects. With Econs you can be sure to get best quality work done within less time. We mostly use php/mysql combination for website development. So no matter if you need a shopping cart, blog, or any other kind of static or dynamic websites developled for you, Econs is the right place for you.

Search Engine Optimization
As an Internet marketing strategy, SEO considers how search engines work and what people search for. Optimizing a website primarily involves editing its content and HTML coding to both increase its relevance to specific keywords and to remove barriers to the indexing activities of search engines. Sometimes a site's structure (the relationships between its content) must be altered too. Because of this it is, from a client's perspective, always better to incorporate Search Engine Optimization when a website is being developed than to try and retroactively apply it. To run a successfull website you need good Search Engine Optimisation (S.E.O). With good SEO you can reduce your marketing expenditure to half or even lower. We also provide this service to our clients with great success.

Domain registration
We provide domain registration service to our client on very low rates which are competitive and economical. We also provide single domain purchase facility as well as bulk purchasing.

Merchants Accounts & Credit cards processing
Econs can help you acquire your own merchant account and with which will be able to process merchant accounts online. Our solutions range from as low as $200 up to $2000 which include US company incorporation services along with your own bank account [ Not available for all countries ].

Corporate mail solutions
Electronic mail is an excellent means of communication in the 21st century. Customers can host their e-mail servers on our infrastructure, managed around the year, round the clock with unsurpassed quality, scalability and reliability. Easy POP3 access, using any e-mail client to send/receive emails from any location in the world.

Co-location of mail servers
We also provide the facility of co-location to our clients. Customer can host his mail server with us and forget about its running/maintenance and backup support. Econs has the capability to provide you uninterrupted service 24 hours a day, 7 days a week.

Shared & Dedicated web/mail servers
We provide for all Large and medium sized organizations who market their brands nationally and internationally and needs to display their products & information in any virtual store around the world web. It is ideally suitable for those organizations that need to spend their resources towards more productive assignments, instead of managing their web/mail & e-commerce related services that requires constant and secure management round the clock, and they can utilize their human resources and finances to other more productive tasks.