Check out Modern Chess, our featured variant for January, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Diagram Editor with scalable graphics. An easy-to-use tool for drawing boards and pieces of any size and color.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Nov 20, 2023 07:53 PM UTC in reply to Fergus Duniho from 06:54 PM:

Well, it could not have worked at that time, because fen2.cgi was not looking at its arguments at all. It expected the query string in an environment variable, which is how Apache passes it. Another problem was that the query string can contain &, which in the eyes of the shell terminates the command. I now escaped that with a backslash when fen2.php glues the string back to one piece. Yet another problem was that the PHP script always seems to put out a header, even when the header("image/png") call was commented out: it then uses a default header "text/plain", possibly inserting it before the header emitted by fen2.cgi. So it was imperative that the PHP script would set the header to "image/png", and hence that fen2.cgi would omit the header, as that would then be perceived as corrupted PNG data.

I believe I also was fooled a lot by browser caching, as displaying a queen suddenly started working without me making a significant change.

Anyway, it does appear to work now!