in reply to Scripts to recursively reading in HTML files

The real problem is that the server is working with /cgi-bin as the default directory, instead of the public_html folder above it, as it would with any regular websurfing

Have you looked into the possibility of moving your script outside of cgi-bin and into public_html? In my experience, just about every shared-hosting Apache servers are configured to run CGI scripts anywhere, if they have the .cgi (sometimes .pl) extention. If it's not, have you tried adding AddHandler cgi-script .cgi to the server's configuration files or to a .htaccess in public_html?

While this may not be the answer you were expecting, it will save you lots of work.

Update: Rephrased a bit to clarify in response to sintadil's comment about default settings. He also mentioned the security consequecences of my suggestion.

Replies are listed 'Best First'.
Re^2: Scripts to recursively reading in HTML files
by sintadil (Pilgrim) on Aug 31, 2004 at 17:34 UTC

    Most Apache servers (dunno about others) are configured to run CGI scripts anywhere, if they have the .cgi (sometimes .pl) extention.

    I just checked both a 1.x and a 2.x default configuration file, and neither of them are set up that way. The lines in the files exist, yes, but they're commented out. This default may be the case with some Linux or other vendor-supplied default configuration files, but it's not the case with the Apache-supplied defaults.

    Also, doing that sort of wildcarding is a bad idea, IMO, because it can lead to unintended execution of files.