Dotcomments VE Day

God! I finally got dotcomments working properly…
[lapsing into nerd-mode]
So I had to go *far* more into PHP and ISAPI than I ever wanted to. The comments.php needed some changes to work under ISAPI because getenv() and setenv() aren’t supported (executing in Server and not CGI mode). Here’s what you need to put in instead…

CGI:
$commentID = ereg_replace('[^0-9]', '', getenv('QUERY_STRING'));
ISAPI:
$commentID = ereg_replace('[^0-9]', '', $HTTP_SERVER_VARS["QUERY_STRING"]);

CGI:
$thisComment = $commentDate . '[+]' . $commentName . '[+]' . $commentMail . '[+]' . $commentText . '[+]' . $commentSite . '[+]' . getenv('REMOTE_ADDR') . "\n";
ISAPI:
$thisComment = $commentDate . '[+]' . $commentName . '[+]' . $commentMail . '[+]' . $commentText . '[+]' . $commentSite . '[+]' . $HTTP_SERVER_VARS["REMOTE_ADDR"] . "\n";

2 Responses

  1. Evil Nose says:

    You are so smart. I am in awe of your coding powers.

  2. Mike says:

    All must bow down before the majesty of the evil nose!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.