p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Wrox search engine sucks [was [RE: super simple login trouble [ was [ RE: i need simple logout [was RE: variable doesn't show up in $_COOKIE or $HTTP_COOKIE_VARS or $_PO


Message #1 by spam@k... on Wed, 26 Feb 2003 12:25:48 -0600
Nik,

Once again, I wish you kept an online archive. The search engine that Wrox uses on the P2P site is really quite bad - it doesn't
seem to keep track of names or email addresses. I tried these searches:

Devereaux superglobal arrays 
yomama@u... superglobal arrays 
auto global 4.1
$_GLOBAL 
auto global

The first four came back empty, the 5th one had 35 responses, all from ASP and Java boards, nothing from the PHP boards. Some search
engines are so bad that I don't know why people use them. I wish Google would drop its prices so that every company could afford to
license them. 

Anyway, there was a post you made last year that was a real masterpiece, on the subject below, of superglobals, but I've lost it and
I'm wondering if your email client kept a copy. 

The exchange went something like this: you said I should switch to the new superglobals, I said I needed backwards compatibility,
and then you came back with a function that first checked for the presense of the old HTTP_VARS and then checked for the presense of
the $_GLOBALS. It was a real elegant piece of code, as I remember it. Do you remember what I'm talking about? 





------------------------------------------------
On Tue, 25 Feb 2003 16:04:57 -0800, "Nikolai Devereaux" <yomama@u...> wrote:

> 
> > I'd like to rewrite the code, but I have to do it on my own, and
> > so it kicks down to a very low priority. I'm not a professional
> > programmer, I do a little programming because it helps automate
> > other work that I do, but there are many other projects and
> > hobbies that compete for the time that I could spend on software.
> > Nevertheless, rewriting the code so that it doesn't depend on the
> > autoglobal stuff from form submits is something I do very much
> > hope to get to this spring.
> 
> 
> Thanks again for the compliments!
> 
> I guess the most difficult thing about starting to code with
> register_globals = off is getting used to it.  But here's an EXTREMELY
> important, though incredibly obvious, and outrageously overlooked, tidbit:
> 
> 
> 
>         You don't have to convert the entire site at once.
> 
> 
> 
> Just take the new snippets of code you're writing now and write them to use
> the superglobal arrays instead of global variables.  You don't have to turn
> off register_globals to use the superglobals.
> 
> Any new code you write should be written *as if* register_globals was off,
> even though in reality it might not be so.
> 
> 
> Good luck, and hope this helps!
> 
> Nik
> 
> 
> 
Message #2 by "David Scott-Bigsby" <DScott-Bigsby@P...> on Wed, 26 Feb 2003 10:49:36 -0800
> The search
> engine that Wrox uses on the P2P site is really quite bad -
> it doesn't seem to keep track of names or email addresses. I
> tried these searches:
>
> Devereaux superglobal arrays
...

But try it on Google... it works fine there, even without specifying the 
site:

	
http://www.google.com/search?sourceid=3Dnavclient&q=3DDevereaux+superglob
al+arrays

dsb

***************************************       
David Scott-Bigsby
Product Manager, Web Site and PEDN

PureEdge Solutions
The Leader in Secure XML e-Forms

v:250-708-8145  f:250-708-8010
1-888-517-2675   www.PureEdge.com
***************************************


> -----Original Message-----
> From: spam@k... [mailto:spam@k...]
> Sent: Wednesday, February 26, 2003 10:26 AM
> To: beginning php
> Subject: [beginning_php] Wrox search engine sucks [was [RE:
> super simple
> login trouble [ was [ RE: i need simple logout [was RE:
> variable doesn't
> show up in $_COOKIE or $HTTP_COOKIE_VARS or $_POST
>
>
> Nik,
>
> The search
> engine that Wrox uses on the P2P site is really quite bad -
> it doesn't seem to keep track of names or email addresses. I
> tried these searches:
>
> Devereaux superglobal arrays
> yomama@u... superglobal arrays
> auto global 4.1
> $_GLOBAL
> auto global
>
> The first four came back empty, the 5th one had 35 responses,
> all from ASP and Java boards, nothing from the PHP boards.
> Some search engines are so bad that I don't know why people
> use them. I wish Google would drop its prices so that every
> company could afford to license them.
>
> Anyway, there was a post you made last year that was a real
> masterpiece, on the subject below, of superglobals, but I've
> lost it and I'm wondering if your email client kept a copy.
>
> The exchange went something like this: you said I should
> switch to the new superglobals, I said I needed backwards
> compatibility, and then you came back with a function that
> first checked for the presense of the old HTTP_VARS and then
> checked for the presense of the $_GLOBALS. It was a real
> elegant piece of code, as I remember it. Do you remember what
> I'm talking about?
>
>
>
>
>
> ------------------------------------------------
> On Tue, 25 Feb 2003 16:04:57 -0800, "Nikolai Devereaux"
> <yomama@u...> wrote:
>
> >
> > > I'd like to rewrite the code, but I have to do it on my own, and
> > > so it kicks down to a very low priority. I'm not a professional
> > > programmer, I do a little programming because it helps automate
> > > other work that I do, but there are many other projects and
> > > hobbies that compete for the time that I could spend on software.
> > > Nevertheless, rewriting the code so that it doesn't depend on the
> > > autoglobal stuff from form submits is something I do very much
> > > hope to get to this spring.
> >
> >
> > Thanks again for the compliments!
> >
> > I guess the most difficult thing about starting to code with
> > register_globals =3D off is getting used to it.  But here's
> an EXTREMELY
> > important, though incredibly obvious, and outrageously
> overlooked, tidbit:
> >
> >
> >
> >         You don't have to convert the entire site at once.
> >
> >
> >
> > Just take the new snippets of code you're writing now and
> write them to use
> > the superglobal arrays instead of global variables.  You
> don't have to turn
> > off register_globals to use the superglobals.
> >
> > Any new code you write should be written *as if*
> register_globals was off,
> > even though in reality it might not be so.
> >
> >
> > Good luck, and hope this helps!
> >
> > Nik
> >
> >
> >
>
>

  Return to Index