Hi all,
I started out with a very small script:
1. Test in a shell
#!/ROCKET/php/bin/php-cgi
<?php
// show all information
phpinfo();
?>
in an untagged file with IBM-1047 encoding. File name is: /u/http/server/cgi-bin/phpinfo.IBM-1047
In the shell I have set:
export CGI_HEADER_ENCODING=EBCDIC
export CGI_BODY_ENCODING=EBCDIC
Now when calling /u/http/server/cgi-bin/phpinfo.IBM-1047 in the shell I get html output which looks good.
2. Test using http server
Now I have set:
SetEnv CGI_HEADER_ENCODING EBCDIC
SetEnv CGI_BODY_ENCODING EBCDIC
in httpd.conf
When calling from browser:
https://internal_server.com/cgi-bin/phpinfo.IBM-1047
I get an internal error.
Looking into httpd error log shows:
[Wed Aug 30 15:45:51.959346 2017] [cgi:error] [pid 66289:tid 1742637969094737925] [client 9.164.183.117:60602] malformed header from script 'phpinfo.IBM-1047': Bad header: <b>Security Alert!</b> The PHP
It could well be that the problem sits in front of my laptop. Dunno.
Any help appreciated.
– Thanks, Manfred