Discussion:
[Phpslash-devel] config.php ordering problem
Dave Reid
2004-05-14 08:20:05 UTC
Permalink
Hi, I've been working with back-end for awhile. I've run into a config.php
problem and Mike Gifford suggested I follow it up here.

The symptom is that when $_PSL['timezone']['engine'] is true, any errors
logging in via login.php cause a blank page to be returned.

The problem is this:

BE extends functions.inc getHeader() to add current date to the template. This
uses psl_dateLong(), which uses psl_strftime(), which needs the tz library
and classes if $_PSL['timezone']['engine'] is set.

Trouble is, config.php calls page_open() _before_ the AddClassRequirement()
and AddLibraryRequirement() calls for tz and friends. In the case of a posted
bad username or password, page_open() tries to render the login form which
causes getHeader() to be called, and the tz library call blows up.

So my question is - why are some of the Add*Requirement() calls (particularly
the ones for tz et al) in config.php after the page_open? I see in
phpslash-dev CVS config-dist.php that this is still true. What would be the
implications of moving these Add*Requirement() calls to before page_open()?

Dave Reid
Dave Reid (by way of Dave Reid )
2004-05-16 04:46:08 UTC
Permalink
Hi, I've been working with back-end for awhile. I've run into a config.php
problem and Mike Gifford suggested I follow it up here.

The symptom is that when $_PSL['timezone']['engine'] is true, any errors
logging in via login.php cause a blank page to be returned.

The problem is this:

BE extends functions.inc getHeader() to add current date to the template.
This uses psl_dateLong(), which uses psl_strftime(), which needs the tz
library and classes if $_PSL['timezone']['engine'] is set.

Trouble is, config.php calls page_open() _before_ the AddClassRequirement()
and AddLibraryRequirement() calls for tz and friends. In the case of a posted
bad username or password, page_open() tries to render the login form which
causes getHeader() to be called, and the tz library call blows up.

So my question is - why are some of the Add*Requirement() calls (particularly
the ones for tz et al) in config.php after the page_open? I see in
phpslash-dev CVS config-dist.php that this is still true. What would be the
implications of moving these Add*Requirement() calls to before page_open()?

Dave Reid
Joe Stewart
2004-05-16 13:10:03 UTC
Permalink
Post by Dave Reid
Hi, I've been working with back-end for awhile. I've run into a config.php
problem and Mike Gifford suggested I follow it up here.
The symptom is that when $_PSL['timezone']['engine'] is true, any errors
logging in via login.php cause a blank page to be returned.
BE extends functions.inc getHeader() to add current date to the template.
This uses psl_dateLong(), which uses psl_strftime(), which needs the tz
library and classes if $_PSL['timezone']['engine'] is set.
Trouble is, config.php calls page_open() _before_ the AddClassRequirement()
and AddLibraryRequirement() calls for tz and friends. In the case of a posted
bad username or password, page_open() tries to render the login form which
causes getHeader() to be called, and the tz library call blows up.
So my question is - why are some of the Add*Requirement() calls (particularly
the ones for tz et al) in config.php after the page_open? I see in
phpslash-dev CVS config-dist.php that this is still true. What would be the
implications of moving these Add*Requirement() calls to before page_open()?
The idea was that the configuration that could be saved in a session
would be done so. It hasn't been done yet.

So that is why some of them are after the page_open. It sounds like you
found a couple that need to be moved. Don't move all of them yet.

We also cache at the minimum required too. Extra code running before
the cache does slow it down. BE took out the option cache at the top of
config.php. The caching in the -dev cvs has been optimized more.

Matthew might have more to add.

Joe
Post by Dave Reid
Dave Reid
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Phpslash-devel mailing list
https://lists.sourceforge.net/lists/listinfo/phpslash-devel
Matthew Leingang
2004-05-18 09:47:03 UTC
Permalink
Post by Joe Stewart
Post by Dave Reid
Hi, I've been working with back-end for awhile. I've run into a config.php
problem and Mike Gifford suggested I follow it up here.
The symptom is that when $_PSL['timezone']['engine'] is true, any errors
logging in via login.php cause a blank page to be returned.
BE extends functions.inc getHeader() to add current date to the template.
This uses psl_dateLong(), which uses psl_strftime(), which needs the tz
library and classes if $_PSL['timezone']['engine'] is set.
Trouble is, config.php calls page_open() _before_ the AddClassRequirement()
and AddLibraryRequirement() calls for tz and friends. In the case of a posted
bad username or password, page_open() tries to render the login form which
causes getHeader() to be called, and the tz library call blows up.
So my question is - why are some of the Add*Requirement() calls (particularly
the ones for tz et al) in config.php after the page_open? I see in
phpslash-dev CVS config-dist.php that this is still true. What would be the
implications of moving these Add*Requirement() calls to before page_open()?
The idea was that the configuration that could be saved in a session
would be done so. It hasn't been done yet.
So that is why some of them are after the page_open. It sounds like you
found a couple that need to be moved. Don't move all of them yet.
We also cache at the minimum required too. Extra code running before
the cache does slow it down. BE took out the option cache at the top of
config.php. The caching in the -dev cvs has been optimized more.
Matthew might have more to add.
Joe
No, that sounds right. We put the "minimal" set of classes/libraries to get
the page open. I guess the timezone stuff belongs to that, especially if
your login form has a date/time in it!
--
Matthew Leingang
Preceptor in Mathematics, Harvard University
***@math.harvard.edu
Continue reading on narkive:
Search results for '[Phpslash-devel] config.php ordering problem' (Questions and Answers)
12
replies
Advice in buying a new computer?
started 2008-11-03 23:48:15 UTC
desktops
Loading...