Search code examples
macosapachecasapache-modulesjelastic

ELF Header Error and Building Modules In Apache for Jelastic


So I'm building a web app and I decided to move it from my localhost to Jelastic. The app requires one custom module: mod_auth_cas. I followed the instructions on the Jelastic website for adding a module.

The only step I didn't follow was compiling the module against 2.2.15. I tried configuring that version, but I couldn't figure out how to run it concurrently with the 2.2.24 version my Mac runs natively. I figured that a module that worked with 2.2.24 should work with 2.2.15.

I uploaded the .so file to the Jelastic server and added the following LoadModule command to the httpd.conf file:

LoadModule auth_cas_module /usr/lib64/php/modules/mod_auth_cas.so

and restarted Apache. I got the following error:

Failed to start 
Stopping httpd [ OK ] Starting httpd 
Jelastic autoconfiguration mark httpd 
Syntax error on line 161 of /etc/httpd/conf/httpd.conf 
Cannot load /usr/lib64/php/modules/mod_auth_cas.so into server   
/usr/lib64/php/modules/mod_auth_cas.so invalid ELF header [FAILED]

From the research I did, it seemed as though this error comes when "the installation is 'corrupted' or someone installed something for the wrong processor/binary type."

So I'm trying to figure out what to do. I either need to figure out how to install Apache 2.2.15 and compile a module against that, or I need to figure out what I'm doing wrong on the Jelastic side, or I need to figure out why the .so file is getting corrupted. Which one is it, and how do I do it?


Solution

  • Indeed the problem is the different platforms.

    The module was compiled for the correct platform and installed for you.

    FYI: To use this module we created a cas.conf file in conf.d please open this file and modify accordingly.