Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   500 internal server error (http://www.go4expert.com/forums/500-internal-server-error-t5716/)

ibrahimsyde 6Aug2007 21:38

500 internal server error
 
Hello guys,
I have recently moved complete site which was build using php,cgi and pl files. After migrating the files i am getting this error.

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@xanam.co.uk 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.

I have tried setting executing permission but still don't work.

Your help on this would be much appreciated.
Many thanks in advance.

Regards
Ibrahim

pradeep 7Aug2007 10:35

Re: 500 internal server error
 
Check the file type, whether its a file with UNIX line endings or with Windows line endings!

ibrahimsyde 7Aug2007 15:11

Re: 500 internal server error
 
Quote:

Originally Posted by pradeep
Check the file type, whether its a file with UNIX line endings or with Windows line endings!

Hi there,
File Type: perl script text executable.
This is what I could see in their FTP control panel. if this is not you want me to check then please guide me how to find the files file type.
thanks for your help

pradeep 7Aug2007 16:25

Re: 500 internal server error
 
Download EditPlus from www.editplus.com, install it and then open your file in that it'll show either UNIX or PC in the status bar...! Easy aint it?

ibrahimsyde 7Aug2007 16:35

Re: 500 internal server error
 
hi there,
thanks for the software link, Yes it says PC.

pradeep 7Aug2007 17:34

Re: 500 internal server error
 
So, you'll have to convert it to UNIX to run it on an Unix server, where '\n' is the line ending character.

ibrahimsyde 7Aug2007 17:43

Re: 500 internal server error
 
thanks pradeep,
is this a problem with every windows files running on unix servers? or this has got only to do with the cgi-perl script pages?
am sorry how can i convert these files to make it work on unix servers please?

ibrahimsyde 7Aug2007 17:47

Re: 500 internal server error
 
#!/usr/bin/perl

every page has this tag so i guess this is what you meant by converting into unix compatible ?

pradeep 7Aug2007 17:49

Re: 500 internal server error
 
Some Unix servers are configured to auto-detect file endings! Scripts cause problems when they have wrong line-endings!
Open a new file in EditPlus, goto Document>File Format and select Unix and then copy-paste the contents of the file which you would like to convert and then save it!

ibrahimsyde 7Aug2007 17:58

Re: 500 internal server error
 
thanks again, i have changed the file type to unix, then uploaded to the server, it still gives the same error message as above. i dont have any clue why is it behaving like this. although this cgi file has 755 permission.


All times are GMT +5.5. The time now is 11:39.