httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Hawkes <>
Subject Re: forcing apache to process files read from a database by php
Date Mon, 24 Jun 2002 15:08:13 GMT
On Mon, 24 Jun 2002 09:56:07 -0500
"Dean Grant" <> wrote:

> Ok, I apologize if I did not give adequate information.
> I have a database that stores files in binary form.  I have a PHP script
> that, depending on a URL request, will grab one of the files and attempt
> to display it in the browser.  The problem is that PHP is not Apache.
> There are certain types of files that are treated in a special way by
> Apache - such as scripts (cgi, php, asp, etc.).  Apache knows where the
> perl and php interpreters are located and how to use them.  What I
> require is a way to feed the files from the database into Apache so that
> Apache treats the file as though it was read from the file system like
> usual.  I thought about creating a temporary file and directing Apache
> to that file, but it kind of defeats the idea I'm aiming for - which is
> to store a website in a database.

Why is the PHP script solution unsatisfactory? It sounds a lot more simple
than any alternative I know.

Also, if you don't mind telling, why do you want to store the entire site
in a database? That doesn't really make sense to me since filesystems seem
to work so nicely for that purpose.

Anyway, it sounds if you really want to do this you'll need to write an
Apache module (there are some books on that subject). The module would
need to somehow translate URLs into a SQL statement and then select
each file from the database, writing it to the client.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message