in reply to
CGI troubles for code that runs on both Windows and OpenSuse Linux 12,3
I am healthily suspicious of the behavior that you are attributing to OpenSuse: the behavior should be exactly the same. Focusing your attention now to just this environment ... take a careful step back, look once again at all the config files, be sure you’ve restarted, and then look at the access.log and error.log files once more; checking, also, one environment against the other.
The fundamental reason why you are seeing kwrite is the Apache is not executing the file ... Apache is serving it as text. This must be an error ... uhh, your error ... in the setup of the apache configuration on Linux. Windows is now set up correctly; Linux is not.
(So, anything having to do with file-permissions, or “shebangs,” must in fact be a red-herring of some kind. ’Tis easy in this biz to chase white-rabbits. We all do, from time to time, especially where Apache is concerned.)
Since you say that you are much less familiar with Linux, perhaps you can tell us a little bit more about how your Apache config is set-up with regard to the specific directory where these files are located: the environs where, in Linux, you have placed the AddHandler directive ...