/ PHPhtml.cgi-pl

LAM Alaska PHPhtml



I created the PHPhtml.cgi-pl as a wrapper for the About PHP html pages on my site. The program is actually written in Perl rather than PHP or Python because I am more familiar with Perl and genrally use Perl for CGI as well as system administration stuff. I do however have both Python and PHP programs on my site so feel I should also have some documentation. This program wrapper adds the menuBar and style to the PHP html pages. I first edited index.html and preface.html then decided it would be easy to write this script. I ended up using a RewiteRule so that the .html files are wrapped and the images in the php/figures/ are still available with the same URL. When checking that a page with figures would work I found that the Zend API page was broken so I fixed it. It now points to several of the largest figures.

The PHP documentation I downloaded was the html version and included 6,997 html files and 33 images in .png format. All the html files are in a single directory and the images in a figures subdirectory. The html documentation is generated from docbook format and I should figure out who to tell about the broken image links I found.

This text is displayed when the program is accessed without a query string. The RewiteRule puts the html file name in the query string and this program displays existing pages wrapped with my site header using the default style for my site. This program transfers processing to the file not found program on my site for any URL not a valid documet in the /php directory.

A dump of all environment variables is included when this test is displayed which is a leftover from my process of creating this program in my current play development style.

Environmet VariableValue
HTTP_CACHE_CONTROL:max-age=259200
DOCUMENT_ROOT:/var/www/z/html
SERVER_NAME:z.lamurakami.com
SERVER_SOFTWARE:Apache/2.4.58 (Ubuntu)
REMOTE_PORT:25468
HTTP_ACCEPT:*/*
SERVER_ADMIN:z.ServerAdmin@lam1.us
SERVER_ADDR:172.31.53.185
HTTP_CONNECTION:keep-alive
SERVER_PROTOCOL:HTTP/1.1
HTTP_HOST:z.lamurakami.com
HTTP_VIA:1.1 squid-proxy-5b5d847c96-6x66d (squid/6.10)
SERVER_PORT:80
HTTP_ACCEPT_ENCODING:gzip, br, zstd, deflate
REMOTE_ADDR:216.73.216.239
HTTP_USER_AGENT:Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
REQUEST_URI:/Public/Scripts/PHPhtml.cgi-pl
REQUEST_SCHEME:http
GATEWAY_INTERFACE:CGI/1.1
SCRIPT_NAME:/Public/Scripts/PHPhtml.cgi-pl
CONTEXT_PREFIX:/Public
SCRIPT_FILENAME:/var/www/no-ssl/html/Public/Scripts/PHPhtml.cgi-pl
SERVER_SIGNATURE:
Apache/2.4.58 (Ubuntu) Server at z.lamurakami.com Port 80
PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin
SCRIPT_URI:http://z.lamurakami.com/Public/Scripts/PHPhtml.cgi-pl
SCRIPT_URL:/Public/Scripts/PHPhtml.cgi-pl
HTTP_X_FORWARDED_FOR:10.1.214.202
REQUEST_METHOD:GET
CONTEXT_DOCUMENT_ROOT:/var/www/no-ssl/html/Public

Up 13 days, 16:45, 2 users, load average: 0.01, 0.02, 0.00
216.73.216.239 GET from server z.lamurakami.com

Monday, July 14, 2025 @ 11:17:18 AM
z.ServerAdmin@lam1.us