cgi (not WE) app not running under Yosemite

We have a cgi app that was built with an older version of RS - 2011r1 or so. It was compiled as a Intel Mac executable, and has been running for several years without problem on a Mac OS X 10.6.8 Server. (It’s a process that gets called by Kagi to dynamically generate and return a license key and also shove it into our database when an order is placed.)

I’m now trying to set it up an a newly-installed Yosemite (not server) machine. We’ve got Apache running on this machine, and are able to serve a web page to the outside world. We’ve modified the httpd.conf file by uncommenting the line “LoadModule cgi_module libexec/apache2/mod_cgi.so”.

The first thing this cgi app does when it’s launched is to create a log file (if necessary), and write to it. If I execute it from a command line, it does this as it should. However, when I call its url (e.g., http://myhost.mydomain.com/cgi-bin/My_App.cgi) from an outside machine or even from the machine itself, Apache doesn’t seem to trigger the app to run.

I’m guessing that this may be due to the newer version of Apache that ships with Yosemite, and that I might have to make some additional changes to httpd.conf, but would appreciate any suggestions.

Oops. One thing I’ve discovered. I am able to run a trivial python cgi script, so perhaps it’s not our Apache cgi configuration…

Since nobody is replying, I guess I’ll keep doing so myself…

In looking through the apache log file, it appears that Apache is trying to run the .cgi as a php script. How do I tell it to just execute it rather than trying to interpret it?

Sorry, not ignoring you, just don’t have a solution.

Firewall perhaps? Maybe Apple are blocking it unless you buy the server app?

I wasn’t suggesting anyone was ignoring me - just always find it amusing when I’m repeatedly posting about my flailing around…

Thanks for the suggestion. I’m pretty sure we’ve got the firewall set up correctly. I’m thinking this is the case as I am able to run a python script (.py) that I made excutable and placed in the same directory.

permissions & / or ownership of the app ?
for apache to run it it would need to be executable by the httpd user I’d think

Thanks, Norman.

I made the app readable, writable, and executable by everybody (just as one of my flails). I’ve also made apache run under the standard “_www” account and group, as well as by the user/group of the administrative account that currently owns the app and lib folder. I even tried code signing them both just in case Yosemite requires that - still no joy :frowning:

I assume its in the right location for a cgi executable ?

Yes; it is, and I am able to run a Python cgi script in the same directory. That file has the same ownership and permissions as the CGIApplication…

whats its name ?
and do you have an explicit add handler in the httpd.conf for it ?

I think I’ve got it! I had to add

Options ExecCGI

to the directives for the CGI-Executables directory. This wasn’t the case in the older version of Apache running on our 10.6.8 machine, as afar as I can tell.

Thanks for the suggestions, Sam and Norman…

I was just working my way down the Apache config how to

Thanks for the link Norman. I think that will be a good thing to read anyway. I’d like to know how to add an explicit handler.

Cheers…