httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Grant" <dgr...@manweb.gov.mb.ca>
Subject RE: forcing apache to process files read from a database by php
Date Mon, 24 Jun 2002 16:03:24 GMT
I understand that, for the moment, storing and distributing a website
from a database is not as fast or efficient as running from the file
system.  But, I do believe that, eventually, the speed gap will be
reduced sufficiently that the difference will be negligible.  Currently,
my reasons for wanting things done in this manner are two-fold:

1.  To increase organization and allow inherent searching abilities of
the       
    web site without the need of a crawler.

2.  To see if it can be done.

Dean



-----Original Message-----
From: Andrew Hawkes [mailto:ahawkes@unicon.net] 
Sent: Monday, June 24, 2002 10:08 AM
To: users@httpd.apache.org
Subject: Re: forcing apache to process files read from a database by php

On Mon, 24 Jun 2002 09:56:07 -0500
"Dean Grant" <dgrant@manweb.gov.mb.ca> 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.

-Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message