Re: [PHP] Newbie question about

2006-09-09 Thread Mike Borrelli
Okay, after thinking about it, and looking at the replies, it seems as though there is only one situation where the short tags break things, and that's in XML with the pair being valid for XML. Yes, enabling the short tags is in the ini file, but is it on by default and require effort to change?

Re: [PHP] Memcache function usage

2006-09-09 Thread Jon Anderson
Chris wrote: Hi, I'm trying to use memcache ( http://uk2.php.net/manual/en/function.memcache-add.php ) but I'm having a problem. When using the add/set functions I want to set an expire time, but dont want the data to be compressed (using small strings it seems silly to try to and compress

Re: [PHP] Using a variable to call another variable [SOLVED]

2006-09-09 Thread Dave M G
Martin, Tedd, Robert, Christopher, Thank you all for your advice and examples. I had not been aware that it was possible to simply add another "$" ahead of the variable, to make a variable of the variable's name. And especially thank you for expressing an example in terms of a class and meth

Re: [PHP] Re: IE session problem on one server only

2006-09-09 Thread Larry Garfield
On Friday 08 September 2006 06:06, Alex Turner wrote: > > We had issues before with the session not working correctly in IE, but I > > fixed those with info from the php.net manual user comments. I'm at a > > loss as to why it's only happening on the one server and not the other > > now. If it w

Re: [PHP] Newbie question about

2006-09-09 Thread Ray Hauge
On Saturday 09 September 2006 08:19, Mike Borrelli wrote: > Good day, > > While I've been using php for more than a little while now, I've never > understood why the use of the "" short tag is noted "to be > avoided". > > Or rather, I understand that there's an option to disable it, and that's > wh

[PHP] Memcache function usage

2006-09-09 Thread Chris
Hi, I'm trying to use memcache ( http://uk2.php.net/manual/en/function.memcache-add.php ) but I'm having a problem. When using the add/set functions I want to set an expire time, but dont want the data to be compressed (using small strings it seems silly to try to and compress), what do I put

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Martin Marques
On Sat, 09 Sep 2006 08:55:35 -0500, Christopher Weldon <[EMAIL PROTECTED]> wrote: > > class myClass { > private var $_001; > private var $_002; > private var $_003; > > public function access_var($var) { > return $this->$$var; > } > } > > $cs = new m

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 16:05 -0400, tedd wrote: > At 11:19 AM -0400 9/9/06, Robert Cummings wrote: > > > > > > Or something like that. < :-) > >> > >> $easy_peasyier = array("foo1" => 1, "foo2" => 2, "foo3" => 3); > >> > >> echo($easy_peasyier['foo1']); > > > >That's zero marks on any exam

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread tedd
At 11:19 AM -0400 9/9/06, Robert Cummings wrote: > > Or something like that. < :-) $easy_peasyier = array("foo1" => 1, "foo2" => 2, "foo3" => 3); echo($easy_peasyier['foo1']); That's zero marks on any exam I ever wrote. You didn't properly read the business requirements that speci

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread tedd
At 12:29 PM -0400 9/9/06, Robert Cummings wrote: On Sat, 2006-09-09 at 12:12 -0400, Mark Charette wrote: As a senior member of the software QC department in a major industrial company, I generally find more errors and omissions in validation routines during code reviews and ethical hacks tha

Re: [PHP] PHP Access Violations

2006-09-09 Thread Jürgen Wind
did you try mysql 5.0.24a? there where some problems with 5.0.24 (segfaults...) -- View this message in context: http://www.nabble.com/PHP-Access-Violations-tf023.html#a6227018 Sent from the PHP - General forum at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 17:27 +0100, Stut wrote: > Mark Charette wrote: > > And I'll wager a brew no one here has ever done a formal, mathematically > > rigorous proof of a validation routine except as a class project. As a > > senior member of the software QC department in a major industrial > >

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 12:12 -0400, Mark Charette wrote: > > As a senior member of the software QC department in a major industrial > company, I generally find more errors and omissions in validation > routines during code reviews and ethical hacks than anywhere else. http://en.wikipedia.org/wiki

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Stut
Mark Charette wrote: And I'll wager a brew no one here has ever done a formal, mathematically rigorous proof of a validation routine except as a class project. As a senior member of the software QC department in a major industrial company, I generally find more errors and omissions in validatio

RE: [PHP] loop structure(SOLVED)

2006-09-09 Thread Reinhart Viane
Thx, it works like a charm I think the mysql_fetch_assoc was the thing I was looking for. -Oorspronkelijk bericht- Van: Robert Cummings [mailto:[EMAIL PROTECTED] Verzonden: zaterdag 9 september 2006 17:36 Aan: [EMAIL PROTECTED] CC: php-general@lists.php.net Onderwerp: Re: [PHP] loop struc

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Mark Charette
Robert Cummings wrote: On Sat, 2006-09-09 at 11:30 -0400, Mark Charette wrote: Stut wrote: Mark Charette wrote: However, looking at it from a 'knowing early the data is tainted' perspective, not from a 'validating and cleaning perspective', if you have coded that (for instance)

Re: [PHP] PHP Access Violations

2006-09-09 Thread Christopher Watson
Hi Wolf, Please correct me if I'm wrong, but neither of these tools from the MySQL team can SSH tunnel. I need that. -Chris On 9/8/06, Wolf <[EMAIL PROTECTED]> wrote: MySQL Query Tool MySQL Admin Tool Both free, both work flawlessly w/ MySQL and both maintained by MySQL Wolf Christopher W

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 11:30 -0400, Mark Charette wrote: > Stut wrote: > > Mark Charette wrote: > >> However, looking at it from a 'knowing early the data is tainted' > >> perspective, not from a 'validating and cleaning perspective', if you > >> have coded that (for instance) a variable is set vi

Re: [PHP] loop structure

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 16:49 +0200, Reinhart Viane wrote: > I've been experimenting some time now but i can't get it right. > I have a database in which I have a table with a list of photo_url > > Table: photos > Idphoto_url > 1 photos/boeket_s40.jpg > 2 photos/boeket_k12.jpg > 3 ph

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Mark Charette
Stut wrote: Mark Charette wrote: However, looking at it from a 'knowing early the data is tainted' perspective, not from a 'validating and cleaning perspective', if you have coded that (for instance) a variable is set via COOKIE, then only looking for that variable set via COOKIE will eliminat

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 10:21 -0400, Mark Charette wrote: > Robert Cummings wrote: > > On Fri, 2006-09-08 at 18:38 -0400, tedd wrote: > > > >> At 5:03 PM -0400 9/8/06, JD wrote: > >> > >> In all of the answers given thus far, no one mentioned that the use > >> of $_REQUEST has a security iss

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 08:44 -0400, tedd wrote: > At 12:10 AM -0400 9/9/06, Robert Cummings wrote: > >On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: > >> PHP List, > >> > >> I have a list of variables: > >> > >> $001 > >> $002 > >> $003 > >> $004 > >> > >> And what I'd like to do is have

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Stut
Mark Charette wrote: However, looking at it from a 'knowing early the data is tainted' perspective, not from a 'validating and cleaning perspective', if you have coded that (for instance) a variable is set via COOKIE, then only looking for that variable set via COOKIE will eliminate its being

[PHP] loop structure

2006-09-09 Thread Reinhart Viane
I've been experimenting some time now but i can't get it right. I have a database in which I have a table with a list of photo_url Table: photos Id photo_url 1 photos/boeket_s40.jpg 2 photos/boeket_k12.jpg 3 photos/boeket_z23.jpg ... I get this out of the database with thi

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Mark Charette
Robert Cummings wrote: On Fri, 2006-09-08 at 18:38 -0400, tedd wrote: At 5:03 PM -0400 9/8/06, JD wrote: In all of the answers given thus far, no one mentioned that the use of $_REQUEST has a security issue with regard to where the $_REQUEST originated. $_REQUEST is an array consisti

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 tedd wrote: > At 12:10 AM -0400 9/9/06, Robert Cummings wrote: >> On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: >>> PHP List, >>> >>> I have a list of variables: >>> >>> $001 >>> $002 >>> $003 >>> $004 >>> >>> And what I'd like to do is hav

Re: [PHP] Newbie question about

2006-09-09 Thread Satyam
All forms of short tags make your php file not XML compliant. Notice that the construct, it is what is called a Processing Instruction (PI) and admits within it absolutely anything except for a ?> which ends the PI. A PI you will be familiar with is the who is to process that PI, thus, there c

Re: [PHP] Newbie question about

2006-09-09 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Borrelli wrote: > Good day, > > While I've been using php for more than a little while now, I've never > understood why the use of the "" short tag is noted "to be > avoided". > > Or rather, I understand that there's an option to disable it, and

Re: [PHP] Newbie question about

2006-09-09 Thread Dave Goodchild
To be gained: less typing To be lost: short_open_tag may be disabled in some environments, making your code less portable. If you are only ever going to run your code in one environment and can enable short_open_tag (or if it is already on), there's no issue. -- http://www.web-buddha.co.u

[PHP] Newbie question about

2006-09-09 Thread Mike Borrelli
Good day, While I've been using php for more than a little while now, I've never understood why the use of the "" short tag is noted "to be avoided". Or rather, I understand that there's an option to disable it, and that's why it's noted in this way, but I don't understand why it's disabled? Wha

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread tedd
At 12:10 AM -0400 9/9/06, Robert Cummings wrote: On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: PHP List, I have a list of variables: $001 $002 $003 $004 And what I'd like to do is have a function which will select and return one of them. Something like: public function returnVa

Re: [PHP] if statement with or comparison (newbie)

2006-09-09 Thread Satyam
No, just try it. Since the returned value cannot have to values at once, whatever it comes it will succeed either one or both and being joined by an or, any single one that succeeds make the whole succeed. Just try it: Returned valueresult redtrue or true