Re: testing 0.8 alpha

Matthew Leingang <leingang-c2Vpf+SSmYbWs/[email protected]> Tue, 02 Mar 2004 10:40:04 -0500
Newsgroups gmane.comp.cms.phpslash.devel
Message-ID <BC6A1504.2800%[email protected]>
On 3/2/04 9:22 AM, "Joe Stewart" <[email protected]> wrote=
:

> On Tue, Mar 02, 2004 at 08:06:19AM -0500, Matthew Leingang wrote:
>> Hi guys,
>>=20
>> I've installed two sites lately based on the 0.8 alpha distro.  It seems=
 to
>> work well.   Some bugs I've found, however, are:
>>=20
>> 1.  Extra question marks in the config_setup.php script URLs so that aft=
er
>> completing a step, the script starts from the beginning (I'm guessing th=
is
>> one was caught already.)
>>=20
>=20
> Haven't seen this.

Eureka!  In config_setup.php POST forms are generated like this:

<form action=3D"?" method=3D"post">...</form>

If the form data is verified and whatever action succeeds, the browser is
redirected by this (line 112)

header("Location: ?step=3D" . getNextStep());

Thus, two question marks at the beginning of the query string.  The first
variable at the beginning of the QS is the step, and so I guess PHP sets a
variable called $_GET['?step'] instead of $_GET['step'].  In any case, ther=
e
is no $_GET['step'] variable set, and the configurator starts over from the
beginning.  I saw this happening, and just manually deleted the extra ? and
everything worked fine.  But I don't know what that form action is "?".
Shouldn=B9t it just be ""?

[...]
>> But *how in fact do I add a module?*  I'm still a little scared by the
>> prospect, since I haven't contributed since the pre-"everything is a blo=
ck"
>> days.  :-)
>>=20
>=20
> Short answer - Just return all output like "return $content".  Don't
> display any output directly.
>=20
> index.php for the basic module public access.  Ideally the only one.
>=20
> Blocks should be another php file similar to index.php and called via a
> module block option.  This way we don't have to register new block types
> for each new module.
>=20
> admin.php - any needed administration functions - This is the basic
> layout for internal modules.
>=20
> also see:
>=20
> http://sourceforge.net/mailarchive/forum.php?thread_id=3D3940749&forum_id=3D1=
53

This should help.  Hopefully I can cobble something together.

Another question, a little off-topic.  I have the main phpslash pages
residing at ~/public_html/phpslash on my hosted account.  What I would like
to do is locate them in server-space at the top level.  So
http://leingang.net/poll.php would get internally mapped to
http://leingang.net/phpslash/poll.php.  I thought I could do that with
mod_rewrite, something like


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond /phpslash%{REQUEST_URI} -U
RewriteRule ^(.*)$ /phpslash/$1 [QSA]

This does map phpslash pages to the right place, but plain old not found
URIs that aren't in PSL cause the annoying-terse internal server error.

The dox caution against over use of the -U flag, because it generates
another server call, but I have a low volume site to say the least.  I coul=
d
also generate RewriteRules for all the files with an awk script.  But then =
I
have to write a new one for each new image or style sheet I add.

Or I could write a PHP script to handle 404's and redirect with a language =
I
can speak better.  This seems like the most reliable but slowest of the
options. =20

Anybody tried this before with success?
--Matt
--=20
Matthew Leingang
Preceptor in Mathematics, Harvard University
leingang-c2Vpf+SSmYbWs/[email protected]



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click