Re: [PHPLIB] Sneaky Use of prepend.php3 From: Bob Bowker (bowker <email protected>)
Date: 11/23/99

Hi --

Neat ... but the same issue arises. If prepend.php3 sends a "Sorry we're
closed" page of HTML to the browser, either because it finds the DBLOCK
file or because it's been overwritten, does this affect the script that's
running the MySQL update?

Maybe the way to get around this is to copy the contents of the *real*
prepend.php3 into the top of the DB Update script, then overwrite
prepend.php3, then do the update, then re-write prepend.php3, then exit
...? But then how do I even start this script without prepend.php3?

I'm still not absolutely sure if there's a problem to get around, although
our tests so far show that something strange is happening ...

Bob.

At 08:37 AM 11/23/99 , you wrote:
>On Tue, Nov 23, 1999 at 08:16:10AM -0800, Bob Bowker wrote:
>
> BB> Any better ideas on how to "shut down" the site ...?
>
>I've used a lighter approach: create a "lock file" somewhere (ie, in tmp),
>then test for the existance of the file in the prepend.php3 script.
>
>The shell code for creating it is quite easy:
>
>--- cut here ---
>#!/bin/sh
>set -e
>DBLOCK=/tmp/lockthesite
>trap "rm -f $DBLOCK; rm -rf "$TMP" > /dev/null 2>&1" exit
>
>if lockfile -! -r 5 "$DBLOCK"; then
> echo "Unable to get lock"
> exit 1
>fi
># Do something useful here!
>--- cut here ---
>
>
>Just my 0.02EUR.
>--
> Massimiliano Masserelli | URL: http://www.interim.it/
> Internet Images S.r.l. | Tel: +39-051-3390671
> vicolo Viazzolo, 3 | Fax: +39-051-557890
> 40124 - Bologna - Italy |
>---------------------------------------------------------------------------
>----
>La Terra -- madre delle donne piu' belle dell'universo.
> -- Apollo, "Who Mourns for Adonais?", data astrale 3468.1
>-
>PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
>To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
>the body, not the subject, of your message.

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.