I recently migrated to a new hosting company. I am pretty new to linux and apache as far as configuration is involved. I can't execute a binary CGI script on the new server. I get a 500 server misconfiguration when trying to execute the script and in the erro log i get: "End of script output before headers" Our old server used the programming language HTML OS by aestiva which uses binary compiled CGI scripts to operate. Things I have tried:
- Permissions - all permissions are set to 755, other simple cgi scripts run fine with the same permissions
- writing a simple GCI sript - executes just fine even in the same directory
- disabling and enabling selinux
- running the script from command line i get this error "Unrecognized character \x7F in column 1 at asetup476.cgi line 1"
Anyways, here are the specs:
OLD SERVER
easy Apache 3 2.4.25(Unix)
perl v5.10.1
NEW SERVER
easy Apache 4 2.4.29(cPanel)
perl v5.10.1
the file structures are completely different between easy Apache 3 and 4 so are the httpd.conf files so copying over the conf files probably wont work. My hosting provider asks me to make sure the files are uploaded with ASCII but this is a binary compiled file so that will render it unusable. I am new to this so I am sorry if there is not enough info, I will provide whatever you need if you are attempting to help. Any help is very much appreciated! here is the cgi script I am trying to run: file
EDIT possible cause, I have found out that my old server supports 32 bit CGI executable and my new server possibly does not. command line test:
readelf -h $(which init) | grep "Class"
returned:
Class: ELF64
I hope this sheds some light, anyone know how to add 32 bit support to CentOS linux?
SOLVED enabling 32 bit support for centOS linux did the trick:
yum install glibc-devel.i686