pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedis this list live?
14+ messages / 7 participants
[nested] [flat]
* is this list live?
@ 2000-10-17 15:54 Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
0 siblings, 1 reply; 14+ messages in thread
From: Adam Lang @ 2000-10-17 15:54 UTC (permalink / raw)
To: pgsql-php
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
@ 2000-10-17 16:13 ` The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
0 siblings, 1 reply; 14+ messages in thread
From: The Hermit Hacker @ 2000-10-17 16:13 UTC (permalink / raw)
To: Adam Lang <aalang@rutgersinsurance.com>; +Cc: pgsql-php
yup, just not very active ... :)
On Tue, 17 Oct 2000, Adam Lang wrote:
>
>
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
>
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
@ 2000-10-17 16:18 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:50 ` Re: is this list live? Sam Hokin <sam@ims.net>
0 siblings, 2 replies; 14+ messages in thread
From: Adam Lang @ 2000-10-17 16:18 UTC (permalink / raw)
To: ; +Cc: pgsql-php
As I said to someone else.. subscribed over a month ago and my curiosity
finally made me check to see if I actually was or not. :)
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "The Hermit Hacker" <scrappy@hub.org>
To: "Adam Lang" <aalang@rutgersinsurance.com>
Cc: <pgsql-php@postgresql.org>
Sent: Tuesday, October 17, 2000 12:13 PM
Subject: Re: is this list live?
>
> yup, just not very active ... :)
>
>
> On Tue, 17 Oct 2000, Adam Lang wrote:
>
> >
> >
> > Adam Lang
> > Systems Engineer
> > Rutgers Casualty Insurance Company
> >
> >
>
> Marc G. Fournier ICQ#7615664 IRC Nick:
Scrappy
> Systems Administrator @ hub.org
> primary: scrappy@hub.org secondary:
scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
@ 2000-10-17 16:22 ` The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:28 ` Re: is this list live? Vince Vielhaber <vev@michvhf.com>
2000-10-17 16:30 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
1 sibling, 2 replies; 14+ messages in thread
From: The Hermit Hacker @ 2000-10-17 16:22 UTC (permalink / raw)
To: Adam Lang <aalang@rutgersinsurance.com>; +Cc: pgsql-php
On Tue, 17 Oct 2000, Adam Lang wrote:
> As I said to someone else.. subscribed over a month ago and my curiosity
> finally made me check to see if I actually was or not. :)
there are curently 157 ppl subscribed to this list sort of sitting there
quietly ... maybe use of PHP is decreasing? :)
>
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
> ----- Original Message -----
> From: "The Hermit Hacker" <scrappy@hub.org>
> To: "Adam Lang" <aalang@rutgersinsurance.com>
> Cc: <pgsql-php@postgresql.org>
> Sent: Tuesday, October 17, 2000 12:13 PM
> Subject: Re: is this list live?
>
>
> >
> > yup, just not very active ... :)
> >
> >
> > On Tue, 17 Oct 2000, Adam Lang wrote:
> >
> > >
> > >
> > > Adam Lang
> > > Systems Engineer
> > > Rutgers Casualty Insurance Company
> > >
> > >
> >
> > Marc G. Fournier ICQ#7615664 IRC Nick:
> Scrappy
> > Systems Administrator @ hub.org
> > primary: scrappy@hub.org secondary:
> scrappy@{freebsd|postgresql}.org
>
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
@ 2000-10-17 16:28 ` Vince Vielhaber <vev@michvhf.com>
2000-10-17 16:46 ` Re: is this list live? Josh Berkus <josh@agliodbs.com>
1 sibling, 1 reply; 14+ messages in thread
From: Vince Vielhaber @ 2000-10-17 16:28 UTC (permalink / raw)
To: The Hermit Hacker <scrappy@hub.org>; +Cc: Adam Lang <aalang@rutgersinsurance.com>; pgsql-php
On Tue, 17 Oct 2000, The Hermit Hacker wrote:
> On Tue, 17 Oct 2000, Adam Lang wrote:
>
> > As I said to someone else.. subscribed over a month ago and my curiosity
> > finally made me check to see if I actually was or not. :)
>
> there are curently 157 ppl subscribed to this list sort of sitting there
> quietly ... maybe use of PHP is decreasing? :)
I'm guessing it's more like PHP and PostgreSQL just work so flawlessly
together that noone has anything to say.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:28 ` Re: is this list live? Vince Vielhaber <vev@michvhf.com>
@ 2000-10-17 16:46 ` Josh Berkus <josh@agliodbs.com>
2000-10-17 17:07 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
0 siblings, 1 reply; 14+ messages in thread
From: Josh Berkus @ 2000-10-17 16:46 UTC (permalink / raw)
To: pgsql-php
Folks,
> I'm guessing it's more like PHP and PostgreSQL just work so flawlessly
> together that noone has anything to say.
Actually, I've been having problems installing the PHP-Postgres
interface on a VA Box running Postgres 7.0.2. I just thought that
nobody was on the list. SO, let me throw this out there:
1. Postgres was installed from RPM, and PHP4 was built from source
(because RPMs were not available at the time). The webserver we are
running is Xitami
2. When we tried to build the postgres interface from source, the make
crashes after about 5 minutes, saying that it can't find certain
libraries that are present and in the directory we supplied in the make
command line.
3. When we try to install from RPM, PHP-Postgres wants a library called
pgsql.so. THis library, as far as I can tell, does not exist in any of
the Postgres sources.
Any thoughts?
-Josh Berkus
--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 436-9166
for law firms, small businesses fax 436-0137
and non-profit organizations. pager 338-4078
San Francisco
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:28 ` Re: is this list live? Vince Vielhaber <vev@michvhf.com>
2000-10-17 16:46 ` Re: is this list live? Josh Berkus <josh@agliodbs.com>
@ 2000-10-17 17:07 ` Adam Lang <aalang@rutgersinsurance.com>
0 siblings, 0 replies; 14+ messages in thread
From: Adam Lang @ 2000-10-17 17:07 UTC (permalink / raw)
To: pgsql-php
Can't help you too much. I had the same sort of problem... my solution was
compile postgres, compile Apache and compile PHP.
Once I eliminated the mix of RPM and compilation, it worked fine..,.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Josh Berkus" <josh@agliodbs.com>
To: "phpp" <pgsql-php@postgresql.org>
Sent: Tuesday, October 17, 2000 12:46 PM
Subject: Re: is this list live?
> Folks,
>
> > I'm guessing it's more like PHP and PostgreSQL just work so flawlessly
> > together that noone has anything to say.
>
> Actually, I've been having problems installing the PHP-Postgres
> interface on a VA Box running Postgres 7.0.2. I just thought that
> nobody was on the list. SO, let me throw this out there:
>
> 1. Postgres was installed from RPM, and PHP4 was built from source
> (because RPMs were not available at the time). The webserver we are
> running is Xitami
>
> 2. When we tried to build the postgres interface from source, the make
> crashes after about 5 minutes, saying that it can't find certain
> libraries that are present and in the directory we supplied in the make
> command line.
>
> 3. When we try to install from RPM, PHP-Postgres wants a library called
> pgsql.so. THis library, as far as I can tell, does not exist in any of
> the Postgres sources.
>
> Any thoughts?
>
> -Josh Berkus
>
>
> --
> ______AGLIO DATABASE SOLUTIONS___________________________
> Josh Berkus
> Complete information technology josh@agliodbs.com
> and data management solutions (415) 436-9166
> for law firms, small businesses fax 436-0137
> and non-profit organizations. pager 338-4078
> San Francisco
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
@ 2000-10-17 16:30 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 17:01 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
1 sibling, 1 reply; 14+ messages in thread
From: Adam Lang @ 2000-10-17 16:30 UTC (permalink / raw)
To: The Hermit Hacker <scrappy@hub.org>; +Cc: pgsql-php
Or maybe it is so easy no one needs help. :)
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "The Hermit Hacker" <scrappy@hub.org>
To: "Adam Lang" <aalang@rutgersinsurance.com>
Cc: <pgsql-php@postgresql.org>
Sent: Tuesday, October 17, 2000 12:22 PM
Subject: Re: is this list live?
> On Tue, 17 Oct 2000, Adam Lang wrote:
>
> > As I said to someone else.. subscribed over a month ago and my curiosity
> > finally made me check to see if I actually was or not. :)
>
> there are curently 157 ppl subscribed to this list sort of sitting there
> quietly ... maybe use of PHP is decreasing? :)
>
> >
> > Adam Lang
> > Systems Engineer
> > Rutgers Casualty Insurance Company
> > ----- Original Message -----
> > From: "The Hermit Hacker" <scrappy@hub.org>
> > To: "Adam Lang" <aalang@rutgersinsurance.com>
> > Cc: <pgsql-php@postgresql.org>
> > Sent: Tuesday, October 17, 2000 12:13 PM
> > Subject: Re: is this list live?
> >
> >
> > >
> > > yup, just not very active ... :)
> > >
> > >
> > > On Tue, 17 Oct 2000, Adam Lang wrote:
> > >
> > > >
> > > >
> > > > Adam Lang
> > > > Systems Engineer
> > > > Rutgers Casualty Insurance Company
> > > >
> > > >
> > >
> > > Marc G. Fournier ICQ#7615664 IRC Nick:
> > Scrappy
> > > Systems Administrator @ hub.org
> > > primary: scrappy@hub.org secondary:
> > scrappy@{freebsd|postgresql}.org
> >
> >
>
> Marc G. Fournier ICQ#7615664 IRC Nick:
Scrappy
> Systems Administrator @ hub.org
> primary: scrappy@hub.org secondary:
scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:30 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
@ 2000-10-17 17:01 ` The Hermit Hacker <scrappy@hub.org>
0 siblings, 0 replies; 14+ messages in thread
From: The Hermit Hacker @ 2000-10-17 17:01 UTC (permalink / raw)
To: Adam Lang <aalang@rutgersinsurance.com>; +Cc: pgsql-php
okay, I can agree with that (note: we do all our development work in
PHP/PostgreSQL, so I'm not putting down HP *grin*)
On Tue, 17 Oct 2000, Adam Lang wrote:
> Or maybe it is so easy no one needs help. :)
>
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
> ----- Original Message -----
> From: "The Hermit Hacker" <scrappy@hub.org>
> To: "Adam Lang" <aalang@rutgersinsurance.com>
> Cc: <pgsql-php@postgresql.org>
> Sent: Tuesday, October 17, 2000 12:22 PM
> Subject: Re: is this list live?
>
>
> > On Tue, 17 Oct 2000, Adam Lang wrote:
> >
> > > As I said to someone else.. subscribed over a month ago and my curiosity
> > > finally made me check to see if I actually was or not. :)
> >
> > there are curently 157 ppl subscribed to this list sort of sitting there
> > quietly ... maybe use of PHP is decreasing? :)
> >
> > >
> > > Adam Lang
> > > Systems Engineer
> > > Rutgers Casualty Insurance Company
> > > ----- Original Message -----
> > > From: "The Hermit Hacker" <scrappy@hub.org>
> > > To: "Adam Lang" <aalang@rutgersinsurance.com>
> > > Cc: <pgsql-php@postgresql.org>
> > > Sent: Tuesday, October 17, 2000 12:13 PM
> > > Subject: Re: is this list live?
> > >
> > >
> > > >
> > > > yup, just not very active ... :)
> > > >
> > > >
> > > > On Tue, 17 Oct 2000, Adam Lang wrote:
> > > >
> > > > >
> > > > >
> > > > > Adam Lang
> > > > > Systems Engineer
> > > > > Rutgers Casualty Insurance Company
> > > > >
> > > > >
> > > >
> > > > Marc G. Fournier ICQ#7615664 IRC Nick:
> > > Scrappy
> > > > Systems Administrator @ hub.org
> > > > primary: scrappy@hub.org secondary:
> > > scrappy@{freebsd|postgresql}.org
> > >
> > >
> >
> > Marc G. Fournier ICQ#7615664 IRC Nick:
> Scrappy
> > Systems Administrator @ hub.org
> > primary: scrappy@hub.org secondary:
> scrappy@{freebsd|postgresql}.org
>
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
@ 2000-10-17 16:50 ` Sam Hokin <sam@ims.net>
2000-10-17 17:06 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 17:44 ` Re: is this list live? Stephen van Egmond <svanegmond@bang.dhs.org>
1 sibling, 2 replies; 14+ messages in thread
From: Sam Hokin @ 2000-10-17 16:50 UTC (permalink / raw)
To: pgsql-php
Heh, I use PHP/Postgres constantly. http://www.royalprestige.com and
http://www.madisonsource.com are two examples I wrote, you might like to
add that to your site examples which I vaguely recall existing. I just
haven't had any Postgres-specific problems to bring up.
However, one BIG issue I'm facing is with revisioning concurrent PHP and
HTML development. Say one has 5 sites that use the same PHP but have
different HTML design. How would one apply an update to the PHP on those 5
sites without touching the HTML? It seems almost impossible since the PHP
and HTML are so intertwined, you'd at least have to automatically generate
comments for parsing/replacing. This seems to be a big, untreated issue in
server-side scripting in general. Of course, not that many people develop
multiple sites that use the same PHP code with different HTML, but I do.
Not a Postgres question at all, but perhaps some smart people on this list
have some ideas. I'll probably post it sometime to the php-general list.
At 13:22 10/17/00 -0300, you wrote:
>On Tue, 17 Oct 2000, Adam Lang wrote:
>
> > As I said to someone else.. subscribed over a month ago and my curiosity
> > finally made me check to see if I actually was or not. :)
>
>there are curently 157 ppl subscribed to this list sort of sitting there
>quietly ... maybe use of PHP is decreasing? :)
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:50 ` Re: is this list live? Sam Hokin <sam@ims.net>
@ 2000-10-17 17:06 ` Adam Lang <aalang@rutgersinsurance.com>
1 sibling, 0 replies; 14+ messages in thread
From: Adam Lang @ 2000-10-17 17:06 UTC (permalink / raw)
To: pgsql-php
To try to solve that, I try to use include files and functions as much as
possible. That is, have the HTML of the page wrapped around the function,
and if you need to update any PHP code, update the include file. Granted it
is not 100% effective, but I think it currently gives the best option (that
I could think of). Also... I never looked into it in too much detail, but
look into something called FastTemplate... it was mentioned in the Wrox PHP
Programming book.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Sam Hokin" <sam@ims.net>
To: <pgsql-php@postgresql.org>
Sent: Tuesday, October 17, 2000 12:50 PM
Subject: Re: is this list live?
> Heh, I use PHP/Postgres constantly. http://www.royalprestige.com and
> http://www.madisonsource.com are two examples I wrote, you might like to
> add that to your site examples which I vaguely recall existing. I just
> haven't had any Postgres-specific problems to bring up.
>
> However, one BIG issue I'm facing is with revisioning concurrent PHP and
> HTML development. Say one has 5 sites that use the same PHP but have
> different HTML design. How would one apply an update to the PHP on those
5
> sites without touching the HTML? It seems almost impossible since the PHP
> and HTML are so intertwined, you'd at least have to automatically generate
> comments for parsing/replacing. This seems to be a big, untreated issue
in
> server-side scripting in general. Of course, not that many people develop
> multiple sites that use the same PHP code with different HTML, but I do.
>
> Not a Postgres question at all, but perhaps some smart people on this list
> have some ideas. I'll probably post it sometime to the php-general list.
>
> At 13:22 10/17/00 -0300, you wrote:
> >On Tue, 17 Oct 2000, Adam Lang wrote:
> >
> > > As I said to someone else.. subscribed over a month ago and my
curiosity
> > > finally made me check to see if I actually was or not. :)
> >
> >there are curently 157 ppl subscribed to this list sort of sitting there
> >quietly ... maybe use of PHP is decreasing? :)
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` Re: is this list live? The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Re: is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:50 ` Re: is this list live? Sam Hokin <sam@ims.net>
@ 2000-10-17 17:44 ` Stephen van Egmond <svanegmond@bang.dhs.org>
1 sibling, 0 replies; 14+ messages in thread
From: Stephen van Egmond @ 2000-10-17 17:44 UTC (permalink / raw)
To: Sam Hokin <sam@ims.net>; +Cc: pgsql-php
Sam Hokin (sam@ims.net) wrote:
> However, one BIG issue I'm facing is with revisioning concurrent PHP and
> HTML development. Say one has 5 sites that use the same PHP but have
> different HTML design. How would one apply an update to the PHP on those 5
> sites without touching the HTML? It seems almost impossible since the PHP
> and HTML are so intertwined, you'd at least have to automatically generate
> comments for parsing/replacing. This seems to be a big, untreated issue in
> server-side scripting in general. Of course, not that many people develop
> multiple sites that use the same PHP code with different HTML, but I do.
>
> Not a Postgres question at all, but perhaps some smart people on this list
> have some ideas. I'll probably post it sometime to the php-general list.
It's a fairly general problem. The standard response is to say "keep
HTML out of your libraries", and "try to keep your interfaces stable".
Those are both tough to do.
Many people feel that XSLT is the way of the future. XSLT stands for
XSL transforms: changing one DTD to another. If your site's data lives
in XML (or can easily be turned into XML via php, etc), it's pretty
easy to write transformations which render the XML into pages, which
through progressive XSL transforms get navigation and contextual
information slowly piled on (think of slashdot or my-netscape or
scripting.com's little windows of information) until you end up with a
proper XHTML page.
It is not clear how exactly how to do this, how exactly one can avoid
binding too tightly to an XML DTD, the same way you have the problem
right now of tying too tightly to PHP functions.
If at all possible, take a serious look at the lambda function of php -
the ability to dynamically create code and return a reference to a
function. In order to fully grok its power you might need to read
something like The Structure and Interpreation of Computer Programs, a
classic in computer science, which does all of its cool stuff with
Lisp.
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
@ 2000-10-17 21:09 Dan Wilson <killroyboy@yahoo.com>
2000-10-17 21:48 ` Re: is this list live? Stephen van Egmond <svanegmond@bang.dhs.org>
0 siblings, 1 reply; 14+ messages in thread
From: Dan Wilson @ 2000-10-17 21:09 UTC (permalink / raw)
To: pgsql-php
I've been doing this fairly well for a while now. I
have two different sites that run off the same PHP
code.
I do it with the following methods.
1) Any HTML output that my PHP code generates is
appended within a single string variable ($strBody).
2) Separate files contain the basic layout and
navigation of the site. Within this file, I output the
string variable and any other dynamic ly generated
text. If I need any dynamic navigation, then I have a
separate variable to contain the generated HTML and
then echo it in the appropriate location.
3) To more easily handle the look of the HTML
generated by the PHP code, I use style sheets. Of
course, the use of css is defendant on your users, but
if you don't want to use style sheets, variables
defining your font attributes, etc can be defined in
an include file as well.
I don't know how much of a performance hit I take with
this method, but for the average site on the web, it
shouldn't be too much of a problem.
-Dan
--- Sam Hokin <sam@ims.net> wrote:
> However, one BIG issue I'm facing is with
> revisioning concurrent PHP and
> HTML development. Say one has 5 sites that use the
> same PHP but have
> different HTML design. How would one apply an
> update to the PHP on those 5
> sites without touching the HTML? It seems almost
> impossible since the PHP
> and HTML are so intertwined, you'd at least have to
> automatically generate
> comments for parsing/replacing. This seems to be a
> big, untreated issue in
> server-side scripting in general. Of course, not
> that many people develop
> multiple sites that use the same PHP code with
> different HTML, but I do.
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: is this list live?
2000-10-17 21:09 Re: is this list live? Dan Wilson <killroyboy@yahoo.com>
@ 2000-10-17 21:48 ` Stephen van Egmond <svanegmond@bang.dhs.org>
0 siblings, 0 replies; 14+ messages in thread
From: Stephen van Egmond @ 2000-10-17 21:48 UTC (permalink / raw)
To: dan_wilson@geocities.com; +Cc: pgsql-php
Dan's approach reminds me of something I coded up to imitate a cool
feature they have in embperl.
It's so simple, I'll append it here.
The general idea is that you have a template in your document root:
root/_template.php
Which for instance can say things like:
<html><head>.....body...
include ("topnav.php"); ...
##PART##
... </html>
Obviously, you could have topnav .php right in root, but why not in the
subdirectories alongside the content:
root/foo/topnav.php
root/bar/topnav.php
The actual content pages:
root/foo/content.php
root/bar/content.php
only need to call one function to bring in the whole templating system.
Their topnav will come from the directory that they're in, and they
don't need to do anything except provide their exact functionality.
Usage:
Put this in every file:
<? include "templating.h"; template_header(); ?> -- at the top
<? template_footer(); ?> -- at the bottom
Create a _template.html somewhere (perhaps the document root) that
contains at least the string ##PART## .
Call template_include() when you want to pull in a file located
somewhere between your script and the document root.
<?
function template_header() {
global $DOCUMENT_ROOT, $SCRIPT_FILENAME;
global $_template_data, $_template_cut_index, $_template_search_path;
$root_path = explode('/', $DOCUMENT_ROOT);
$script_path = explode('/', $SCRIPT_FILENAME);
for ($i = count($script_path)-1; $i >= count($root_path); $i--) {
$directory = join('/',array_slice($script_path, 0, $i));
$_template_search_path[] = $directory;
if (file_exists($directory.'/_template.php')) {
$fh = fopen($directory.'/_template.php', 'r');
while (!feof($fh)) {
$_template_data .= fread($fh, 65536);
}
$_template_cut_index = strpos($_template_data,'##PART##');
if ($_template_cut_index == 0) {
print "Error: there's no ##PART## in $directory/_template.php";
die;
}
eval ('?>'.substr($_template_data, 0, $_template_cut_index-2).'<?');
return;
}
}
print "didn't find a template<p>";
}
function template_footer() {
global $_template_data, $_template_cut_index;
eval ("?>".substr($_template_data, $_template_cut_index+6)."<?");
}
function template_include($file) {
global $_template_search_path;
foreach ($_template_search_path as $path) {
if (file_exists($path.'/'.$file)) {
include($path.'/'.$file);
return;
}
}
}
?>
^ permalink raw reply [nested|flat] 14+ messages in thread
end of thread, other threads:[~2000-10-17 21:48 UTC | newest]
Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-17 15:54 is this list live? Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:13 ` The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:18 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:22 ` The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:28 ` Vince Vielhaber <vev@michvhf.com>
2000-10-17 16:46 ` Josh Berkus <josh@agliodbs.com>
2000-10-17 17:07 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 16:30 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 17:01 ` The Hermit Hacker <scrappy@hub.org>
2000-10-17 16:50 ` Sam Hokin <sam@ims.net>
2000-10-17 17:06 ` Adam Lang <aalang@rutgersinsurance.com>
2000-10-17 17:44 ` Stephen van Egmond <svanegmond@bang.dhs.org>
2000-10-17 21:09 Re: is this list live? Dan Wilson <killroyboy@yahoo.com>
2000-10-17 21:48 ` Stephen van Egmond <svanegmond@bang.dhs.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox