From arzala at gmail.com Sat Oct 1 00:08:07 2005 From: arzala at gmail.com (Anirudh Zala) Date: Sat, 01 Oct 2005 09:38:07 +0530 Subject: [nycphp-talk] What are ? and : In-Reply-To: <33DFD788D44E404CB92B90176DEC061A6DAFD0@NYCPDMSXMB06.ad.tiaa-cref.org> References: <33DFD788D44E404CB92B90176DEC061A6DAFD0@NYCPDMSXMB06.ad.tiaa-cref.org> Message-ID: <433E0BA7.1020106@gmail.com> I like this stuff as well. It is very useful when editing some data that comes from DB, and while updating it when some conditions fails, values came from DB and values changed by users both can be checked and retained in form. Like below. $phoneVal=isset($_POST['phone']) ? $_POST['phone'] : $someRow->phone; However there are many use of these operators. One can use in their preferred way as he/she likes. Thanks, Anirudh Zala ---------------------------------------------------------------- Anirudh Zala (Production Manager), ASPL, 814-815, Star Plaza, Ph: +91 281 245 1894 Phhulchhab Square, anirudh at aspl.in Rajkot 360001, Gujarat http://www.aspl.in INDIA ---------------------------------------------------------------- Nunez, Eddy wrote: >Yeah no kidding .. I love this stuff!! >I've used them in sequence to test and update a conditional variable... >some actual code I wrie to set a string based on various database variables.. > > $approval_status = ( $adt=$res[APPROVED] ) ? "Approved on $adt" : 'Unapproved' ; > $approval_status = ( in_array($suffix,array('AN','SP')) ) ? 'N/A' : $approval_status ; > $approval_status = ( $cdt=$res[COMPLETED] ) ? "Closed on $cdt" : $approval_status ; > $approval_status = ( $cdt=$res[CANCELED] ) ? "Canceled on $cdt" : $approval_status ; > >I realized in the above the sequence of the instructions is critical for the correct >result because the following statements will use the previous results on false condition. > >FYI: texts refer to it as Trinary operator because it takes 3 operands, instead of >the more common 2 ops. > >Cool stuff! > >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Rahmin Pavlovic >Sent: Friday, September 30, 2005 12:47 PM >To: NYPHP Talk; Aaron Fischer >Subject: Re: [nycphp-talk] What are ? and : > > > >On Fri, 30 Sep 2005 12:36 , Aaron Fischer sent: > > > >>I am in the process of reading through the PHundamentals article titled >>"Functions for Storing Data Submitted From a Form and Displaying Data >> >> >>from a Database" and have run into two symbols that I am unclear about > > >>in the fix_magic_quotes function. >>http://www.nyphp.org/phundamentals/storingretrieving.php >> >>The symbols in question are ? and : >> >>The lines where they are used: >> >>1) $argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : NULL; >> >> >> > >It's a conditional operator, and it's basically a simple if/else assignment. In >this case, it's checking to see if there are any arguments -- if so, they get >assigned to $argv, if not, $argv is NULL. > >A lot of people don't like conditional operators, but I use them a lot. > > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > >************************************************************** >This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. >TIAA-CREF >************************************************************** > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From list at harveyk.com Sat Oct 1 09:27:23 2005 From: list at harveyk.com (harvey) Date: Sat, 01 Oct 2005 09:27:23 -0400 Subject: [nycphp-talk] Date switching back and forth Message-ID: <6.2.5.6.2.20051001092221.033759c0@usa.com> How is this possible? I have a site hosted at Yahoo and am using the following code to display the date/time at the top of the page. Works fine, except-- every once in a while, the date is one full day off. For example, on the 28th of this month at about 10pm, the page said it was the 29th at 10pm. Later on, it was fine and said the right date. Yahoo, of course, says it's not them, but what else could it be? Thanks in advance. $hourdiff = "-4"; $timeadjust = ($hourdiff * 60 * 60); echo date("l") . "
" . date("F jS, Y") . "
" . date("g:i:s a", time() + $timeadjust) . " NYC"; From hendler at simmons.edu Sat Oct 1 09:39:39 2005 From: hendler at simmons.edu (Jonathan) Date: Sat, 01 Oct 2005 09:39:39 -0400 Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <6.2.5.6.2.20051001092221.033759c0@usa.com> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> Message-ID: <433E919B.5040409@simmons.edu> There is an error in your code. You will always have the correctly adjusted hour because of date("g:i:s a", time() + $timeadjust) But your date will be wrong for 4 hours every day because of echo date("l") . "
" . date("F jS, Y") You need to add your time adjust to each of those dates. Try $adjusted_time = time() + $timeadjust; echo date("l",$adjusted_time) . "
" . date("F jS, Y",$adjusted_time); date("g:i:s a", $adjusted_time) ; harvey wrote: >How is this possible? I have a site hosted at Yahoo and am using the >following code to display the date/time at the top of the page. Works >fine, except-- every once in a while, the date is one full day off. >For example, on the 28th of this month at about 10pm, the page said >it was the 29th at 10pm. Later on, it was fine and said the right >date. Yahoo, of course, says it's not them, but what else could it >be? Thanks in advance. > >$hourdiff = "-4"; >$timeadjust = ($hourdiff * 60 * 60); >echo date("l") . "
" . date("F jS, Y") . "
" . date("g:i:s a", >time() + $timeadjust) . " NYC"; > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > From list at harveyk.com Sat Oct 1 09:57:13 2005 From: list at harveyk.com (harvey) Date: Sat, 01 Oct 2005 09:57:13 -0400 Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <433E919B.5040409@simmons.edu> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> <433E919B.5040409@simmons.edu> Message-ID: <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> Of course, not sure why I didn't see that. Thanks a lot! At 09:39 AM 10/1/2005, Jonathan wrote: >There is an error in your code. >You will always have the correctly adjusted hour because of > > date("g:i:s a", >time() + $timeadjust) > > >But your date will be wrong for 4 hours every day because of > >echo date("l") . "
" . date("F jS, Y") > > >You need to add your time adjust to each of those dates. >Try >$adjusted_time = time() + $timeadjust; > >echo date("l",$adjusted_time) . "
" . date("F jS, Y",$adjusted_time); >date("g:i:s a", $adjusted_time) ; > > > >harvey wrote: > > >How is this possible? I have a site hosted at Yahoo and am using the > >following code to display the date/time at the top of the page. Works > >fine, except-- every once in a while, the date is one full day off. > >For example, on the 28th of this month at about 10pm, the page said > >it was the 29th at 10pm. Later on, it was fine and said the right > >date. Yahoo, of course, says it's not them, but what else could it > >be? Thanks in advance. > > > >$hourdiff = "-4"; > >$timeadjust = ($hourdiff * 60 * 60); > >echo date("l") . "
" . date("F jS, Y") . "
" . date("g:i:s a", > >time() + $timeadjust) . " NYC"; > > > >_______________________________________________ > >New York PHP Talk Mailing List > >AMP Technology > >Supporting Apache, MySQL and PHP > >http://lists.nyphp.org/mailman/listinfo/talk > >http://www.nyphp.org > > > > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From gatzby3jr at gmail.com Sat Oct 1 12:09:04 2005 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Sat, 1 Oct 2005 12:09:04 -0400 Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> <433E919B.5040409@simmons.edu> <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> Message-ID: <29da5d150510010909y506861a4k5fd1184cd8969e3c@mail.gmail.com> I prefer to use mktime for converting dates, but I guess that's just a preference. $dateConversion = date('Y-m-d', mktime(date('H')-4, date('i'), date('s'), date('m'), date('d'), date('Y'))); On 10/1/05, harvey wrote: > > Of course, not sure why I didn't see that. > Thanks a lot! > > > At 09:39 AM 10/1/2005, Jonathan wrote: > > >There is an error in your code. > >You will always have the correctly adjusted hour because of > > > > date("g:i:s a", > >time() + $timeadjust) > > > > > >But your date will be wrong for 4 hours every day because of > > > >echo date("l") . "
" . date("F jS, Y") > > > > > >You need to add your time adjust to each of those dates. > >Try > >$adjusted_time = time() + $timeadjust; > > > >echo date("l",$adjusted_time) . "
" . date("F jS, Y",$adjusted_time); > >date("g:i:s a", $adjusted_time) ; > > > > > > > >harvey wrote: > > > > >How is this possible? I have a site hosted at Yahoo and am using the > > >following code to display the date/time at the top of the page. Works > > >fine, except-- every once in a while, the date is one full day off. > > >For example, on the 28th of this month at about 10pm, the page said > > >it was the 29th at 10pm. Later on, it was fine and said the right > > >date. Yahoo, of course, says it's not them, but what else could it > > >be? Thanks in advance. > > > > > >$hourdiff = "-4"; > > >$timeadjust = ($hourdiff * 60 * 60); > > >echo date("l") . "
" . date("F jS, Y") . "
" . date("g:i:s a", > > >time() + $timeadjust) . " NYC"; > > > > > >_______________________________________________ > > >New York PHP Talk Mailing List > > >AMP Technology > > >Supporting Apache, MySQL and PHP > > >http://lists.nyphp.org/mailman/listinfo/talk > > >http://www.nyphp.org > > > > > > > > > >_______________________________________________ > >New York PHP Talk Mailing List > >AMP Technology > >Supporting Apache, MySQL and PHP > >http://lists.nyphp.org/mailman/listinfo/talk > >http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Sat Oct 1 12:23:58 2005 From: chsnyder at gmail.com (csnyder) Date: Sat, 1 Oct 2005 12:23:58 -0400 Subject: [nycphp-talk] Validating/cleaning/scrubbing In-Reply-To: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> Message-ID: On 9/30/05, Stephen Musgrave wrote: > > Given Tuesday's presentation by Chris Shiflett (thanks, Chris!), I have > been thinking more about security and am wondering if there are any > classes out there that people are using that the trust and can > recommend? Any comments about PHP Input Filter? > > PHP Input Filter (linked the PHP Security Consortium web site) > http://cyberai.com/inputfilter/ > The blacklist in PHP Input Filter doesn't include the style attribute, which can be used in a whole class of XSS attacks that involve obscuring a page's real content with content of an attacker's choosing. Of course, stripping the style attribute will also break some of the markup generated by most WYSIWYG html editors, so perhaps that's a necessary compromise? It seems easy enough to ask it to strip style attributes on demand. -- Chris Snyder http://chxo.com/ From shiflett at php.net Sat Oct 1 12:39:53 2005 From: shiflett at php.net (Chris Shiflett) Date: Sat, 01 Oct 2005 12:39:53 -0400 Subject: [nycphp-talk] Validating/cleaning/scrubbing In-Reply-To: References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> Message-ID: <433EBBD9.1010707@php.net> Stephen Musgrave wrote: > Given Tuesday's presentation by Chris Shiflett (thanks, Chris!) Thanks - I hope it was helpful. :-) > I have been thinking more about security and am wondering if > there are any classes out there that people are using that > the trust and can recommend? Any comments about PHP Input > Filter? I'm the one that linked to it from the PHPSC Library, but I don't use it. It has a strong reputation, and I like the general approach - as a developer, you get to choose exactly what behavior you want. I always write my own filtering logic, and I use the conventions that I described in the talk (simple naming convention, variable initialization, etc.). csnyder wrote: > The blacklist in PHP Input Filter doesn't include the style > attribute, which can be used in a whole class of XSS attacks > that involve obscuring a page's real content with content of > an attacker's choosing. You might be confusing this with something else. You get to specify exactly what your blacklist (or whitelist) of tags and attributes is. Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From chsnyder at gmail.com Sat Oct 1 13:22:53 2005 From: chsnyder at gmail.com (csnyder) Date: Sat, 1 Oct 2005 13:22:53 -0400 Subject: [nycphp-talk] strategy question: point accrual system and bots In-Reply-To: References: <433C07FB.60006@neuropunks.org> Message-ID: On 9/30/05, Marc Antony Vose wrote: > I'm interested in people's strategies for preventing scripts or bots > from continually submitting actions and accruing points for someone. > In some cases, there are special things I can look for that will be > the components of these actions, but I'm looking also for some kind > of general strategy (special hash keys based on some random factor, > etc. and so on). >From a purely technical point of view, this is a Really Hard Problem. You mention hash keys and random factors, but remember that a bot will necessarily have access to any secrets that you send to its human owner. You can make scripting difficult, but you will never be able to make it impossible. If the incentive to cheat is high enough, your valued users will find ways around javascript voodoo, captchas, rate-limiting, IP-address limitations and any other barriers you put in their way. As Billy Reisinger already pointed out, it is a much better idea to concentrate on detecting and dealing with fraud rather than preventing it outright. In other words, the solution to this problem is social rather than technological. First, define the acceptable-use envelope: how fast can a user accumulate points? Are users allowed to team up? Are users allowed to log in from multiple locations? Are users allowed to sell their points on e-Bay? Write a plain-language Terms of Service that explains what is acceptable, what is not, and how you intend to deal with attempts at defrauding the system. Then find or build tools to identify marathon sessions, speed-surfing, repeated access patterns, and other obvious robot-like behavior or cheating. Keep an eye on the top performers (total points) and the fastest climbers (points earned in the last 24 hours). Never underestimate the value of direct contact. If something looks suspicious, contact the user -- in my experience, most cheaters will cave in immediately when caught, and describe how they rigged your system if you promise to fix it so that no one else can get away with a similar hack. It's not that rate-limiting and careful session handling are a waste of time -- they aren't, and they are important for other reasons. They just aren't particularly effective at preventing the kind of abuse you are concerned about. -- Chris Snyder http://chxo.com/ From hendler at simmons.edu Sat Oct 1 18:47:20 2005 From: hendler at simmons.edu (Jonathan) Date: Sat, 01 Oct 2005 18:47:20 -0400 Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <29da5d150510010909y506861a4k5fd1184cd8969e3c@mail.gmail.com> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> <433E919B.5040409@simmons.edu> <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> <29da5d150510010909y506861a4k5fd1184cd8969e3c@mail.gmail.com> Message-ID: <433F11F8.6040304@simmons.edu> strtotime() is also fun! Brian O'Connor wrote: > I prefer to use mktime for converting dates, but I guess that's just a > preference. > > $dateConversion = date('Y-m-d', mktime(date('H')-4, date('i'), > date('s'), date('m'), date('d'), date('Y'))); > > On 10/1/05, *harvey* < list at harveyk.com > wrote: > > Of course, not sure why I didn't see that. > Thanks a lot! > > > At 09:39 AM 10/1/2005, Jonathan wrote: > > >There is an error in your code. > >You will always have the correctly adjusted hour because of > > > > date("g:i:s a", > >time() + $timeadjust) > > > > > >But your date will be wrong for 4 hours every day because of > > > >echo date("l") . "
" . date("F jS, Y") > > > > > >You need to add your time adjust to each of those dates. > >Try > >$adjusted_time = time() + $timeadjust; > > > >echo date("l",$adjusted_time) . "
" . date("F jS, > Y",$adjusted_time); > >date("g:i:s a", $adjusted_time) ; > > > > > > > >harvey wrote: > > > > >How is this possible? I have a site hosted at Yahoo and am > using the > > >following code to display the date/time at the top of the page. > Works > > >fine, except-- every once in a while, the date is one full day > off. > > >For example, on the 28th of this month at about 10pm, the page said > > >it was the 29th at 10pm. Later on, it was fine and said the right > > >date. Yahoo, of course, says it's not them, but what else could it > > >be? Thanks in advance. > > > > > >$hourdiff = "-4"; > > >$timeadjust = ($hourdiff * 60 * 60); > > >echo date("l") . "
" . date("F jS, Y") . "
" . > date("g:i:s a", > > >time() + $timeadjust) . " NYC"; > > > > > >_______________________________________________ > > >New York PHP Talk Mailing List > > >AMP Technology > > >Supporting Apache, MySQL and PHP > > >http://lists.nyphp.org/mailman/listinfo/talk > > >http://www.nyphp.org > > > > > > > > > >_______________________________________________ > >New York PHP Talk Mailing List > >AMP Technology > >Supporting Apache, MySQL and PHP > >http://lists.nyphp.org/mailman/listinfo/talk > > >http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > > > > -- > Brian O'Connor > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > From gatzby3jr at gmail.com Sat Oct 1 21:55:38 2005 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Sat, 1 Oct 2005 21:55:38 -0400 Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <433F11F8.6040304@simmons.edu> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> <433E919B.5040409@simmons.edu> <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> <29da5d150510010909y506861a4k5fd1184cd8969e3c@mail.gmail.com> <433F11F8.6040304@simmons.edu> Message-ID: <29da5d150510011855w55b6972aqec355566160539c3@mail.gmail.com> I use strtotime to convert dates out of a database into more visually pleasing forms :) On 10/1/05, Jonathan wrote: > > strtotime() is also fun! > > Brian O'Connor wrote: > > > I prefer to use mktime for converting dates, but I guess that's just a > > preference. > > > > $dateConversion = date('Y-m-d', mktime(date('H')-4, date('i'), > > date('s'), date('m'), date('d'), date('Y'))); > > > > On 10/1/05, *harvey* < list at harveyk.com > > wrote: > > > > Of course, not sure why I didn't see that. > > Thanks a lot! > > > > > > At 09:39 AM 10/1/2005, Jonathan wrote: > > > > >There is an error in your code. > > >You will always have the correctly adjusted hour because of > > > > > > date("g:i:s a", > > >time() + $timeadjust) > > > > > > > > >But your date will be wrong for 4 hours every day because of > > > > > >echo date("l") . "
" . date("F jS, Y") > > > > > > > > >You need to add your time adjust to each of those dates. > > >Try > > >$adjusted_time = time() + $timeadjust; > > > > > >echo date("l",$adjusted_time) . "
" . date("F jS, > > Y",$adjusted_time); > > >date("g:i:s a", $adjusted_time) ; > > > > > > > > > > > >harvey wrote: > > > > > > >How is this possible? I have a site hosted at Yahoo and am > > using the > > > >following code to display the date/time at the top of the page. > > Works > > > >fine, except-- every once in a while, the date is one full day > > off. > > > >For example, on the 28th of this month at about 10pm, the page said > > > >it was the 29th at 10pm. Later on, it was fine and said the right > > > >date. Yahoo, of course, says it's not them, but what else could it > > > >be? Thanks in advance. > > > > > > > >$hourdiff = "-4"; > > > >$timeadjust = ($hourdiff * 60 * 60); > > > >echo date("l") . "
" . date("F jS, Y") . "
" . > > date("g:i:s a", > > > >time() + $timeadjust) . " NYC"; > > > > > > > >_______________________________________________ > > > >New York PHP Talk Mailing List > > > >AMP Technology > > > >Supporting Apache, MySQL and PHP > > > >http://lists.nyphp.org/mailman/listinfo/talk > > > >http://www.nyphp.org > > > > > > > > > > > > > >_______________________________________________ > > >New York PHP Talk Mailing List > > >AMP Technology > > >Supporting Apache, MySQL and PHP > > >http://lists.nyphp.org/mailman/listinfo/talk > > > > >http://www.nyphp.org > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > > > > > > -- > > Brian O'Connor > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >New York PHP Talk Mailing List > >AMP Technology > >Supporting Apache, MySQL and PHP > >http://lists.nyphp.org/mailman/listinfo/talk > >http://www.nyphp.org > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Sun Oct 2 18:34:24 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sun, 2 Oct 2005 18:34:24 -0400 (EDT) Subject: [nycphp-talk] Date switching back and forth In-Reply-To: <433F11F8.6040304@simmons.edu> References: <6.2.5.6.2.20051001092221.033759c0@usa.com> <433E919B.5040409@simmons.edu> <6.2.5.6.2.20051001095537.02ea71b0@harveyk.com> <29da5d150510010909y506861a4k5fd1184cd8969e3c@mail.gmail.com> <433F11F8.6040304@simmons.edu> Message-ID: On Sat, 1 Oct 2005, Jonathan wrote: > strtotime() is also fun! Though a bit slower. (Isn't it?) --- David Mintz http://davidmintz.org/ From mitch.pirtle at gmail.com Sun Oct 2 20:57:56 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Sun, 2 Oct 2005 20:57:56 -0400 Subject: [nycphp-talk] FW: [nycbug-talk] gpl on /. In-Reply-To: <0MKp2t-1ELPAV3kEl-0002Wy@mrelay.perfora.net> References: <0MKp2t-1ELPAV3kEl-0002Wy@mrelay.perfora.net> Message-ID: <330532b60510021757s7576c822ob424d931dcfaa70d@mail.gmail.com> On 9/30/05, Hans Zaunere wrote: > > Marc Spitzer wrote on Friday, September 30, 2005 11:41 AM: > > Saw below on slashdot, this is something we need to be up to speed on. > > All you web developers out there need to add in time for licence > > review on your projects, if you use any 3rd party lib, ouch. It is only an issue if you are trying to use the GPL and also have non-GPL releases. If you are buying totally into the GPL, then by all means go whole hog. However, if you are trying to have a dual-licensed release, using the GPL means you can pretty much forget about including any external GPL libraries. That is where we are with both Mambo and Joomla! at present, and isn't really all that bad. Well, other than the fact that the first major commercial product from JamboWorks is now going to be released under the GPL. -- Mitch, crying in his Guinness From mikko.rantalainen at peda.net Mon Oct 3 05:09:50 2005 From: mikko.rantalainen at peda.net (Mikko Rantalainen) Date: Mon, 03 Oct 2005 12:09:50 +0300 Subject: [nycphp-talk] GPL version 3 In-Reply-To: <0MKp2t-1ELPAV3kEl-0002Wy@mrelay.perfora.net> References: <0MKp2t-1ELPAV3kEl-0002Wy@mrelay.perfora.net> Message-ID: <4340F55E.3020306@peda.net> Hans Zaunere wrote: > Marc Spitzer wrote on Friday, September 30, 2005 11:41 AM: > >>Saw below on slashdot, this is something we need to be up to speed on. >> All you web developers out there need to add in time for licence >>review on your projects, if you use any 3rd party lib, ouch. >> >> [...] >>interview link http://news.zdnet.com/2100-3513_22-5884172.html > > Interesting developments in the exciting world of GPL licensing... If you're using GPL version 2 licensed software and you're happy with it, you have nothing to worry. GPL version 3 cannot change how old software has been licensed. If you comply with the GPL version 2 now, you'll automaticaly comply with the GPL version 2 in the future too. What could change, is that you cannot upgrade your GPL software if the latest release is distributed under *different* licence (e.g. GPL version 3 instead of GPL version 2). You need to review the license of any piece of software every time the license changes anyway, so this is nothing new. It would be worth to mention that most software licensed under GPL version 2 have clause in their license that says: "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version." Note that it's up to the *end user* to decide which license he wants to accept. If version 3 allows something that version 2 didn't allow, then he clearly wants to select version 3. If version 2 suits you better, select that. Obviously, you cannot mix clauses from version 2 and version 3. -- Mikko From agfische at email.smith.edu Mon Oct 3 08:11:23 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Mon, 03 Oct 2005 08:11:23 -0400 Subject: [nycphp-talk] Validating/cleaning/scrubbing In-Reply-To: <433EBBD9.1010707@php.net> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> Message-ID: <43411FEB.1030705@email.smith.edu> Chris Shiflett wrote: >Stephen Musgrave wrote: > > Given Tuesday's presentation by Chris Shiflett (thanks, Chris!) > >Thanks - I hope it was helpful. :-) > > Unfortunately I wasn't able to make it down for the presentation. Will there be an audio recording posted and/or online presentation materials to view? -Aaron From wfan at VillageVoice.com Mon Oct 3 16:43:47 2005 From: wfan at VillageVoice.com (Fan, Wellington) Date: Mon, 3 Oct 2005 16:43:47 -0400 Subject: [nycphp-talk] Any success/failures with PHP/Java bridge? Message-ID: <4D2FAD9B00577645932AD7ED5FECA24591B16F@mail> Listies, I will need to use a PHP/Java bridge soon and am looking for stories of horror and delight. Anyone have any experiences? I've heard some differing reports: it seems that there is some confusion regarding the version of PHP required. I've heard that you *must* have 5, and elsewhere it seems people are using 4.3.x with no problems. The PHP/Java bridge lives at: http://php-java-bridge.sourceforge.net/ And a mention that it works with PHP 4.3.2: http://www.php.net/manual/en/ref.java.php#53184 Thanks all! From agfische at email.smith.edu Mon Oct 3 16:56:32 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Mon, 03 Oct 2005 16:56:32 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? Message-ID: <43419B00.8030107@email.smith.edu> I've been thinking of implementing the PHundamentals function for fixing magic quotes when on a shared server: (http://www.nyphp.org/phundamentals/storingretrieving.php) The line in question: return $sybase ? str_replace ('\'\'', '\'', $var) : stripslashes ($var); I broke the str_replace and stripslashes out into separate code to test and make sure I understand what was going on. When testing, the str_replace wasn't working as is with the search and replace string surrounded by single quotes. After checking the php manual , I changed the search and replace text to be surrounded by double quotes and it worked correctly. Should the PHundamentals function be changed to have double quotes? Here's the code I used to test: // test sybase str_replace with single quotes - doesn't appear to produce desired result echo '

'; $sb_string = "I\'\'m heading out on the road"; $sb_string_new = str_replace('\'\'', '\'', $sb_string); echo 'Sybase string is ' . $sb_string . '
'; echo 'String replace produces ' . $sb_string_new . '
'; // test sybase str_replace with double quotes - appears to produce desired result echo '
'; $sb_string_new = str_replace("\'\'", "\'", $sb_string); echo 'Sybase string is ' . $sb_string . '
'; echo 'String replace produces ' . $sb_string_new . '
'; And the output: Sybase string is I\'\'m heading out on the road String replace produces I\'\'m heading out on the road Sybase string is I\'\'m heading out on the road String replace produces I\'m heading out on the road Thoughts? -Aaron From dcech at phpwerx.net Mon Oct 3 17:09:17 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 03 Oct 2005 17:09:17 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? In-Reply-To: <43419B00.8030107@email.smith.edu> References: <43419B00.8030107@email.smith.edu> Message-ID: <43419DFD.8080504@phpwerx.net> Aaron, As it happens I wrote the line in question, so I'll try and explain what's going on ;) I think that you're confused about the effect of the magic_quotes_sybase php.ini directive. Say you had the string: I'm heading out on the road With magic_quotes_gpc=On and magic_quotes_sybase=Off, the string coming in would look like: I\'m heading out on the road With magic_quotes_gpc and magic_quotes_sybase both On, the string coming in would look like: I''m heading out on the road So, in php/english the idea of that line is: if (magic_quotes_sybase = On) { // replace '' with ' return str_replace ('\'\'', '\'', $var) } else { // use regular stripslashes return stripslashes ($var) } You could also write the line as: return $sybase ? str_replace ("''", "'", $var) : stripslashes ($var); to have the same effect, but I tend to prefer using single-quoted strings unless I'm actually embedding \n line breaks or variables, so I went with the single-quotes-and-slashes encoding. Dan Aaron Fischer wrote: > I've been thinking of implementing the PHundamentals function for fixing > magic quotes when on a shared server: > (http://www.nyphp.org/phundamentals/storingretrieving.php) > > The line in question: > return $sybase ? str_replace ('\'\'', '\'', $var) : stripslashes ($var); > > I broke the str_replace and stripslashes out into separate code to test > and make sure I understand what was going on. > > When testing, the str_replace wasn't working as is with the search and > replace string surrounded by single quotes. After checking the php > manual , I changed the search and replace text to be surrounded by > double quotes and it worked correctly. > > Should the PHundamentals function be changed to have double quotes? > > Here's the code I used to test: > > // test sybase str_replace with single quotes - doesn't appear to > produce desired result > echo '

'; > $sb_string = "I\'\'m heading out on the road"; > $sb_string_new = str_replace('\'\'', '\'', $sb_string); > echo 'Sybase string is ' . $sb_string . '
'; > echo 'String replace produces ' . $sb_string_new . '
'; > > // test sybase str_replace with double quotes - appears to produce > desired result > echo '
'; > $sb_string_new = str_replace("\'\'", "\'", $sb_string); > echo 'Sybase string is ' . $sb_string . '
'; > echo 'String replace produces ' . $sb_string_new . '
'; > > And the output: > Sybase string is I\'\'m heading out on the road > String replace produces I\'\'m heading out on the road > > Sybase string is I\'\'m heading out on the road > String replace produces I\'m heading out on the road > > Thoughts? > > -Aaron > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From stephen at musgrave.org Mon Oct 3 17:54:45 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Mon, 3 Oct 2005 17:54:45 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X Message-ID: Hello - I am wondering if anybody has a favorite ER (Entity Relationship) Diagram tool that they like to use with MySQL on OS X. Or if not an "official" piece of ER software, maybe some other visualization process manually done in something like Visio? I only need it to be read-only - I've got a pretty large database I'm working with and I'd love a poster of it! Thanks, Stephen ??????????????????????????????? email: stephen at musgrave.org web: http://stephen.musgrave.org/career office: 917.721.3378 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 620 bytes Desc: not available URL: From Consult at CovenantEDesign.com Mon Oct 3 19:11:45 2005 From: Consult at CovenantEDesign.com (CED) Date: Mon, 3 Oct 2005 19:11:45 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X References: Message-ID: <06fd01c5c86f$d31f0e00$0319a8c0@ced> Stephen, I am currently the data-migration lead on a massive project covering just over 5,000 tables. I found the most effective tools to be Access, for getting a handle and feel on the data.. Visio, for setting up the normalized state of the 'new' DBs... Great DDL export features and options. Query Analyzer, for actually scrubbing and working with the 'to-be moved' data. I'm fortunate enough to have an employer who provides me with this tools, however I have heard some really good things about DDT which can be found here amongst others: http://www.databaseanswers.com/modelling_tools.htm Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Stephen Musgrave To: talk at lists.nyphp.org Sent: Monday, October 03, 2005 5:54 PM Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X Hello - I am wondering if anybody has a favorite ER (Entity Relationship) Diagram tool that they like to use with MySQL on OS X. Or if not an "official" piece of ER software, maybe some other visualization process manually done in something like Visio? I only need it to be read-only - I've got a pretty large database I'm working with and I'd love a poster of it! Thanks, Stephen ??????????????????????????????? email: stephen at musgrave.org web: http://stephen.musgrave.org/career office: 917.721.3378 ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From agfische at email.smith.edu Mon Oct 3 19:24:56 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Mon, 03 Oct 2005 19:24:56 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? In-Reply-To: <43419DFD.8080504@phpwerx.net> References: <43419B00.8030107@email.smith.edu> <43419DFD.8080504@phpwerx.net> Message-ID: <4341BDC8.8060206@email.smith.edu> Dan Cech wrote: >Aaron, > >As it happens I wrote the line in question, so I'll try and explain >what's going on ;) > > > Most appreciated Dan! >I think that you're confused about the effect of the magic_quotes_sybase >php.ini directive. > > > Hmmm, that doesn't surprise me. >Say you had the string: > >I'm heading out on the road > >With magic_quotes_gpc=On and magic_quotes_sybase=Off, the string coming >in would look like: > >I\'m heading out on the road > >With magic_quotes_gpc and magic_quotes_sybase both On, the string coming >in would look like: > >I''m heading out on the road > >So, in php/english the idea of that line is: > >if (magic_quotes_sybase = On) { > // replace '' with ' > return str_replace ('\'\'', '\'', $var) >} else { > // use regular stripslashes > return stripslashes ($var) >} > >You could also write the line as: > >return $sybase ? str_replace ("''", "'", $var) : stripslashes ($var); > >to have the same effect, but I tend to prefer using single-quoted >strings unless I'm actually embedding \n line breaks or variables, so I >went with the single-quotes-and-slashes encoding. > >Dan > > Gotcha. I was thrown off by misinterpreting the search and replace strings. Thanks, that's very helpful! Cheers, -Aaron From shiflett at php.net Mon Oct 3 19:27:03 2005 From: shiflett at php.net (Chris Shiflett) Date: Mon, 03 Oct 2005 19:27:03 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? In-Reply-To: <43419DFD.8080504@phpwerx.net> References: <43419B00.8030107@email.smith.edu> <43419DFD.8080504@phpwerx.net> Message-ID: <4341BE47.1080604@php.net> Aaron Fischer wrote: > $sb_string = "I\'\'m heading out on the road"; You don't have to escape single quotes when you enclose the string with double quotes. I wrote a bit more on quoting strings here: http://shiflett.org/archive/140 Dan Cech wrote: > return $sybase ? str_replace ("''", "'", $var) : stripslashes ($var); I prefer this approach when it helps me avoid escaping. In this case, I think both look confusing, but the escaping makes it worse. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From ps at pswebcode.com Mon Oct 3 19:29:15 2005 From: ps at pswebcode.com (Peter Sawczynec) Date: Mon, 3 Oct 2005 19:29:15 -0400 Subject: [nycphp-talk] Bill Gates on Cover of InfoWorld Message-ID: <002001c5c872$480dd460$68e4a144@PeterStorm> http://www.infoworld.com/print_issue/archive/latest_print_issue.html Just such a great goofy concept sketch of Bill Gates as hard edged football coach running MSFT. Warmest regards, Peter Sawczynec Technology Director PSWebcode www.pswebcode.com ps at pswebcode.com 718.796.1951 From lists at zaunere.com Mon Oct 3 19:50:37 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 3 Oct 2005 19:50:37 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X In-Reply-To: <06fd01c5c86f$d31f0e00$0319a8c0@ced> Message-ID: <007001c5c875$422be930$3dd9a8c0@MZ> > I'm fortunate enough to have an employer who provides me with this tools, > however I have heard some really good things about DDT which can be found > here amongst others: > http://www.databaseanswers.com/modelling_tools.htm Nice page... Myself a others are currently engaged in a large financial project and we've been using Enterprise Architect. Quite nice, with remote repository management (via MySQL), project sharing, including straight forward interface and UML. We're using all facets of it, from business processes, to state diagrams, to database reverse engineering from AS400/RPG. Fun stuff! --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From agfische at email.smith.edu Mon Oct 3 20:15:45 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Mon, 03 Oct 2005 20:15:45 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? In-Reply-To: <4341BE47.1080604@php.net> References: <43419B00.8030107@email.smith.edu> <43419DFD.8080504@phpwerx.net> <4341BE47.1080604@php.net> Message-ID: <4341C9B1.8060004@email.smith.edu> Chris Shiflett wrote: >Aaron Fischer wrote: > > $sb_string = "I\'\'m heading out on the road"; > >You don't have to escape single quotes when you enclose the string with >double quotes. I wrote a bit more on quoting strings here: > > > Right, I know that. In this case I was attempting to recreate a string that would represent, say, a POST['var'] on a server that had magic_quotes_gpc turned on. So I wanted the escape slash to be a part of the string so I could then test stripslashes on it. It string var was actually supposed to be: $sb_string = "I\'m heading out on the road"; Then: $sb_string_new = stripslashes($sb_string); // escape slash should be removed >http://shiflett.org/archive/140 > > > Cool link. >Dan Cech wrote: > > return $sybase ? str_replace ("''", "'", $var) : stripslashes ($var); > >I prefer this approach when it helps me avoid escaping. In this case, I >think both look confusing, but the escaping makes it worse. > > > This looks better to me too (but what do I know?). -Aaron From dcech at phpwerx.net Mon Oct 3 21:12:26 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 03 Oct 2005 21:12:26 -0400 Subject: [nycphp-talk] Bug in PHundamentals function? In-Reply-To: <4341C9B1.8060004@email.smith.edu> References: <43419B00.8030107@email.smith.edu> <43419DFD.8080504@phpwerx.net> <4341BE47.1080604@php.net> <4341C9B1.8060004@email.smith.edu> Message-ID: <4341D6FA.9040108@phpwerx.net> Aaron Fischer wrote: > Chris Shiflett wrote: >> Dan Cech wrote: >>> return $sybase ? str_replace ("''", "'", $var) : stripslashes ($var); >> >> I prefer this approach when it helps me avoid escaping. In this case, I >> think both look confusing, but the escaping makes it worse. > > This looks better to me too (but what do I know?). Yes, the double-quoted syntax is probably easier to understand in this case. Honestly I never thought about it because single-quoted is what I usually use. That said there may also be a (very slight) performance advantage to using the single-quoted version, given the fact that it's executed for every member (recursively) of every array affected by magic_quotes_gpc, for every page load. Dan From ashaw at iifwp.org Mon Oct 3 23:39:04 2005 From: ashaw at iifwp.org (Allen Shaw) Date: Mon, 03 Oct 2005 22:39:04 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <06fd01c5c86f$d31f0e00$0319a8c0@ced> References: <06fd01c5c86f$d31f0e00$0319a8c0@ced> Message-ID: <4341F958.7000707@iifwp.org> CED wrote: > http://www.databaseanswers.com/modelling_tools.htm That's a great list of tools. Something else very interesting to me is this note at the end of the page: > *A short note about about Data Modelling and Database Design ...* > >Data modelling and database design are two very different activities. > >For data modelling, the question you are asking is : >1) What does the world being modelled look like ? > In particular, you are looking for similarities between things. > Then you identify a 'super-type' of thing which may have sub-types. > For example, Corporate Customers and Personal Customers > > If, for example, supplier contacts are conceptually different things from customer contacts, > then the answer is that they should be modelled separately. > On the other hand, if they are merely sub-sets of the same thing, then treat them as the same thing. > >2) For database design, you are answering a different question:- > how can I efficiently design a database that will support the functions of proposed application or Web Site. > The key task here is to identify similarities between entities so that you can integrate them into the > same table, usually with a 'Type' indicator. > For example, a Customer table, which combines all attributes of both Corporate and Personal Customers. > As a result, it is possible to spend a great deal of time breaking things out when creating a Data Model, and > then collapsing them back together when designing the corresponding database. > What interest me here is the writer's understanding that when I'm programming an actual application it's in my best interest to de-normalize the data model, aiming for fewer tables than my data model would have indicated. I'm assuming this person has good reason for what he's saying, but it's something I've never thought of or heard before? Can anyone suggest reasons why it's better to have fewer tables, or to try and combine different types of objects into the same table? Surely it's something to do with better performance (fewer joins, simpler queries), right? Is this a common principle of design that I haven't learned yet? - Allen -- Allen Shaw Polymer (http://polymerdb.org) From hans at cyberxdesigns.com Tue Oct 4 00:46:46 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Tue, 04 Oct 2005 00:46:46 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X In-Reply-To: <007001c5c875$422be930$3dd9a8c0@MZ> References: <007001c5c875$422be930$3dd9a8c0@MZ> Message-ID: <43420936.3010209@cyberxdesigns.com> Wow Hans, that sounds like a pretty cool project. I wish I could get in on a gig like that. Hans --- Hans Kaspersetz / Presentation Lacky / New York PHP www.nyphp.org / www.cyberxdesigns.com Hans Zaunere wrote: > > >>I'm fortunate enough to have an employer who provides me with this tools, >>however I have heard some really good things about DDT which can be found >>here amongst others: >>http://www.databaseanswers.com/modelling_tools.htm >> >> > >Nice page... > >Myself a others are currently engaged in a large financial project and we've >been using Enterprise Architect. Quite nice, with remote repository >management (via MySQL), project sharing, including straight forward >interface and UML. We're using all facets of it, from business processes, >to state diagrams, to database reverse engineering from AS400/RPG. Fun >stuff! > > > >--- >Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > From phil at bearingasset.com Tue Oct 4 08:06:47 2005 From: phil at bearingasset.com (Phil Duffy) Date: Tue, 4 Oct 2005 08:06:47 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4341F958.7000707@iifwp.org> Message-ID: <20051004120654.669E0A862D@virtu.nyphp.org> Allen, > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Allen Shaw > Sent: Monday, October 03, 2005 10:39 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > Can anyone suggest reasons why it's better to have fewer tables, or to > try and combine different types of objects into the same table? Surely > it's something to do with better performance (fewer joins, simpler > queries), right? Is this a common principle of design that I haven't > learned yet? The rule I used in the development of a framework was (1) model the real world first, and (2) de-normalize only when it is obviously necessary for performance reasons. I can't say that I ever read that anywhere, but I am sure it is not original. The framework was the foundation for large, complex applications with high transaction volumes. Performance was appropriate and de-normalization was rare. Phil From rsd at electronink.com Tue Oct 4 09:06:46 2005 From: rsd at electronink.com (Russ Demarest) Date: Tue, 4 Oct 2005 09:06:46 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051004120654.669E0A862D@virtu.nyphp.org> References: <20051004120654.669E0A862D@virtu.nyphp.org> Message-ID: <6DD7AD27-1EFF-4A88-B388-3A6505539EA3@electronink.com> Going back to the original request... An ER tool I have heard good things about but have not played with much is SQL 4X Manager J 3. If you got the time, check it out and let us know how it is. http://www.macosguru.de/ On Oct 4, 2005, at 8:06 AM, Phil Duffy wrote: > Allen, > > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org [mailto:talk- >> bounces at lists.nyphp.org] >> On Behalf Of Allen Shaw >> Sent: Monday, October 03, 2005 10:39 PM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER >> Diagram >> > > > > >> Can anyone suggest reasons why it's better to have fewer tables, >> or to >> try and combine different types of objects into the same table? >> Surely >> it's something to do with better performance (fewer joins, simpler >> queries), right? Is this a common principle of design that I haven't >> learned yet? >> > > The rule I used in the development of a framework was (1) model the > real > world first, and (2) de-normalize only when it is obviously > necessary for > performance reasons. I can't say that I ever read that anywhere, > but I am > sure it is not original. > > The framework was the foundation for large, complex applications > with high > transaction volumes. Performance was appropriate and de- > normalization was > rare. > > Phil > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From dcallaghan at linuxmail.org Tue Oct 4 09:30:51 2005 From: dcallaghan at linuxmail.org (Dave Callaghan) Date: Tue, 04 Oct 2005 08:30:51 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) Message-ID: <20051004133051.C41443AA515@ws5-8.us4.outblaze.com> > Can anyone suggest reasons why it's better to have fewer tables, or to > try and combine different types of objects into the same table? Surely > it's something to do with better performance (fewer joins, simpler > queries), right? Is this a common principle of design that I haven't > learned yet? Big tables (may) have big full table scans while multiple small tables (may) impact IO. There is an impact with regard to full table scans depending on how many blocks your max row takes up. Of course, this will depend on how the columns are defined. Its easy to imagine a table with three column of BLOBS taking longer to scan then a table with 20 columns of single bytes. There is also some simple math to estimate the impact of splitting the table out into multiple tables. You'll have 1+x primary keys (K) to maintain instead of just one. The height of your index (H) will also have an impact on IO. So, for every row retrieved, you can compare your baseline IO for a single table to K(H+1). Of course, this assumes that you are making this join frequently. So, if you know that to actually describe the entity you will always need x attributes, and you split these x attributes into n tables where n > 1, you will likely suffer an unnecessary performance penalty. However, if to typically describe an entity you just need a subset of x (for example, employee contact info) and there is another subset y that is rarely accessed and would make for a large table scan (employee image), I might consider splitting them up. Dave Callaghan programmer dcallaghan at linuxmail.org -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze From stephen at musgrave.org Tue Oct 4 11:07:53 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Tue, 4 Oct 2005 11:07:53 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051004120654.669E0A862D@virtu.nyphp.org> References: <20051004120654.669E0A862D@virtu.nyphp.org> Message-ID: On Oct 4, 2005, at 8:06 AM, Phil Duffy wrote: >> Can anyone suggest reasons why it's better to have fewer tables, or to >> try and combine different types of objects into the same table? >> Surely >> it's something to do with better performance (fewer joins, simpler >> queries), right? Is this a common principle of design that I haven't >> learned yet? > > The rule I used in the development of a framework was (1) model the > real > world first, and (2) de-normalize only when it is obviously necessary > for > performance reasons. I can't say that I ever read that anywhere, but > I am > sure it is not original. This is an interesting topic because I'm approaching a question based upon this principal. There is an application that I am building where the User record can have 5 addresses (home address, work address, permanent address, international address, etc, etc). I'm considering making a table called UserAddress and then linking it to address ID fields in the User table. I'm on the fence about it because while I don't want a monstrous User table with tons of columns, I also don't want to over normalize. Thanks, Stephen ??????????????????????????????? email: stephen at musgrave.org web: http://stephen.musgrave.org/career office: 917.721.3378 From hans at cyberxdesigns.com Tue Oct 4 11:15:06 2005 From: hans at cyberxdesigns.com (Hans Kaspersetz) Date: Tue, 04 Oct 2005 11:15:06 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X In-Reply-To: <007001c5c875$422be930$3dd9a8c0@MZ> References: <007001c5c875$422be930$3dd9a8c0@MZ> Message-ID: <43429C7A.606@cyberxdesigns.com> It just dawned on me, that I need to chime in here in a more thoughtful way. Like Hans said, we are using Enterprise Architect, the short coming is that it does not run natively on OS X. You will need virtual PC with Windows running on your OS X machine. This will incur a performance hit. I am currently using EA on OSX through Virtual PC with Windows XP Home. It is not a terrible situation. We standardized on EA even though a part of the team is on OS X becuase it is a very useful piece of software and the benefit of EA out weighs the cost of Virtual PC. Just to be clear I have a 12" Power Book G4 1.33 with 1.2 GB of RAM. Hans K -- Hans C. Kaspersetz Cyber X Designs Office: 201-558-7929 http://www.cyberxdesigns.com Hans Zaunere wrote: > > >>I'm fortunate enough to have an employer who provides me with this tools, >>however I have heard some really good things about DDT which can be found >>here amongst others: >>http://www.databaseanswers.com/modelling_tools.htm >> >> > >Nice page... > >Myself a others are currently engaged in a large financial project and we've >been using Enterprise Architect. Quite nice, with remote repository >management (via MySQL), project sharing, including straight forward >interface and UML. We're using all facets of it, from business processes, >to state diagrams, to database reverse engineering from AS400/RPG. Fun >stuff! > > > >--- >Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > From ashaw at iifwp.org Tue Oct 4 11:53:46 2005 From: ashaw at iifwp.org (Allen Shaw) Date: Tue, 04 Oct 2005 10:53:46 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: References: <20051004120654.669E0A862D@virtu.nyphp.org> Message-ID: <4342A58A.1020309@iifwp.org> Stephen Musgrave wrote: >This is an interesting topic because I'm approaching a question based >upon this principal. There is an application that I am building where >the User record can have 5 addresses (home address, work address, >permanent address, international address, etc, etc). I'm considering >making a table called UserAddress and then linking it to address ID >fields in the User table. I'm on the fence about it because while I >don't want a monstrous User table with tons of columns, I also don't >want to over normalize. > > Here's a great working example to explore the issue. I would let the User table contain no address info, and then let the UserAddress table contain one address per row with an extra column for UserID. This seems like a clear one-to-many relationship between a person and his/her many addresses (also assuming it could be any number between 0 and 5, right?), so adding 5 sets of columns to the User table doesn't seem right... Honestly, the only reason I'm writing here is so someone can correct me if I'm wrong (and if I'm right then this might actually helping somebody -- neat-o ...). -- Allen Shaw Polymer (http://polymerdb.org) From ashaw at iifwp.org Tue Oct 4 11:56:18 2005 From: ashaw at iifwp.org (Allen Shaw) Date: Tue, 04 Oct 2005 10:56:18 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051004133051.C41443AA515@ws5-8.us4.outblaze.com> References: <20051004133051.C41443AA515@ws5-8.us4.outblaze.com> Message-ID: <4342A622.2080203@iifwp.org> Dave Callaghan wrote: >There is also some simple math to estimate the impact of splitting the table out into multiple tables. You'll have 1+x primary keys (K) ... > [snip] Dave, this is really interesting. If you (or anybody?) wants to recommend further reading on the topic I'd love to follow up more. Links, anyone? Thanks, Allen -- Allen Shaw Polymer (http://polymerdb.org) From dcech at phpwerx.net Tue Oct 4 12:03:24 2005 From: dcech at phpwerx.net (Dan Cech) Date: Tue, 04 Oct 2005 12:03:24 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4342A58A.1020309@iifwp.org> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> Message-ID: <4342A7CC.9040302@phpwerx.net> Allen Shaw wrote: > Stephen Musgrave wrote: > >> This is an interesting topic because I'm approaching a question based >> upon this principal. There is an application that I am building where >> the User record can have 5 addresses (home address, work address, >> permanent address, international address, etc, etc). I'm considering >> making a table called UserAddress and then linking it to address ID >> fields in the User table. I'm on the fence about it because while I >> don't want a monstrous User table with tons of columns, I also don't >> want to over normalize. >> > Here's a great working example to explore the issue. I would let the > User table contain no address info, and then let the UserAddress table > contain one address per row with an extra column for UserID. This seems > like a clear one-to-many relationship between a person and his/her many > addresses (also assuming it could be any number between 0 and 5, > right?), so adding 5 sets of columns to the User table doesn't seem > right... > > Honestly, the only reason I'm writing here is so someone can correct me > if I'm wrong (and if I'm right then this might actually helping somebody > -- neat-o ...). I was going to say the same thing, although you would probably want the address table to contain the user id, address type and address columns. It seems to make sense from pretty much every angle, and of course will work for any number of different addresses. If you're interested in doing any queries that would match against more than 1 address then this will also be much easier, like: SELECT user_id FROM addresses WHERE address_type IN (1,2,3) AND country='USA' If you do go this way there is definitely no need to have any address columns in the user table, which is also a boon for any query where you're not pulling address information (which in my (limited) experience tends to be most of them). Dan From rsd at electronink.com Tue Oct 4 12:16:26 2005 From: rsd at electronink.com (Russ Demarest) Date: Tue, 4 Oct 2005 12:16:26 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4342A58A.1020309@iifwp.org> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> Message-ID: Another consideration is how you are using the addresses and the users. For example if you are going to be joining users with other tables then trying to determine which of those users also have an address in NY the queries can beat on your server. How many users will you have? What with the addresses be used for? Will you need to search all addresses for each user related to other tables? From a data point of view you would normalize it all and I would suggest a states and countries table to be linked to addresses as a well as address type. But when you are trying to come up with all the users with a address in NY who are related to other tables, i.e. groups, you may wish you have it all in one table. If you get really "normal" you could have a "user_addresses" table which would contain the address_type field so if you have 2 users at the same address the address would only be in the address table once but related to both users. :) Don't get me started if you need to track history. "Where did user X live at home 2 years ago?". Then you have a start_date and end_date in the user_addresses. I have done it both ways and there really is not a clear winner, depends on the situation. I am glad I am not tracking user address history any more, Good luck On Oct 4, 2005, at 11:53 AM, Allen Shaw wrote: > Stephen Musgrave wrote: > > >> This is an interesting topic because I'm approaching a question based >> upon this principal. There is an application that I am building >> where >> the User record can have 5 addresses (home address, work address, >> permanent address, international address, etc, etc). I'm considering >> making a table called UserAddress and then linking it to address ID >> fields in the User table. I'm on the fence about it because while I >> don't want a monstrous User table with tons of columns, I also don't >> want to over normalize. >> >> >> > Here's a great working example to explore the issue. I would let the > User table contain no address info, and then let the UserAddress table > contain one address per row with an extra column for UserID. This > seems > like a clear one-to-many relationship between a person and his/her > many > addresses (also assuming it could be any number between 0 and 5, > right?), so adding 5 sets of columns to the User table doesn't seem > right... > > Honestly, the only reason I'm writing here is so someone can > correct me > if I'm wrong (and if I'm right then this might actually helping > somebody > -- neat-o ...). > > -- > Allen Shaw > Polymer (http://polymerdb.org) > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From max.goldberg at gmail.com Tue Oct 4 12:46:55 2005 From: max.goldberg at gmail.com (max goldberg) Date: Tue, 4 Oct 2005 12:46:55 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> Message-ID: <87e6ded30510040946s701ccf5fn45bc1753e84f8fa3@mail.gmail.com> I'm actually running into the point of an application where my completely normalized database design is just killing my database server. It was fine during the first few months of my site being up but as my traffic grew, it really began to take a toll. The first thing I had to do was move from MyISAM to InnoDB, due to the huge number of locks causing the site to just screech to a halt. On average I am getting around 5000 hits per minute to the PHP pages that connect to the database. During the "slow" time at 7am, I get around 2500. I've managed to lower my average queries per second from 300 to 220, but normalization is still killing me. This makes doing any sort of database maintenance fairly difficult. InnoDB has helped a lot, I have a dedicated DB server, but one query that has to copy to a temp table on each page view means almost certain death. My temporary solution to this has been to create "digest" tables which are more or less 5-10 table joins that get refreshed every X minutes via cron. This obviously causes caching problems as data isn't up to the second, and it seems like a pain to write code around using this "hack" to make my application work as it should. I've considered using InnoDB's cascading update/delete function to keep my digest tables up to date without a cron job, but I want to play with it more before I just launch into it. I am starting to wonder how much of this is just my lack of expertise in database administration and how much is just a fundamental flaw with normalized database design. Is it possible to have a large scale production database with a fully normalized design without extremely expensive hardware? It seems like it would be worth the extra overhead to keep behind-the-scenes digest tables of commonly joined tables, is this something that higher end databases (ie. oracle) do? -Max On 10/4/05, Russ Demarest wrote: > > Another consideration is how you are using the addresses and the > users. For example if you are going to be joining users with other > tables then trying to determine which of those users also have an > address in NY the queries can beat on your server. How many users > will you have? What with the addresses be used for? Will you need to > search all addresses for each user related to other tables? > > From a data point of view you would normalize it all and I would > suggest a states and countries table to be linked to addresses as a > well as address type. But when you are trying to come up with all the > users with a address in NY who are related to other tables, i.e. > groups, you may wish you have it all in one table. > > If you get really "normal" you could have a "user_addresses" table > which would contain the address_type field so if you have 2 users at > the same address the address would only be in the address table once > but related to both users. :) > > Don't get me started if you need to track history. "Where did user X > live at home 2 years ago?". Then you have a start_date and end_date > in the user_addresses. > > I have done it both ways and there really is not a clear winner, > depends on the situation. I am glad I am not tracking user address > history any more, > > Good luck > > > On Oct 4, 2005, at 11:53 AM, Allen Shaw wrote: > > > Stephen Musgrave wrote: > > > > > >> This is an interesting topic because I'm approaching a question based > >> upon this principal. There is an application that I am building > >> where > >> the User record can have 5 addresses (home address, work address, > >> permanent address, international address, etc, etc). I'm considering > >> making a table called UserAddress and then linking it to address ID > >> fields in the User table. I'm on the fence about it because while I > >> don't want a monstrous User table with tons of columns, I also don't > >> want to over normalize. > >> > >> > >> > > Here's a great working example to explore the issue. I would let the > > User table contain no address info, and then let the UserAddress table > > contain one address per row with an extra column for UserID. This > > seems > > like a clear one-to-many relationship between a person and his/her > > many > > addresses (also assuming it could be any number between 0 and 5, > > right?), so adding 5 sets of columns to the User table doesn't seem > > right... > > > > Honestly, the only reason I'm writing here is so someone can > > correct me > > if I'm wrong (and if I'm right then this might actually helping > > somebody > > -- neat-o ...). > > > > -- > > Allen Shaw > > Polymer (http://polymerdb.org) > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phil at bearingasset.com Tue Oct 4 13:16:43 2005 From: phil at bearingasset.com (Phil Duffy) Date: Tue, 4 Oct 2005 13:16:43 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4342A58A.1020309@iifwp.org> Message-ID: <20051004171654.55D4CA87DA@virtu.nyphp.org> Allen, > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Allen Shaw > Sent: Tuesday, October 04, 2005 10:54 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > tool for MySQL/OS X) > > Stephen Musgrave wrote: > > >This is an interesting topic because I'm approaching a question based > >upon this principal. There is an application that I am building where > >the User record can have 5 addresses (home address, work address, > >permanent address, international address, etc, etc). I'm considering > >making a table called UserAddress and then linking it to address ID > >fields in the User table. I'm on the fence about it because while I > >don't want a monstrous User table with tons of columns, I also don't > >want to over normalize. > > > > > Here's a great working example to explore the issue. I would let the > User table contain no address info, and then let the UserAddress table > contain one address per row with an extra column for UserID. This seems > like a clear one-to-many relationship between a person and his/her many > addresses (also assuming it could be any number between 0 and 5, > right?), so adding 5 sets of columns to the User table doesn't seem > right... > > Honestly, the only reason I'm writing here is so someone can correct me > if I'm wrong (and if I'm right then this might actually helping somebody > -- neat-o ...). > In my opinion, you are exactly correct. We went down this road with our Zephyr System and specifically its Industry-neutral Core (http://www.eleccott.com/indneutl.htm ). We also established an Address Type table and coded each address by type, e.g., Legal Address, Billing Address, Remittance Address. One of the attributes of the Address Type table was a Single-Address-of-Type flag such that only one Legal Address could be entered, but multiple Vacation Addresses could be entered. I also believe that creating a database with a specified number of 5 or any other number of addresses brings unnecessary rigidity, and perhaps complexity, to a system. BTW, in the world of business objects, even the concept of a User needs to be rethought. I would do away with Users as a fundamental business object and replace it with the more generic Person, and identify system Users as a subset of the Person universe. Users then become Persons who play the Role, System User, in which additional sets of information are required such as username, password, permissions, et cetera. HTH Phil From phil at bearingasset.com Tue Oct 4 13:47:19 2005 From: phil at bearingasset.com (Phil Duffy) Date: Tue, 4 Oct 2005 13:47:19 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: Message-ID: <20051004174732.D273BA87F6@virtu.nyphp.org> Russ, > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Russ Demarest > Sent: Tuesday, October 04, 2005 11:16 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > toolfor MySQL/OS X) > From a data point of view you would normalize it all and I would > suggest a states and countries table to be linked to addresses as a > well as address type. But when you are trying to come up with all the > users with a address in NY who are related to other tables, i.e. > groups, you may wish you have it all in one table. We found FIPS Pub 55-3 ( http://www.census.gov/geo/www/fips/fips.html ) to be helpful for creating the geographical sub-division structure within a country and FIPS 10-4 (http://earth-info.nga.mil/gns/html/fips10-4.html ) to be useful for country coding and the first level of country sub-division. The latter introduces the issues of multiple sub-division types within a country (US has states and a district, Canada has provinces and territories, and Argentina has districts, national territories and provinces). FIPS 10-4 also reveals the native names for these sub-divisions, e.g., distrito, territorio nacional and provincia for Argentina and velayats for Afghanistan. You may have an issue with postal codes since these vary by country. We addressed that by establishing different format masks such that multiple countries could share the same postal code mask for editing. Canada, UK and the US all used different postal code masks, which were attributes of the country table. > > If you get really "normal" you could have a "user_addresses" table > which would contain the address_type field so if you have 2 users at > the same address the address would only be in the address table once > but related to both users. :) Absolutely. When the oldest daughter in a 12-child family moves out, only her association with the address is changed. This can be a real issue in medical information systems in which the caregivers are responsible for multiple family members. Phil From rahmin at insite-out.com Tue Oct 4 13:56:46 2005 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Tue, 4 Oct 2005 13:56:46 -0400 Subject: [nycphp-talk] GD Lib 2, resiszing GIFs Message-ID: <200510041756.j94HukGs023621@webmail4.megamailservers.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ken at secdat.com Tue Oct 4 14:40:11 2005 From: ken at secdat.com (Kenneth Downs) Date: Tue, 4 Oct 2005 14:40:11 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <87e6ded30510040946s701ccf5fn45bc1753e84f8fa3@mail.gmail.com> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <87e6ded30510040946s701ccf5fn45bc1753e84f8fa3@mail.gmail.com> Message-ID: <33354.38.117.147.25.1128451211.squirrel@38.117.147.25> > It seems like it would be worth the extra overhead to keep > behind-the-scenes > digest tables of commonly joined tables, is this something that higher end > databases (ie. oracle) do? It's not so much the higher-end databases do it, but that they can do it, whereas I'm not sure mySQL can. One method is to use triggers to update the digest tables when detail tables are updated. Another method is to use "materialized views", where you create a view that is kept updated by the system. In method 1 you do the work, in method 2 the system does the work. barring these, you would update the digest tables yourself whenever the detail tables are updated. One danger of course is that you introduce contention on the writes if everybody is trying to hit the digest tables. If you mave many more reads than writes this may not be an issue. > > -Max > > On 10/4/05, Russ Demarest wrote: >> >> Another consideration is how you are using the addresses and the >> users. For example if you are going to be joining users with other >> tables then trying to determine which of those users also have an >> address in NY the queries can beat on your server. How many users >> will you have? What with the addresses be used for? Will you need to >> search all addresses for each user related to other tables? >> >> From a data point of view you would normalize it all and I would >> suggest a states and countries table to be linked to addresses as a >> well as address type. But when you are trying to come up with all the >> users with a address in NY who are related to other tables, i.e. >> groups, you may wish you have it all in one table. >> >> If you get really "normal" you could have a "user_addresses" table >> which would contain the address_type field so if you have 2 users at >> the same address the address would only be in the address table once >> but related to both users. :) >> >> Don't get me started if you need to track history. "Where did user X >> live at home 2 years ago?". Then you have a start_date and end_date >> in the user_addresses. >> >> I have done it both ways and there really is not a clear winner, >> depends on the situation. I am glad I am not tracking user address >> history any more, >> >> Good luck >> >> >> On Oct 4, 2005, at 11:53 AM, Allen Shaw wrote: >> >> > Stephen Musgrave wrote: >> > >> > >> >> This is an interesting topic because I'm approaching a question based >> >> upon this principal. There is an application that I am building >> >> where >> >> the User record can have 5 addresses (home address, work address, >> >> permanent address, international address, etc, etc). I'm considering >> >> making a table called UserAddress and then linking it to address ID >> >> fields in the User table. I'm on the fence about it because while I >> >> don't want a monstrous User table with tons of columns, I also don't >> >> want to over normalize. >> >> >> >> >> >> >> > Here's a great working example to explore the issue. I would let the >> > User table contain no address info, and then let the UserAddress table >> > contain one address per row with an extra column for UserID. This >> > seems >> > like a clear one-to-many relationship between a person and his/her >> > many >> > addresses (also assuming it could be any number between 0 and 5, >> > right?), so adding 5 sets of columns to the User table doesn't seem >> > right... >> > >> > Honestly, the only reason I'm writing here is so someone can >> > correct me >> > if I'm wrong (and if I'm right then this might actually helping >> > somebody >> > -- neat-o ...). >> > >> > -- >> > Allen Shaw >> > Polymer (http://polymerdb.org) >> > >> > _______________________________________________ >> > New York PHP Talk Mailing List >> > AMP Technology >> > Supporting Apache, MySQL and PHP >> > http://lists.nyphp.org/mailman/listinfo/talk >> > http://www.nyphp.org >> > >> > >> >> _______________________________________________ >> New York PHP Talk Mailing List >> AMP Technology >> Supporting Apache, MySQL and PHP >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org >> > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From krook at us.ibm.com Tue Oct 4 14:50:06 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue, 4 Oct 2005 14:50:06 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <33354.38.117.147.25.1128451211.squirrel@38.117.147.25> Message-ID: > > It seems like it would be worth the extra overhead to keep > > behind-the-scenes > > digest tables of commonly joined tables, is this > something that higher end > > databases (ie. oracle) do? > > It's not so much the higher-end databases do it, but that > they can do it, > whereas I'm not sure mySQL can. > > One method is to use triggers to update the digest tables > when detail > tables are updated. > > Another method is to use "materialized views", where you > create a view > that is kept updated by the system. In method 1 you do the work, in > method 2 the system does the work. > > barring these, you would update the digest tables yourself > whenever the > detail tables are updated. DB2 uses a technology called Materialized Query Tables (MQTs) that are intended for this type of work. They were introduced in version 8 but were known in a limited form as summary tables (ASTs) in version 7. As described above, there are two ways to keep these "perma-views" in synch with the base tables, either user refreshed or system refreshed: http://www.ibm.com/developerworks/db2/library/techarticle/dm-0509melnyk/ Since the Zend Core for IBM is based on PHP/DB2, these might be available to play around with. http://www.zend.com/core/ibm/ Daniel Krook, Advisory IT Specialist Application Development, Production Services - Tools, ibm.com Personal: http://info.krook.org/ BluePages: http://bluepages.redirect.webahead.ibm.com/ BlogPages: http://blogpages.redirect.webahead.ibm.com/ From agfische at email.smith.edu Tue Oct 4 15:08:07 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue, 04 Oct 2005 15:08:07 -0400 Subject: [nycphp-talk] Automating a manual process Message-ID: <4342D317.2040509@email.smith.edu> Greetings, I have a manual process that I would like to make happen automatically (on a scheduled basis). The process: 1) In MS Access on a local computer, run a query on a table, then export the query as a text file. 2) From same local computer, append the text file data to a MySQL table on my web server. I would appreciate any tips or suggestions on how to make this happen. Thanks, -Aaron From chsnyder at gmail.com Tue Oct 4 15:16:54 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 4 Oct 2005 15:16:54 -0400 Subject: [nycphp-talk] ER Diagram tool for MySQL/OS X In-Reply-To: <43429C7A.606@cyberxdesigns.com> References: <007001c5c875$422be930$3dd9a8c0@MZ> <43429C7A.606@cyberxdesigns.com> Message-ID: On 10/4/05, Hans Kaspersetz wrote: > It just dawned on me, that I need to chime in here in a more thoughtful > way. Like Hans said, we are using Enterprise Architect, the short > coming is that it does not run natively on OS X. You will need virtual > PC with Windows running on your OS X machine. This will incur a > performance hit. I am currently using EA on OSX through Virtual PC with > Windows XP Home. It is not a terrible situation. We standardized on EA > even though a part of the team is on OS X becuase it is a very useful > piece of software and the benefit of EA out weighs the cost of Virtual > PC. Just to be clear I have a 12" Power Book G4 1.33 with 1.2 GB of RAM. > > Hans K Rather than take the Virtual PC performance hit, you should probably run a copy on a spare Windows box somewhere and use Remote Desktop to bring it up on your Mac. From chsnyder at gmail.com Tue Oct 4 15:27:39 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 4 Oct 2005 15:27:39 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051004171654.55D4CA87DA@virtu.nyphp.org> References: <4342A58A.1020309@iifwp.org> <20051004171654.55D4CA87DA@virtu.nyphp.org> Message-ID: On 10/4/05, Phil Duffy wrote: > BTW, in the world of business objects, even the concept of a User needs to > be rethought. I would do away with Users as a fundamental business object > and replace it with the more generic Person, and identify system Users as a > subset of the Person universe. Users then become Persons who play the Role, > System User, in which additional sets of information are required such as > username, password, permissions, et cetera. Preach it, brother! -- Chris Snyder http://chxo.com/ From dmintz at davidmintz.org Tue Oct 4 15:40:57 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 4 Oct 2005 15:40:57 -0400 (EDT) Subject: [nycphp-talk] Automating a manual process In-Reply-To: <4342D317.2040509@email.smith.edu> References: <4342D317.2040509@email.smith.edu> Message-ID: On Tue, 4 Oct 2005, Aaron Fischer wrote: > I have a manual process that I would like to make happen automatically > (on a scheduled basis). > > The process: > 1) In MS Access on a local computer, run a query on a table, then > export the query as a text file. > 2) From same local computer, append the text file data to a MySQL table > on my web server. > > I would appreciate any tips or suggestions on how to make this happen. I assume you mean export the data resulting from the query. I haven't done much windows for a while and don't know the counterpart of cron, but there must be one. But that's the last step. You should be able to create an ODBC data source, then access it programmatically -- e.g., with the PHP ODBC API (http://us3.php.net/manual/en/ref.uodbc.php) With your data in hand, it seems you can either (1) connect to your hosts MySQL database directly across the network from your machine and run the insert queries, or, if they don't let you do that, (2) do your own export-as-text (e.g., to tab-delimited), then upload it via POST (cURL might be helpful) to another PHP script on your server that accepts the upload and knows what to do with it -- break it back down and run the queries with it. You will no doubt want to add user authentication to the mix and possibly SSL. There's probably a simpler/better solution about to be posted any second. (-: --- David Mintz http://davidmintz.org/ From yournway at gmail.com Tue Oct 4 16:42:22 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Tue, 4 Oct 2005 21:42:22 +0100 Subject: [nycphp-talk] Automating a manual process In-Reply-To: References: <4342D317.2040509@email.smith.edu> Message-ID: On 04/10/05, David Mintz wrote: > > On Tue, 4 Oct 2005, Aaron Fischer wrote: > > > I have a manual process that I would like to make happen automatically > > (on a scheduled basis). > > > > You should be able to create an ODBC data source, then access it > programmatically -- e.g., with the PHP ODBC API > (http://us3.php.net/manual/en/ref.uodbc.php) > > With your data in hand, it seems you can either > > (1) connect to your hosts MySQL database directly across the network from > your machine and run the insert queries, or, if they don't let you do > that, > > (2) do your own export-as-text (e.g., to tab-delimited), then upload it > via POST (cURL might be helpful) to another PHP script on your server that > accepts the upload and knows what to do with it -- break it back down and > run the queries with it. You will no doubt want to add user authentication > to the mix and possibly SSL. > > There's probably a simpler/better solution about to be posted any second. > (-: > > > --- > David Mintz > http://davidmintz.org/ I second the opinion that the simplest is to interconnect both databases with php. Another solution I had to implement once was to have an asp dump an XML, using scheduled tasks on Win2K, to a certain network folder, and have a php get it using getElementByID and dump it to MySQL. It worked fine, though I had to get someone to do me the asp, hehe. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Tue Oct 4 18:12:56 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 04 Oct 2005 15:12:56 -0700 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: References: Message-ID: <4429-66439@sneakemail.com> Daniel Krook krook-at-us.ibm.com |nyphp dev/internal group use| wrote: >DB2 uses a technology called Materialized Query Tables (MQTs) that are >intended for this type of work. They were introduced in version 8 but >were known in a limited form as summary tables (ASTs) in version 7. > >As described above, there are two ways to keep these "perma-views" in >synch with the base tables, either user refreshed or system refreshed: >http://www.ibm.com/developerworks/db2/library/techarticle/dm-0509melnyk/ > > I stayed out of this but am glad Dan added his comments. The developer needs to develop code for the app, and in this case the app is no longer trying to query the database as was designed -- it's querying summary tables as it is now required to do. Who made that decision? based on data models? Database design? App design? All of the above. Once the *already designed* app (with *already designed* database) was analyzed, the system imposed requirements BASED ON THOSE DESIGNS. There is more than one way to achieve normalization, but it was irrelevant if the database had to be redesigned for performance for this application. This recursive design process is at the heart of successful development IMHO. I guess I am just underlining that the initial question of modeling data vs. modeling system or application requirements does not always encompass database design. In my experience, one must always consider the platform and the application from the start, and almost always re-design the database around platform factors known later. Yeah, lots of "extra work". One plus for agile software development http://agilemanifesto.org/ and an underline of the value of "ben there, done that". -=john andrews http://www.seo-fun.com From ashaw at iifwp.org Tue Oct 4 18:47:43 2005 From: ashaw at iifwp.org (Allen Shaw) Date: Tue, 04 Oct 2005 17:47:43 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4429-66439@sneakemail.com> References: <4429-66439@sneakemail.com> Message-ID: <4343068F.8050604@iifwp.org> inforequest wrote: >I guess I am just underlining that the initial question of modeling data >vs. modeling system or application requirements does not always >encompass database design. In my experience, one must always consider >the platform and the application from the start, and almost always >re-design the database around platform factors known later. Yeah, lots >of "extra work". > >One plus for agile software development http://agilemanifesto.org/ and >an underline of the value of "ben there, done that". > > Great link, and all in all this whole discussion is very helpful -- I've been way gone on normalization and never really considered the impact that it could have on my apps. - Allen -- Allen Shaw Polymer (http://polymerdb.org) From ken at secdat.com Tue Oct 4 19:09:41 2005 From: ken at secdat.com (Kenneth Downs) Date: Tue, 4 Oct 2005 19:09:41 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4343068F.8050604@iifwp.org> References: <4429-66439@sneakemail.com> <4343068F.8050604@iifwp.org> Message-ID: <33417.38.117.147.25.1128467381.squirrel@38.117.147.25> > inforequest wrote: > >>I guess I am just underlining that the initial question of modeling data >>vs. modeling system or application requirements does not always >>encompass database design. In my experience, one must always consider >>the platform and the application from the start, and almost always >>re-design the database around platform factors known later. Yeah, lots >>of "extra work". >> >>One plus for agile software development http://agilemanifesto.org/ and >>an underline of the value of "ben there, done that". >> >> > Great link, and all in all this whole discussion is very helpful -- I've > been way gone on normalization and never really considered the impact > that it could have on my apps. Normalization can have a huge impact on your apps -- it can reduce many data entry errors and eliminate others entirely. That is its purpose. Without normalization all of the time you spend supporting a slow app will be spent fixing errors in bad data. But querying data is a different thing. If you have known common queries that aggregate and join data, then by all means create some summary system that is, hopefully, automatic and guaranteed to be right. This is not really denormalization, though the relational theorist will argue it is. What it is in fact is the creation of derived tables based on normalized tables. But anyway, normalize the tables users can directly modify, and use summaries derived from those normalized tables. Then you get accurate data coming in and that makes for accurate summaries. > > - Allen > > -- > Allen Shaw > Polymer (http://polymerdb.org) > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From tgales at tgaconnect.com Tue Oct 4 19:21:07 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 04 Oct 2005 19:21:07 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <4429-66439@sneakemail.com> References: <4429-66439@sneakemail.com> Message-ID: <43430E63.4070707@tgaconnect.com> inforequest wrote: > Daniel Krook krook-at-us.ibm.com |nyphp dev/internal group use| wrote: > > >>DB2 uses a technology called Materialized Query Tables (MQTs) that are >>intended for this type of work. They were introduced in version 8 but >>were known in a limited form as summary tables (ASTs) in version 7. >> >>As described above, there are two ways to keep these "perma-views" in >>synch with the base tables, either user refreshed or system refreshed: >>http://www.ibm.com/developerworks/db2/library/techarticle/dm-0509melnyk/ >> >> > > > I stayed out of this but am glad Dan added his comments. The developer > needs to develop code for the app, and in this case the app is no longer > trying to query the database as was designed -- it's querying summary > tables as it is now required to do. > > Who made that decision? based on data models? Database design? App > design? All of the above. > > Once the *already designed* app (with *already designed* database) was > analyzed, the system imposed requirements BASED ON THOSE DESIGNS. There > is more than one way to achieve normalization, Have a look at: 'The Dangerous Illusion: Denormalization, Performance and Integrity' http://dmreview.com/article_sub.cfm?articleId=5251 Read the part that starts off with: "a fully normalized relational database consists of R-tables. Each represents just one entity type..." It strikes me that normalization of data follows a strict path -- first normal, second normal, and so on. That is, there is not such a thing as "more than one 'right way' " to normalize data -- not even with Perl packages. > but it was irrelevant if > the database had to be redesigned for performance for this application. > This recursive design process is at the heart of successful development > IMHO. > > I guess I am just underlining that the initial question of modeling data > vs. modeling system or application requirements does not always > encompass database design. In my experience, one must always consider > the platform and the application from the start, and almost always > re-design the database around platform factors known later. Yeah, lots > of "extra work". "... conceptual modeling is inherently an informal endeavor, logical modeling?which is where normalization applies?is based on formal theory. Otherwise put, while business modeling is all art, logical database design is, at least in part, science. And the theory is there not for its own sake, but to guarantee consistency and avoid the practical problems... -- Fabian Pascal (the same author of the above article) > > One plus for agile software development http://agilemanifesto.org/ and > an underline of the value of "ben there, done that". > been there and 're-done' that you mean.. -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From krook at us.ibm.com Tue Oct 4 19:56:35 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue, 4 Oct 2005 19:56:35 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <33417.38.117.147.25.1128467381.squirrel@38.117.147.25> Message-ID: > Normalization can have a huge impact on your apps -- it > can reduce many > data entry errors and eliminate others entirely. That is > its purpose. > Without normalization all of the time you spend supporting > a slow app will > be spent fixing errors in bad data. > > But querying data is a different thing. If you have known > common queries > that aggregate and join data, then by all means create > some summary system > that is, hopefully, automatic and guaranteed to be right. > This is not > really denormalization, though the relational theorist > will argue it is. > What it is in fact is the creation of derived tables based > on normalized > tables. > > But anyway, normalize the tables users can directly modify, and use > summaries derived from those normalized tables. Then you > get accurate > data coming in and that makes for accurate summaries. Excellent point Kenneth, This is the very thing Craig S. Mullins envisions in his "Death of Denormalization" articles. [1][2] "With MQTs, you can achieve the best of both worlds: fully normalized tables to ensure data integrity during modification and MQTs for efficient querying." [2] In essense, you don't have to change your data model just your hardware or software. But Fabian Pascal says the solution isn't that denormalization will be rendered obsolete by faster physical resources, it's rethinking those software systems in the first place to support true high-form normalization that should eliminate performance issues. "Hardware, product and optimization improvements are, of, course, always desirable and welcome, but they are only add-ons, not substitutes for the real and fundamental solution: well implemented TRDBMSs, whose performance is not hindered, but actually enhanced with fully normalized databases." [3]. Interesting reading, and nice affirmations to normalize. :) [1] The Death of Denormalization http://www.dbta.com/columnists/craig_mullins/dba_corner_0104.html [2] Materialized Query Tables and the Death of Denormalization http://www.zjournal.com/Article.asp?ArticleId=875 [3] Irrational Exuberance http://www.dbazine.com/ofinterest/oi-articles/pascal18 Daniel Krook, Advisory IT Specialist Application Development, Production Services - Tools, ibm.com Personal: http://info.krook.org/ BluePages: http://bluepages.redirect.webahead.ibm.com/ BlogPages: http://blogpages.redirect.webahead.ibm.com/ From mitch.pirtle at gmail.com Tue Oct 4 22:04:30 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 4 Oct 2005 22:04:30 -0400 Subject: [nycphp-talk] data modelling vs. db design Message-ID: <330532b60510041904k5b78b30ei3afc48e836c78f38@mail.gmail.com> On 10/4/05, Russ Demarest wrote: > > Don't get me started if you need to track history. "Where did user X > live at home 2 years ago?". Then you have a start_date and end_date > in the user_addresses. This is one of the main reasons I look for support for Stored Procedures and Triggers. With those two available, versioning can be automated and absolutely zero hassle to the programmer. For example, you could add begin_date and end_date in the user_address table, and then create a trigger that fired on INSERT statements that setup the proper values for each (as well as an UPDATE trigger that also updates the values). You could also add address_status instead, if you wanted to track without dates if that direction suits your purposes better. In the end, you can put that work in the database, where IMHO it belongs. -- Mitch From mitch.pirtle at gmail.com Tue Oct 4 22:19:43 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 4 Oct 2005 22:19:43 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <87e6ded30510040946s701ccf5fn45bc1753e84f8fa3@mail.gmail.com> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <87e6ded30510040946s701ccf5fn45bc1753e84f8fa3@mail.gmail.com> Message-ID: <330532b60510041919i3a599048na7f7f903e4c9f492@mail.gmail.com> On 10/4/05, max goldberg wrote: > I'm actually running into the point of an application where my completely > normalized database design is just killing my database server. It was fine > during the first few months of my site being up but as my traffic grew, it > really began to take a toll. The first thing I had to do was move from > MyISAM to InnoDB, due to the huge number of locks causing the site to just > screech to a halt. On average I am getting around 5000 hits per minute to > the PHP pages that connect to the database. During the "slow" time at 7am, I > get around 2500. I've managed to lower my average queries per second from > 300 to 220, but normalization is still killing me. Without knowing your datamodel, I cannot really tell you much. My experience tells me that the more you normalize, the less you will encounter the locks that MySQL ISAM tables are prone to. Denormalization will make your problems worse for sure. > I've considered using InnoDB's cascading update/delete function to keep my > digest tables up to date without a cron job, but I want to play with it more > before I just launch into it. I am starting to wonder how much of this is > just my lack of expertise in database administration and how much is just a > fundamental flaw with normalized database design. Is it possible to have a > large scale production database with a fully normalized design without > extremely expensive hardware? See below for my comments, but I have personally worked on sites using both MySQL and PostgreSQL that had daily page views well into the millions. The PostgreSQL sites usually have no problems, and the one really huge MySQL site had major ones - but remember that this was almost ten years ago when MySQL was just a little punk ;-) I would wager that moving to a more recent version of MySQL would alleviate some of your pain, but I have no idea what version you are using at the moment. > It seems like it would be worth the extra overhead to keep > behind-the-scenes digest tables of commonly joined tables, is this something > that higher end databases (ie. oracle) do? I worked on a site with over 7.5 million page views daily, and ran on two dual-xeon servers with PHP and PostgreSQL. The MySQL version of the app had the exact same problems you had, and I also had to switch to InnoDB tables to keep indexes from getting blown away on very active tables. Interestingly enough, PostgreSQL handled the normalized design without a burp. The switcheroo also included the implementation of a lot more functionality, like foreign keys, stored procedures and triggers. I expected a wash in performance, but it was just a tad faster under heavy load. I know of a financial application that was using SQL Server, and when you get to like 20 joins or whatever the query just fails. A quick port to PostgreSQL and all those joins run just fine. I spend most of my time in PostgreSQL - but I can say that if you have a sophisticated data model with a lot of foreign constraints, PostgreSQL's MVCC model takes care of a lot of the pain that other databases often experience when doing lots of JOIN operations. Time to take a look at the impending MySQL 5.0 (it *is* going stable sometime right? hehe) as I am not really up to speed with what MySQL has to offer with the latest versions. But in the end you can definitely run high-traffic, data-intensive websites with open source databases, and I would only consider a big commercial RDBMS if you hired someone with that particular skillset; and even then it would be more of a business decision than a technical one. -- Mitch From lists at zaunere.com Tue Oct 4 23:00:07 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 4 Oct 2005 23:00:07 -0400 Subject: [nycphp-talk] Google as a Penetration Tool Message-ID: <001901c5c958$e60db450$6601a8c0@MZ> Through some various newsletters I'm subscribed to, and by way of various reads lately, Google as a penetration tool has come up several times. Some insightful links, related to Oracle: http://www.red-database-security.com/wp/google_oracle_hacking_us.pdf Mostly surrounding this book/author: http://johnny.ihackstuff.com/ And don't think that a couple of well crafted searches for phpmyadmin wouldn't show numerous results. Just some food for thought. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From ken at secdat.com Wed Oct 5 06:16:54 2005 From: ken at secdat.com (Kenneth Downs) Date: Wed, 5 Oct 2005 06:16:54 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: References: <33417.38.117.147.25.1128467381.squirrel@38.117.147.25> Message-ID: <33539.38.117.147.25.1128507414.squirrel@38.117.147.25> >> Normalization can have a huge impact on your apps -- it >> can reduce many >> data entry errors and eliminate others entirely. That is >> its purpose. >> Without normalization all of the time you spend supporting >> a slow app will >> be spent fixing errors in bad data. >> >> But querying data is a different thing. If you have known >> common queries >> that aggregate and join data, then by all means create >> some summary system >> that is, hopefully, automatic and guaranteed to be right. >> This is not >> really denormalization, though the relational theorist >> will argue it is. >> What it is in fact is the creation of derived tables based >> on normalized >> tables. >> >> But anyway, normalize the tables users can directly modify, and use >> summaries derived from those normalized tables. Then you >> get accurate >> data coming in and that makes for accurate summaries. > > > Excellent point Kenneth, Thank you. > > This is the very thing Craig S. Mullins envisions in his "Death of > Denormalization" articles. [1][2] "With MQTs, you can achieve the best > of both worlds: fully normalized tables to ensure data integrity during > modification and MQTs for efficient querying." [2] In essense, you don't > have to change your data model just your hardware or software. His point is subcategory of the entire concept of automation and how it is put into context with normalization. > > But Fabian Pascal says the solution isn't that denormalization will be > rendered obsolete by faster physical resources, it's rethinking those > software systems in the first place to support true high-form > normalization that should eliminate performance issues. "Hardware, > product and optimization improvements are, of, course, always desirable > and welcome, but they are only add-ons, not substitutes for the real and > fundamental solution: well implemented TRDBMSs, whose performance is not > hindered, but actually enhanced with fully normalized databases." [3]. > Generally I ignore Fabian Pascal. His solution too often is to tell everybody how wrong they are, and how they don't know enough. There are more elegant authors out there who realize you have to talk to people where they are at. > > > [1] The Death of Denormalization > http://www.dbta.com/columnists/craig_mullins/dba_corner_0104.html > > [2] Materialized Query Tables and the Death of Denormalization > http://www.zjournal.com/Article.asp?ArticleId=875 > > [3] Irrational Exuberance > http://www.dbazine.com/ofinterest/oi-articles/pascal18 > > > > > Daniel Krook, Advisory IT Specialist > Application Development, Production Services - Tools, ibm.com > > Personal: http://info.krook.org/ > BluePages: http://bluepages.redirect.webahead.ibm.com/ > BlogPages: http://blogpages.redirect.webahead.ibm.com/ > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From dipeshjr at yahoo.com Wed Oct 5 07:54:48 2005 From: dipeshjr at yahoo.com (DIPESH RABADIYA) Date: Wed, 5 Oct 2005 04:54:48 -0700 (PDT) Subject: [nycphp-talk] Problem while compiling php Message-ID: <20051005115448.77678.qmail@web54006.mail.yahoo.com> Hi All, I've problem while compiling php. I've to compil php with clibpdf and readline new option. I've used following command: './configure' '--prefix=/usr/local' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit' '--with-config-file-scan-dir=/etc/php.d' '--with-openssl=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-readline=/usr/include/readline' '--with-cpdflib=/usr/local/include' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-mysql=/usr' '--with-ldap' '--with-apache=/home/dipesh/server_Install/192.168.0.18/serverInstall/Apachetoolbox-1.5.72/apache_1.3.31' but still its not wokring with php could you pleas help me ??? Regards, Dipesh Rabadiya __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From lists at zaunere.com Wed Oct 5 10:21:56 2005 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 5 Oct 2005 10:21:56 -0400 Subject: [nycphp-talk] Problem while compiling php In-Reply-To: <20051005115448.77678.qmail@web54006.mail.yahoo.com> Message-ID: <000001c5c9b8$26f5b710$3dd9a8c0@MZ> DIPESH RABADIYA wrote on Wednesday, October 05, 2005 7:55 AM: > Hi All, > > I've problem while compiling php. > > I've to compil php with clibpdf and readline new > option. > I've used following command: > > './configure' '--prefix=/usr/local' '--enable-exif' > '--enable-track-vars' '--with-calendar=shared' > '--enable-magic-quotes' '--enable-trans-sid' > '--enable-wddx' '--enable-ftp' > '--enable-inline-optimization' '--enable-memory-limit' > '--with-config-file-scan-dir=/etc/php.d' > '--with-openssl=/usr' '--with-gd' > '--with-zlib-dir=/usr' > '--with-readline=/usr/include/readline' > '--with-cpdflib=/usr/local/include' > '--with-png-dir=/usr' '--with-jpeg-dir=/usr' > '--with-mysql=/usr' '--with-ldap' > '--with-apache=/home/dipesh/server_Install/192.168.0.18/serverInstall/Apache toolbox-1.5.72/apache_1.3.31' > > but still its not wokring with php What's not working? Does ./configure break? Does the compile fail? You need to tell us where it breaks, and what the pertinent error message is. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From sailer at bnl.gov Wed Oct 5 11:02:23 2005 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 5 Oct 2005 11:02:23 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4342A7CC.9040302@phpwerx.net> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <4342A7CC.9040302@phpwerx.net> Message-ID: <20051005150223.GA18286@bnl.gov> On Tue, Oct 04, 2005 at 12:03:24PM -0400, Dan Cech wrote: > Allen Shaw wrote: > > Stephen Musgrave wrote: > > > >> This is an interesting topic because I'm approaching a question based > >> upon this principal. There is an application that I am building where > >> the User record can have 5 addresses (home address, work address, > >> permanent address, international address, etc, etc). I'm considering > >> making a table called UserAddress and then linking it to address ID > >> fields in the User table. I'm on the fence about it because while I > >> don't want a monstrous User table with tons of columns, I also don't > >> want to over normalize. > >> > > Here's a great working example to explore the issue. I would let the > > User table contain no address info, and then let the UserAddress table > > contain one address per row with an extra column for UserID. This seems > > like a clear one-to-many relationship between a person and his/her many > > addresses (also assuming it could be any number between 0 and 5, > > right?), so adding 5 sets of columns to the User table doesn't seem > > right... > > > > Honestly, the only reason I'm writing here is so someone can correct me > > if I'm wrong (and if I'm right then this might actually helping somebody > > -- neat-o ...). > > I was going to say the same thing, although you would probably want the > address table to contain the user id, address type and address columns. > > It seems to make sense from pretty much every angle, and of course will > work for any number of different addresses. If you're interested in > doing any queries that would match against more than 1 address then this > will also be much easier, like: > > SELECT user_id FROM addresses WHERE address_type IN (1,2,3) AND > country='USA' > > If you do go this way there is definitely no need to have any address > columns in the user table, which is also a boon for any query where > you're not pulling address information (which in my (limited) experience > tends to be most of them). I agree. I also go one step more extreme, and have an address_type table that has the address_type_id and the char user-friendly 'address type'. This way (for the benefit of people that haven't done this type of thing before) you simply add another row to the address_tpe table to add another type of address, and to use in your contraints. If you're not using DB enforced constraints (ie foreign keys), be careful to not delete an address type from the table and leave orphaned records in the address table. Tim -- Tim Sailer Information and Special Technologies Program Office of CounterIntelligence Brookhaven National Laboratory (631) 344-3001 From cliff at pinestream.com Wed Oct 5 12:11:13 2005 From: cliff at pinestream.com (cliff) Date: Wed, 5 Oct 2005 11:11:13 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051005150223.GA18286@bnl.gov> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <4342A7CC.9040302@phpwerx.net> <20051005150223.GA18286@bnl.gov> Message-ID: <20051005161113.M96592@pinestream.com> I just read about normalizing to 3NF and as an example, the book showed how in an extreme case of obsessive 3NF compliance city and state address fields could really be separate tables since city depends on state, state depends on country, etc. A bit extreme to me, but food for thought. Regarding another point previously made in this thread: MySQL versus Postgres. MySQL seems to have all the momentum, yet a previous poster gave the impression that Postgres is more advanced. Should we be looking at Postgres more seriously despite the MySQL onslaught? Why does it seem like PHP/MySQL has become one word -- like Wintel -- instead of PHP/Postgres? Cliff Hirsch From phil at bearingasset.com Wed Oct 5 15:16:41 2005 From: phil at bearingasset.com (Phil Duffy) Date: Wed, 5 Oct 2005 15:16:41 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: <20051005161113.M96592@pinestream.com> Message-ID: <20051005191702.5135AA86EA@virtu.nyphp.org> > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of cliff > Sent: Wednesday, October 05, 2005 11:11 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > toolfor MySQL/OS X) > > I just read about normalizing to 3NF and as an example, the book showed > how > in an extreme case of obsessive 3NF compliance city and state address > fields > could really be separate tables since city depends on state, state depends > on country, etc. A bit extreme to me, but food for thought. I suspect there are two issues here: (1) storage of codes for address fields and (2) the overall design requirements of the system. Typically codes are stored and are in general use outside of systems for states, e.g., NY for New York and PA for Pennsylvania. So the question comes down to the use of codes for further political sub-divisions (particularly municipalities in the US where counties do not appear in the typical address). So it would seem to be obsessive to store the municipality as a code as opposed to the string, because that would double the number of disk accesses (one for all the other elements of the address and one for the municipal code lookup). The second issue is concerned with the requirements of the system. I would make a distinction between 'application' requirements and 'system' requirements, but I would acknowledge that others could make the case they are the same. To me an application tends to be a broad set of functions accessing a database that address a specified need, such as an airline's reservation application or an inventory control application. The immediately perceived needs define the application. The system, on the other hand, tends to be something quite different, what evolves over time, particularly when the initial application has been successful. The challenge of the system designer is to discern the future direction of the system and make no mistakes in the design that would be prohibitive to reverse. Application programs are typically not nearly as disastrous as databases in this regard. All things being equal, it is probably better to err on the side of obsession when designing a database. For example, one approach might be to use municipal tables to assure that the municipality is a valid entity, but then store the string. In that way the database design is normalized at the foundation level, but has a thin veneer of de-normalization over the top for operational efficiency. At least that seems to have worked for me. Phil From dcech at phpwerx.net Wed Oct 5 17:09:54 2005 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 05 Oct 2005 17:09:54 -0400 Subject: [nycphp-talk] fun with proc_open Message-ID: <43444122.5000108@phpwerx.net> Hi all, Firstly, apologies for the long email, I couldn't think of a less verbose way to describe the issues I'm experiencing. I'm in the midst of writing a little program for executing long-running processes in the background from php and monitoring their output as they run. The problem I'm running into is that when I execute a process using proc_open and try to read any output from stdout and stderr I am running into some odd behavior. This only seems to happen under windows, running the same script on my debian server works as expected. The first read from stdout is fine, but then it doesn't get any more output from stdout until the end of the script. Is there some issue with using stdout and stderr together in this way that I don't know about? My test code looks like this: array('pipe','w'), // stdout 2 => array('pipe','w'), // stderr ); $process = proc_open($cmd,$descriptorspec,$pipes); if (!is_resource($process)) { echo 'failed'."\n"; exit(1); } // don't block process stdout or stderr stream_set_blocking($pipes[1],0); stream_set_blocking($pipes[2],0); // don't buffer stdout or stderr stream_set_write_buffer($pipes[1],0); stream_set_write_buffer($pipes[2],0); while (true) { // read process stdout $stdout = fread($pipes[1],FREAD_LENGTH); if (strlen($stdout) > 0) { echo 'stdout:'. $stdout; flush(); } // read process stderr $stderr = fread($pipes[2],FREAD_LENGTH); if (strlen($stderr) > 0) { echo 'stderr:'. $stderr; flush(); } // end when both pipes are closed if (feof($pipes[1]) && feof($pipes[2])) { break; } // wait for more output sleep(1); } // close process stdout and stderr fclose($pipes[1]); fclose($pipes[2]); // grab exit code $exitcode = proc_close($process); echo 'exitcode:'. $exitcode ."\n"; // end of script sleep.php is a simple script that outputs some data: References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <4342A7CC.9040302@phpwerx.net> <20051005150223.GA18286@bnl.gov> <20051005161113.M96592@pinestream.com> Message-ID: <330532b60510051412i40d94d4fm85164a81a5f6ca2d@mail.gmail.com> On 10/5/05, cliff wrote: > Regarding another point previously made in this thread: MySQL versus > Postgres. MySQL seems to have all the momentum, yet a previous poster gave > the impression that Postgres is more advanced. Should we be looking at > Postgres more seriously despite the MySQL onslaught? Why does it seem like > PHP/MySQL has become one word -- like Wintel -- instead of PHP/Postgres? In a nutshell, PostgreSQL started out with one primary goal, SQL compliance (and that means features). MySQL however started out with only three goals - speed, speed, and more speed. While PostgreSQL found that so many features required a tremendous amount of refactoring and tuning to get performance and stability up to a reasonable level, MySQL was under constant pressure to add features that every other database had. (I remember joking, and not that long ago, that the only database that has as few features as MySQL was Access, and at the time Access had more features LOL) So PostgreSQL started out really fat, with a ton of features, and had major speed and stability issues. We are talking *major* speed and stability issues. And MySQL started out really fast, unbelievably fast, but had almost no capabilities, and no way to ensure clean, consistent data - like spreadsheets for linux webservers. Talk about opposite ends of the spectrum! I think that they are now basically meeting in the middle, with PostgreSQL is just as fast as any other database out there, and I have seen PostgreSQL perform better than most for very sophisticated designs; and MySQL has lost all of that legendary speed in order to implement features that keep it competitive with other database offerings. My philosophical choice of PostgreSQL over MySQL has really only one important point: 1) They are meeting in the middle, but PostgreSQL has had most of this functionality for *years*. Maybe MySQL is finally getting around to adding the stuff I require, but PostgreSQL has had it for a loooong time, and it is absolutely bazooka proof at this point. It's there, it's free (BSD license), why the heck not? ;-) Perhaps most importantly, the decision for you (the web developer) should really boil down to this one question: Where are you planning on implementing the "business rules" of your application? If you want to put logic in your database, you should look at PostgreSQL, and if you want to put that logic in your code then MySQL or PostgreSQL would most likely suffice. There are some very emotional people out there on this topic (me included!) but perhaps this is more of a personal preference than scientific conclusion. Would love to hear other thoughts on this! As for the popularity comparison... MySQL has always had a better press relationship than PostgreSQL. Also consider that MySQL was easy for folks to learn, because it really could not do much more than store data anyway. With a commercial entity behind MySQL, there was a budget for advertising, and evangelism was a priority for them - whereas PostgreSQL has had many supporters that had absolutely no interest in the market, and made no effort to spread the word. Another thing is that now as both PHP and MySQL gain complexity as they mature, PostgreSQL will most likely not be perceived as such a complex beast anymore. For me, PostgreSQL is always the default, regardless of the application, unless the client demands a commercial database. Here is an interesting read, on what the databases do incorrectly or poorly: MySQL Gotchas: http://sql-info.de/mysql/gotchas.html PostgreSQL Gotchas: http://sql-info.de/postgresql/postgres-gotchas.html -- Mitch From 1j0lkq002 at sneakemail.com Wed Oct 5 17:32:23 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 05 Oct 2005 14:32:23 -0700 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <43430E63.4070707@tgaconnect.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> Message-ID: <3270-41147@sneakemail.com> Tim Gales tgales-at-tgaconnect.com |nyphp dev/internal group use| wrote: > It strikes me that normalization of data follows a strict path --first > normal, second normal, and so on. > >That is, there is not such a thing as "more than one 'right way' " to normalize data -- not even with Perl packages > > Show me a "fully normalized" database supporting a web app, done close to schedule and budget. I double dog dare ya. I do NOT recommend de-normalizing. Dan's commments were on summary table built and managed by the dbms... and the coder now had to code to those instead of the db tables. That's great, IMHO, because it guarantees interity to the degree that the dbms can maintain it (presumably better than the developer can). I do believe there are multiple ways to normalize, because you have to select a base data unit around which you build your app (and normalize your database). Some hard-core database guys fallback on semantics here -- they assume there is no data except what is specified in the data model. Sure.. in that case, full norm is the only option. But I don't think it's a realistic (nor particularly helpful) perspective. For a real estate application, is the base unit of location state, city, market area, zip code, GIS coordinates, zone, or what? Practically GIS coordinates represent the fnest granularity available and are actually required for some mapping applications. But are placename databases available by GIS coordinates? No, and they wouldn't be to useful anyway. Somebody will have to pick a basis and it will be based on real-world application requirements. Yes, they are thusly translated into RESTRICTIONS and theoretically will hinder scalability.When and if additional data elements are needed (perhaps increased granularity for location parameters in the zip code example) the system will be revealed to be not normal and will need to be fixed. In the context of this discussion, data types were being examined as they relate to normalization in the database design. In my view, you need to base that on experience, choosing data structures that permit the application to accomplish it's goals, while being normalized. You cannot have your cake and eat it, too. In other words, I prefer to keep the database theorists out of the kitchen. There is more than one way to normalize, because there are multiple ways to define the data set. That's my point. In addressing the developers' needs, the database design seems to come later. But of course we need a solid database design to start; it has to be done first... hence the recursive puzzle.But should we start with full normalized form? We would never get development started. I love database guys... as much as I love graphic designers. But I won't let either one tell me how to code ;-) -=john andrews http://www.seo-fun.com From redbox2000 at optonline.net Wed Oct 5 18:29:43 2005 From: redbox2000 at optonline.net (Martin Lanser) Date: Wed, 05 Oct 2005 18:29:43 -0400 Subject: [nycphp-talk] Project management solutions In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3580135531C@network.PLMresearch.com> Message-ID: <0INW00MAQRTOLYD0@mta1.srv.hcvlny.cv.net> I don't know if you're only looking at OSS solutions, but you may want to look at Copper [http://www.copperproject.com/index.php]. It's not that expensive, but it does have some features (like task dependencies) that some of the tools in your list are lacking. I've also played quite a bit w/ phpCollab & NetOffice, both of which are pretty good, but I decided in the end to purchase Copper. Hope this helps ... -martin. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Tuesday, September 27, 2005 5:05 PM To: 'bostonphptalk at bostonphp.org'; 'talk at lists.nyphp.org' Subject: [nycphp-talk] Project management solutions I'm on the front-end of a research project to locate "good" PHP project management solutions. So far I've identified the following candidates. Does anyone have experience with PHProjekt http://www.phprojekt.com/ DOTproject http://www.dotproject.net/ Netoffice http://netoffice.sourceforge.net TUTOS http://www.tutos.org more.groupware http://mgw.k-fish.de/ phpGroupWare http://www.phpgroupware.org/ Any ones that I've missed? Thanks in advance, Mark -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 ext. 704 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com AIM/MSN/Skype: PLMresearch Yahoo: PLMresearch2000 mwithington at plmresearch.com Public Key: http://www.plmresearch.com/keys/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From smanes at magpie.com Wed Oct 5 21:19:38 2005 From: smanes at magpie.com (Steve Manes) Date: Wed, 05 Oct 2005 21:19:38 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <330532b60510051412i40d94d4fm85164a81a5f6ca2d@mail.gmail.com> References: <20051004120654.669E0A862D@virtu.nyphp.org> <4342A58A.1020309@iifwp.org> <4342A7CC.9040302@phpwerx.net> <20051005150223.GA18286@bnl.gov> <20051005161113.M96592@pinestream.com> <330532b60510051412i40d94d4fm85164a81a5f6ca2d@mail.gmail.com> Message-ID: <43447BAA.2090104@magpie.com> Mitch Pirtle wrote: > For me, PostgreSQL is always the default, regardless of the > application, unless the client demands a commercial database. Or MySQL. Excellent thumbnail summary of MySQL's and PostgreSQL's respective childhoods, BTW. I'm the same: PostgreSQL is my default RDBMS and has been since 7.2. We used it when we built Trafficmac and damned if that PG server hasn't been rebooted or PG restarted in... lemme check... yikes... 599 days! And because it's an adserver reporting aggregator/ad ops workflow tool for WSJ, Foxnews, CBSMW and Cars.com, we hammer hard it every day. I was a big MySQL guy until I got hired into an Oracle shop (CCI) where I got spoiled on Oracle's unbelievably rich feature set... foreign keys, procs, triggers, dblinks, AQ. Oracle isn't just a database hanging off an application; it's an operating system. When I returned to consulting my philosophy for how to build data-driven sites had taken a quantum leap and MySQL couldn't oblige. MySQL4 provided a couple of those features and MySQL5 offers even more. That's great to see but it's going to be a while before it catches up to PG8's feature set. Meanwhile, PG's got a lot on its TODO plate so I don't think it will be sleeping either: http://www.postgresql.org/docs/faqs.TODO.html From rinaldy_roy at yahoo.com Thu Oct 6 02:57:27 2005 From: rinaldy_roy at yahoo.com (rinaldy roy) Date: Wed, 5 Oct 2005 23:57:27 -0700 (PDT) Subject: [nycphp-talk] Insert Primary Key Value into Foreign Key Message-ID: <20051006065727.24887.qmail@web52705.mail.yahoo.com> Dear all, I have a table with a primary key in it. I use stored procedures to insert new records. What I want to know is how do I make it so a column (foreign key) in another table adds the same number as the primary key in the original table when a new record is inserted? My database is generated by MS ACCESS Rinaldy RM --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Thu Oct 6 07:44:17 2005 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Thu, 06 Oct 2005 07:44:17 -0400 Subject: [nycphp-talk] Insert Primary Key Value into Foreign Key In-Reply-To: <20051006065727.24887.qmail@web52705.mail.yahoo.com> Message-ID: <0INX00LU1SM6OHL0@mta6.srv.hcvlny.cv.net> Is this a question about MS Access or PHP? Jeff _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of rinaldy roy Sent: Thursday, October 06, 2005 1:57 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Insert Primary Key Value into Foreign Key Dear all, I have a table with a primary key in it. I use stored procedures to insert new records. What I want to know is how do I make it so a column (foreign key) in another table adds the same number as the primary key in the original table when a new record is inserted? My database is generated by MS ACCESS Rinaldy RM _____ Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Consult at CovenantEDesign.com Thu Oct 6 07:47:58 2005 From: Consult at CovenantEDesign.com (CED) Date: Thu, 6 Oct 2005 07:47:58 -0400 Subject: [nycphp-talk] Insert Primary Key Value into Foreign Key References: <20051006065727.24887.qmail@web52705.mail.yahoo.com> Message-ID: <09fc01c5ca6b$cc97f7b0$0319a8c0@ced> You need to make a PK to FK relationship. I'm not sure how appropriate this topic is to this list. Try here: http://www.access-programmers.co.uk/forums/showthread.php?t=92899 Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: rinaldy roy To: talk at lists.nyphp.org Sent: Thursday, October 06, 2005 2:57 AM Subject: [nycphp-talk] Insert Primary Key Value into Foreign Key Dear all, I have a table with a primary key in it. I use stored procedures to insert new records. What I want to know is how do I make it so a column (foreign key) in another table adds the same number as the primary key in the original table when a new record is inserted? My database is generated by MS ACCESS Rinaldy RM ------------------------------------------------------------------------------ Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Thu Oct 6 07:53:58 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 6 Oct 2005 07:53:58 -0400 Subject: [nycphp-talk] Loop next/previous offset boundaries in Arrays Message-ID: <000a01c5ca6c$a2b7cb40$0ba8a8c0@cliff> In a loop, a common function seems to be comparing a current array value with the next or prior array value. Seems easy, except for the first and last loops, which generate undefined offset errors. Is there a "clean" way to get around this other than testing for the first or last loop value, which generates a lot of extra code. Cliff Hirsch -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcech at phpwerx.net Thu Oct 6 09:22:04 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 06 Oct 2005 09:22:04 -0400 Subject: [nycphp-talk] Loop next/previous offset boundaries in Arrays In-Reply-To: <000a01c5ca6c$a2b7cb40$0ba8a8c0@cliff> References: <000a01c5ca6c$a2b7cb40$0ba8a8c0@cliff> Message-ID: <434524FC.8050908@phpwerx.net> Cliff, I'm not sure exactly what you're trying to do, but you may find the following useful: $myarray = array(); unset($prev); foreach ($myarray as $curr) { if (isset($prev)) { // compare $prev and $curr } $prev = $curr; } $myarray = array(); unset($curr); foreach ($myarray as $next) { if (isset($curr)) { // compare $curr and $next } $curr = $next; } These won't work properly if the arrays contain null values, though I'm sure someone on the list will have an idea on that one. Dan Cliff Hirsch wrote: > In a loop, a common function seems to be comparing a current array value > with the next or prior array value. Seems easy, except for the first and > last loops, which generate undefined offset errors. Is there a "clean" > way to get around this other than testing for the first or last loop > value, which generates a lot of extra code. > > Cliff Hirsch > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From hans at cyberxdesigns.com Thu Oct 6 09:54:22 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Thu, 06 Oct 2005 09:54:22 -0400 Subject: [nycphp-talk] [OT] Apache htaccess auth Message-ID: <43452C8E.5060900@cyberxdesigns.com> I know this might be off topic a bit but I can't figure it out and I am confident NYPHP is the place for AMP answers. I am developing an application that needs to receive http responses from a remote system. Currently, the entire application lives behind .htaccess Auth. Don't want the whole world to see it. The problem is that to continue to develop/test I need to receive the responses from the remote system and the remote system won't change to do the auth. So what I would like to do is continue to protect all the files in /webroot behind Auth except for one subdirectory, or I would like all users from www.foo.com to access all the file in /webroot/ and make everyone else authenticate. I have been looking at the apache .htaccess stuff and haven't figured it out. Please help. Thanks, Hans From dcech at phpwerx.net Thu Oct 6 10:21:23 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 06 Oct 2005 10:21:23 -0400 Subject: [nycphp-talk] [OT] Apache htaccess auth In-Reply-To: <43452C8E.5060900@cyberxdesigns.com> References: <43452C8E.5060900@cyberxdesigns.com> Message-ID: <434532E3.9000600@phpwerx.net> Hans, If all you need is access to one subdirectory, you can add an .htaccess file to that subdirectory with the following lines: Allow from 'remote system ip' Satisfy any This will allow the remote system to access that subdirectory without auth, but still require auth for every other host, and for the rest of the site. You may find these links helpful: http://lists.nyphp.org/pipermail/talk/2004-May/009750.html http://httpd.apache.org/docs-2.0/mod/core.html#satisfy Dan Hans C. Kaspersetz wrote: > I know this might be off topic a bit but I can't figure it out and I am > confident NYPHP is the place for AMP answers. > > I am developing an application that needs to receive http responses from > a remote system. Currently, the entire application lives behind > .htaccess Auth. Don't want the whole world to see it. The problem is > that to continue to develop/test I need to receive the responses from > the remote system and the remote system won't change to do the auth. > > So what I would like to do is continue to protect all the files in > /webroot behind Auth except for one subdirectory, or I would like all > users from www.foo.com to access all the file in /webroot/ and make > everyone else authenticate. > > I have been looking at the apache .htaccess stuff and haven't figured it > out. Please help. > > Thanks, > Hans From mitch.pirtle at gmail.com Thu Oct 6 11:14:00 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 6 Oct 2005 11:14:00 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <3270-41147@sneakemail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> Message-ID: <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> On 10/5/05, inforequest <1j0lkq002 at sneakemail.com> wrote: > > Show me a "fully normalized" database supporting a web app, done close > to schedule and budget. I double dog dare ya. First find me a web app project that has a realistic schedule and budget to begin with. I TRIPLE dog dare ya. > I love database guys... as much as I love graphic designers. But I won't > let either one tell me how to code ;-) Then developers need to get off the minimalist caveman approach to data modeling, and start getting themselves edumucated ;-) Today's web developer looks at databases like a server-side Excel spreadsheet. Yuck. -- Mitch From lists at genoverly.net Thu Oct 6 11:39:42 2005 From: lists at genoverly.net (michael) Date: Thu, 6 Oct 2005 11:39:42 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> Message-ID: <20051006113942.21651101@genoverly.com> On Thu, 6 Oct 2005 11:14:00 -0400 Mitch Pirtle wrote: > Then developers need to get off the minimalist caveman approach to > data modeling, and start getting themselves edumucated ;-) Today's > web developer looks at databases like a server-side Excel spreadsheet. > Yuck. To quote csnyder.. "Preach it brother!" On smaller application development, the web app guy is probably the data guy too. When things grow out of hand, edumacation is vital. Realistic normalization has been proven effective throughout the ages. If a developer has a problem writing SQL queries, ask the DBA for data diagrams and meta-data. Heck, they "may" even help you. Views and stored procedures can be really helpful here. If the app is for summary reporting (vs transactions), then decide on some standard element and time dimensions and build a 'warehouse' or 'data mart' style denormalized database. Again, the DBA can be helpful. Maybe, if the NYPHP gods are listening.. this would be a good talk topic. That is, unless a local database user group gets there first . Great thread, BTW. Michael From hans at cyberxdesigns.com Thu Oct 6 12:04:44 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Thu, 06 Oct 2005 12:04:44 -0400 Subject: [nycphp-talk] [OT] Apache htaccess auth In-Reply-To: <434532E3.9000600@phpwerx.net> References: <43452C8E.5060900@cyberxdesigns.com> <434532E3.9000600@phpwerx.net> Message-ID: <43454B1C.1090809@cyberxdesigns.com> Thanks Dan, I obviously didn't look hard enough. This works. Hans Dan Cech wrote: >Hans, > >If all you need is access to one subdirectory, you can add an .htaccess >file to that subdirectory with the following lines: > >Allow from 'remote system ip' >Satisfy any > >This will allow the remote system to access that subdirectory without >auth, but still require auth for every other host, and for the rest of >the site. > >You may find these links helpful: > >http://lists.nyphp.org/pipermail/talk/2004-May/009750.html >http://httpd.apache.org/docs-2.0/mod/core.html#satisfy > >Dan > >Hans C. Kaspersetz wrote: > > >>I know this might be off topic a bit but I can't figure it out and I am >>confident NYPHP is the place for AMP answers. >> >>I am developing an application that needs to receive http responses from >>a remote system. Currently, the entire application lives behind >>.htaccess Auth. Don't want the whole world to see it. The problem is >>that to continue to develop/test I need to receive the responses from >>the remote system and the remote system won't change to do the auth. >> >>So what I would like to do is continue to protect all the files in >>/webroot behind Auth except for one subdirectory, or I would like all >>users from www.foo.com to access all the file in /webroot/ and make >>everyone else authenticate. >> >>I have been looking at the apache .htaccess stuff and haven't figured it >>out. Please help. >> >>Thanks, >>Hans >> >> >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > From jellicle at gmail.com Thu Oct 6 12:08:37 2005 From: jellicle at gmail.com (Michael Sims) Date: Thu, 6 Oct 2005 12:08:37 -0400 Subject: [nycphp-talk] int to ordinal function Message-ID: <200510061208.38270.jellicle@gmail.com> Does anyone have a function handy for converting numerals to the fully-alphabetic ordinal equivalent? f(1) = "First" f(2) = "Second" f(3) = "Third" f(24) = "Twenty-fourth" etc. It's easier to convert to the numeric ordinal (1st, 2nd, 3rd) but I prefer the all-alphabetic, especially if I don't have to write it myself. :) Michael Sims From mitch.pirtle at gmail.com Thu Oct 6 12:54:04 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 6 Oct 2005 12:54:04 -0400 Subject: [nycphp-talk] int to ordinal function In-Reply-To: <200510061208.38270.jellicle@gmail.com> References: <200510061208.38270.jellicle@gmail.com> Message-ID: <330532b60510060954m1d799d5ci71e30c0952f93e25@mail.gmail.com> On 10/6/05, Michael Sims wrote: > > Does anyone have a function handy for converting numerals to the > fully-alphabetic ordinal equivalent? Check pear.php.net, the package is called Numbers_Words: http://pear.php.net/package/Numbers_Words -- Mitch From 1j0lkq002 at sneakemail.com Thu Oct 6 16:18:36 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 06 Oct 2005 13:18:36 -0700 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> Message-ID: <7097-58617@sneakemail.com> An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Thu Oct 6 16:53:05 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Thu, 06 Oct 2005 15:53:05 -0500 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <7097-58617@sneakemail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> <7097-58617@sneakemail.com> Message-ID: <43458EB1.1040808@polymerdb.org> An HTML attachment was scrubbed... URL: From hans at cyberxdesigns.com Thu Oct 6 17:14:52 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Thu, 06 Oct 2005 17:14:52 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <7097-58617@sneakemail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> <7097-58617@sneakemail.com> Message-ID: <434593CC.8060307@cyberxdesigns.com> John, Why is it that you link to SEO-Fun but there is nothing there? Hans > Pheh. I knew should a gone for the triple right away. > My upcoming course in Competitive Webmastering > includes a session of budgets and > expectations.. very important stuff. > > -=john andrews > http://www.seo-fun.com > From rolan at omnistep.com Thu Oct 6 17:39:56 2005 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 06 Oct 2005 17:39:56 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <434593CC.8060307@cyberxdesigns.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> <7097-58617@sneakemail.com> <434593CC.8060307@cyberxdesigns.com> Message-ID: <434599AC.9010508@omnistep.com> The cobblers children have no shoes ~Rolan Hans C. Kaspersetz wrote: >John, > >Why is it that you link to SEO-Fun but there is nothing there? > >Hans > > > >>P......... of budgets and >>expectations.. very important stuff. >> >>-=john andrews >>http://www.seo-fun.com >> >> From tgales at tgaconnect.com Thu Oct 6 17:40:44 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 06 Oct 2005 17:40:44 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <3270-41147@sneakemail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> Message-ID: <434599DC.8020404@tgaconnect.com> > > Show me a "fully normalized" database supporting a web app, done close > to schedule and budget. I double dog dare ya. I know of two -- but they were conversions of existing databases, which were already in pretty good shape. So maybe they don't count, if you meant designed 'from scratch' for a web app. ... > There is more than one way to normalize, because there are multiple ways > to define the data set. That's my point. In addressing the developers' > needs, the database design seems to come later. But of course we need a > solid database design to start; it has to be done first... hence the > recursive puzzle.But should we start with full normalized form? We would > never get development started. To address the developers' needs, the (physical) design typically does come (later) after the logical model is created. But, I don't know of anyone who advocates less than 3rd normal for a logical database design (to be used in a relational DBMS). After a few iterations the physical design can (and often is) denormalized from the logical model. You can get your development started after your first 'cut' of a physical design -- not "We would never get started." "... should we start with a full normalized form?" Yes. -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From Consult at CovenantEDesign.com Thu Oct 6 17:43:18 2005 From: Consult at CovenantEDesign.com (CED) Date: Thu, 6 Oct 2005 17:43:18 -0400 Subject: [nycphp-talk] data modelling vs. db design References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> <330532b60510060814l6f6e715eg968a102c48bccd57@mail.gmail.com> <7097-58617@sneakemail.com><434593CC.8060307@cyberxdesigns.com> <434599AC.9010508@omnistep.com> Message-ID: <0aaf01c5cabe$f7260c30$0319a8c0@ced> The DBA's children have no information? ----- Original Message ----- From: "Rolan Yang" To: "NYPHP Talk" Sent: Thursday, October 06, 2005 5:39 PM Subject: Re: [nycphp-talk] data modelling vs. db design The cobblers children have no shoes ~Rolan Hans C. Kaspersetz wrote: >John, > >Why is it that you link to SEO-Fun but there is nothing there? > >Hans > > > >>P......... of budgets and >>expectations.. very important stuff. >> >>-=john andrews >>http://www.seo-fun.com >> >> _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From ken at secdat.com Thu Oct 6 17:51:29 2005 From: ken at secdat.com (Kenneth Downs) Date: Thu, 6 Oct 2005 17:51:29 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <3270-41147@sneakemail.com> References: <4429-66439@sneakemail.com> <43430E63.4070707@tgaconnect.com> <3270-41147@sneakemail.com> Message-ID: <32781.38.117.147.25.1128635489.squirrel@38.117.147.25> > Tim Gales tgales-at-tgaconnect.com |nyphp dev/internal group use| wrote: > >> It strikes me that normalization of data follows a strict path --first >> normal, second normal, and so on. >> >>That is, there is not such a thing as "more than one 'right way' " to >> normalize data -- not even with Perl packages >> >> > > Show me a "fully normalized" database supporting a web app, done close > to schedule and budget. I double dog dare ya. How about ahead of schedule? That's how ours go. The trick is to know well the disparate nature of both web and data, and have a tool that gives each its due and creates the proper interface between them. Using heavily Object-Oriented techniques will not get you there, and may hold you back. > > I do NOT recommend de-normalizing. Dan's commments were on summary table > built and managed by the dbms... and the coder now had to code to those > instead of the db tables. That's great, IMHO, because it guarantees > interity to the degree that the dbms can maintain it (presumably better > than the developer can). I do believe there are multiple ways to > normalize, because you have to select a base data unit around which you > build your app (and normalize your database). Some hard-core database > guys fallback on semantics here -- they assume there is no data except > what is specified in the data model. Sure.. in that case, full norm is > the only option. But I don't think it's a realistic (nor particularly > helpful) perspective. Not sure what you mean here. I've found it easier to use a handful of plain-English terms. So when talking to customers I don't talk about "models", it's more like "What do you want to keep track of?" Then its questions like, "will one price go for all products in the category, or do separate items get separate prices?" These questions lead directly to table design and table design drives the rest of the process. > > In my view, you need to base that on experience, choosing data > structures that permit the application to accomplish it's goals, while > being normalized. You choose data structures that accurately record what needs to be recorded, the application is simply an interface to that data. > You cannot have your cake and eat it, too. In other > words, I prefer to keep the database theorists out of the kitchen. Dare I say that's why you are not delivering on time or budget? (ducking) It is true that you must determine who is "master" of the app, is it all about the code, or all about the data? If it is all about getting the record-keeping down accurately, then you must insist on a proper database design, then the application fits over the table structure like latex. Those who are more coder than db dude don't like this idea and want to shape the database to the code -- bad idea. > > There is more than one way to normalize, because there are multiple ways > to define the data set. That's my point. In addressing the developers' > needs, the database design seems to come later. But of course we need a > solid database design to start; it has to be done first... hence the > recursive puzzle.But should we start with full normalized form? We would > never get development started. Let me ask about cost. Is the recursive puzzle a problem because it is expensive? Does it yield the correct result? Could it be that it would not be a problem if it were cheaper? > > I love database guys... as much as I love graphic designers. But I won't > let either one tell me how to code ;-) I love coders, but I never let a coder take an architect's role. > > -=john andrews > http://www.seo-fun.com > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From 1j0lkq002 at sneakemail.com Thu Oct 6 22:08:26 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 6 Oct 2005 22:08:26 -0400 Subject: [nycphp-talk] data modelling vs. db design Message-ID: <25846-72135@sneakemail.com> >John, > >Why is it that you link to SEO-Fun but there is nothing there? > > The better question would be, if you find nothing there, why do you continue to click? ;-) As for the discussion, we all seem to agree the project needs multiple experts and due diligence to db design etc. I don't find much to disagree with in the comments, except the practicality of it all. I am usually one of the sticklers for solid normalization on projects. HOWEVER, I find most of the work for me is in getting the application's future defined enough to be able to discuss that, while collaborators (dba's included) want to lock n load. Of course an architect would make all the difference... that is the missing piece. How many projects have an IA role assigned early on? From what I have seen this has been a helpful discussion for everyone struggling with normalizing a db that supports a developing app. Valuable contribution. -=john andrews http://www.seo-fun.com http://www.privacydesk.com Original Message: ----------------- From: CED Consult-at-CovenantEDesign.com |nyphp dev/internal group use| ... Date: Thu, 6 Oct 2005 17:43:18 -0400 To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] data modelling vs. db design The DBA's children have no information? ----- Original Message ----- From: "Rolan Yang" To: "NYPHP Talk" Sent: Thursday, October 06, 2005 5:39 PM Subject: Re: [nycphp-talk] data modelling vs. db design The cobblers children have no shoes ~Rolan Hans C. Kaspersetz wrote: >John, > >Why is it that you link to SEO-Fun but there is nothing there? > >Hans > > > >>P......... of budgets and >>expectations.. very important stuff. >> >>-=john andrews >>http://www.seo-fun.com >> >> _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From stephen at musgrave.org Fri Oct 7 13:48:57 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Fri, 7 Oct 2005 13:48:57 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <20051004171654.55D4CA87DA@virtu.nyphp.org> References: <20051004171654.55D4CA87DA@virtu.nyphp.org> Message-ID: > BTW, in the world of business objects, even the concept of a User > needs to > be rethought. I would do away with Users as a fundamental business > object > and replace it with the more generic Person, and identify system Users > as a > subset of the Person universe. Users then become Persons who play the > Role, > System User, in which additional sets of information are required such > as > username, password, permissions, et cetera. A-ha! Even more normalization. This is the way I have done it my system, btw. There are "staff" users ... err PEOPLE".. and "participants" which have their own tables and then the USER table handles data that is required for those people to use the application. Thanks for all the contributions to the thread - it has been very helpful! From cliff at pinestream.com Fri Oct 7 14:02:07 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 7 Oct 2005 14:02:07 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: Message-ID: <004901c5cb69$3b45c540$0ba8a8c0@cliff> Breaking up People into separate tables makes me think of a problem I am struggling with and that's probably all too common. A product has a price, right -- simple. Maybe not. The price could be fixed. It might be x dollars per pound or some other unit. Maybe the price is even non-linear. So it seems like each price model should be a separate object and thus a separate table. Right? And if so, it seems like it would be impossible to get all product info in one query efficiently. Do I query the product table to see what price model that product uses and then perform a 2nd query? Do I join everything and see what price model "pops up?" -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Stephen Musgrave Sent: Friday, October 07, 2005 1:49 PM To: NYPHP Talk Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) > BTW, in the world of business objects, even the concept of a User > needs to > be rethought. I would do away with Users as a fundamental business > object > and replace it with the more generic Person, and identify system Users > as a > subset of the Person universe. Users then become Persons who play the > Role, > System User, in which additional sets of information are required such > as > username, password, permissions, et cetera. A-ha! Even more normalization. This is the way I have done it my system, btw. There are "staff" users ... err PEOPLE".. and "participants" which have their own tables and then the USER table handles data that is required for those people to use the application. Thanks for all the contributions to the thread - it has been very helpful! _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From ken at secdat.com Fri Oct 7 14:39:10 2005 From: ken at secdat.com (Kenneth Downs) Date: Fri, 7 Oct 2005 14:39:10 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: <004901c5cb69$3b45c540$0ba8a8c0@cliff> References: <004901c5cb69$3b45c540$0ba8a8c0@cliff> Message-ID: <49221.38.117.147.25.1128710350.squirrel@38.117.147.25> > Breaking up People into separate tables makes me think of a problem I am > struggling with and that's probably all too common. A product has a > price, right -- simple. Maybe not. The price could be fixed. It might be > x dollars per pound or some other unit. Maybe the price is even > non-linear. THis is not as hard as it looks. Just use units-of-measure. We don't think about it most of the time because it is simply "item", like "5 widgets". But the UOM could be pounds, acres, whatever you want. > > So it seems like each price model should be a separate object and thus a > separate table. Right? And if so, it seems like it would be impossible > to get all product info in one query efficiently. Do I query the product > table to see what price model that product uses and then perform a 2nd > query? Do I join everything and see what price model "pops up?" The trick is to use a series of exceptions, and a "resolution" view. You start out with prices in the PRODUCT_CATEGORIES table. You override at the ITEMS table level. Then you override at the SPECIALS table for that item during a particular period in time. Make up any other levels that are appropriate. The resolution uses the magic of NULLs and COALESCE to join the tables together and pull out the price. select coalesce(special.price,item.price,cat.price) from SPECIALS special JOIN ITEMS item JOIN CATEGORIES cat blah blah blah > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Stephen Musgrave > Sent: Friday, October 07, 2005 1:49 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > toolfor MySQL/OS X) > > > >> BTW, in the world of business objects, even the concept of a User >> needs to >> be rethought. I would do away with Users as a fundamental business >> object >> and replace it with the more generic Person, and identify system Users > >> as a >> subset of the Person universe. Users then become Persons who play the > >> Role, >> System User, in which additional sets of information are required such > >> as >> username, password, permissions, et cetera. > > A-ha! Even more normalization. This is the way I have done it my > system, btw. There are "staff" users ... err PEOPLE".. and > "participants" which have their own tables and then the USER table > handles data that is required for those people to use the application. > > Thanks for all the contributions to the thread - it has been very > helpful! > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From dcech at phpwerx.net Fri Oct 7 14:54:22 2005 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 07 Oct 2005 14:54:22 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: <49221.38.117.147.25.1128710350.squirrel@38.117.147.25> References: <004901c5cb69$3b45c540$0ba8a8c0@cliff> <49221.38.117.147.25.1128710350.squirrel@38.117.147.25> Message-ID: <4346C45E.40204@phpwerx.net> Kenneth Downs wrote: >> Breaking up People into separate tables makes me think of a problem I am >> struggling with and that's probably all too common. A product has a >> price, right -- simple. Maybe not. The price could be fixed. It might be >> x dollars per pound or some other unit. Maybe the price is even >> non-linear. > > THis is not as hard as it looks. Just use units-of-measure. We don't > think about it most of the time because it is simply "item", like "5 > widgets". But the UOM could be pounds, acres, whatever you want. Yes, this combined with the idea of multiple tables below would allow you to put together almost any pricing structure you wanted. Recurring products are a whole 'nother kettle of fish though. >> So it seems like each price model should be a separate object and thus a >> separate table. Right? And if so, it seems like it would be impossible >> to get all product info in one query efficiently. Do I query the product >> table to see what price model that product uses and then perform a 2nd >> query? Do I join everything and see what price model "pops up?" > > The trick is to use a series of exceptions, and a "resolution" view. > > You start out with prices in the PRODUCT_CATEGORIES table. You override > at the ITEMS table level. Then you override at the SPECIALS table for > that item during a particular period in time. Make up any other levels > that are appropriate. > > The resolution uses the magic of NULLs and COALESCE to join the tables > together and pull out the price. > > select coalesce(special.price,item.price,cat.price) > from SPECIALS special > JOIN ITEMS item > JOIN CATEGORIES cat blah blah blah Good idea, though shouldn't the SQL be something more like: SELECT coalesce(special.price,item.price,cat.price) FROM CATEGORIES cat LEFT JOIN ITEMS item ON item.cat_id=cat.cat_id LEFT JOIN SPECIALS special ON special.item_id=item.item_id WHERE blah blah blah Dan > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] >> On Behalf Of Stephen Musgrave >> Sent: Friday, October 07, 2005 1:49 PM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram >> toolfor MySQL/OS X) >> >> >> >>> BTW, in the world of business objects, even the concept of a User >>> needs to >>> be rethought. I would do away with Users as a fundamental business >>> object >>> and replace it with the more generic Person, and identify system Users >>> as a >>> subset of the Person universe. Users then become Persons who play the >>> Role, >>> System User, in which additional sets of information are required such >>> as >>> username, password, permissions, et cetera. >> A-ha! Even more normalization. This is the way I have done it my >> system, btw. There are "staff" users ... err PEOPLE".. and >> "participants" which have their own tables and then the USER table >> handles data that is required for those people to use the application. >> >> Thanks for all the contributions to the thread - it has been very >> helpful! From ken at secdat.com Fri Oct 7 15:00:07 2005 From: ken at secdat.com (Kenneth Downs) Date: Fri, 7 Oct 2005 15:00:07 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: <4346C45E.40204@phpwerx.net> References: <004901c5cb69$3b45c540$0ba8a8c0@cliff> <49221.38.117.147.25.1128710350.squirrel@38.117.147.25> <4346C45E.40204@phpwerx.net> Message-ID: <49303.38.117.147.25.1128711607.squirrel@38.117.147.25> > Kenneth Downs wrote: >> The resolution uses the magic of NULLs and COALESCE to join the tables >> together and pull out the price. >> >> select coalesce(special.price,item.price,cat.price) >> from SPECIALS special >> JOIN ITEMS item >> JOIN CATEGORIES cat blah blah blah > > Good idea, though shouldn't the SQL be something more like: > > SELECT coalesce(special.price,item.price,cat.price) > FROM CATEGORIES cat > LEFT JOIN ITEMS item ON item.cat_id=cat.cat_id > LEFT JOIN SPECIALS special ON special.item_id=item.item_id > WHERE blah blah blah yup. > > Dan > >> >>> -----Original Message----- >>> From: talk-bounces at lists.nyphp.org >>> [mailto:talk-bounces at lists.nyphp.org] >>> On Behalf Of Stephen Musgrave >>> Sent: Friday, October 07, 2005 1:49 PM >>> To: NYPHP Talk >>> Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram >>> toolfor MySQL/OS X) >>> >>> >>> >>>> BTW, in the world of business objects, even the concept of a User >>>> needs to >>>> be rethought. I would do away with Users as a fundamental business >>>> object >>>> and replace it with the more generic Person, and identify system Users >>>> as a >>>> subset of the Person universe. Users then become Persons who play the >>>> Role, >>>> System User, in which additional sets of information are required such >>>> as >>>> username, password, permissions, et cetera. >>> A-ha! Even more normalization. This is the way I have done it my >>> system, btw. There are "staff" users ... err PEOPLE".. and >>> "participants" which have their own tables and then the USER table >>> handles data that is required for those people to use the application. >>> >>> Thanks for all the contributions to the thread - it has been very >>> helpful! > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From phil at bearingasset.com Fri Oct 7 15:02:14 2005 From: phil at bearingasset.com (Phil Duffy) Date: Fri, 7 Oct 2005 15:02:14 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagramtoolfor MySQL/OS X) In-Reply-To: <004901c5cb69$3b45c540$0ba8a8c0@cliff> Message-ID: <20051007190222.41A76A87E9@virtu.nyphp.org> > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Cliff Hirsch > Sent: Friday, October 07, 2005 1:02 PM > To: 'NYPHP Talk' > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER > Diagramtoolfor MySQL/OS X) > > Breaking up People into separate tables makes me think of a problem I am > struggling with and that's probably all too common. A product has a > price, right -- simple. Maybe not. The price could be fixed. It might be > x dollars per pound or some other unit. Maybe the price is even > non-linear. > > So it seems like each price model should be a separate object and thus a > separate table. Right? And if so, it seems like it would be impossible > to get all product info in one query efficiently. Do I query the product > table to see what price model that product uses and then perform a 2nd > query? Do I join everything and see what price model "pops up?" Perhaps I have misunderstood this question, but to me a price is normally not an entity but an attribute of an entity such as a product/service. The latter would have a table established, and the price might represent one column in the table. "Might" is the keyword for the price attribute, because pricing can get quite complex. In the simplest case, price would be applied to a constant unit over the entire product/service table. It gets a bit more complicated when different pricing units apply against different products/services, e.g., units for some products, pounds for others. It then becomes necessary to store the pricing unit as an attribute as well as the price. Another dimension of complexity is a pricing schedule, in which the price is dependent upon the amount, for example, or upon the location of the buyer. Then a reference to the price schedule might be stored in the product/service table as well as information about the pricing unit. Obviously the above does not exhaust pricing schemes, which are limited only by the imagination of marketing people. It seems to me that pricing schedules, as opposed to prices, would be considered entities since they have their own attributes. It would then depend upon the goal of the query which route was taken, but for applying prices to products/services sold, the first table access would be to the product/service table and the subsequent access to the specific price schedule, and perhaps to the specific row in that schedule that applies to the product/service sold. Incidentally, be careful about the identification of the entity. Are you dealing with pure products, pure services or a hybrid (and does it really matter)? Software vendors, for example, sell licenses (theoretically a service?) and support (a pure service). Automobile dealers sell a physical product, but also maintenance service. Do you mix products and services in the same table (generally my preference although I would distinguish the product from the service) or create separate tables? Typically the pricing algorithms can cover both so there is a simplification reason for combining them into one table. HTH. Phil From cliff at pinestream.com Fri Oct 7 15:11:04 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 7 Oct 2005 15:11:04 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ERDiagramtoolfor MySQL/OS X) In-Reply-To: <20051007190222.41A76A87E9@virtu.nyphp.org> Message-ID: <005701c5cb72$dd562dd0$0ba8a8c0@cliff> Coalesce is a great function and the solutions proposed are really excellent. Many thanks. I think Phil hit the nail on the head with the statement, "which are limited only by the imagination of marketing people." It's not today's imagination that causes me angst -- ok, a bit. Its what curveball I'll be hit with in six months that my architecture didn't anticipate. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Duffy Sent: Friday, October 07, 2005 3:02 PM To: 'NYPHP Talk' Subject: Re: [nycphp-talk] data modelling vs. db design (was: ERDiagramtoolfor MySQL/OS X) > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Cliff Hirsch > Sent: Friday, October 07, 2005 1:02 PM > To: 'NYPHP Talk' > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER > Diagramtoolfor MySQL/OS X) > > Breaking up People into separate tables makes me think of a problem I > am struggling with and that's probably all too common. A product has a > price, right -- simple. Maybe not. The price could be fixed. It might > be x dollars per pound or some other unit. Maybe the price is even > non-linear. > > So it seems like each price model should be a separate object and thus > a separate table. Right? And if so, it seems like it would be > impossible to get all product info in one query efficiently. Do I > query the product table to see what price model that product uses and > then perform a 2nd query? Do I join everything and see what price > model "pops up?" Perhaps I have misunderstood this question, but to me a price is normally not an entity but an attribute of an entity such as a product/service. The latter would have a table established, and the price might represent one column in the table. "Might" is the keyword for the price attribute, because pricing can get quite complex. In the simplest case, price would be applied to a constant unit over the entire product/service table. It gets a bit more complicated when different pricing units apply against different products/services, e.g., units for some products, pounds for others. It then becomes necessary to store the pricing unit as an attribute as well as the price. Another dimension of complexity is a pricing schedule, in which the price is dependent upon the amount, for example, or upon the location of the buyer. Then a reference to the price schedule might be stored in the product/service table as well as information about the pricing unit. Obviously the above does not exhaust pricing schemes, which are limited only by the imagination of marketing people. It seems to me that pricing schedules, as opposed to prices, would be considered entities since they have their own attributes. It would then depend upon the goal of the query which route was taken, but for applying prices to products/services sold, the first table access would be to the product/service table and the subsequent access to the specific price schedule, and perhaps to the specific row in that schedule that applies to the product/service sold. Incidentally, be careful about the identification of the entity. Are you dealing with pure products, pure services or a hybrid (and does it really matter)? Software vendors, for example, sell licenses (theoretically a service?) and support (a pure service). Automobile dealers sell a physical product, but also maintenance service. Do you mix products and services in the same table (generally my preference although I would distinguish the product from the service) or create separate tables? Typically the pricing algorithms can cover both so there is a simplification reason for combining them into one table. HTH. Phil _____________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From greg.rundlett at gmail.com Fri Oct 7 22:27:08 2005 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Fri, 7 Oct 2005 22:27:08 -0400 Subject: [nycphp-talk] Validating/cleaning/scrubbing In-Reply-To: <43411FEB.1030705@email.smith.edu> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> Message-ID: <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> On 10/3/05, Aaron Fischer wrote: > Chris Shiflett wrote: > > >Stephen Musgrave wrote: > > > Given Tuesday's presentation by Chris Shiflett (thanks, Chris!) > > > >Thanks - I hope it was helpful. :-) > > > > > > Unfortunately I wasn't able to make it down for the presentation. Will > there be an audio recording posted and/or online presentation materials > to view? > http://brainbulb.com/talks Thanks Chris for a great presentation yesterday in Boston, and for posting it (PHP Security Audit HOWTO). - Greg Rundlett From Consult at CovenantEDesign.com Sat Oct 8 22:32:44 2005 From: Consult at CovenantEDesign.com (CED) Date: Sat, 8 Oct 2005 22:32:44 -0400 Subject: [nycphp-talk] CaliPHornia References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org><433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> Message-ID: <006701c5cc79$bb28ce90$0319a8c0@ced> Anyone headed out to the conf.? I have been so busy with preparing for my first child and preping the Albany Medical College DBs that I can't. But looking at the line-up it seems like it's gonna be an awesome edifying experience. From stephen at musgrave.org Mon Oct 10 16:11:10 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Mon, 10 Oct 2005 16:11:10 -0400 Subject: [nycphp-talk] Regular expression for Google-like search Message-ID: <1741203e4da9c121add11e73213fcd98@musgrave.org> I searched the web and was shocked not to find the answer to this.... so I bring it to "the list". I am building content management tool, within which I want people to be able to search for content. I want to use the same query string rules as Google does - specifically the quote to group words into a unified string. For example: "the color purple" movie soundtrack "the color purple" would need to be an exact match, ignoring the spaces as OR characters. The spaces outside the quotes would still be treated like an OR character. I am using this code so far: $search_string = $_REQUEST['search_string']; $search_terms = array(); $search_terms = preg_split('/"/', $search_string, -1, PREG_SPLIT_NO_EMPTY); And it results in: Array ( [0] => the color purple [1] => movie soundtrack ) But I want it to result in: Array ( [0] => the color purple [1] => movie [2] => soundtrack ) I feel like I'm a couple keystrokes away... any help is much appreciated. Thanks, Stephen From nyphp at n0p.net Mon Oct 10 16:33:54 2005 From: nyphp at n0p.net (Flavio daCosta) Date: Mon, 10 Oct 2005 16:33:54 -0400 Subject: [nycphp-talk] Regular expression for Google-like search In-Reply-To: <1741203e4da9c121add11e73213fcd98@musgrave.org> References: <1741203e4da9c121add11e73213fcd98@musgrave.org> Message-ID: <434AD032.6000403@n0p.net> How about: $search_string = '"the color purple" movie soundtrack'; $search_terms = array(); $search_terms = preg_match_all ('/"[^"]+"|\w+/', $search_string, $matches); print_r ($matches); Array ( [0] => Array ( [0] => "the color purple" [1] => movie [2] => soundtrack ) ) From dcech at phpwerx.net Mon Oct 10 16:34:51 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 10 Oct 2005 16:34:51 -0400 Subject: [nycphp-talk] Regular expression for Google-like search In-Reply-To: <1741203e4da9c121add11e73213fcd98@musgrave.org> References: <1741203e4da9c121add11e73213fcd98@musgrave.org> Message-ID: <434AD06B.3010900@phpwerx.net> Stephen, For this kind of a problem it may be simpler (and possibly more efficient considering the small size of the strings) to write a simple parser that goes through the string and builds up the query that way, detecting whether you are inside a quoted string or not and behaving appropriately as well as potentially processing AND OR NOT - (a,b,c), etc constructs. It seems like this could be a very worthwhile project, and more than likely there is already something out there I'm not aware of to solve this common problem. You might also want to try digging into the source of some of the more mature wiki or cms applications for inspiration. Dan Stephen Musgrave wrote: > I searched the web and was shocked not to find the answer to this.... > so I bring it to "the list". > > I am building content management tool, within which I want people to be > able to search for content. I want to use the same query string rules > as Google does - specifically the quote to group words into a unified > string. > > For example: > > "the color purple" movie soundtrack > > "the color purple" would need to be an exact match, ignoring the spaces > as OR characters. The spaces outside the quotes would still be treated > like an OR character. > > I am using this code so far: > > $search_string = $_REQUEST['search_string']; > $search_terms = array(); > $search_terms = preg_split('/"/', $search_string, -1, > PREG_SPLIT_NO_EMPTY); > > And it results in: > > Array ( [0] => the color purple [1] => movie soundtrack ) > > But I want it to result in: > > Array ( [0] => the color purple [1] => movie [2] => soundtrack ) > > I feel like I'm a couple keystrokes away... any help is much > appreciated. > > Thanks, > > Stephen From lists at zaunere.com Mon Oct 10 18:33:10 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 18:33:10 -0400 Subject: [nycphp-talk] Loop next/previous offset boundaries in Arrays In-Reply-To: <000a01c5ca6c$a2b7cb40$0ba8a8c0@cliff> Message-ID: <000101c5cdea$9ce14ee0$6501a8c0@MZ> Hi Cliff, Cliff Hirsch wrote on Thursday, October 06, 2005 7:54 AM: > In a loop, a common function seems to be comparing a current array value > with the next or prior array value. Seems easy, except for the first and > last loops, which generate undefined offset errors. Is there a "clean" > way to get around this other than testing for the first or last loop > value, which generates a lot of extra code. When I need to do non-trivial tasks in a loop, I typically use a for loop, rather than a foreach(). It often has some key advantages. Granted, there's an added step for associative arrays, but if I know that an array needs some complex processing, I always try to use an numericly indexed array. Anyway, I do things like this, for example: $ArrayCount = count($somearray); for( $i = 0; $i < $ArrayCount; ++$i ) { if( $i === 0 ) echo 'The first element'; if( $i === ($ArrayCount-1) ) echo 'The last element' } By using the numeric index, it makes determining where you are in the array fast and straightforward. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Mon Oct 10 19:58:29 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 19:58:29 -0400 Subject: [nycphp-talk] CaliPHornia In-Reply-To: <006701c5cc79$bb28ce90$0319a8c0@ced> Message-ID: <008f01c5cdf6$84962b10$6501a8c0@MZ> CED wrote on Saturday, October 08, 2005 10:33 PM: > Anyone headed out to the conf.? I have been so busy with preparing for my > first child and preping the Albany Medical College DBs that I can't. But > looking at the line-up it seems like it's gonna be an awesome edifying > experience. Myself and Chris will be heading out. Anyone else? --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From adam at trachtenberg.com Mon Oct 10 20:01:30 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Mon, 10 Oct 2005 20:01:30 -0400 (EDT) Subject: [nycphp-talk] CaliPHornia In-Reply-To: <008f01c5cdf6$84962b10$6501a8c0@MZ> References: <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: On Mon, 10 Oct 2005, Hans Zaunere wrote: > Myself and Chris will be heading out. Anyone else? I will be there, but now I am there. You can come by and heckle me in the eBay/PayPal Developers Program booth. -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From rotsen at gmail.com Mon Oct 10 20:02:49 2005 From: rotsen at gmail.com (Nestor) Date: Mon, 10 Oct 2005 17:02:49 -0700 Subject: [nycphp-talk] CaliPHornia In-Reply-To: References: <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: On 10/10/05, Adam Maccabee Trachtenberg wrote: > On Mon, 10 Oct 2005, Hans Zaunere wrote: > > > Myself and Chris will be heading out. Anyone else? > > I will be there, but now I am there. You can come by and heckle me in > the eBay/PayPal Developers Program booth. > > -adam > > -- > adam at trachtenberg.com | http://www.trachtenberg.com > author of o'reilly's "upgrading to php 5" and "php cookbook" > avoid the holiday rush, buy your copies today! > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > Does it cost money to go there. I mean my commute from San Diego is not as afar as you guys's Nestor :-) From lists at zaunere.com Mon Oct 10 20:09:19 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 20:09:19 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <4341F958.7000707@iifwp.org> Message-ID: <009701c5cdf8$07a7d430$6501a8c0@MZ> Allen Shaw wrote on Monday, October 03, 2005 11:39 PM: > CED wrote: > > > http://www.databaseanswers.com/modelling_tools.htm > > That's a great list of tools. Something else very interesting to me is > this note at the end of the page: > > > *A short note about about Data Modelling and Database Design ...* > > > > Data modelling and database design are two very different activities. > > > > For data modelling, the question you are asking is : > > 1) What does the world being modelled look like ? > > In particular, you are looking for similarities between things. > > Then you identify a 'super-type' of thing which may have sub-types. > > For example, Corporate Customers and Personal Customers > > > > If, for example, supplier contacts are conceptually different things > > from customer contacts, then the answer is that they should be > > modelled separately. On the other hand, if they are merely sub-sets of > > the same thing, then treat them as the same thing. > > > > 2) For database design, you are answering a different question:- > > how can I efficiently design a database that will support the > > functions of proposed application or Web Site. The key task here is > > to identify similarities between entities so that you can integrate > > them into the same table, usually with a 'Type' indicator. For > > example, a Customer table, which combines all attributes of both > > Corporate and Personal Customers. As a result, it is possible to > > spend a great deal of time breaking things out when creating a Data > > Model, and then collapsing them back together when designing the > > corresponding database. > > > What interest me here is the writer's understanding that when I'm > programming an actual application it's in my best interest to > de-normalize the data model, aiming for fewer tables than my data model > would have indicated. I'm assuming this person has good reason for what > he's saying, but it's something I've never thought of or heard before? > > Can anyone suggest reasons why it's better to have fewer tables, or to > try and combine different types of objects into the same table? Surely > it's something to do with better performance (fewer joins, simpler > queries), right? Is this a common principle of design that I haven't > learned yet? Normalization is often one of the most misunderstood aspects of relational databases. Of course, it's what makes a relational database relational, and we're all taught that you're not worth a cent unless you only work in the 5th normalized form. Well, perhaps if you're a mathematician, then that's correct. The reality is that over-normalization can kill a project just as much as under-normalization. Don't forget - at least from the old SQL books I learned from - why normalization was being preached. "Don't have duplicate data!" was often the mantra. If you had more than one guy named "John", then you need to have a table of first names, with a lookup table relating first names with the other data you're storing. Seems rediculous, right? The practice of heavy normalization was based on some old, bygone, concerns, namely "storage is expensive." Add in academic chest-beating, and pretty soon you have a table for every letter of the alphabet and look-up tables to match. As I think we generally find, with the abundance of hardware resources, normalization is reduced to only an element of good design. Sure, performance can still be a factor, but let's consider the performance of an entire system, and not just what's happening in the database. Not considering the overhead involved in joining tables (and thus resolving disparate blocks across the drive(s)), there's overhead in the application, and in a big way. First is the performance of dealing with duplicate rows - you know, the throwing out of wasted rows from a one-many relationships. That not only incurs network traffic - which is often the slowest part of a modern internet system - it also incurs processing and memory waste on the application server. And what about the overhead of development itself? Large complex queries, sub-queries, joins, and SQL query management in any language can make for unmaintable and tedious code. So it's a balancing act - as always. The degree of normalization is generally more of an art than a science, and the "correct" amount is different for every project, and for every database architect. Get three database architects, and you'll get four recommendations for the correct schema. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From adam at trachtenberg.com Mon Oct 10 20:26:44 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Mon, 10 Oct 2005 20:26:44 -0400 (EDT) Subject: [nycphp-talk] CaliPHornia In-Reply-To: References: <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: On Mon, 10 Oct 2005, Nestor wrote: > Does it cost money to go there. I mean my commute from San Diego is not as > afar as you guys's Around $900 +/-. Fees are linked to from this page. http://guest.cvent.com/EVENTS/Info/Summary.aspx?e=a72c7fa1-43cb-4e9f-8b8e-a8b0ed99b197 -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From kushner at gmail.com Mon Oct 10 20:31:44 2005 From: kushner at gmail.com (Daniel Kushner) Date: Mon, 10 Oct 2005 17:31:44 -0700 Subject: [nycphp-talk] CaliPHornia In-Reply-To: References: <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: <7ac626ed0510101731l47f518d3yeca059b4873e87ea@mail.gmail.com> > > > Does it cost money to go there. I mean my commute from San Diego is not as > afar as you guys's > > Nestor :-) > _______________________________________________ As always, we can always get NYPHP'ers great discounts. Send me an email ( daniel at zend.com) if you're interested. -Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Mon Oct 10 20:37:09 2005 From: rotsen at gmail.com (Nestor) Date: Mon, 10 Oct 2005 17:37:09 -0700 Subject: [nycphp-talk] CaliPHornia In-Reply-To: References: <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: That is too bad. I stop being a php programmer about 5 month ago and I am back doing C programming but I miss working with PHP. AT $900 I do not think I will be going to this conference. You guys have fun in sunny southern cal. Nestor :-) On 10/10/05, Adam Maccabee Trachtenberg wrote: > On Mon, 10 Oct 2005, Nestor wrote: > > > Does it cost money to go there. I mean my commute from San Diego is not as > > afar as you guys's > > Around $900 +/-. Fees are linked to from this page. > > http://guest.cvent.com/EVENTS/Info/Summary.aspx?e=a72c7fa1-43cb-4e9f-8b8e-a8b0ed99b197 > > -adam > > -- > adam at trachtenberg.com | http://www.trachtenberg.com > author of o'reilly's "upgrading to php 5" and "php cookbook" > avoid the holiday rush, buy your copies today! > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From lists at zaunere.com Mon Oct 10 20:38:27 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 20:38:27 -0400 Subject: [nycphp-talk] fun with proc_open In-Reply-To: <43444122.5000108@phpwerx.net> Message-ID: <009e01c5cdfc$196a59a0$6501a8c0@MZ> Dan Cech wrote on Wednesday, October 05, 2005 5:10 PM: > Hi all, > > Firstly, apologies for the long email, I couldn't think of a less > verbose way to describe the issues I'm experiencing. > > I'm in the midst of writing a little program for executing long-running > processes in the background from php and monitoring their output as they > run. > > The problem I'm running into is that when I execute a process using > proc_open and try to read any output from stdout and stderr I am running > into some odd behavior. > > This only seems to happen under windows, running the same script on my > debian server works as expected. > > The first read from stdout is fine, but then it doesn't get any more > output from stdout until the end of the script. > > Is there some issue with using stdout and stderr together in this way > that I don't know about? > > My test code looks like this: > > > // allow script to run for 5 minutes > set_time_limit(300); > > // maximum length of blocks to read from process > define('FREAD_LENGTH',1024*10); > > $cmd = 'php '.dirname(__FILE__).DIRECTORY_SEPARATOR.'sleep.php'; > > $descriptorspec = array( > 1 => array('pipe','w'), // stdout > 2 => array('pipe','w'), // stderr > ); > > $process = proc_open($cmd,$descriptorspec,$pipes); > > if (!is_resource($process)) { > echo 'failed'."\n"; > exit(1); > } > > // don't block process stdout or stderr > stream_set_blocking($pipes[1],0); > stream_set_blocking($pipes[2],0); > > // don't buffer stdout or stderr > stream_set_write_buffer($pipes[1],0); > stream_set_write_buffer($pipes[2],0); > > while (true) { > // read process stdout > $stdout = fread($pipes[1],FREAD_LENGTH); > if (strlen($stdout) > 0) { > echo 'stdout:'. $stdout; > flush(); > } > > // read process stderr > $stderr = fread($pipes[2],FREAD_LENGTH); > if (strlen($stderr) > 0) { > echo 'stderr:'. $stderr; > flush(); > } > > // end when both pipes are closed > if (feof($pipes[1]) && feof($pipes[2])) { > break; > } > > // wait for more output > sleep(1); > } > > // close process stdout and stderr > fclose($pipes[1]); > fclose($pipes[2]); > > // grab exit code > $exitcode = proc_close($process); > > echo 'exitcode:'. $exitcode ."\n"; > > // end of script > > sleep.php is a simple script that outputs some data: > > > ob_implicit_flush(); > > echo('started'."\n"); > > for ($i = 1;$i <= 10;$i++) { > sleep(1); > echo($i."\n"); > } > > fwrite(STDERR,'done'."\n"); > > // end of script > > Running the first script from command line or web browser should output: > > stdout:started > stdout:1 > stdout:2 > stdout:3 > stdout:4 > stdout:5 > stdout:6 > stdout:7 > stdout:8 > stdout:9 > stdout:10 > stderr:done > exitcode:0 > > On windows I'm seeing: > > stdout:started > stderr:done > stdout:1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > exitcode:0 > > I've managed to get the same functionality using popen and redirecting > stderr to a fifo or tempfile, but proc_open seems like the cleaner > solution if I can get it to work the way I want. > > Any ideas? Since it works under Linux, it's probably a subtle difference in the buffering behavior on Windows. Changing the fread() calls to fgets() seems to work, but unfortunately I can't say what's different on Windows that makes this a factor. It's likely blocking/buffering behavior. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From adam at trachtenberg.com Mon Oct 10 20:39:15 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Mon, 10 Oct 2005 20:39:15 -0400 (EDT) Subject: [nycphp-talk] CaliPHornia In-Reply-To: <7ac626ed0510101731l47f518d3yeca059b4873e87ea@mail.gmail.com> References: <008f01c5cdf6$84962b10$6501a8c0@MZ> <7ac626ed0510101731l47f518d3yeca059b4873e87ea@mail.gmail.com> Message-ID: On Mon, 10 Oct 2005, Daniel Kushner wrote: > As always, we can always get NYPHP'ers great discounts. Send me an email ( > daniel at zend.com) if you're interested. Yea. I forgot about the NYPHP discount. This will be a very interesting PHP conference, as there are lots of people talking on more than the usual set of topics. -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! -------------- next part -------------- _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From lists at zaunere.com Mon Oct 10 20:41:06 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 20:41:06 -0400 Subject: [nycphp-talk] Any success/failures with PHP/Java bridge? In-Reply-To: <4D2FAD9B00577645932AD7ED5FECA24591B16F@mail> Message-ID: <009f01c5cdfc$78296a80$6501a8c0@MZ> Fan, Wellington wrote on Monday, October 03, 2005 4:44 PM: > Listies, > > I will need to use a PHP/Java bridge soon and am looking for stories of > horror and delight. Anyone have any experiences? > > I've heard some differing reports: it seems that there is some confusion > regarding the version of PHP required. I've heard that you *must* have 5, > and elsewhere it seems people are using 4.3.x with no problems. > > The PHP/Java bridge lives at: > http://php-java-bridge.sourceforge.net/ > > > And a mention that it works with PHP 4.3.2: > http://www.php.net/manual/en/ref.java.php#53184 I haven't worked with this in a long time, so I'd be interested to hear your experiences. Just as an educated guess, I'd think that PHP 5 would be better, considering the fundamental OO architecture changes. While it may work in PHP 4, you'll probably see more memory usage, which of course may or may not be important, depending on your application. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Mon Oct 10 20:42:48 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 10 Oct 2005 20:42:48 -0400 Subject: [nycphp-talk] CaliPHornia In-Reply-To: <7ac626ed0510101731l47f518d3yeca059b4873e87ea@mail.gmail.com> Message-ID: <00a601c5cdfc$b5198b50$6501a8c0@MZ> Daniel Kushner wrote on Monday, October 10, 2005 8:32 PM: > Does it cost money to go there. I mean my commute from San Diego is not > as afar as you guys's > > Nestor :-) > _______________________________________________ > > > As always, we can always get NYPHP'ers great discounts. Send me an email > (daniel at zend.com) if you're interested. Thanks Daniel - looking forward to the show. Aside from the plane ticket, the conference is certainly worth it. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From hans.zaunere at nyphp.com Mon Oct 10 20:49:34 2005 From: hans.zaunere at nyphp.com (Hans Zaunere) Date: Mon, 10 Oct 2005 20:49:34 -0400 Subject: [nycphp-talk] FW: MySQL AB Welcomes Oracle to the FOSS Database Market Message-ID: <00a701c5cdfd$a78e7bc0$6501a8c0@MZ> Interesting developments in the database world... --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com Kaj Arn? wrote on Friday, October 07, 2005 8:34 PM: > Dear MySQL User, > > MySQL AB and the Free / Open Source database market today received some > unexpected recognition by Oracle, through their acquisition of Innobase > Oy. > > So what does this have to do with MySQL? > > Well, Innobase is the provider of the popular InnoDB Storage Engine in > MySQL. One of the things our users appreciate about MySQL is its unique > pluggable storage engine architecture. You have the flexibility to > choose from number of storage engines including MyISAM, Memory, Merge, > Cluster and InnoDB. And with MySQL 5.0, we added the new Archive and > Federated storage engines. > > Just like the rest of MySQL Server and its Storage Engines, InnoDB is > released under the GPL. With this license, our users have complete > freedom to use, develop, modify the code base as they wish. That is why > MySQL has chose the GPL: to protect the freedom that users value in free > / open source software. > > In their press release on > http://www.oracle.com/corporate/press/2005_oct/inno.html > Oracle states: > > "InnoDB is not a standalone database product: it is distributed as a > part of the MySQL database. InnoDB's contractual relationship with MySQL > comes up for renewal next year. Oracle fully expects to negotiate an > extension of that relationship." > > We have also issued a press release on > http://www.mysql.com/news-and-events/news/article_968.html > where M?rten Mickos, CEO of MySQL, states: > > "This announcement represents further validation of the open source > movement. The beauty of open source software and the GPL license is > freedom. As with all MySQL code, InnoDB is provided under the GPL > license, meaning that users have complete freedom to use, develop, and > modify the code base. We are pleased to see even broader industry > acceptance of open source database technology. This also means that > database developers now have even greater flexibility to use MySQL and > Oracle in the same environment." > > For you as a MySQL user, I want to stress a couple of further points of > the "don't worry" type: > > * we remain committed to support our existing clients and users, using > InnoDB and other storage engines > * we will continue to provide development and bug-fix resources for > InnoDB users > * we continue to sell to our prospects and woo new users, using InnoDB > and other storage engines > * there will be no impact on MySQL 5.0, scheduled for GA in Q4, 2005 > * we will continue to include InnoDB in future releases of MySQL > * Innobase Oy is a separate company ? and is not a part of MySQL AB; > Oracle has no ownership of MySQL AB > * we will work with Oracle as a normal business partner > > Go MySQL! > > Kaj Arn? > VP Community Relations > MySQL AB From andrew at plexpod.com Mon Oct 10 20:51:16 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Mon, 10 Oct 2005 20:51:16 -0400 Subject: [nycphp-talk] CaliPHornia In-Reply-To: <008f01c5cdf6$84962b10$6501a8c0@MZ> References: <006701c5cc79$bb28ce90$0319a8c0@ced> <008f01c5cdf6$84962b10$6501a8c0@MZ> Message-ID: <20051011005115.GU1448@desario.homelinux.net> On Mon, Oct 10, 2005 at 07:58:29PM -0400, Hans Zaunere wrote: > CED wrote on Saturday, October 08, 2005 10:33 PM: > > Anyone headed out to the conf.? I have been so busy with preparing for my > > first child and preping the Albany Medical College DBs that I can't. But > > looking at the line-up it seems like it's gonna be an awesome edifying > > experience. > > Myself and Chris will be heading out. Anyone else? I'll be there too. Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From 1j0lkq002 at sneakemail.com Mon Oct 10 23:11:30 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 10 Oct 2005 20:11:30 -0700 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <009701c5cdf8$07a7d430$6501a8c0@MZ> References: <009701c5cdf8$07a7d430$6501a8c0@MZ> Message-ID: <30644-86917@sneakemail.com> Hans Zaunere lists-at-zaunere.com |nyphp dev/internal group use| wrote: > Normalization is often one of the most misunderstood aspects of relational > >databases. Of course, it's what makes a relational database relational, and >we're all taught that you're not worth a cent unless you only work in the >5th normalized form. > >Well, perhaps if you're a mathematician, then that's correct. The reality >is that over-normalization can kill a project just as much as >under-normalization. Don't forget - at least from the old SQL books I >learned from - why normalization was being preached. "Don't have duplicate >data!" was often the mantra. If you had more than one guy named "John", >then you need to have a table of first names, with a lookup table relating >first names with the other data you're storing. Seems rediculous, right? > >The practice of heavy normalization was based on some old, bygone, concerns, >namely "storage is expensive." Add in academic chest-beating, and pretty >soon you have a table for every letter of the alphabet and look-up tables to >match. > >As I think we generally find, with the abundance of hardware resources, >normalization is reduced to only an element of good design. Sure, >performance can still be a factor, but let's consider the performance of an >entire system, and not just what's happening in the database. > >Not considering the overhead involved in joining tables (and thus resolving >disparate blocks across the drive(s)), there's overhead in the application, >and in a big way. First is the performance of dealing with duplicate rows - >you know, the throwing out of wasted rows from a one-many relationships. >That not only incurs network traffic - which is often the slowest part of a >modern internet system - it also incurs processing and memory waste on the >application server. > >And what about the overhead of development itself? Large complex queries, >sub-queries, joins, and SQL query management in any language can make for >unmaintable and tedious code. > >So it's a balancing act - as always. The degree of normalization is >generally more of an art than a science, and the "correct" amount is >different for every project, and for every database architect. Get three >database architects, and you'll get four recommendations for the correct >schema. > > >--- >Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > Yeah. What he said. -=john andrews http://www.seo-fun.com From mitch.pirtle at gmail.com Tue Oct 11 01:59:42 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 11 Oct 2005 01:59:42 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <009701c5cdf8$07a7d430$6501a8c0@MZ> References: <4341F958.7000707@iifwp.org> <009701c5cdf8$07a7d430$6501a8c0@MZ> Message-ID: <330532b60510102259o11a7f9c1qb3877653f8e30d55@mail.gmail.com> On 10/10/05, Hans Zaunere wrote: > > So it's a balancing act - as always. The degree of normalization is > generally more of an art than a science, and the "correct" amount is > different for every project, and for every database architect. Get three > database architects, and you'll get four recommendations for the correct > schema. Uh. Hmm. *spacemonkey counts with both fingers and toes -- Mitch From suzerain at suzerain.com Tue Oct 11 02:42:50 2005 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue, 11 Oct 2005 02:42:50 -0400 Subject: [nycphp-talk] length of form element names? In-Reply-To: <1741203e4da9c121add11e73213fcd98@musgrave.org> References: <1741203e4da9c121add11e73213fcd98@musgrave.org> Message-ID: Hi there: I searched around, and did not find an answer. In particular, I was looking at http://www.w3.org/TR/REC-html40/interact/forms.html#control-name ...and also just general Google searching. So my question is this: How long can the name of a form element be? Is there a limit? I have a script which is a few layers deep into auto-generating forms based on information in a CSS file, and it's inserting some arcane codes in that are adding up to make really long form elements. Nothing's breaking, but I'm concerned that there might be a problem in the future, since it could conceivably construct some pretty long form field names. Cheers, Marc From tgales at tgaconnect.com Tue Oct 11 07:05:08 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 11 Oct 2005 07:05:08 -0400 Subject: [nycphp-talk] data modelling vs. db design In-Reply-To: <330532b60510102259o11a7f9c1qb3877653f8e30d55@mail.gmail.com> References: <4341F958.7000707@iifwp.org> <009701c5cdf8$07a7d430$6501a8c0@MZ> <330532b60510102259o11a7f9c1qb3877653f8e30d55@mail.gmail.com> Message-ID: <434B9C64.1020807@tgaconnect.com> Mitch Pirtle wrote: > On 10/10/05, Hans Zaunere wrote: > >>So it's a balancing act - as always. The degree of normalization is >>generally more of an art than a science, and the "correct" amount is >>different for every project, and for every database architect. Get three >>database architects, and you'll get four recommendations for the correct >>schema. > > > Uh. Hmm. > > *spacemonkey counts with both fingers and toes > It would seem that you should be able to count the most common degrees of normalization on one hand... ( very few people take things past 5th normal) Normalization is basically simplifying, if you are to believe E.F. Codd: "For this reason (and others to be cited below) the possibility of eliminating nonsimple domains appears worth investigating. [see note 4] There is, in fact, a very simple elimination procedure, which we shall call normalization." http://www.acm.org/classics/nov95/s1p4.html There may be a number of ways to simplify a certain schema, and there may be many opinions about what constitutes a 'good' schema -- but normalization itself is pretty much 'cut and dried'. Further, if you define the degree of normalization needed as that degree which will protect the data from (unexpected) anomalies, the degree of normalization needed is not a matter of opinion either. A useful guide for the steps involved in normalizing data can be found at: http://www.gslis.utexas.edu/~wyllys/DMPAMaterials/normstep.html -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From ashaw at polymerdb.org Tue Oct 11 08:06:41 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Tue, 11 Oct 2005 07:06:41 -0500 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X) In-Reply-To: <30644-86917@sneakemail.com> References: <009701c5cdf8$07a7d430$6501a8c0@MZ> <30644-86917@sneakemail.com> Message-ID: <434BAAD1.4000607@polymerdb.org> inforequest wrote: > Hans Zaunere lists-at-zaunere.com |nyphp dev/internal group use| wrote: > > [snip] >> >>--- >>Hans Zaunere / President / New York PHP >> www.nyphp.org / www.nyphp.com >> > > > Yeah. What he said. > > > -=john andrews > http://www.seo-fun.com > Great - thanks John. :) -- Allen Shaw Polymer (http://polymerdb.org) From andrew at plexpod.com Tue Oct 11 08:24:48 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Tue, 11 Oct 2005 08:24:48 -0400 Subject: [nycphp-talk] length of form element names? In-Reply-To: References: <1741203e4da9c121add11e73213fcd98@musgrave.org> Message-ID: <20051011122446.GW1448@desario.homelinux.net> On Tue, Oct 11, 2005 at 02:42:50AM -0400, Marc Antony Vose wrote: > How long can the name of a form element be? Is there a limit? I can't say I've run into a limit, nor do I know of one on the _name_ of a form element. But there are limits to the length of URLs. I believe the documented limit is 1024 chars, but most browsers will do much more. Anyway, my point is if you have lots of long form element names in one form, don't use a GET for sure! Use a POST. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From smanes at magpie.com Tue Oct 11 08:36:40 2005 From: smanes at magpie.com (Steve Manes) Date: Tue, 11 Oct 2005 08:36:40 -0400 Subject: [nycphp-talk] FW: MySQL AB Welcomes Oracle to the FOSS Database Market In-Reply-To: <00a701c5cdfd$a78e7bc0$6501a8c0@MZ> References: <00a701c5cdfd$a78e7bc0$6501a8c0@MZ> Message-ID: <434BB1D8.5020303@magpie.com> Hans Zaunere wrote: > Interesting developments in the database world... And interesting discussion about it on the PostgreSQL list: http://archives.postgresql.org/pgsql-general/2005-10/threads.php#00401 From phil at bearingasset.com Tue Oct 11 09:05:20 2005 From: phil at bearingasset.com (Phil Duffy) Date: Tue, 11 Oct 2005 09:05:20 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagram toolfor MySQL/OS X) In-Reply-To: <009701c5cdf8$07a7d430$6501a8c0@MZ> Message-ID: <20051011130535.92D9FA86EA@virtu.nyphp.org> > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Hans Zaunere > Sent: Monday, October 10, 2005 7:09 PM > To: 'NYPHP Talk' > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > toolfor MySQL/OS X) > Normalization is often one of the most misunderstood aspects of relational > databases. Of course, it's what makes a relational database relational, > and > we're all taught that you're not worth a cent unless you only work in the > 5th normalized form. > > Well, perhaps if you're a mathematician, then that's correct. The reality > is that over-normalization can kill a project just as much as > under-normalization. Don't forget - at least from the old SQL books I > learned from - why normalization was being preached. "Don't have > duplicate > data!" was often the mantra. If you had more than one guy named "John", > then you need to have a table of first names, with a lookup table relating > first names with the other data you're storing. Seems rediculous, right? > > The practice of heavy normalization was based on some old, bygone, > concerns, > namely "storage is expensive." Add in academic chest-beating, and pretty > soon you have a table for every letter of the alphabet and look-up tables > to > match. > > As I think we generally find, with the abundance of hardware resources, > normalization is reduced to only an element of good design. Sure, > performance can still be a factor, but let's consider the performance of > an > entire system, and not just what's happening in the database. Hans, While I agree with your general message, I have a reservation about the "storage is expensive" specific example. Having been around since before Boole and Babbage, I can't even recall in the "old days" when developers were slavish about "storage is expensive". We sought opportunities to reduce storage, when that was practical, but only in very specialized applications did we go out of our way to conserve disk storage. The primary issue was data consistency and software maintainability. Lack of normalization created situations which encouraged users to create inconsistent data. For example, consider a pre-relational system in healthcare that recognized two 'pseudo-entities', physicians and patients (pseudo in the sense we now recognize these as roles as opposed to fundamental entities). Each pseudo-entity had its own basic record to contain address, telephone number and other attributes. That worked as long as the physician never became a patient. However, a change to a physician/patient's record created an inconsistency in the changed attribute, e.g., the address. The second issue was software maintenance. There were situations where one record's structure might be modified while the other was not. I believe it was a natural progression from normalization of databases to object-oriented design, because the latter encouraged all interactions with the database to be performed in a single module. I know of at least one situation in healthcare where that limitation in the existing systems nearly killed a patient. But your principle point is that database design (and object design by extension in my opinion) is still an art form. Both database and object design should look upon the 'rules' as significant guidelines. Understand when to bypass these rules, and document those reasons (conditions may change in the future and others will probably have to clean up the situation). I liked your example of normalizing the string 'John', which underlines the absurdity of over-normalization. For me, appropriate normalization begins with the recognition of the fundamental entities in a system and a distinction between real world-modeled entities (e.g., a Person) as opposed to system-internal entities (e.g., a web page). If I come to a branch in the road at which normalization or de-normalization both offer advantages, I am most likely to take the normalization branch, make a mental note and if I later discover that creates a significant performance issue that can't be otherwise corrected, I would de-normalize that area of the system intentionally (documenting my reasons and the implementation). It would be interesting to see if others have approached normalization guidelines differently. I won't claim the above is the only way to do database design - it is still an art form after all. Phil From mitch.pirtle at gmail.com Tue Oct 11 15:49:32 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 11 Oct 2005 15:49:32 -0400 Subject: [nycphp-talk] FW: MySQL AB Welcomes Oracle to the FOSS Database Market In-Reply-To: <434BB1D8.5020303@magpie.com> References: <00a701c5cdfd$a78e7bc0$6501a8c0@MZ> <434BB1D8.5020303@magpie.com> Message-ID: <330532b60510111249i3109c5bg4b69aaa01313f8e3@mail.gmail.com> On 10/11/05, Steve Manes wrote: > > And interesting discussion about it on the PostgreSQL list: > > http://archives.postgresql.org/pgsql-general/2005-10/threads.php#00401 Hey I recognize a couple names over there. Hans, is what I stated the position that MySQL is in, with regards to incorporating a 3rd party GPL library into a dual-licensed work? -- Mitch, been talking to waaaaay too many lawyers lately ;-) From lists at zaunere.com Tue Oct 11 21:27:58 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 11 Oct 2005 21:27:58 -0400 Subject: [nycphp-talk] FW: MySQL AB Welcomes Oracle to the FOSS DatabaseMarket In-Reply-To: <330532b60510111249i3109c5bg4b69aaa01313f8e3@mail.gmail.com> Message-ID: <000201c5cecc$2eaeb920$6601a8c0@MZ> Mitch Pirtle wrote on Tuesday, October 11, 2005 3:50 PM: > On 10/11/05, Steve Manes wrote: > > > > And interesting discussion about it on the PostgreSQL list: > > > > http://archives.postgresql.org/pgsql-general/2005-10/threads.php#00401 > > Hey I recognize a couple names over there. Hans, is what I stated the > position that MySQL is in, with regards to incorporating a 3rd party > GPL library into a dual-licensed work? I'm not sure I want to go down this road :) > -- Mitch, been talking to waaaaay too many lawyers lately ;-) Hans, mumbling something about copyright ownership and deciding on the license From lists at zaunere.com Tue Oct 11 22:13:59 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 11 Oct 2005 22:13:59 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagramtoolfor MySQL/OS X) In-Reply-To: <20051011130535.92D9FA86EA@virtu.nyphp.org> Message-ID: <000301c5ced2$9c4b9420$6601a8c0@MZ> Phil Duffy wrote on Tuesday, October 11, 2005 9:05 AM: > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: > > Monday, October 10, 2005 7:09 PM > > To: 'NYPHP Talk' > > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER Diagram > > toolfor MySQL/OS X) Normalization is often one of the most > > misunderstood aspects of relational databases. Of course, it's what > > makes a relational database relational, and we're all taught that > > you're not worth a cent unless you only work in the 5th normalized > > form. > > > > Well, perhaps if you're a mathematician, then that's correct. The > > reality is that over-normalization can kill a project just as much as > > under-normalization. Don't forget - at least from the old SQL books I > > learned from - why normalization was being preached. "Don't have > > duplicate data!" was often the mantra. If you had more than one guy > > named "John", then you need to have a table of first names, with a > > lookup table relating first names with the other data you're storing. > > Seems rediculous, right? > > > > The practice of heavy normalization was based on some old, bygone, > > concerns, namely "storage is expensive." Add in academic > > chest-beating, and pretty soon you have a table for every letter of the > > alphabet and look-up tables to match. > > > > As I think we generally find, with the abundance of hardware resources, > > normalization is reduced to only an element of good design. Sure, > > performance can still be a factor, but let's consider the performance > > of an entire system, and not just what's happening in the database. > > > > Hans, > > While I agree with your general message, I have a reservation about the > "storage is expensive" specific example. Having been around since before > Boole and Babbage, I can't even recall in the "old days" when developers > were slavish about "storage is expensive". We sought opportunities to > reduce storage, when that was practical, but only in very specialized > applications did we go out of our way to conserve disk storage. The > primary issue was data consistency and software maintainability. Lack of > normalization created situations which encouraged users to create > inconsistent data. For example, consider a pre-relational system in > healthcare that recognized two 'pseudo-entities', physicians and patients > (pseudo in the sense we now recognize these as roles as opposed to > fundamental entities). Each pseudo-entity had its own basic record to > contain address, telephone number and other attributes. That worked as > long as the physician never became a patient. However, a change to a > physician/patient's record created an inconsistency in the changed > attribute, e.g., the address. > > The second issue was software maintenance. There were situations where > one record's structure might be modified while the other was not. Good points, and I think you raise an important issue, namely, normalization as a mechanism for separation and isolation. > I believe it was a natural progression from normalization of databases to > object-oriented design, because the latter encouraged all interactions > with the database to be performed in a single module. I know of at least > one situation in healthcare where that limitation in the existing systems > nearly killed a patient. Ah hah! Separation and isolation. There is always the consideration of what perspective we're looking at, and at the end, who is saying normalization. I think the storage reasoning has come from - at least in my experience when browsing academic SQL references - a largely idealistic way of storing data. Perhaps storage was or wasn't really expensive, but it was neat to not store redundant data, as the first few normal-forms try to address: http://www.datamodel.org/NormalizationRules.html That's from the data-structures-are-cool-and-I'm-not-an-implementer department, which begins down the road of: http://en.wikipedia.org/wiki/Database_normalization#Sixth_normal_form http://www.bkent.net/Doc/simple5.htm and eventually to: http://www.nerdbooks.com/item.php?id=1558608559 Not a bad thing, but not something I'd be ready to recommend to a customer :) >From a developer's perspective, however, the more important issue, as you point out, is a good, clean, representation of data. And, as hardware resources become cheaper, that might mean that it's OK to have redundant/repeating data, and still be correctly normalized and architectured. > But your principle point is that database design (and object design by > extension in my opinion) is still an art form. Both database and object > design should look upon the 'rules' as significant guidelines. Understand > when to bypass these rules, and document those reasons (conditions may > change in the future and others will probably have to clean up the > situation). Exactly - it's a balance between what works in a sensible way, and how you're supposed to do it. As some of the links above mention, they're discussing "relational database theory." A lot of the work these guys do is great, and the basis for much of the technology we have today. But as architects and implementers on the front-lines, it's our job to find that happy place between the theory and practical, cost effective software. > I liked your example of normalizing the string 'John', which underlines > the absurdity of over-normalization. For me, appropriate normalization > begins with the recognition of the fundamental entities in a system and a > distinction between real world-modeled entities (e.g., a Person) as > opposed to system-internal entities (e.g., a web page). If I come to a > branch in the road at which normalization or de-normalization both offer > advantages, I am most likely to take the normalization branch, make a > mental note and if I later discover that creates a significant > performance issue that can't be otherwise corrected, I would de-normalize > that area of the system intentionally (documenting my reasons and the > implementation). > > It would be interesting to see if others have approached normalization > guidelines differently. I won't claim the above is the only way to do > database design - it is still an art form after all. I approach it in much the same way, however often take de-normalization if all other things are equal. Recognition of fundamental entities is really the driver behind normalization in most environments I come across, and without it, the total system, in terms of code/DB writing, style, and maintainability, system performance, and future system changes by external developers, is usually happier with a bit more data consolidation. Good talk Phil, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From 1j0lkq002 at sneakemail.com Tue Oct 11 22:38:43 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 11 Oct 2005 19:38:43 -0700 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagramtoolfor MySQL/OS X) In-Reply-To: <000301c5ced2$9c4b9420$6601a8c0@MZ> References: <000301c5ced2$9c4b9420$6601a8c0@MZ> Message-ID: <25564-25892@sneakemail.com> There seems to be enough interest in this thread, perhaps we should hash out a real-world example, using it to make points in the discussion? My first suggestion would be a retail system for a shopping cart, with qty, prices, and taxes. I think that an open discussion of the proper database design, inlight of an eventual application, might be very....educational? I would be happy to volunteer time to re-post some of the more technical posts, for the less-advanced PHPer 9or at least do my best). Comments? -=john andrews http://www.seo-fun.com Competitive Webmastering 101 From mikko.rantalainen at peda.net Wed Oct 12 04:43:02 2005 From: mikko.rantalainen at peda.net (Mikko Rantalainen) Date: Wed, 12 Oct 2005 11:43:02 +0300 Subject: [nycphp-talk] length of form element names? In-Reply-To: <20051011122446.GW1448@desario.homelinux.net> References: <1741203e4da9c121add11e73213fcd98@musgrave.org> <20051011122446.GW1448@desario.homelinux.net> Message-ID: <434CCC96.6070104@peda.net> Andrew Yochum wrote: > On Tue, Oct 11, 2005 at 02:42:50AM -0400, Marc Antony Vose wrote: > >>How long can the name of a form element be? Is there a limit? > > I can't say I've run into a limit, nor do I know of one on the _name_ of > a form element. But there are limits to the length of URLs. I believe > the documented limit is 1024 chars, but most browsers will do much more. > Anyway, my point is if you have lots of long form element names in one > form, don't use a GET for sure! Use a POST. I googled for "rfc url length" and got RFC 2397 as an answer (http://www.faqs.org/rfcs/rfc2397.html). It says that HTML 2.0 has following limits: maximum length of literal attribute value (for href of a or action of post or value of input type hidden) is 1024 bytes (LITLEN) maximum combined length of all attribute values of a single tag is 2100 bytes (ATTSPLEN) maximum length for a single tag in source code is 2100 bytes (TAGLEN) [as a side note, limit of 2100 bytes for a tag limits maximum combined attribute length to less than 2100 bytes in real life.] ** Fortunately, no current user agent has such a low limits. HTML 4.01 says (http://www.w3.org/TR/html401/conform.html#conformance): "A user agent should avoid imposing arbitrary length limits on attribute value literals (see the section on capacities in the SGML Declaration). For introductory information on SGML attributes, please consult the section on attribute definitions." HTML 4.01 SGML Declaration (http://www.w3.org/TR/html401/sgml/sgmldecl.html#h-20.1) has following part: ATTCNT 60 -- increased -- ATTSPLEN 65536 -- These are the largest values -- LITLEN 65536 -- permitted in the declaration -- NAMELEN 65536 -- Avoid fixed limits in actual -- TAGLEN 65536 and the declaration includes a message that says "These are the largest values permitted in the declaration. Avoid fixed limits in actual implementations of HTML UA's." RFC 2616 doesn't set any limits for the lenght of URL. As for the real world limits, "Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters [...] If you are using the GET method, you are limited to a maximum of 2,048 characters (minus the number of characters in the actual path, of course)." (http://support.microsoft.com/default.aspx?scid=KB;en-us;q208427). -- Mikko From phil at bearingasset.com Wed Oct 12 09:56:49 2005 From: phil at bearingasset.com (Phil Duffy) Date: Wed, 12 Oct 2005 09:56:49 -0400 Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagramtoolfor MySQL/OS X) In-Reply-To: <25564-25892@sneakemail.com> Message-ID: <20051012135655.562A5A85F0@virtu.nyphp.org> John, Good suggestion. I'll be glad to redo my comments so they fit within a format accepted by the group. Perhaps one way to start something like this would be to outline 'chapters' of the discussion, particularly if we would be dealing with practical examples. I think it is wise to limit the examples to an application such as a shopping cart because the subject would be immense otherwise. Phil > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of inforequest > Sent: Tuesday, October 11, 2005 9:39 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] data modelling vs. db design (was: ER > Diagramtoolfor MySQL/OS X) > > There seems to be enough interest in this thread, perhaps we should hash > out a real-world example, using it to make points in the discussion? > > My first suggestion would be a retail system for a shopping cart, with > qty, prices, and taxes. I think that an open discussion of the proper > database design, inlight of an eventual application, might be > very....educational? > > I would be happy to volunteer time to re-post some of the more technical > posts, for the less-advanced PHPer 9or at least do my best). > > Comments? > > -=john andrews > http://www.seo-fun.com > Competitive Webmastering 101 > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From dmintz at davidmintz.org Wed Oct 12 09:57:24 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 12 Oct 2005 09:57:24 -0400 (EDT) Subject: [nycphp-talk] data modelling vs. db design (was: ER Diagramtoolfor MySQL/OS X) In-Reply-To: <25564-25892@sneakemail.com> References: <000301c5ced2$9c4b9420$6601a8c0@MZ> <25564-25892@sneakemail.com> Message-ID: On Tue, 11 Oct 2005, inforequest wrote: > There seems to be enough interest in this thread, perhaps we should hash > out a real-world example, using it to make points in the discussion? > > My first suggestion would be a retail system for a shopping cart, with > qty, prices, and taxes. I think that an open discussion of the proper > database design, inlight of an eventual application, might be > very....educational? > > I would be happy to volunteer time to re-post some of the more technical > posts, for the less-advanced PHPer 9or at least do my best). > > Comments? I'll buy him a round of whatever he's drinking. This has been one of the most interesting (read: exquisitely geeky) NYPHP threads of 2005, imho. --- David Mintz http://davidmintz.org/ From jeff at geeksociety.com Wed Oct 12 11:42:22 2005 From: jeff at geeksociety.com (Jeffrey O. Stevison) Date: Wed, 12 Oct 2005 10:42:22 -0500 Subject: [nycphp-talk] system() call timeout Message-ID: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> Is there a way to set a timeout value for a system("ls -l") call? If the ls command hangs for at least 5 secs I want to term the call and have some return value that indicates the process has termed. Jeff From sailer at bnl.gov Wed Oct 12 11:46:08 2005 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 12 Oct 2005 11:46:08 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> Message-ID: <20051012154608.GB3974@bnl.gov> On Wed, Oct 12, 2005 at 10:42:22AM -0500, Jeffrey O. Stevison wrote: > Is there a way to set a timeout value for a system("ls -l") call? If > the ls command hangs for at least 5 secs I want to term the call and > have some return value that indicates the process has termed. Not that I've found. I've been using the $dirhandle=opendir('xx'); $filename=readdir($dirhandle); method of picking out files. Tim -- Tim Sailer Information and Special Technologies Program Office of CounterIntelligence Brookhaven National Laboratory (631) 344-3001 From stephen at musgrave.org Wed Oct 12 12:15:54 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Wed, 12 Oct 2005 12:15:54 -0400 Subject: [nycphp-talk] Regular expression for Google-like search In-Reply-To: <434AD032.6000403@n0p.net> References: <1741203e4da9c121add11e73213fcd98@musgrave.org> <434AD032.6000403@n0p.net> Message-ID: Great! Thanks for the push! On Oct 10, 2005, at 4:33 PM, Flavio daCosta wrote: > How about: > > $search_string = '"the color purple" movie soundtrack'; > $search_terms = array(); > $search_terms = preg_match_all ('/"[^"]+"|\w+/', $search_string, > $matches); > > print_r ($matches); > > > Array > ( > [0] => Array > ( > [0] => "the color purple" > [1] => movie > [2] => soundtrack > ) > > ) > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From tgales at tgaconnect.com Wed Oct 12 12:15:54 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 12 Oct 2005 12:15:54 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> Message-ID: <434D36BA.7030705@tgaconnect.com> Jeffrey O. Stevison wrote: > Is there a way to set a timeout value for a system("ls -l") call? If > the ls command hangs for at least 5 secs I want to term the call and > have some return value that indicates the process has termed. Did you try ' set_time_limit()' ? -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From tgales at tgaconnect.com Wed Oct 12 12:18:28 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 12 Oct 2005 12:18:28 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <434D36BA.7030705@tgaconnect.com> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> <434D36BA.7030705@tgaconnect.com> Message-ID: <434D3754.50009@tgaconnect.com> Tim Gales wrote: > Jeffrey O. Stevison wrote: > >>Is there a way to set a timeout value for a system("ls -l") call? If >>the ls command hangs for at least 5 secs I want to term the call and >>have some return value that indicates the process has termed. > > > Did you try ' set_time_limit()' ? > oh I see that: "Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running." --nevermind -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From jeff at geeksociety.com Wed Oct 12 12:25:25 2005 From: jeff at geeksociety.com (Jeffrey O. Stevison) Date: Wed, 12 Oct 2005 11:25:25 -0500 Subject: [nycphp-talk] system() call timeout In-Reply-To: <20051012154608.GB3974@bnl.gov> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> <20051012154608.GB3974@bnl.gov> Message-ID: I'm more trying to know when that exact command fails rather than any output from the command itself. Jeff On Oct 12, 2005, at 10:46 AM, Tim Sailer wrote: > On Wed, Oct 12, 2005 at 10:42:22AM -0500, Jeffrey O. Stevison wrote: > >> Is there a way to set a timeout value for a system("ls -l") call? If >> the ls command hangs for at least 5 secs I want to term the call and >> have some return value that indicates the process has termed. >> > > Not that I've found. I've been using the $dirhandle=opendir('xx'); > $filename=readdir($dirhandle); method of picking out files. > From smanes at magpie.com Wed Oct 12 12:41:55 2005 From: smanes at magpie.com (Steve Manes) Date: Wed, 12 Oct 2005 12:41:55 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> Message-ID: <434D3CD3.3070601@magpie.com> Jeffrey O. Stevison wrote: > Is there a way to set a timeout value for a system("ls -l") call? If > the ls command hangs for at least 5 secs I want to term the call and > have some return value that indicates the process has termed. I've never tried it with PHP but I used external process timers in C programs by setting a function on the SIG_ALRM signal. The function would send a kill to the PID of the child process when alarm() timed out. You might find what you need here: http://us3.php.net/manual/en/function.pcntl-signal.php From andrew at plexpod.com Wed Oct 12 12:45:34 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 12 Oct 2005 12:45:34 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> <20051012154608.GB3974@bnl.gov> Message-ID: <20051012164534.GI1448@desario.homelinux.net> On Wed, Oct 12, 2005 at 11:25:25AM -0500, Jeffrey O. Stevison wrote: > I'm more trying to know when that exact command fails rather than any > output from the command itself. Try prefacing it with the "time" command: http://linux.ctyme.com/man/man3414.htm HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From jeff at geeksociety.com Wed Oct 12 14:15:19 2005 From: jeff at geeksociety.com (Jeffrey O. Stevison) Date: Wed, 12 Oct 2005 13:15:19 -0500 Subject: [nycphp-talk] system() call timeout In-Reply-To: <20051012164534.GI1448@desario.homelinux.net> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> <20051012154608.GB3974@bnl.gov> <20051012164534.GI1448@desario.homelinux.net> Message-ID: <629F9D15-DA78-4A05-B048-9896C66C3839@geeksociety.com> But if the command hangs, the only thing that the time command will do is record how long the program is 'executing' or not for that matter. I need to term the offensive command and return a code that this has happened. The reason being I don't want to wait for the system to time out the command as it takes too long to time out. I would know in a matter of seconds rather than the systems minutes whether the command is hung or not. Jeffrey O. Stevison On Oct 12, 2005, at 11:45 AM, Andrew Yochum wrote: > On Wed, Oct 12, 2005 at 11:25:25AM -0500, Jeffrey O. Stevison wrote: > >> I'm more trying to know when that exact command fails rather than any >> output from the command itself. >> > > Try prefacing it with the "time" command: > http://linux.ctyme.com/man/man3414.htm From andrew at plexpod.com Wed Oct 12 15:28:10 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 12 Oct 2005 15:28:10 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <629F9D15-DA78-4A05-B048-9896C66C3839@geeksociety.com> References: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> <20051012154608.GB3974@bnl.gov> <20051012164534.GI1448@desario.homelinux.net> <629F9D15-DA78-4A05-B048-9896C66C3839@geeksociety.com> Message-ID: <20051012192810.GA29855@desario.homelinux.net> On Wed, Oct 12, 2005 at 01:15:19PM -0500, Jeffrey O. Stevison wrote: > But if the command hangs, the only thing that the time command will > do is record how long the program is 'executing' or not for that > matter. I need to term the offensive command and return a code that > this has happened. The reason being I don't want to wait for the > system to time out the command as it takes too long to time out. I > would know in a matter of seconds rather than the systems minutes > whether the command is hung or not. Gotcha. One method might be to use the pcntl_* functions to fork a child, exec the "ls -la" and wait for the child to exit using a non-blocking waitpid in a loop, killing the proc if it takes to long or moving on to other business when it returns. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From enunez at tiaa-cref.org Wed Oct 12 17:08:01 2005 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Wed, 12 Oct 2005 17:08:01 -0400 Subject: [nycphp-talk] system() call timeout Message-ID: <33DFD788D44E404CB92B90176DEC061A6DAFEF@NYCPDMSXMB06.ad.tiaa-cref.org> Fork a child ? pcntl function calls ?? what if you're running on a webserver, you're going to fork a huge application just to do a "ls -l" ??? It's always good to have this knowledge on hand but ask yourself do I really need a bazooka to kill a mouse? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Andrew Yochum Sent: Wednesday, October 12, 2005 3:28 PM To: NYPHP Talk Subject: Re: [nycphp-talk] system() call timeout On Wed, Oct 12, 2005 at 01:15:19PM -0500, Jeffrey O. Stevison wrote: > But if the command hangs, the only thing that the time command will > do is record how long the program is 'executing' or not for that > matter. I need to term the offensive command and return a code that > this has happened. The reason being I don't want to wait for the > system to time out the command as it takes too long to time out. I > would know in a matter of seconds rather than the systems minutes > whether the command is hung or not. Gotcha. One method might be to use the pcntl_* functions to fork a child, exec the "ls -la" and wait for the child to exit using a non-blocking waitpid in a loop, killing the proc if it takes to long or moving on to other business when it returns. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** From jeff.loiselle at gmail.com Wed Oct 12 17:44:39 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 12 Oct 2005 17:44:39 -0400 Subject: [nycphp-talk] CaliPHornia In-Reply-To: <006701c5cc79$bb28ce90$0319a8c0@ced> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> <006701c5cc79$bb28ce90$0319a8c0@ced> Message-ID: <4b1887110510121444k40186ad6ydc8438564b0d04fc@mail.gmail.com> I'm seriously considering attending after reading this thread. I had been tossing it around in my mind for quite a while, and with Dan's supercool NYPHP discount, I just might make the plunge. Thanks for rallying the troops. From andrew at plexpod.com Wed Oct 12 17:44:05 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 12 Oct 2005 17:44:05 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <33DFD788D44E404CB92B90176DEC061A6DAFEF@NYCPDMSXMB06.ad.tiaa-cref.org> References: <33DFD788D44E404CB92B90176DEC061A6DAFEF@NYCPDMSXMB06.ad.tiaa-cref.org> Message-ID: <20051012214405.GC29855@desario.homelinux.net> On Wed, Oct 12, 2005 at 05:08:01PM -0400, Nunez, Eddy wrote: > > Fork a child ? pcntl function calls ?? what if you're running on a webserver, > you're going to fork a huge application just to do a "ls -l" ??? > > It's always good to have this knowledge on hand but ask yourself do I > really need a bazooka to kill a mouse? Very good point. You should know what is really doing behind the scenes. However, I *suspect* Jeffrey was not really finding that "ls -l" was timing out, but rather something proprietary for which he substituted something common for public conumption. If it is really "ls" then, there is more to the problem then he is stating. Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From lists at zaunere.com Wed Oct 12 22:42:20 2005 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 12 Oct 2005 22:42:20 -0400 Subject: [nycphp-talk] system() call timeout In-Reply-To: <5B644D95-A5D9-4895-A8D8-11CBD4475FB4@geeksociety.com> Message-ID: <000601c5cf9f$bc7d38c0$6501a8c0@MZ> Jeffrey O. Stevison wrote on Wednesday, October 12, 2005 11:42 AM: > Is there a way to set a timeout value for a system("ls -l") call? If > the ls command hangs for at least 5 secs I want to term the call and > have some return value that indicates the process has termed. I've never tested this for this type of use, but perhaps proc_open() or popen() could help. You'd get some streams, which you could then set timeouts on for reading. It might be a little tricky to code, and may not even work, but could be worth a shot. The real question, however, is why an ls is taking so long. If the same ls doesn't take long in the shell, then it's likely some other issue in the PHP application. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From codebowl at gmail.com Thu Oct 13 08:17:36 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 13 Oct 2005 08:17:36 -0400 Subject: [nycphp-talk] [OT] - PhpPatterns.com In-Reply-To: <8d9a4280050827055346349e93@mail.gmail.com> References: <8d9a4280050827055346349e93@mail.gmail.com> Message-ID: <8d9a42800510130517va7ecd8fkd625e7c9709c327f@mail.gmail.com> again can anyone get to this site? I still have not been able to reach this site and i cannot see it just dying, it was pretty popular ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.rundlett at gmail.com Thu Oct 13 08:31:43 2005 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Thu, 13 Oct 2005 08:31:43 -0400 Subject: [nycphp-talk] [OT] - PhpPatterns.com In-Reply-To: <8d9a42800510130517va7ecd8fkd625e7c9709c327f@mail.gmail.com> References: <8d9a4280050827055346349e93@mail.gmail.com> <8d9a42800510130517va7ecd8fkd625e7c9709c327f@mail.gmail.com> Message-ID: <5e2aaca40510130531q5d1cfc9t43f3b856cb502ad4@mail.gmail.com> On 10/13/05, Joseph Crawford wrote: > again can anyone get to this site? I still have not been able to reach this > site and i cannot see it just dying, it was pretty popular ;) > The site is run by Harry Fuecks. I don't know Harry personally, so I can't tell you what he is up to now, but it may be a case of 'RL'.[1] I too would like to see it come back. As luck would have it, at about the same time that phppatterns.com went off-air, Sourceforge made changes to their system which killed his (docuwiki) website for the popular JPSpan (AJAX) project[2] [1] http://www.retrologic.com/jargon/R/RL.html [2] http://jpspan.sourceforge.net/wiki/doku.php > -- > Joseph Crawford Jr. > Zend Certified Engineer > > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From ashaw at polymerdb.org Thu Oct 13 08:34:41 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Thu, 13 Oct 2005 07:34:41 -0500 Subject: [nycphp-talk] [OT] - PhpPatterns.com In-Reply-To: <8d9a42800510130517va7ecd8fkd625e7c9709c327f@mail.gmail.com> References: <8d9a4280050827055346349e93@mail.gmail.com> <8d9a42800510130517va7ecd8fkd625e7c9709c327f@mail.gmail.com> Message-ID: <434E5461.40708@polymerdb.org> Joseph Crawford wrote: > again can anyone get to this site? I still have not been able to reach > this site and i cannot see it just dying, it was pretty popular ;) Hi Joseph, Not sure if you've seen this thread on SitePoint - it ends with hopeful comments from Harry Fuecks (the site's creator) as of a couple of weeks ago: http://www.sitepoint.com/forums/showthread.php?t=296849 -- Allen Shaw Polymer (http://polymerdb.org) From hertso at yahoo.com Thu Oct 13 13:48:24 2005 From: hertso at yahoo.com (gault herbertson) Date: Thu, 13 Oct 2005 10:48:24 -0700 (PDT) Subject: [nycphp-talk] how to draw tables Message-ID: <20051013174824.59867.qmail@web61325.mail.yahoo.com> im new at preproccessor and i need help on how to draw tables with php and fill in a number of fields . thanks gault herbertson --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: From store at sewfastseweasy.com Thu Oct 13 13:49:22 2005 From: store at sewfastseweasy.com (Customer Service at Sew Fast Sew Easy) Date: Thu, 13 Oct 2005 13:49:22 -0400 Subject: [nycphp-talk] Programmer Needed Message-ID: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> We are looking for the following. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line. visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns and classes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Thu Oct 13 13:54:49 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Thu, 13 Oct 2005 12:54:49 -0500 Subject: [nycphp-talk] Programmer Needed In-Reply-To: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> References: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> Message-ID: <434E9F69.9050703@polymerdb.org> Customer Service at Sew Fast Sew Easy wrote: > visit us at www.sewfastseweasy.com > and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need > to Know When You Start to Sew" by Elissa Meyrich, sewing patterns and > classes. Maybe *these guys* can get phppatterns.com back on line. :o) -- Allen Shaw Polymer (http://polymerdb.org) From hans at cyberxdesigns.com Thu Oct 13 15:03:04 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Thu, 13 Oct 2005 15:03:04 -0400 Subject: [nycphp-talk] Programmer Needed In-Reply-To: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> References: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> Message-ID: <434EAF68.1040005@cyberxdesigns.com> You may want to check out our Jobs list. You can find it at: http://www.nyphp.org/content/mailinglist/mlist.php. That is where we recommend people post job listings. Thanks, Hans Kaspersetz hans.kaspersetz [at] nyphp.org AVP Operations & Presentation Lacky, New York PHP Customer Service at Sew Fast Sew Easy wrote: > We are looking for the following. > > A PHP coder with experience developing ecommerce sites, especially in > a shared hosting environment. Must have strong *nix skills. Must know > MySQL. Moderate to advanced Javascript and CSS. Some experience with > mod_rewrite helpful. > > Must work well with understanding and modifying existing scripts. Must > have experience with PHP's cURL functions. Experience with cron a plus. > > Please e-mail your qualifications to store at sewfastseweasy.com > or fax them to 212-268-4321 with > ATTN: Gregory Garvin in the subject line. > > From codebowl at gmail.com Thu Oct 13 16:55:22 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 13 Oct 2005 16:55:22 -0400 Subject: [nycphp-talk] Programmer Needed In-Reply-To: <434EAF68.1040005@cyberxdesigns.com> References: <000f01c5d01e$72182b30$7d01a8c0@DESKTOP> <434EAF68.1040005@cyberxdesigns.com> Message-ID: <8d9a42800510131355n7ad15fay831005cd3fddcff7@mail.gmail.com> lol let's see em get phppatterns back ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at cyberxdesigns.com Thu Oct 13 18:44:02 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Thu, 13 Oct 2005 18:44:02 -0400 Subject: [nycphp-talk] Prentice Hall Discounts Message-ID: <434EE332.4070005@cyberxdesigns.com> Prentice Hall has asked me to let you know that NY PHP members can purchase books for 35% off list price discount with free UPS shipping, by purchasing directly from Prentice Hall. Visit: www.phptr.com/title/0131867164 Add the book to the Shopping Cart At Checkout Step #3 [Payment Method], enter coupon code: "usergroup". [Coupon expires 12/31/05] The disclaimer here is they send me books to review regularly. I have a new book that will be donated to NY PHP for the give away this month or next:"Core Web Application Development with PHP and MySQL". Looks like a good book, it is certainly thick. I hope this isn't considered a commercial post. Hmmm..... Thanks, Hans K http://www.cyberxdesigns.com From nasir81 at gmail.com Thu Oct 13 19:14:31 2005 From: nasir81 at gmail.com (Nasir Zubair) Date: Thu, 13 Oct 2005 19:14:31 -0400 Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: <434EE332.4070005@cyberxdesigns.com> References: <434EE332.4070005@cyberxdesigns.com> Message-ID: <40fcda730510131614s691c03b5sdbb14d59cfc56a21@mail.gmail.com> Thanks for the code Hans. Just wondering if the code is for this one book only or sitewide? On 10/13/05, Hans C. Kaspersetz wrote: > > Prentice Hall has asked me to let you know that NY PHP members can > purchase books for 35% off list price discount with free UPS shipping, > by purchasing directly from Prentice Hall. > > Visit: www.phptr.com/title/0131867164 > > Add the book to the Shopping Cart > At Checkout Step #3 [Payment Method], enter coupon code: "usergroup". > [Coupon expires 12/31/05] > > The disclaimer here is they send me books to review regularly. I have a > new book that will be donated to NY PHP for the give away this month or > next:"Core Web Application Development with PHP and MySQL". Looks like a > good book, it is certainly thick. > > I hope this isn't considered a commercial post. Hmmm..... > > Thanks, > Hans K > http://www.cyberxdesigns.com > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Nasir Zubair http://www.nasir.us/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Thu Oct 13 20:18:08 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 13 Oct 2005 20:18:08 -0400 (EDT) Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: <434EE332.4070005@cyberxdesigns.com> References: <434EE332.4070005@cyberxdesigns.com> Message-ID: On Thu, 13 Oct 2005, Hans C. Kaspersetz wrote: > Looks like a good book, it is certainly thick. Don't judge a book by the width of its spine. :) -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From 1j0lkq002 at sneakemail.com Thu Oct 13 22:56:56 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 13 Oct 2005 19:56:56 -0700 Subject: [nycphp-talk] NYPHP cringed at AJAX almost a year ago.... now JS exploit "level 3" In-Reply-To: <4b1887110510121444k40186ad6ydc8438564b0d04fc@mail.gmail.com> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> <006701c5cc79$bb28ce90$0319a8c0@ced> <4b1887110510121444k40186ad6ydc8438564b0d04fc@mail.gmail.com> Message-ID: <3148-12429@sneakemail.com> I was at a meeting of NYPHPers a long time ago when some stuff was discussed that has since become part of "AJAX". I consider everyone at that dinner table to be a primo technologist, but some of them are truly outstanding programmers too :-) When some clever new JS cross-server stuff was dissected in discussion, and it appeared that it was a "feature" made from what everybody recognized to be an XSS hole, some of the faces were really interesting. Kinda like "well, you really don't want to leave that open, but if it's open, yeah, I guess you could do that". Since then we have AJAX everywhere. And now we have a hack that's being called a new "level 3" exploit. See http://e-scribe.com/news/103 and http://namb.la/popular/tech.html I guess we all knew THAT would happen, right? ;-) -=john andrews http://www.seo-fun.com From chsnyder at gmail.com Fri Oct 14 09:52:21 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 14 Oct 2005 09:52:21 -0400 Subject: [nycphp-talk] NYPHP cringed at AJAX almost a year ago.... now JS exploit "level 3" In-Reply-To: <3148-12429@sneakemail.com> References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> <006701c5cc79$bb28ce90$0319a8c0@ced> <4b1887110510121444k40186ad6ydc8438564b0d04fc@mail.gmail.com> <3148-12429@sneakemail.com> Message-ID: On 10/13/05, inforequest <1j0lkq002 at sneakemail.com> wrote: > Since then we have AJAX everywhere. And now we have a hack that's being > called a new "level 3" exploit. See http://e-scribe.com/news/103 and > http://namb.la/popular/tech.html > Hmm, you can chase the buzzword and call this an AJAX hack, but it is really plain old cross-site scripting vulnerability. MySpace wasn't properly sanitizing user-submitted markup, and these guys were able to sneak some JavaScript in. It's a pretty great hack nonetheless. They used XMLHTTPRequest to make requests in the background that a user would never notice, which is what makes it AJAXy. Two lessons learned: 1) If you allow markup, use a serious sanitizer ... something like http://chxo.com/scripts/safe_html/ or one of the others discussed previously on this list 2) Take steps to prevent forged form submissions ... for an excellent tutorial, see http://shiflett.org/articles/security-corner-dec2004. But further to number 2, if you don't have protection against JavaScript there isn't much you can do to secure your forms. Even the random token method that Chris describes can be foiled if the attacker is scripting XMLHTTPRequests, because the script can request and then POST a valid form, without the user ever knowing it. Neato. -- Chris Snyder http://chxo.com/ From mitch.pirtle at gmail.com Fri Oct 14 10:16:38 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Fri, 14 Oct 2005 10:16:38 -0400 Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: References: <434EE332.4070005@cyberxdesigns.com> Message-ID: <330532b60510140716t386967a5tb760836dce4b5f3c@mail.gmail.com> On 10/13/05, Adam Maccabee Trachtenberg wrote: > On Thu, 13 Oct 2005, Hans C. Kaspersetz wrote: > > > Looks like a good book, it is certainly thick. > > Don't judge a book by the width of its spine. :) Back in the glory days of Big-6 consulting, that was called the T.H.U.D. Factor(TM). In order to bill a client excessive amounts of cash for a quickly-written paper, you needed to ensure an adequate T.H.U.D. Factor for proper justification of funds appropriation to suit your needs. Analysis of T.H.U.D. is simple - pick up the tome, drop it on your desk, and measure the sound in decibels. -- Mitch From hans at cyberxdesigns.com Fri Oct 14 10:26:55 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Fri, 14 Oct 2005 10:26:55 -0400 Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: <330532b60510140716t386967a5tb760836dce4b5f3c@mail.gmail.com> References: <434EE332.4070005@cyberxdesigns.com> <330532b60510140716t386967a5tb760836dce4b5f3c@mail.gmail.com> Message-ID: <434FC02F.6040500@cyberxdesigns.com> I can tell you this book makes a pretty good T.H.U.D. when it hits the desk. The cover even looks nice. All kidding aside, when I have a chance to read through it, I will let you guys know if the substance makes as much a thud as the volume. HCK Mitch Pirtle wrote: >On 10/13/05, Adam Maccabee Trachtenberg wrote: > > >>On Thu, 13 Oct 2005, Hans C. Kaspersetz wrote: >> >> >> >>>Looks like a good book, it is certainly thick. >>> >>> >>Don't judge a book by the width of its spine. :) >> >> > >Back in the glory days of Big-6 consulting, that was called the >T.H.U.D. Factor(TM). > >In order to bill a client excessive amounts of cash for a >quickly-written paper, you needed to ensure an adequate T.H.U.D. >Factor for proper justification of funds appropriation to suit your >needs. > >Analysis of T.H.U.D. is simple - pick up the tome, drop it on your >desk, and measure the sound in decibels. > >-- Mitch >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > From shiflett at php.net Fri Oct 14 12:19:22 2005 From: shiflett at php.net (Chris Shiflett) Date: Fri, 14 Oct 2005 12:19:22 -0400 Subject: [nycphp-talk] NYPHP cringed at AJAX almost a year ago.... now JS exploit "level 3" In-Reply-To: References: <3a2a0d6a56ce33fcaed8fb6b6b98b96a@musgrave.org> <433EBBD9.1010707@php.net> <43411FEB.1030705@email.smith.edu> <5e2aaca40510071927v19f41994w11577be3494badd3@mail.gmail.com> <006701c5cc79$bb28ce90$0319a8c0@ced> <4b1887110510121444k40186ad6ydc8438564b0d04fc@mail.gmail.com> <3148-12429@sneakemail.com> Message-ID: <434FDA8A.1060100@php.net> csnyder wrote: > Even the random token method that Chris describes can be foiled if > the attacker is scripting XMLHTTPRequests, because the script can > request and then POST a valid form, without the user ever knowing it. Yep, and this is exactly what happened. This is primarily a CSRF attack, and it uses a XSS vulnerability as a platform. Apparently Myspace had CSRF protection, but because the XSS vulnerability allowed the attacker to inject some XMLHttpRequest stuff into people's profiles, that could be used to first request the form (victim's token included) and then send the CSRF attack along with the valid token. The clever part is that the CSRF payload exploited the XSS vulnerability again, proliferating itself through other people's profiles. CSRF and XSS have been a deadly combination for years, and I'm hoping this recent incident helps raise awareness further. The technical details are interesting, but the personal account is worth reading just for the laughs: http://namb.la/popular/ "Oh wait, it's exponential, isn't it. Shit." Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From joshmccormack at travelersdiary.com Fri Oct 14 13:08:32 2005 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Fri, 14 Oct 2005 13:08:32 -0400 Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: <434FC02F.6040500@cyberxdesigns.com> References: <434EE332.4070005@cyberxdesigns.com> <330532b60510140716t386967a5tb760836dce4b5f3c@mail.gmail.com> <434FC02F.6040500@cyberxdesigns.com> Message-ID: <434FE610.8020805@travelersdiary.com> I got it from the publisher, too. I had the manuscript (which is gigantic) and managed to read through some of it. The stuff on OO programming with PHP makes it pretty easy to understand, the explanation of variable functions was very nice, and there's thankfully not a great deal of "PHP works this way, while C does..." which I never really get a great deal of value from. I'll let you know as I get through more of it. Josh Hans C. Kaspersetz wrote: > I can tell you this book makes a pretty good T.H.U.D. when it hits the > desk. The cover even looks nice. All kidding aside, when I have a > chance to read through it, I will let you guys know if the substance > makes as much a thud as the volume. > > HCK > > Mitch Pirtle wrote: > > >>On 10/13/05, Adam Maccabee Trachtenberg wrote: >> >> >> >>>On Thu, 13 Oct 2005, Hans C. Kaspersetz wrote: >>> >>> >>> >>> >>>>Looks like a good book, it is certainly thick. >>>> >>>> >>> >>>Don't judge a book by the width of its spine. :) >>> >>> >> >>Back in the glory days of Big-6 consulting, that was called the >>T.H.U.D. Factor(TM). >> >>In order to bill a client excessive amounts of cash for a >>quickly-written paper, you needed to ensure an adequate T.H.U.D. >>Factor for proper justification of funds appropriation to suit your >>needs. >> >>Analysis of T.H.U.D. is simple - pick up the tome, drop it on your >>desk, and measure the sound in decibels. >> >>-- Mitch >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >> >> >> > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From robynover at gmail.com Fri Oct 14 14:10:23 2005 From: robynover at gmail.com (robyn o) Date: Fri, 14 Oct 2005 14:10:23 -0400 Subject: [nycphp-talk] all functions parameters in an array? Message-ID: Is there a php function to get all the parameters in a user function in an array? For example, I have several strings in a function, and I'd like to do the same thing to all of them before I deal with them individually: function my_function($a, $b, $c, $d){ foreach ($array_of_parameters as $p){ $p = trim($p); } } Thanks for your help. Robyn -------------- next part -------------- An HTML attachment was scrubbed... URL: From robynover at gmail.com Fri Oct 14 14:09:41 2005 From: robynover at gmail.com (robyn o) Date: Fri, 14 Oct 2005 14:09:41 -0400 Subject: [nycphp-talk] all functions parameters in an array? Message-ID: Is there a php function to get all the parameters in a user function in an array? For example, I have several strings in a function, and I'd like to do the same thing to all of them before I deal with them individually: function my_function($a, $b, $c, $d){ foreach ($array_of_parameters as $p){ $p = trim($p); } } Thanks for your help. Robyn -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellicle at gmail.com Fri Oct 14 14:19:35 2005 From: jellicle at gmail.com (Michael Sims) Date: Fri, 14 Oct 2005 14:19:35 -0400 Subject: [nycphp-talk] all functions parameters in an array? In-Reply-To: References: Message-ID: <200510141419.35793.jellicle@gmail.com> On Friday 14 October 2005 14:10, robyn o wrote: > For example, I have several strings in a function, and I'd like to do > the same thing to all of them before I deal with them individually: > > function my_function($a, $b, $c, $d){ > foreach ($array_of_parameters as $p){ > $p = trim($p); > } > } A few notes: --see the func_get_arg() and func_get_args() functions --see the array_map() function --remember a function can take an array as a parameter (which isn't necessary, given the above functions I noted, but may be easier) Michael Sims From tom at supertom.com Fri Oct 14 14:21:20 2005 From: tom at supertom.com (Tom Melendez) Date: Fri, 14 Oct 2005 14:21:20 -0400 Subject: [nycphp-talk] all functions parameters in an array? In-Reply-To: References: Message-ID: <434FF720.9030807@supertom.com> Hi Robyn, This sounds like a job for func_get_args: http://us3.php.net/func_get_args Tom http://www.liphp.org robyn o wrote: > Is there a php function to get all the parameters in a user function > in an array? > > For example, I have several strings in a function, and I'd like to do > the same thing to all of them before I deal with them individually: > > function my_function($a, $b, $c, $d){ > foreach ($array_of_parameters as $p){ > $p = trim($p); > } > } > > Thanks for your help. > Robyn > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > From andrew at plexpod.com Fri Oct 14 14:22:53 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Fri, 14 Oct 2005 14:22:53 -0400 Subject: [nycphp-talk] all functions parameters in an array? In-Reply-To: References: Message-ID: <20051014182252.GQ17933@desario.homelinux.net> On Fri, Oct 14, 2005 at 02:10:23PM -0400, robyn o wrote: > Is there a php function to get all the parameters in a user function in an > array? Try func_get_args(): http://us2.php.net/manual/en/function.func-get-args.php HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From robynover at gmail.com Fri Oct 14 14:25:56 2005 From: robynover at gmail.com (robyn o) Date: Fri, 14 Oct 2005 14:25:56 -0400 Subject: [nycphp-talk] all functions parameters in an array? In-Reply-To: <200510141419.35793.jellicle@gmail.com> References: <200510141419.35793.jellicle@gmail.com> Message-ID: i think func_get_args() is what i need -- thank you. (i don't want pass an array into the function in this case, because i want to deal with each item separately later in the function.) On 10/14/05, Michael Sims wrote: > > On Friday 14 October 2005 14:10, robyn o wrote: > > > For example, I have several strings in a function, and I'd like to do > > the same thing to all of them before I deal with them individually: > > > > function my_function($a, $b, $c, $d){ > > foreach ($array_of_parameters as $p){ > > $p = trim($p); > > } > > } > > A few notes: > --see the func_get_arg() and func_get_args() functions > --see the array_map() function > --remember a function can take an array as a parameter (which isn't > necessary, given the above functions I noted, but may be easier) > > > Michael Sims > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Fri Oct 14 15:47:59 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 14 Oct 2005 14:47:59 -0500 Subject: [nycphp-talk] bounced email and Mail::send() Message-ID: <43500B6F.7060509@polymerdb.org> Hi All, I would expect mail sent to bad addresses to bounce, but maybe I'm missing something. The following code snippet does send mail to good addresses, but mail to bad addresses don't seem to bounce back to me. I suppose I'm missing some header, but I don't know what it would be. Any ideas? 'me at mydomain.com', 'Subject' => 'email subject', 'Return-Path' => 'me at mydomain.com', 'Reply-To' => 'me at mydomain.com', 'Return-Receipt-To' => 'me at mydomain.com' ); $mime = new Mail_mime("\n"); $mime->setTXTBody("sample text"); $mime->addAttachment('/tmp/sample.pdf', 'application/pdf'); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $mail->send('nonExistentUser at mydomain.com', $hdrs, $body); ?> BTW, I checked, and the mail is not falling into a failover or other black hole that I know of. For example sending to "nonExistentUser at mydomain.com" from my desktop mail client gets me a bounce within a few minutes. Any thoughts? - Allen -- Allen Shaw Polymer (http://polymerdb.org) From Consult at CovenantEDesign.com Fri Oct 14 17:39:59 2005 From: Consult at CovenantEDesign.com (CED) Date: Fri, 14 Oct 2005 17:39:59 -0400 Subject: [nycphp-talk] all functions parameters in an array? References: Message-ID: <093c01c5d107$dc3711e0$6401a8c0@ced> Robyn, Why not array_walk() BEFORE you pass them into the function, or is there some specific reason it needs to be done in the function itself? Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: robyn o To: talk at lists.nyphp.org Sent: Friday, October 14, 2005 2:10 PM Subject: [nycphp-talk] all functions parameters in an array? Is there a php function to get all the parameters in a user function in an array? For example, I have several strings in a function, and I'd like to do the same thing to all of them before I deal with them individually: function my_function($a, $b, $c, $d){ foreach ($array_of_parameters as $p){ $p = trim($p); } } Thanks for your help. Robyn ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From arzala at gmail.com Fri Oct 14 23:53:24 2005 From: arzala at gmail.com (Anirudh Zala) Date: Sat, 15 Oct 2005 09:23:24 +0530 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <43500B6F.7060509@polymerdb.org> References: <43500B6F.7060509@polymerdb.org> Message-ID: <43507D34.60708@gmail.com> You already have paramater "Return-path" in your header so it should work. Do you use proper syntex in writing your all headers? Moreover try to add 1 more parameter "Errors-To" to your header string and then check whether it works or not. I have not tested it, but normally it works. Thanks Zala --------------------------------- Anirudh Zala (Production Manager) Ph: +91 281 245 1894 anirudh at aspl.in http://www.aspl.in --------------------------------- Allen Shaw wrote: >Hi All, > >I would expect mail sent to bad addresses to bounce, but maybe I'm >missing something. The following code snippet does send mail to good >addresses, but mail to bad addresses don't seem to bounce back to me. I >suppose I'm missing some header, but I don't know what it would be. Any >ideas? > > include_once('Mail.php'); > include_once('Mail/mime.php'); > > $hdrs = array( > 'From' => 'me at mydomain.com', > 'Subject' => 'email subject', > 'Return-Path' => 'me at mydomain.com', > 'Reply-To' => 'me at mydomain.com', > 'Return-Receipt-To' => 'me at mydomain.com' > ); > $mime = new Mail_mime("\n"); > $mime->setTXTBody("sample text"); > $mime->addAttachment('/tmp/sample.pdf', 'application/pdf'); > > $body = $mime->get(); > $hdrs = $mime->headers($hdrs); > > $mail =& Mail::factory('mail'); > $mail->send('nonExistentUser at mydomain.com', $hdrs, $body); >?> > >BTW, I checked, and the mail is not falling into a failover or other >black hole that I know of. For example sending to >"nonExistentUser at mydomain.com" from my desktop mail client gets me a >bounce within a few minutes. Any thoughts? > >- Allen > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Sat Oct 15 07:30:23 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Sat, 15 Oct 2005 06:30:23 -0500 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <43507D34.60708@gmail.com> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> Message-ID: <4350E84F.6030401@polymerdb.org> Anirudh Zala wrote: > You already have paramater "Return-path" in your header so it should > work. Do you use proper syntex in writing your all headers? Moreover try > to add 1 more parameter "Errors-To" to your header string and then check > whether it works or not. I have not tested it, but normally it works. > > Thanks > > Zala Well, after further review, it appears it *did* work after all, but not in the way I expected. Bounced mail came back into my CLI user's mailbox (let's call it "shell_PHP_user at example.com"), not the one marked in the headers ("me at example.com"). In fact, the headers on most of this bounced mail show the original message as coming from "shell_PHP_user at localhost". I'm guessing there's some sendmail tweaking to be done here. But still, shouldn't the headers I pass to Mail::send() be the same headers that get attached to the mail? For the sake of detail, here are the first few header lines of the email that's being sent -- notice that 'shell_PHP_user' is being used on the lines above, while 'me' is being used on the lower lines: > From - Sat Oct 15 06:12:13 2005 > X-Account-Key: account3 > X-UIDL: 4350e40d00000001 > X-Mozilla-Status: 0001 > X-Mozilla-Status2: 10400000 > Return-Path: Received: (from shell_PHP_user at localhost) > by example.com (8.11.6/8.11.6) id j9FBC7J03635; > Sat, 15 Oct 2005 06:12:08 -0500 > Date: Sat, 15 Oct 2005 06:12:08 -0500 > Message-Id: <200510151112.j9FBC7J03635 at example.com> > To: badaddress at other.example.com, me at example.com > Subject: test email > MIME-Version: 1.0 > From: > Reply-To: > Return-Receipt-To: > Errors-To: > Content-Type: multipart/mixed; > boundary="=_24450f0ce176f5580ea337c3fe3ec778" > Status: That's when I run the script from the command line. If I run it through the Web, it's all the same except 'apache' is used instead of 'shell_PHP_user'. In any case, somehow the user name is being used instead of the values passed to $mime->headers(). Odd, right? At this point it's academic, as I've found the bounced mail and know where it's going, but why the heck isn't this mail using the headers I give it? I'll keep looking and post any answers here as a follow-up. - Allen -- Allen Shaw Polymer (http://polymerdb.org) From shiflett at php.net Sat Oct 15 10:41:01 2005 From: shiflett at php.net (Chris Shiflett) Date: Sat, 15 Oct 2005 10:41:01 -0400 Subject: [nycphp-talk] Prentice Hall Discounts In-Reply-To: References: <434EE332.4070005@cyberxdesigns.com> Message-ID: <435114FD.5070805@php.net> Adam Trachtenberg wrote: > Don't judge a book by the width of its spine. :) Yeah: http://phpsecurity.org/ :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From codebowl at gmail.com Sat Oct 15 10:48:05 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 15 Oct 2005 10:48:05 -0400 Subject: [nycphp-talk] Decorator Pattern & Code Criticism Message-ID: <8d9a42800510150748v64ea7131hdf0ae5893dfffffe@mail.gmail.com> Guys, I have started to create an object oriented approach at form handling with PHP 5, can i get some constructive criticism on the code if you have time. I have also attempted to implement the Decorator Pattern. http://codebowl.dontexist.net/codebowl.zip currently i have a TextInput, TextValidator that are working, when you add the widget to the form you say if the item is required or not, if it is then a * is shown next to the input field, and it's validated upon post, if not well then there's nothing to validate. If someone could look this over for me i would appreciate it ;) I think the code is a bit of a mess as to see if the item is required i have to pass through about 3 classes. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwclifton at gmail.com Sat Oct 15 22:57:39 2005 From: dwclifton at gmail.com (Douglas Clifton) Date: Sat, 15 Oct 2005 22:57:39 -0400 Subject: [nycphp-talk] talk Digest, Vol 29, Issue 24 In-Reply-To: References: Message-ID: <7d6cdcb0510151957y2c4eb131i5d89a2c6a49eb2a6@mail.gmail.com> Or you can pass the arguments as an array, and then decompose them for use inside the function: function my_function($args) { foreach ($args as $arg) trim($arg); list($arg1, $arg2, $arg3) = $args; } Or pass an associative array to the function with the keys being the names of the individual arguments and decompose them as variable variables: foreach ($args as $name => $value) $$name = trim($value); This would also be useful if you want the function to process a variable number of arguments There are countless ways of doing this sort of thing, it might help if you explained in more detail what the data and the function is trying to accomplish. --doug > ---------- Forwarded message ---------- > From: robyn o > To: talk at lists.nyphp.org > Date: Fri, 14 Oct 2005 14:10:23 -0400 > Subject: [nycphp-talk] all functions parameters in an array? > Is there a php function to get all the parameters in a user function in an > array? > > For example, I have several strings in a function, and I'd like to do the > same thing to all of them before I deal with them individually: > > function my_function($a, $b, $c, $d){ > foreach ($array_of_parameters as $p){ > $p = trim($p); > } > } -- Douglas Clifton dwclifton at gmail.com http://loadaveragezero.com/ http://loadaveragezero.com/app/s9y/ http://loadaveragezero.com/drx/rss/recent From rolan at omnistep.com Sun Oct 16 11:13:15 2005 From: rolan at omnistep.com (Rolan Yang) Date: Sun, 16 Oct 2005 11:13:15 -0400 Subject: [nycphp-talk] maybe off topic... Message-ID: <43526E0B.8040104@omnistep.com> Have any of you received a flurry of these via email this morning? 404 Not Found

Not Found

The requested URL was not found on this server.


Apache/1.3.31
I am seeming many of them from differing IP's. ~Rolan From arzala at gmail.com Mon Oct 17 00:54:19 2005 From: arzala at gmail.com (Anirudh Zala) Date: Mon, 17 Oct 2005 10:24:19 +0530 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <4350E84F.6030401@polymerdb.org> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> Message-ID: <43532E7B.8020404@gmail.com> Normally you do not require to set header "Return-path" because return path address is automatically taken by Sendmail as the user who sends emails. Hence in your case it is "apache" when when sending mail from web and "shell user" while sending mail from shell. Hence now you have only 2 options. To set above header in desired way, do not pass "Return-path" header while sending email. Instead in mail function use 5th arguments like below. mail('To mail', 'Subject', 'Message', 'All required header', '-f bounce at someone.some'); This fifth parameter (was added in PHP 4.0.5) is your Return-Path. Here "bounce at someone.some" is your bounce mail address. Alternatively you can set permanent address in your php.ini or httpd.conf like below. /usr/sbin/sendmail -f 'bounce at someone.some' Please note that I have not tested above, so you have to try. But it will work most probably or you may have to change syntax according to php.ini or httpd.conf. And sending mail from shell, invoke sendail command by using "-f" option and specify bounced email adress. See below. [...]# /usr/sbin/sendmail -f 'bounce at someone.some' REST OF ARGUMENTS Thanks Anirudh Zala --------------------------------- Anirudh Zala (Production Manager) Ph: +91 281 245 1894 anirudh at aspl.in http://www.aspl.in --------------------------------- Allen Shaw wrote: >Anirudh Zala wrote: > > >>You already have paramater "Return-path" in your header so it should >>work. Do you use proper syntex in writing your all headers? Moreover try >>to add 1 more parameter "Errors-To" to your header string and then check >>whether it works or not. I have not tested it, but normally it works. >> >>Thanks >> >>Zala >> >> > >Well, after further review, it appears it *did* work after all, but not >in the way I expected. Bounced mail came back into my CLI user's >mailbox (let's call it "shell_PHP_user at example.com"), not the one marked >in the headers ("me at example.com"). In fact, the headers on most of this >bounced mail show the original message as coming from >"shell_PHP_user at localhost". > >I'm guessing there's some sendmail tweaking to be done here. But still, >shouldn't the headers I pass to Mail::send() be the same headers that >get attached to the mail? > >For the sake of detail, here are the first few header lines of the email >that's being sent -- notice that 'shell_PHP_user' is being used on the >lines above, while 'me' is being used on the lower lines: > > >>From - Sat Oct 15 06:12:13 2005 >>X-Account-Key: account3 >>X-UIDL: 4350e40d00000001 >>X-Mozilla-Status: 0001 >>X-Mozilla-Status2: 10400000 >>Return-Path: Received: (from shell_PHP_user at localhost) >> by example.com (8.11.6/8.11.6) id j9FBC7J03635; >> Sat, 15 Oct 2005 06:12:08 -0500 >>Date: Sat, 15 Oct 2005 06:12:08 -0500 >>Message-Id: <200510151112.j9FBC7J03635 at example.com> >>To: badaddress at other.example.com, me at example.com >>Subject: test email >>MIME-Version: 1.0 >>From: >>Reply-To: >>Return-Receipt-To: >>Errors-To: >>Content-Type: multipart/mixed; >> boundary="=_24450f0ce176f5580ea337c3fe3ec778" >>Status: >> >> > >That's when I run the script from the command line. If I run it through >the Web, it's all the same except 'apache' is used instead of >'shell_PHP_user'. In any case, somehow the user name is being used >instead of the values passed to $mime->headers(). Odd, right? > >At this point it's academic, as I've found the bounced mail and know >where it's going, but why the heck isn't this mail using the headers I >give it? > >I'll keep looking and post any answers here as a follow-up. > >- Allen > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at tomkeatingphotography.co.uk Mon Oct 17 13:05:24 2005 From: tom at tomkeatingphotography.co.uk (tom keating) Date: Mon, 17 Oct 2005 18:05:24 +0100 Subject: [nycphp-talk] art maps Message-ID: <4353D9D4.4090807@tomkeatingphotography.co.uk> Hello all, we are a funded arts organisation. im not 100% sure if i'm posting to the right list. i have been trying to adapt php gallery scripts to fit my needs and have realized i dont really know what im doing! _brief introduction to 'us'_ Walkingtheland is a long-term initiative led by three Stroud based artists, landscape enthusiasts and educators. our work has two threads: 1. to develop and produce our own work in response to walking through the landscape as a group. 2. the artists show this work as a catalyst for working with local people, artists and others with a keen interest in the landscape. Participants are supported in developing their own work in response to the walks and this work is then curated on a web-based /e/Gallery. Over time this will develop into an archive of responses to local landscape. we have arts funding to develop the second thread _what we need. _ a dynamic and efficient way of storing and displaying images (and eventually movie and sound) we are currently using iframes (created by photoshop and simplifying the html a little) but its obviously becomes a bit longwinded the more images we have the more pages http://www.walkingtheland.org.uk/walkingthelandgallery/ (and click on the names on the right to see the gallerys) at the moment we badly need to start storing images and displaying them well. but we have a vision to develop the way the images are displayed in the future. we want to create 'online' maps of images sounds movies and journeys incorporating GIS. _any ideas?_ if anyone has any ideas or can offer any help it would be greatly apreciated if i hear from anyone then i can be far more specific regards tom From ashaw at polymerdb.org Mon Oct 17 13:34:16 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 17 Oct 2005 12:34:16 -0500 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <43532E7B.8020404@gmail.com> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> Message-ID: <4353E098.5030501@polymerdb.org> Thanks, Anirudh. I'll look into this some more. To pass the -f flag to the PHP mail() function might work, but also I am trying to do this with PEAR Mail::send(), so I will dig deeper into that codebase to look for clues. Still mystified, Allen Anirudh Zala wrote: > Normally you do not require to set header "Return-path" because return > path address is automatically taken by Sendmail as the user who sends > emails. Hence in your case it is "apache" when when sending mail from > web and "shell user" while sending mail from shell. > > Hence now you have only 2 options. To set above header in desired way, > do not pass "Return-path" header while sending email. Instead in mail > function use 5th arguments like below. > > mail('To mail', 'Subject', 'Message', 'All required header', '-f > bounce at someone.some'); > > This fifth parameter (was added in PHP 4.0.5) is your Return-Path. Here > "bounce at someone.some" is your bounce mail address. Alternatively you can > set permanent address in your php.ini or httpd.conf like below. > > /usr/sbin/sendmail -f 'bounce at someone.some' > > Please note that I have not tested above, so you have to try. But it > will work most probably or you may have to change syntax according to > php.ini or httpd.conf. > > And sending mail from shell, invoke sendail command by using "-f" option > and specify bounced email adress. See below. > > [...]# /usr/sbin/sendmail -f 'bounce at someone.some' REST OF ARGUMENTS > > Thanks > > Anirudh Zala > > --------------------------------- > Anirudh Zala (Production Manager) > Ph: +91 281 245 1894 > anirudh at aspl.in > http://www.aspl.in > --------------------------------- > -- Allen Shaw Polymer (http://polymerdb.org) From nasir81 at gmail.com Mon Oct 17 13:38:15 2005 From: nasir81 at gmail.com (Nasir Zubair) Date: Mon, 17 Oct 2005 13:38:15 -0400 Subject: [nycphp-talk] art maps In-Reply-To: <4353D9D4.4090807@tomkeatingphotography.co.uk> References: <4353D9D4.4090807@tomkeatingphotography.co.uk> Message-ID: <40fcda730510171038y66789d18sd8cc9257ec948acc@mail.gmail.com> Hi Tom, Instead of starting from scratch, try looking into existing gallery scripts/applications. My favorite one is "Gallery" http://gallery.menalto.com/ It's an open source application, so you will be able to customize it for the functionality that you need. (Unless of course, you really want to roll out your own package). On 10/17/05, tom keating wrote: > > Hello all, > > we are a funded arts organisation. im not 100% sure if i'm posting to > the right list. > i have been trying to adapt php gallery scripts to fit my needs and have > realized i dont really know what im doing! > > _brief introduction to 'us'_ > > Walkingtheland is a long-term initiative led by three Stroud based > artists, landscape enthusiasts and educators. > our work has two threads: > 1. to develop and produce our own work in response to walking through > the landscape as a group. > 2. the artists show this work as a catalyst for working with local > people, artists and others with a keen interest in the landscape. > Participants are supported in developing their own work in response to > the walks and this work is then curated on a web-based /e/Gallery. Over > time this will develop into an archive of responses to local landscape. > > we have arts funding to develop the second thread > > _what we need. > _ > a dynamic and efficient way of storing and displaying images (and > eventually movie and sound) > > we are currently using iframes (created by photoshop and simplifying the > html a little) but its obviously becomes a bit longwinded the more > images we have the more pages > http://www.walkingtheland.org.uk/walkingthelandgallery/ (and click on > the names on the right to see the gallerys) > > at the moment we badly need to start storing images and displaying them > well. but we have a vision to develop the way the images are displayed > in the future. > we want to create 'online' maps of images sounds movies and journeys > incorporating GIS. > > _any ideas?_ > > if anyone has any ideas or can offer any help it would be greatly > apreciated > > if i hear from anyone then i can be far more specific > > regards tom > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > -- Nasir Zubair http://www.nasir.us/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Sun Oct 23 18:30:09 2005 From: ken at secdat.com (Kenneth Downs) Date: Sun, 23 Oct 2005 18:30:09 -0400 (EDT) Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <4353E098.5030501@polymerdb.org> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> Message-ID: <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> I went nuts with this until I gave up on shell emails and used TCP. The TCP option requires you to have your email server running, but on the other hand, the shell method made it impossible to get the Return path right, and that was a deal-breaker. Using the PEAR package the code is this: // Assume an array $em() that has some stuff in it include_once('Mail.php'); $recipients =$em["email_to"]; $headers['From'] = $from_name. "<".$from_addr.">"; $headers['To'] = $em["email_to"]; $headers['Subject'] = $em["email_subject"]; $headers['Date'] = date("D, j M Y H:i:s O",time()); $body = $em["email_message"]; $mail_object = Mail::factory('smtp', $params); $mail_object->send($recipients, $headers, $body); Once I got this running I've never looked back. > Thanks, Anirudh. I'll look into this some more. To pass the -f flag to > the PHP mail() function might work, but also I am trying to do this with > PEAR Mail::send(), so I will dig deeper into that codebase to look for > clues. > > Still mystified, > Allen > > Anirudh Zala wrote: >> Normally you do not require to set header "Return-path" because return >> path address is automatically taken by Sendmail as the user who sends >> emails. Hence in your case it is "apache" when when sending mail from >> web and "shell user" while sending mail from shell. >> >> Hence now you have only 2 options. To set above header in desired way, >> do not pass "Return-path" header while sending email. Instead in mail >> function use 5th arguments like below. >> >> mail('To mail', 'Subject', 'Message', 'All required header', '-f >> bounce at someone.some'); >> >> This fifth parameter (was added in PHP 4.0.5) is your Return-Path. Here >> "bounce at someone.some" is your bounce mail address. Alternatively you can >> set permanent address in your php.ini or httpd.conf like below. >> >> /usr/sbin/sendmail -f 'bounce at someone.some' >> >> Please note that I have not tested above, so you have to try. But it >> will work most probably or you may have to change syntax according to >> php.ini or httpd.conf. >> >> And sending mail from shell, invoke sendail command by using "-f" option >> and specify bounced email adress. See below. >> >> [...]# /usr/sbin/sendmail -f 'bounce at someone.some' REST OF ARGUMENTS >> >> Thanks >> >> Anirudh Zala >> >> --------------------------------- >> Anirudh Zala (Production Manager) >> Ph: +91 281 245 1894 >> anirudh at aspl.in >> http://www.aspl.in >> --------------------------------- >> > > -- > Allen Shaw > Polymer (http://polymerdb.org) > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From Consult at CovenantEDesign.com Mon Oct 17 14:04:15 2005 From: Consult at CovenantEDesign.com (CED) Date: Mon, 17 Oct 2005 14:04:15 -0400 Subject: [nycphp-talk] art maps References: <4353D9D4.4090807@tomkeatingphotography.co.uk> <40fcda730510171038y66789d18sd8cc9257ec948acc@mail.gmail.com> Message-ID: <000001c5d345$c21cf910$6401a8c0@ced> Tom, A Close friend of mine has been using Coppermine for sometime, worth a look. http://coppermine-gallery.net/index.php Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Nasir Zubair To: NYPHP Talk Sent: Monday, October 17, 2005 1:38 PM Subject: Re: [nycphp-talk] art maps Hi Tom, Instead of starting from scratch, try looking into existing gallery scripts/applications. My favorite one is "Gallery" http://gallery.menalto.com/ It's an open source application, so you will be able to customize it for the functionality that you need. (Unless of course, you really want to roll out your own package). On 10/17/05, tom keating wrote: Hello all, we are a funded arts organisation. im not 100% sure if i'm posting to the right list. i have been trying to adapt php gallery scripts to fit my needs and have realized i dont really know what im doing! _brief introduction to 'us'_ Walkingtheland is a long-term initiative led by three Stroud based artists, landscape enthusiasts and educators. our work has two threads: 1. to develop and produce our own work in response to walking through the landscape as a group. 2. the artists show this work as a catalyst for working with local people, artists and others with a keen interest in the landscape. Participants are supported in developing their own work in response to the walks and this work is then curated on a web-based /e/Gallery. Over time this will develop into an archive of responses to local landscape. we have arts funding to develop the second thread _what we need. _ a dynamic and efficient way of storing and displaying images (and eventually movie and sound) we are currently using iframes (created by photoshop and simplifying the html a little) but its obviously becomes a bit longwinded the more images we have the more pages http://www.walkingtheland.org.uk/walkingthelandgallery/ (and click on the names on the right to see the gallerys) at the moment we badly need to start storing images and displaying them well. but we have a vision to develop the way the images are displayed in the future. we want to create 'online' maps of images sounds movies and journeys incorporating GIS. _any ideas?_ if anyone has any ideas or can offer any help it would be greatly apreciated if i hear from anyone then i can be far more specific regards tom _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -- Nasir Zubair http://www.nasir.us/ ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Mon Oct 17 14:11:51 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 17 Oct 2005 13:11:51 -0500 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> Message-ID: <4353E967.6080905@polymerdb.org> Now *this* works. I didn't realize that the Mail::factory() docs mentioned a $backend argument, and even those docs wouldn't have lead me to believe I'd get better results by changing it, but just switching to 'smtp' instead of 'mail' seems to have solved the problem entirely. Good call. Thanks, Allen Kenneth Downs wrote: > I went nuts with this until I gave up on shell emails and used TCP. The > TCP option requires you to have your email server running, but on the > other hand, the shell method made it impossible to get the Return path > right, and that was a deal-breaker. Using the PEAR package the code is > this: > > // Assume an array $em() that has some stuff in it > include_once('Mail.php'); > $recipients =$em["email_to"]; > $headers['From'] = $from_name. "<".$from_addr.">"; > $headers['To'] = $em["email_to"]; > $headers['Subject'] = $em["email_subject"]; > $headers['Date'] = date("D, j M Y H:i:s O",time()); > $body = $em["email_message"]; > $mail_object = Mail::factory('smtp', $params); > $mail_object->send($recipients, $headers, $body); > > Once I got this running I've never looked back. > > >>Thanks, Anirudh. I'll look into this some more. To pass the -f flag to >>the PHP mail() function might work, but also I am trying to do this with >>PEAR Mail::send(), so I will dig deeper into that codebase to look for >>clues. >> >>Still mystified, >>Allen -- Allen Shaw Polymer (http://polymerdb.org) From ken at secdat.com Sun Oct 23 23:21:19 2005 From: ken at secdat.com (Kenneth Downs) Date: Sun, 23 Oct 2005 23:21:19 -0400 (EDT) Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <4353E967.6080905@polymerdb.org> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> <4353E967.6080905@polymerdb.org> Message-ID: <48615.38.117.147.25.1130124079.squirrel@38.117.147.25> > Now *this* works. I didn't realize that the Mail::factory() docs > mentioned a $backend argument, and even those docs wouldn't have lead me > to believe I'd get better results by changing it, but just switching to > 'smtp' instead of 'mail' seems to have solved the problem entirely. > Good call. Glad it worked :) > -- > Allen Shaw > Polymer (http://polymerdb.org) > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From arzala at gmail.com Tue Oct 18 00:07:06 2005 From: arzala at gmail.com (Anirudh Zala) Date: Tue, 18 Oct 2005 09:37:06 +0530 Subject: [nycphp-talk] bounced email and Mail::send() In-Reply-To: <4353E967.6080905@polymerdb.org> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> <4353E967.6080905@polymerdb.org> Message-ID: <435474EA.3040400@gmail.com> This "-f " switch has 2 drawback as well. Sometimes web based email treats it as span because, you forcibly mention different Return-path than it should be. Check all headers of your mail. You may find 1 header in your mail like "X-Authentication-Warning: SERVER NAME: apache set sender to bounce at SOMETHING.SOME using -f" So you should use authenticated user account like root, admin etc. so above header will not added with your messages. Please note that you can not set return path using headers. so header "Return-path" will not yield anything. Thanks, --------------------------------- Anirudh Zala (Production Manager) Ph: +91 281 245 1894 anirudh at gmail.com http://www.aspl.in --------------------------------- Allen Shaw wrote: >Now *this* works. I didn't realize that the Mail::factory() docs >mentioned a $backend argument, and even those docs wouldn't have lead me >to believe I'd get better results by changing it, but just switching to >'smtp' instead of 'mail' seems to have solved the problem entirely. >Good call. > >Thanks, >Allen > >Kenneth Downs wrote: > > >>I went nuts with this until I gave up on shell emails and used TCP. The >>TCP option requires you to have your email server running, but on the >>other hand, the shell method made it impossible to get the Return path >>right, and that was a deal-breaker. Using the PEAR package the code is >>this: >> >>// Assume an array $em() that has some stuff in it >>include_once('Mail.php'); >>$recipients =$em["email_to"]; >>$headers['From'] = $from_name. "<".$from_addr.">"; >>$headers['To'] = $em["email_to"]; >>$headers['Subject'] = $em["email_subject"]; >>$headers['Date'] = date("D, j M Y H:i:s O",time()); >>$body = $em["email_message"]; >>$mail_object = Mail::factory('smtp', $params); >>$mail_object->send($recipients, $headers, $body); >> >>Once I got this running I've never looked back. >> >> >> >> >>>Thanks, Anirudh. I'll look into this some more. To pass the -f flag to >>>the PHP mail() function might work, but also I am trying to do this with >>>PEAR Mail::send(), so I will dig deeper into that codebase to look for >>>clues. >>> >>>Still mystified, >>>Allen >>> >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amiller at criticalmedia.biz Tue Oct 18 00:55:23 2005 From: amiller at criticalmedia.biz (Alan T. Miller) Date: Tue, 18 Oct 2005 12:55:23 +0800 Subject: [nycphp-talk] $sth->fetch(PDO::FETCH_ASSOC); = Undefined class constant 'FETCH_ASSOC' In-Reply-To: <435474EA.3040400@gmail.com> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> <4353E967.6080905@polymerdb.org> <435474EA.3040400@gmail.com> Message-ID: <4354803B.1070709@criticalmedia.biz> I have been playing around with the new PDO objects in PHP 5.1 and for some reason I cannot get any of the constants to work. I have followed the examples to the wire but no matter what I try, I keep getting an error telling me that the constants are undefined. Anyone else have this problem so far? Any sugestions? Statements such as: $sth->fetch(PDO::FETCH_ASSOC); will always yield a simular error: *Fatal error*: Undefined class constant 'FETCH_ASSOC' My test code follows what you will find at: http://php.planetmirror.com/manual/en/function.pdostatement-fetch.php Alan From greg.rundlett at gmail.com Tue Oct 18 10:48:21 2005 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Tue, 18 Oct 2005 10:48:21 -0400 Subject: [nycphp-talk] $sth->fetch(PDO::FETCH_ASSOC); = Undefined class constant 'FETCH_ASSOC' In-Reply-To: <4354803B.1070709@criticalmedia.biz> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> <4353E967.6080905@polymerdb.org> <435474EA.3040400@gmail.com> <4354803B.1070709@criticalmedia.biz> Message-ID: <5e2aaca40510180748n1ee96456o31c614b0bf5f0282@mail.gmail.com> On 10/18/05, Alan T. Miller wrote: > I have been playing around with the new PDO objects in PHP 5.1 and for > some reason I cannot get any of the constants to work. I have followed > the examples to the wire but no matter what I try, I keep getting an > error telling me that the constants are undefined. Anyone else have this > problem so far? Any sugestions? > > Statements such as: $sth->fetch(PDO::FETCH_ASSOC); will always yield a > simular error: > > *Fatal error*: Undefined class constant 'FETCH_ASSOC' Find out what class defines the constant (by searching for the 'FETCH_ASSOC' string, or otherwise). Find out if that class file is included, or if that class is defined using 'class_exists()' http://us2.php.net/class_exists. Given the error, it is likely that your code is not including the required class file. It could also be possible that the class defines the constant incorrectly, but that is less likely. > > My test code follows what you will find at: > > http://php.planetmirror.com/manual/en/function.pdostatement-fetch.php > > Alan > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From aarong at thinkcomputer.com Tue Oct 18 19:11:42 2005 From: aarong at thinkcomputer.com (Aaron Greenspan) Date: Tue, 18 Oct 2005 18:11:42 -0500 Subject: [nycphp-talk] Think Opens Lampshade PHP Framework Message-ID: <4355812E.90202@thinkcomputer.com> Hi, My company has been using its own PHP framework, called Lampshade, when building products for our clients for a long time. As of today, we've made it open-source. Feel free to download and take it for a test drive. Here's a link to the press release, which links to the download page: http://www.thinkcomputer.com/corporate/news/pressreleases.html?id=24 Let me know if you have any questions, too. Thanks, Aaron Aaron Greenspan President & CEO Think Computer Corporation http://www.thinkcomputer.com From hans at cyberxdesigns.com Wed Oct 19 09:38:36 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Wed, 19 Oct 2005 09:38:36 -0400 Subject: [nycphp-talk] Microsoft Shared Hosting. Message-ID: <43564C5C.7090308@cyberxdesigns.com> I hate to ask this question, but can someone recommend a provider for virtual hosting in a Microsoft environment? My clients needs to move his MSSQL/ASP site to a new provider. Thanks, Hans From jeff.loiselle at gmail.com Wed Oct 19 10:40:46 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 19 Oct 2005 10:40:46 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? Message-ID: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> I've been Googling around for a bit, but I figured I'd ask anyway... Has anyone implemented any good, free, stock charts into their PHP applications that you can recommend? --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From ray at lances.net Wed Oct 19 11:01:18 2005 From: ray at lances.net (Ray Lance) Date: Wed, 19 Oct 2005 11:01:18 -0400 Subject: [nycphp-talk] [work] Microsoft Shared Hosting. References: <43564C5C.7090308@cyberxdesigns.com> Message-ID: <085701c5d4bd$f6225600$0600000a@rayl> Wrong forum. We will almost always advise moving to a LAMP environment. ----- Original Message ----- From: "Hans C. Kaspersetz" To: "NYPHP Talk" Sent: Wednesday, October 19, 2005 9:38 AM Subject: [work] [nycphp-talk] Microsoft Shared Hosting. I hate to ask this question, but can someone recommend a provider for virtual hosting in a Microsoft environment? My clients needs to move his MSSQL/ASP site to a new provider. Thanks, Hans _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From corey at domanistudios.com Wed Oct 19 11:07:04 2005 From: corey at domanistudios.com (corey szopinski) Date: Wed, 19 Oct 2005 11:07:04 -0400 Subject: [nycphp-talk] Microsoft Shared Hosting. In-Reply-To: <43564C5C.7090308@cyberxdesigns.com> Message-ID: I've had good luck with MaximumASP. Very friendly support folks, and lots of features for the money. http://www.maximumasp.com -corey On 10/19/05 9:38 AM, "Hans C. Kaspersetz" wrote: > I hate to ask this question, but can someone recommend a provider for > virtual hosting in a Microsoft environment? My clients needs to move > his MSSQL/ASP site to a new provider. > > Thanks, > Hans From rolan at omnistep.com Wed Oct 19 11:33:41 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 19 Oct 2005 11:33:41 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> Message-ID: <43566755.9070708@omnistep.com> A while back, I wrote up a small script that fetched and cached (mysql) historical stock prices from Yahoo!Finance, then plotted it with the GD library. It also scraped Yahoo for the analyst ratings and can optionally plot them too (I was toying around with some ideas about automated prediction of stock movement based on weighted analyst ratings). Anyway, feel free to give it a try http://www.datawhorehouse.com/stock/prolookup.php It is "work safe" unless you check off the "XXX" option. ~Rolan Jeff Loiselle wrote: >I've been Googling around for a bit, but I figured I'd ask anyway... > >Has anyone implemented any good, free, stock charts into their PHP >applications that you can recommend? > > > > > From codebowl at gmail.com Wed Oct 19 12:07:08 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 19 Oct 2005 12:07:08 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <43566755.9070708@omnistep.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> Message-ID: <8d9a42800510190907s60ecd6b5tf706401eb70702f1@mail.gmail.com> lol nice porno stock charts ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.loiselle at gmail.com Wed Oct 19 12:14:30 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 19 Oct 2005 12:14:30 -0400 Subject: [nycphp-talk] [work] Microsoft Shared Hosting. In-Reply-To: <085701c5d4bd$f6225600$0600000a@rayl> References: <43564C5C.7090308@cyberxdesigns.com> <085701c5d4bd$f6225600$0600000a@rayl> Message-ID: <4b1887110510190914p1b58725bgac5df1916079a2ab@mail.gmail.com> Hey Ray, You're going to tell a principal of NYPHP that this is the wrong forum? You're too funny man. ;-) --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From jeff.loiselle at gmail.com Wed Oct 19 12:17:20 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 19 Oct 2005 12:17:20 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <43566755.9070708@omnistep.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> Message-ID: <4b1887110510190917w71ad4e21v2980edb1696556f9@mail.gmail.com> Rolan, Thanks, this is pretty cool. I need something with some labels and quite smaller though. The XXX feature is definitely a unique feature. ;-) /jeff --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From gary at helponboard.org Wed Oct 19 12:34:40 2005 From: gary at helponboard.org (Gary Bonde) Date: Wed, 19 Oct 2005 12:34:40 -0400 Subject: [nycphp-talk] Microsoft Shared Hosting In-Reply-To: Message-ID: <20051019163439.68684A87A3@virtu.nyphp.org> I have a dedicated server at www.aitcom.net and I know they have both linux and windows hosting environments. The technical support is average but they get the job done. Gary Bonde IT/Web Services gary at helponboard.org -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.12.4/143 - Release Date: 10/19/2005 From edwardpotter at gmail.com Wed Oct 19 12:52:07 2005 From: edwardpotter at gmail.com (edward potter) Date: Wed, 19 Oct 2005 12:52:07 -0400 Subject: [nycphp-talk] Looking for the holy grail of snippet databases... Message-ID: hmmm, a long, long time ago, I had grabbed a GREAT little snippet database to dump my PHP code snippets into. Alas, that Mac melted on me (well actually I drowned it, but that's another story all together!) Yes, I know I should write it myself, but I'm swamped with college classes, and the one I had before was excellent. I was wondering if anyone has seen one around, or how do you efficiently manage your code hacks, tips, snippets etc? thanks, ed :-) From rolan at omnistep.com Wed Oct 19 14:09:31 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 19 Oct 2005 14:09:31 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <4b1887110510190917w71ad4e21v2980edb1696556f9@mail.gmail.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> <4b1887110510190917w71ad4e21v2980edb1696556f9@mail.gmail.com> Message-ID: <43568BDB.4010606@omnistep.com> You can modify the routines to generate charts of any size. I'll make the source available after I clean up the big security holes. :o ~Rolan Jeff Loiselle wrote: >Rolan, > >Thanks, this is pretty cool. I need something with some labels and >quite smaller though. The XXX feature is definitely a unique feature. >;-) > >/jeff >--- >Jeff Loiselle >Web Developer, Musician, and Observer >http://jeff.loiselles.com >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From matt at jobsforge.com Wed Oct 19 18:47:16 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 19 Oct 2005 18:47:16 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <43566755.9070708@omnistep.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> Message-ID: <5ff3dc88deaab738576511e4d0344dd2@jobsforge.com> On Oct 19, 2005, at 11:33 AM, Rolan Yang wrote: > of stock movement based on weighted analyst ratings). Anyway, feel free > to give it a try http://www.datawhorehouse.com/stock/prolookup.php Is that source freely available? From edwardpotter at gmail.com Wed Oct 19 19:05:23 2005 From: edwardpotter at gmail.com (edward potter) Date: Wed, 19 Oct 2005 19:05:23 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <5ff3dc88deaab738576511e4d0344dd2@jobsforge.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> <5ff3dc88deaab738576511e4d0344dd2@jobsforge.com> Message-ID: This is a pretty decent stock parser, i had to use curl instead of fopen, but same principals apply. I'm actually integrating it with a flash application that pulls quotes from php then does some glowing cubes in flash based on % changes in price. It's not xml based, but does the job. Should get you started: http://giombetti.com/snippets/14 thanks,ed On 10/19/05, Matthew Terenzio wrote: > > On Oct 19, 2005, at 11:33 AM, Rolan Yang wrote: > > > of stock movement based on weighted analyst ratings). Anyway, feel free > > to give it a try http://www.datawhorehouse.com/stock/prolookup.php > > > Is that source freely available? > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From rolan at omnistep.com Wed Oct 19 21:43:12 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 19 Oct 2005 21:43:12 -0400 Subject: [nycphp-talk] Good Free Stock Chart Web Service? In-Reply-To: <5ff3dc88deaab738576511e4d0344dd2@jobsforge.com> References: <4b1887110510190740v66374164r610e0f89883e7875@mail.gmail.com> <43566755.9070708@omnistep.com> <5ff3dc88deaab738576511e4d0344dd2@jobsforge.com> Message-ID: <4356F630.7090708@omnistep.com> I'm truly embarrassed to publish this code. It was just a hacked-together thing to test some ideas. Really not anything of presentable quality. You can glance over it and maybe get some ideas though. I added some comments at the start of getquote.php which describes the database structure. http://www.datawhorehouse.com/stock/prolookup.phps - main script which users access getquote.phps - fetches the quote(s) from the database or web. If via web, then cache in the database backgroundgetquote.phps - launches a unix background process to fetch and cache quotes (so user does not have to wait) getratings.phps - fetches analyst ratings for a given stock graph.phps - plots a graph given many parameters prepend.phps - database setup and query wrapper. ~Rolan Matthew Terenzio wrote: > >Is that source freely available? > > > > From 1j0lkq002 at sneakemail.com Thu Oct 20 04:31:45 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 20 Oct 2005 01:31:45 -0700 Subject: [nycphp-talk] Wordpress SQl injection risk - early warning? In-Reply-To: <48615.38.117.147.25.1130124079.squirrel@38.117.147.25> References: <43500B6F.7060509@polymerdb.org> <43507D34.60708@gmail.com> <4350E84F.6030401@polymerdb.org> <43532E7B.8020404@gmail.com> <4353E098.5030501@polymerdb.org> <48544.38.117.147.25.1130106609.squirrel@38.117.147.25> <4353E967.6080905@polymerdb.org> <48615.38.117.147.25.1130124079.squirrel@38.117.147.25> Message-ID: <29617-49659@sneakemail.com> Sometimes it is good to get a heads up. This one is on the WP forums, addressing wp-mail.php not sanitizing inputs. It's used when you post by email. -=john andrews http://www.seo-fun.com From leam at reuel.net Thu Oct 20 12:31:39 2005 From: leam at reuel.net (leam at reuel.net) Date: Thu, 20 Oct 2005 12:31:39 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? Message-ID: <20051020163139.GF2468@leitz.reuel.net> I've set up a static site for my client while I work on the shopping cart. The html files include double quotes which come across on his browser and mine as odd characters. I figured out how to set the encoding on my Mozilla to universal but the client and customers are not likely as computer literate. Is there a way to force the browser to see the double quotes properly? As always, if there's something you can point me to that i missed, lemme know. ciao! leam From Consult at CovenantEDesign.com Thu Oct 20 12:35:26 2005 From: Consult at CovenantEDesign.com (CED) Date: Thu, 20 Oct 2005 12:35:26 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? References: <20051020163139.GF2468@leitz.reuel.net> Message-ID: <002a01c5d594$46bf5eb0$1519a8c0@ced> php.net/chr ? ----- Original Message ----- From: To: Sent: Thursday, October 20, 2005 12:31 PM Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? I've set up a static site for my client while I work on the shopping cart. The html files include double quotes which come across on his browser and mine as odd characters. I figured out how to set the encoding on my Mozilla to universal but the client and customers are not likely as computer literate. Is there a way to force the browser to see the double quotes properly? As always, if there's something you can point me to that i missed, lemme know. ciao! leam _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From php at haberco.com Thu Oct 20 13:23:32 2005 From: php at haberco.com (Eddie Haber) Date: Thu, 20 Oct 2005 13:23:32 -0400 Subject: [nycphp-talk] File Download Question In-Reply-To: <48615.38.117.147.25.1130124079.squirrel@38.117.147.25> Message-ID: I have a file download area on my site. Users click a link, a JS pop-up window pops with a meta-refresh tag that refreshes to the file to be downloaded. The pop-up window also refreshes (reloads) the opener page. Everything works great, except one problem. I am using a PHP script as a gatekeeper/passthru for the file to be downloaded. Once the file download begins, no other links on the browser (parent or pop-up) will resolve until the download is over or is stopped. The second the download stops, any clicked on link resolves. The odd part is: If the meta-refresh in the pop-up goes directly to the zip file, the browser can link away without problem. But if meta-refresh links to the php script that dispenses the file, the links won't resolve during download. Script is below. Much appreciated! Thank you, Eddie From dcech at phpwerx.net Thu Oct 20 13:59:29 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 20 Oct 2005 13:59:29 -0400 Subject: [nycphp-talk] File Download Question In-Reply-To: References: Message-ID: <4357DB01.7060301@phpwerx.net> Eddie, It sounds to me like you may have an issue with your sessions, as presumably the php download script is blocking your other pages from accessing the session. If you put a call to session_write_close (http://www.php.net/session_write_close) after anything that needs access to the session but before the portion of the script that takes a long time, it should fix your problem. Dan Eddie Haber wrote: > I have a file download area on my site. Users click a link, a JS pop-up > window pops with a meta-refresh tag that refreshes to the file to be > downloaded. The pop-up window also refreshes (reloads) the opener page. > > Everything works great, except one problem. I am using a PHP script as a > gatekeeper/passthru for the file to be downloaded. Once the file download > begins, no other links on the browser (parent or pop-up) will resolve until > the download is over or is stopped. The second the download stops, any > clicked on link resolves. > > The odd part is: If the meta-refresh in the pop-up goes directly to the zip > file, the browser can link away without problem. But if meta-refresh links > to the php script that dispenses the file, the links won't resolve during > download. Script is below. > > Much appreciated! Thank you, > Eddie > > > > // a bunch of security checking > > // filename (all are zip files) > $filename = "somepath/somefile.zip"; > > // commented headers below are > // alternate tries that didn't work > > // output > header("Pragma: public"); > header("Expires: 0"); // set expiration time > header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); > header("Cache-Control: public"); > header('Content-Description: File Transfer'); > header("Content-Type: application/zip"); > // header("Content-Type: application/force-download"); > // header("Content-Type: application/octet-stream"); > // header("Content-Type: application/download"); > header("Content-Disposition: attachment; > filename=".basename($filename).";"); > header("Content-Transfer-Encoding: binary"); > header("Content-Length: " . filesize($filename)); > > @readfile("$filename"); > exit; > > ?> > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From php at haberco.com Thu Oct 20 14:19:56 2005 From: php at haberco.com (Eddie Haber) Date: Thu, 20 Oct 2005 14:19:56 -0400 Subject: [nycphp-talk] File Download Question In-Reply-To: <4357DB01.7060301@phpwerx.net> Message-ID: Dan, You're a miracle worker! I had been wondering about this one for a couple weeks. That fixed the problem. Thank you so much! Eddie On 10/20/05 1:59 PM, "Dan Cech" wrote: > Eddie, > > It sounds to me like you may have an issue with your sessions, as > presumably the php download script is blocking your other pages from > accessing the session. > > If you put a call to session_write_close > (http://www.php.net/session_write_close) after anything that needs > access to the session but before the portion of the script that takes a > long time, it should fix your problem. > > Dan > > > Eddie Haber wrote: >> I have a file download area on my site. Users click a link, a JS pop-up >> window pops with a meta-refresh tag that refreshes to the file to be >> downloaded. The pop-up window also refreshes (reloads) the opener page. >> >> Everything works great, except one problem. I am using a PHP script as a >> gatekeeper/passthru for the file to be downloaded. Once the file download >> begins, no other links on the browser (parent or pop-up) will resolve until >> the download is over or is stopped. The second the download stops, any >> clicked on link resolves. >> >> The odd part is: If the meta-refresh in the pop-up goes directly to the zip >> file, the browser can link away without problem. But if meta-refresh links >> to the php script that dispenses the file, the links won't resolve during >> download. Script is below. >> >> Much appreciated! Thank you, >> Eddie >> >> >> > >> // a bunch of security checking >> >> // filename (all are zip files) >> $filename = "somepath/somefile.zip"; >> >> // commented headers below are >> // alternate tries that didn't work >> >> // output >> header("Pragma: public"); >> header("Expires: 0"); // set expiration time >> header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); >> header("Cache-Control: public"); >> header('Content-Description: File Transfer'); >> header("Content-Type: application/zip"); >> // header("Content-Type: application/force-download"); >> // header("Content-Type: application/octet-stream"); >> // header("Content-Type: application/download"); >> header("Content-Disposition: attachment; >> filename=".basename($filename).";"); >> header("Content-Transfer-Encoding: binary"); >> header("Content-Length: " . filesize($filename)); >> >> @readfile("$filename"); >> exit; >> >> ?> >> >> >> _______________________________________________ >> New York PHP Talk Mailing List >> AMP Technology >> Supporting Apache, MySQL and PHP >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From dcech at phpwerx.net Thu Oct 20 14:28:36 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 20 Oct 2005 14:28:36 -0400 Subject: [nycphp-talk] File Download Question In-Reply-To: References: Message-ID: <4357E1D4.5010204@phpwerx.net> No worries, I'm glad it worked out for you! Dan Eddie Haber wrote: > Dan, > > You're a miracle worker! I had been wondering about this one for a couple > weeks. That fixed the problem. Thank you so much! > > Eddie > > > On 10/20/05 1:59 PM, "Dan Cech" wrote: > >> Eddie, >> >> It sounds to me like you may have an issue with your sessions, as >> presumably the php download script is blocking your other pages from >> accessing the session. >> >> If you put a call to session_write_close >> (http://www.php.net/session_write_close) after anything that needs >> access to the session but before the portion of the script that takes a >> long time, it should fix your problem. >> >> Dan >> >> >> Eddie Haber wrote: >>> I have a file download area on my site. Users click a link, a JS pop-up >>> window pops with a meta-refresh tag that refreshes to the file to be >>> downloaded. The pop-up window also refreshes (reloads) the opener page. >>> >>> Everything works great, except one problem. I am using a PHP script as a >>> gatekeeper/passthru for the file to be downloaded. Once the file download >>> begins, no other links on the browser (parent or pop-up) will resolve until >>> the download is over or is stopped. The second the download stops, any >>> clicked on link resolves. >>> >>> The odd part is: If the meta-refresh in the pop-up goes directly to the zip >>> file, the browser can link away without problem. But if meta-refresh links >>> to the php script that dispenses the file, the links won't resolve during >>> download. Script is below. >>> >>> Much appreciated! Thank you, >>> Eddie From mitch.pirtle at gmail.com Thu Oct 20 15:48:32 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 20 Oct 2005 15:48:32 -0400 Subject: [nycphp-talk] HAhahahahahahaha Message-ID: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> http://news.com.com/Andreessen+PHP+succeeding+where+Java+isnt/2100-1012_3-5903187.html?tag=nl "The simplicity of scripting language PHP means it will be more popular than Java for building Web-based applications, Internet browser pioneer Marc Andreessen predicted Wednesday in a speech here at the Zend/PHP Conference." Welcome to the nineties, dude! -- Mitch From codebowl at gmail.com Thu Oct 20 16:02:22 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 20 Oct 2005 16:02:22 -0400 Subject: [nycphp-talk] HAhahahahahahaha In-Reply-To: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> References: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> Message-ID: <8d9a42800510201302j3a402b53yc6d671120f35f0fa@mail.gmail.com> very funny ;) i cannot wait to see what PHP6 brings to the table for php programmers ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From glenn310b at mac.com Thu Oct 20 16:28:20 2005 From: glenn310b at mac.com (Glenn) Date: Thu, 20 Oct 2005 16:28:20 -0400 Subject: [nycphp-talk] database performance Message-ID: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> hello, i'm new to the list. i was reading some of the posts about database performance, and have an idea to help speed up certain queries. given a one to many relationship between parent_table and child_table_a... parent_table ------------- parent_id (unique key) indexed child_table_a_count more_cols ... ------------- child_table_a ------------- parent_id child_id more_cols ... -------------- the idea is to keep a record of how many children a parent record has, then use limit, so the query doesn't have to search the entire child table looking for rows that match parent_id. it will quit when it's found the correct number of rows. both tables are innodb in the application, (or with a trigger?) set up a transaction where; whenever rows are added to or deleted from child_table_a, child_table_a_count in parent_table is updated to the number of child rows. to look up child rows in child_table_a for parent_id, 1. query parent_table for child_table_a_count for parent_id. 2. construct the next query, using the value of child_table_a_count as the value for limit. maybe this is way too much work, or maybe limit doesn't actually stop searching the table when it reaches the limit_num. could this be useful? thanks, glenn From Consult at CovenantEDesign.com Thu Oct 20 17:02:16 2005 From: Consult at CovenantEDesign.com (CED) Date: Thu, 20 Oct 2005 17:02:16 -0400 Subject: [nycphp-talk] HAhahahahahahaha References: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> Message-ID: <002601c5d5b9$8f9eeb30$1519a8c0@ced> Nice, very nice. =D ----- Original Message ----- From: "Mitch Pirtle" To: "NYPHP Talk" Sent: Thursday, October 20, 2005 3:48 PM Subject: [nycphp-talk] HAhahahahahahaha http://news.com.com/Andreessen+PHP+succeeding+where+Java+isnt/2100-1012_3-59 03187.html?tag=nl "The simplicity of scripting language PHP means it will be more popular than Java for building Web-based applications, Internet browser pioneer Marc Andreessen predicted Wednesday in a speech here at the Zend/PHP Conference." Welcome to the nineties, dude! -- Mitch _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From rcozzol at optonline.net Thu Oct 20 17:09:10 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Thu, 20 Oct 2005 17:09:10 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> References: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> Message-ID: <43580776.6040501@optonline.net> You can also use nested set theory. This makes retrieval of parents, children, siblings, etc. extremely fast and efficient. This also allows for an unlimited hierarchy. The math is a bit more confusing at first, but quite trivial once you get it. The adjacency list model is significantly slower but much easier to understand. A good link to help understand this is http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=1266295. Also note, that in Oracle, there is a specific function to deal with this ... postgres, mysql, sql server and others do not deal with hierarchical structures in flat format. Hope this helps, although I am not sure what the question was in the first place. > > From nasir81 at gmail.com Thu Oct 20 20:32:19 2005 From: nasir81 at gmail.com (Nasir Zubair) Date: Thu, 20 Oct 2005 20:32:19 -0400 Subject: [nycphp-talk] HAhahahahahahaha In-Reply-To: <002601c5d5b9$8f9eeb30$1519a8c0@ced> References: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> <002601c5d5b9$8f9eeb30$1519a8c0@ced> Message-ID: <40fcda730510201732u722c7233sbfd3c10c3caad56d@mail.gmail.com> 6 already? I'm still adjusting to 5 :-) On 10/20/05, CED wrote: > > Nice, very nice. =D > > ----- Original Message ----- > From: "Mitch Pirtle" > To: "NYPHP Talk" > Sent: Thursday, October 20, 2005 3:48 PM > Subject: [nycphp-talk] HAhahahahahahaha > > > > http://news.com.com/Andreessen+PHP+succeeding+where+Java+isnt/2100-1012_3-59 > 03187.html?tag=nl > > "The simplicity of scripting language PHP means it will be more > popular than Java for building Web-based applications, Internet > browser pioneer Marc Andreessen predicted Wednesday in a speech here > at the Zend/PHP Conference." > > Welcome to the nineties, dude! > > -- Mitch > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Nasir Zubair http://www.nasir.us/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.rundlett at gmail.com Thu Oct 20 23:09:26 2005 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Thu, 20 Oct 2005 23:09:26 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? In-Reply-To: <20051020163139.GF2468@leitz.reuel.net> References: <20051020163139.GF2468@leitz.reuel.net> Message-ID: <5e2aaca40510202009y6deae433j77a8e4c35fdcaabf@mail.gmail.com> On 10/20/05, leam at reuel.net wrote: > I've set up a static site for my client while I work on the shopping cart. The html files include double quotes which come across on his browser and mine as odd characters. I figured out how to set the encoding on my Mozilla to universal but the client and customers are not likely as computer literate. > > Is there a way to force the browser to see the double quotes properly? As always, if there's something you can point me to that i missed, lemme know. > You're on the right track. The character(s) in question are probably inserted by a Microsoft application that is configured (by default) to insert 'smart quotes', em dash, trademark symbol etc in place of the actual ASCII characters you type at the keyboard. These bad characters (like the 'smart quote') that are part of the Windows-1250 character set (http://en.wikipedia.org/wiki/Windows-1250) that is incompatible with simple ASCII or UTF-8. There are many reasons why this is a 'dumb' idea. The main one is that not all user agents will be able to render such characters, because the character is NOT present in the font available on the client system - even IF the appropriate character set is specified in the document header. Even a user on a Microsoft platform (using a non-Microsoft font) could see incorrect or missing characters. The best solution would be to avoid these non-standard characters. The second best solution would be to replace these troublesome characters with their unicode equivalent and then specify that character set in BOTH the HTTP header like this header("Content-type: text/html; charset=utf-8"); (assuming you're using PHP -- there are many variations depending on the http server and scripting language in use) and your document using a tag like this for HTML: or this for XML Text is said to be in a Unicode encoding form if it is encoded in UTF-8, UTF-16 or UTF-32 If you want to use a character that is not in UTF-8, then you can always use a numeric or character entity reference. There is a great FAQ at the unicode website here http://www.unicode.org/faq/unicode_web.html There is also a 'demoroniser' script (http://www.fourmilab.ch/webtools/demoroniser/) that will clean your documents if you have lots of cleanup to do. A great tutorial can be found at http://www.cs.tut.fi/~jkorpela/chars.html, with additional information at http://www.cs.tut.fi/~jkorpela/html/chars.html, which might lead you to think "this guy knows his stuff" (Korpela, not me) Where can I read more? http://www.cs.tut.fi/~jkorpela/www.html Then there is the wikipedia set of articles on the topic: http://en.wikipedia.org/wiki/Character_encoding Setting the HTTP header http://www.w3.org/International/O-HTTP-charset.html No list of references would be complete without a link to the W3C spec http://www.w3.org/TR/charmod/ - Greg From leam at reuel.net Thu Oct 20 23:52:22 2005 From: leam at reuel.net (leam at reuel.net) Date: Thu, 20 Oct 2005 23:52:22 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? In-Reply-To: <002a01c5d594$46bf5eb0$1519a8c0@ced> References: <20051020163139.GF2468@leitz.reuel.net> <002a01c5d594$46bf5eb0$1519a8c0@ced> Message-ID: <20051021035222.GA2085@leitz.reuel.net> Um, not sure what you mean. I have an html file with the error that web browsers don't know how to read the character. There's no php in it. ciao! leam On Thu, Oct 20, 2005 at 12:35:26PM -0400, CED wrote: > php.net/chr ? > > ----- Original Message ----- > From: > To: > Sent: Thursday, October 20, 2005 12:31 PM > Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? > > > I've set up a static site for my client while I work on the shopping cart. > The html files include double quotes which come across on his browser and > mine as odd characters. I figured out how to set the encoding on my Mozilla > to universal but the client and customers are not likely as computer > literate. > > Is there a way to force the browser to see the double quotes properly? As > always, if there's something you can point me to that i missed, lemme know. > > ciao! > > leam > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From JoeyD473 at nyc.rr.com Thu Oct 20 23:52:30 2005 From: JoeyD473 at nyc.rr.com (Joey Derrico) Date: Thu, 20 Oct 2005 23:52:30 -0400 Subject: [nycphp-talk] HAhahahahahahaha In-Reply-To: <40fcda730510201732u722c7233sbfd3c10c3caad56d@mail.gmail.com> References: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> <002601c5d5b9$8f9eeb30$1519a8c0@ced> <40fcda730510201732u722c7233sbfd3c10c3caad56d@mail.gmail.com> Message-ID: <435865FE.40709@nyc.rr.com> I still havn't touched 5 yet Joey Derrico Nasir Zubair wrote: > 6 already? I'm still adjusting to 5 :-) > > On 10/20/05, *CED* > wrote: > > Nice, very nice. =D > > ----- Original Message ----- > From: "Mitch Pirtle" < mitch.pirtle at gmail.com > > > To: "NYPHP Talk" > > Sent: Thursday, October 20, 2005 3:48 PM > Subject: [nycphp-talk] HAhahahahahahaha > > > http://news.com.com/Andreessen+PHP+succeeding+where+Java+isnt/2100-1012_3-59 > 03187.html?tag=nl > > "The simplicity of scripting language PHP means it will be more > popular than Java for building Web-based applications, Internet > browser pioneer Marc Andreessen predicted Wednesday in a speech here > at the Zend/PHP Conference." > > Welcome to the nineties, dude! > > -- Mitch > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > > > > -- > Nasir Zubair > http://www.nasir.us/ > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.rundlett at gmail.com Fri Oct 21 00:20:44 2005 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Fri, 21 Oct 2005 00:20:44 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? In-Reply-To: <20051021035222.GA2085@leitz.reuel.net> References: <20051020163139.GF2468@leitz.reuel.net> <002a01c5d594$46bf5eb0$1519a8c0@ced> <20051021035222.GA2085@leitz.reuel.net> Message-ID: <5e2aaca40510202120m209dea51q1b9949a285c9a480@mail.gmail.com> On 10/20/05, leam at reuel.net wrote: > Um, not sure what you mean. I have an html file with the error that web browsers don't know how to read the character. There's no php in it. You should read some of the references/FAQs I posted, but the short answer is replace the fancy quotes that are in your document with regular " from your keyboard (using a plain text editor or capable web editor like Quanta Plus). If you didn't create the original file, then you /might/ be in the position where you can't actually see the offending characters. In that case, use a tool like Tidy or the demoroniser to do the work for you. From dmintz at davidmintz.org Fri Oct 21 09:15:09 2005 From: dmintz at davidmintz.org (David Mintz) Date: Fri, 21 Oct 2005 09:15:09 -0400 (EDT) Subject: [nycphp-talk] database performance In-Reply-To: <43580776.6040501@optonline.net> References: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> <43580776.6040501@optonline.net> Message-ID: On Thu, 20 Oct 2005, Roland Cozzolino wrote: > http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=1266295. Utterly cool. Now, if only they would add a Flash animation that shows the tree morphing into an oval containing lots of nested ovals, and a worm traversing it... --- David Mintz http://davidmintz.org/ From jellicle at gmail.com Fri Oct 21 10:39:34 2005 From: jellicle at gmail.com (Michael Sims) Date: Fri, 21 Oct 2005 10:39:34 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> References: <94debb045c6ace0fcc3bb63cdcecbdd1@mac.com> Message-ID: <200510211039.35126.jellicle@gmail.com> On Thursday 20 October 2005 16:28, Glenn wrote: > i was reading some of the posts about database performance, > and have an idea to help speed up certain queries. You are correct, using LIMIT will often be faster than the same query without LIMIT: http://dev.mysql.com/doc/refman/5.0/en/limit-optimization.html However, the problem of keeping the parent_table updated with how many child rows apply may kill those gains. It depends whether the child data changes often or rarely. If the child data changes ten times for every one time you SELECT it, you will lose more than you gain. If the child data changes twice yearly and is SELECTED ten times per second, this denormalization will clearly benefit performance. It's all in how the data is actually being used. Michael Sims From leam at reuel.net Fri Oct 21 11:24:03 2005 From: leam at reuel.net (leam at reuel.net) Date: Fri, 21 Oct 2005 11:24:03 -0400 Subject: [nycphp-talk] [OT]Forcing charset on a shared webhost? In-Reply-To: <5e2aaca40510202120m209dea51q1b9949a285c9a480@mail.gmail.com> References: <20051020163139.GF2468@leitz.reuel.net> <002a01c5d594$46bf5eb0$1519a8c0@ced> <20051021035222.GA2085@leitz.reuel.net> <5e2aaca40510202120m209dea51q1b9949a285c9a480@mail.gmail.com> Message-ID: <20051021152403.GG2507@leitz.reuel.net> Sorry if my reply seemed off, I read the one answer before getting to yours. The complication is that i looked at the file on the server with "more" and it looked fine. Then I used "vi" to look at it and saw that indeed the odd characters were there. So I'll read through your suggestions and put them to work. Thanks! leam On Fri, Oct 21, 2005 at 12:20:44AM -0400, Greg Rundlett wrote: > On 10/20/05, leam at reuel.net wrote: > > Um, not sure what you mean. I have an html file with the error that web browsers don't know how to read the character. There's no php in it. > > You should read some of the references/FAQs I posted, but the short > answer is replace the fancy quotes that are in your document with > regular " from your keyboard (using a plain text editor or capable web > editor like Quanta Plus). > > If you didn't create the original file, then you /might/ be in the > position where you can't actually see the offending characters. In > that case, use a tool like Tidy or the demoroniser to do the work for > you. From cliff at pinestream.com Fri Oct 21 11:36:20 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 21 Oct 2005 11:36:20 -0400 Subject: [nycphp-talk] database performance In-Reply-To: Message-ID: <000301c5d655$3856bd20$cc00470a@CHirschLaptop> I have implemented this structure, but have added several fields. For starters, I keep the id, parent id relationship because it seems handy at times, and then add a tree level/depth field. This makes updates a bit more complex, but if you are mainly performing various sorts of reads, I think it makes things faster and presentation a bit easier. Cliff Hirsch -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Friday, October 21, 2005 9:15 AM To: NYPHP Talk Subject: Re: [nycphp-talk] database performance On Thu, 20 Oct 2005, Roland Cozzolino wrote: > http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=12662 95. Utterly cool. Now, if only they would add a Flash animation that shows the tree morphing into an oval containing lots of nested ovals, and a worm traversing it... --- David Mintz http://davidmintz.org/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From dcech at phpwerx.net Fri Oct 21 11:56:39 2005 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 21 Oct 2005 11:56:39 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <000301c5d655$3856bd20$cc00470a@CHirschLaptop> References: <000301c5d655$3856bd20$cc00470a@CHirschLaptop> Message-ID: <43590FB7.4080004@phpwerx.net> I wrote a hybrid system based off a nested set idea but also storing the parent_id for phpGACL (http://phpgacl.sourceforge.net/). It works very well, scales great and can easily be rebuilt if there is an error in the lft,rgt pairs. The same idea powered this little demo, which some of you may remember. http://clew.phpwerx.net/ Dan Cliff Hirsch wrote: > I have implemented this structure, but have added several fields. For > starters, I keep the id, parent id relationship because it seems handy > at times, and then add a tree level/depth field. This makes updates a > bit more complex, but if you are mainly performing various sorts of > reads, I think it makes things faster and presentation a bit easier. > > Cliff Hirsch > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of David Mintz > Sent: Friday, October 21, 2005 9:15 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] database performance > > > On Thu, 20 Oct 2005, Roland Cozzolino wrote: > > http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=12662 > 95. > > Utterly cool. Now, if only they would add a Flash animation that shows > the > tree morphing into an oval containing lots of nested ovals, and a worm > traversing it... > > --- > David Mintz > http://davidmintz.org/ From glenn310b at mac.com Fri Oct 21 17:29:12 2005 From: glenn310b at mac.com (Glenn) Date: Fri, 21 Oct 2005 17:29:12 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <43590FB7.4080004@phpwerx.net> References: <000301c5d655$3856bd20$cc00470a@CHirschLaptop> <43590FB7.4080004@phpwerx.net> Message-ID: <36e601d0534d6d3f565dc7a7e5163652@mac.com> thanks everyone, there are far more reads than writes in the data situation I was thinking of. glad to know that the concept is acceptable, at least in certain situations. i was not familiar with nested sets. what a great idea. i'll be checking that concept out further. thanks for all the links. sorry about the rtfm error about how mysql optimizes limit. i had checked my local mysql docs, but didn't check the dev.mysql site. i'm new to php and mysql (and sql in general), but have a few years experience with databases and programming. mostly shell and perl using relational (normalized) sequential plain text files, and isam with cobol. anyway, i'm glad to be here. hope i can contribute something useful in the future. glenn > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From codebowl at gmail.com Fri Oct 21 17:56:38 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Fri, 21 Oct 2005 17:56:38 -0400 Subject: [nycphp-talk] AOP vs OOP Message-ID: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> Anyone here heard of AOP? I just heard about it today and was wondering if it is better than OOP? any thoughts? -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Fri Oct 21 18:06:14 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 21 Oct 2005 18:06:14 -0400 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> References: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> Message-ID: On 10/21/05, Joseph Crawford wrote: > Anyone here heard of AOP? No... http://www.google.com/search?q=define%3Aaop Any of those? > I just heard about it today and was wondering if it is better than OOP? What could be better? ;-) From yournway at gmail.com Fri Oct 21 18:08:08 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 21 Oct 2005 23:08:08 +0100 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: References: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> Message-ID: Chris, I think Joseph means Aspect Oriented Programming. Still digging on it... On 21/10/05, csnyder wrote: > On 10/21/05, Joseph Crawford wrote: > > Anyone here heard of AOP? > > No... http://www.google.com/search?q=define%3Aaop > > Any of those? > > > > I just heard about it today and was wondering if it is better than OOP? > > What could be better? ;-) > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From codebowl at gmail.com Fri Oct 21 18:09:38 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Fri, 21 Oct 2005 18:09:38 -0400 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: References: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> Message-ID: <8d9a42800510211509w19922d3eu827700d1e9b275a9@mail.gmail.com> Yes Aspect Oriented Programming http://en.wikipedia.org/wiki/Aspect-oriented_programming -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From krook at us.ibm.com Fri Oct 21 18:18:29 2005 From: krook at us.ibm.com (Daniel Krook) Date: Fri, 21 Oct 2005 18:18:29 -0400 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: <8d9a42800510211509w19922d3eu827700d1e9b275a9@mail.gmail.com> Message-ID: > Yes Aspect Oriented Programming > > http://en.wikipedia.org/wiki/Aspect-oriented_programming > > -- > Joseph Crawford Jr. This is an area I've been wanting to explore but haven't yet gotten into. There seems to be a lot of new technologies and articles on it recently. The tutorial below might be of some use as an overview (at least in Java/OOP terms). But you'd probably best be served on how it could be applied in PHP terms by looking for an implementation or port of the Spring framework (http://springframework.org/). Maybe http://www.aophp.net/ (linked from that wikipedia article). An introduction to AOP https://www6.software.ibm.com/developerworks/education/j-aopintro/j-aopintro-ltr.pdf "AOP does not contradict or displace object-oriented design and programming, which all Java developers practice. Instead, it complements them. AOP can be viewed as the next natural adaptive step beyond object-oriented programming (OOP) in software engineering for developers and research communities." Daniel Krook, Advisory IT Specialist Application Development, Production Services - Tools, ibm.com Personal: http://info.krook.org/ BluePages: http://bluepages.redirect.webahead.ibm.com/ BlogPages: http://blogpages.redirect.webahead.ibm.com/ From chsnyder at gmail.com Fri Oct 21 18:20:36 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 21 Oct 2005 18:20:36 -0400 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: References: <8d9a42800510211456l3f45a753w4dc1db843c24e6d5@mail.gmail.com> Message-ID: On 10/21/05, csnyder wrote: > On 10/21/05, Joseph Crawford wrote: > > Anyone here heard of AOP? > > No... http://www.google.com/search?q=define%3Aaop > > Any of those? Yes, Aspect-Oriented Programming, which takes OOP and adds the notion of "aspects", interfaces that cut across multiple classes. > > I just heard about it today and was wondering if it is better than OOP? > > What could be better? ;-) See http://jroller.com/page/colyer/20040531 for concept, and http://www.eclipse.org/aspectj/doc/released/faq.html#q:benefits for some benefits. -- Chris Snyder http://chxo.com/ From chsnyder at gmail.com Fri Oct 21 18:25:01 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 21 Oct 2005 18:25:01 -0400 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: References: <8d9a42800510211509w19922d3eu827700d1e9b275a9@mail.gmail.com> Message-ID: On 10/21/05, Daniel Krook wrote: > An introduction to AOP > https://www6.software.ibm.com/developerworks/education/j-aopintro/j-aopintro-ltr.pdf > > "AOP does not contradict or displace object-oriented design and > programming, which > all Java developers practice. Instead, it complements them. AOP can be > viewed as > the next natural adaptive step beyond object-oriented programming (OOP) in > software engineering for developers and research communities." > Thanks, Dan -- that's a great resource. From yournway at gmail.com Fri Oct 21 18:27:03 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 21 Oct 2005 23:27:03 +0100 Subject: [nycphp-talk] AOP vs OOP In-Reply-To: References: <8d9a42800510211509w19922d3eu827700d1e9b275a9@mail.gmail.com> Message-ID: Indeed, you antecipated me Chris. Thanks Daniel. On 21/10/05, csnyder wrote: > On 10/21/05, Daniel Krook wrote: > > > An introduction to AOP > > https://www6.software.ibm.com/developerworks/education/j-aopintro/j-aopintro-ltr.pdf > > > > "AOP does not contradict or displace object-oriented design and > > programming, which > > all Java developers practice. Instead, it complements them. AOP can be > > viewed as > > the next natural adaptive step beyond object-oriented programming (OOP) in > > software engineering for developers and research communities." > > > > > Thanks, Dan -- that's a great resource. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From shiflett at php.net Sat Oct 22 15:51:28 2005 From: shiflett at php.net (Chris Shiflett) Date: Sat, 22 Oct 2005 15:51:28 -0400 Subject: [nycphp-talk] HAhahahahahahaha In-Reply-To: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> References: <330532b60510201248j4987a96bk9d6b938a83172f30@mail.gmail.com> Message-ID: <435A9840.1000302@php.net> Mitch Pirtle wrote: > "The simplicity of scripting language PHP means it will be more > popular than Java for building Web-based applications, Internet > browser pioneer Marc Andreessen predicted Wednesday in a speech > here at the Zend/PHP Conference." > > Welcome to the nineties, dude! PHP was nowhere near as popular as Java in the 90s. :-) Marc said a lot that we already know, but keep in mind that his words carry a lot of weight in the business community, and they're not as close to the technology as we are. If this stuff wasn't news to them, it wouldn't be getting this much attention. His statement was that more web applications will be built in the next 5 years than exist now. Thus, whatever technology dominates over the next 5 years is going to be firmly in the top spot, and PHP is poised to do exactly that. That's what I heard. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From matt at matt-roberts.net Sat Oct 22 16:15:00 2005 From: matt at matt-roberts.net (Matt Roberts) Date: Sat, 22 Oct 2005 16:15:00 -0400 Subject: [nycphp-talk] Long MySQL processes, connections Message-ID: <6C52C4A2-D964-4A7A-A388-CE794EFFFFDF@matt-roberts.net> I'm using mysql_connect() to access a MySQL database at the beginning of a PHP script. This script does long process of a large recordset, and generally takes 30-40 minutes to process all records. My question: what's the best way to handle this long connection? Could someone please explain the behind the scenes / best practice around MySQL var "wait_timeout" ? Sometimes the process hangs - could it be related to this timeout variable? As a workaround I connect and disconnect at the top and bottom of the processing loop - is this a bad idea? Thanks! Matt Matt Roberts matt at matt-roberts.net From dmintz at davidmintz.org Sat Oct 22 16:36:15 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sat, 22 Oct 2005 16:36:15 -0400 (EDT) Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity Message-ID: Anybody see anything wrong with this? '; $headers['Subject'] = 'Test message'; $body = "This test used the 'mail' backend and a To field that says: $header[To]"; true === $result = $mailer->send($recipients, $headers, $body) or exit($result->getMessage()); echo "ok\n" ; ?> When this message reaches my inbox and I read it with the pine email client, the To field says To: dmintz at davidmintz.org, David Mintz that is, listing my email address twice. Though I in fact get just one copy of the message, it's ugly. But when I send mail to myself through any other means I don't get this behavior. And when I read this same message via my hosting service's web interface, the To header displays thus To: "David Mintz" which is what I want/expect. Comments? Thanks --- David Mintz http://davidmintz.org/ From jdaly at panix.com Sat Oct 22 16:49:43 2005 From: jdaly at panix.com (John Daly) Date: Sat, 22 Oct 2005 16:49:43 -0400 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity References: Message-ID: <001001c5d74a$21934ae0$6401a8c0@GUITAR> David, It looks like you're already setting the To: header when you set recipients and use it as the first argument to 'send'. Leave out the $headers['To'] and that should fix it. I'm not familiar with this class, but there might be another association to set Name. JD ----- Original Message ----- From: "David Mintz" To: Sent: Saturday, October 22, 2005 4:36 PM Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity Anybody see anything wrong with this? '; $headers['Subject'] = 'Test message'; $body = "This test used the 'mail' backend and a To field that says: $header[To]"; true === $result = $mailer->send($recipients, $headers, $body) or exit($result->getMessage()); echo "ok\n" ; ?> When this message reaches my inbox and I read it with the pine email client, the To field says To: dmintz at davidmintz.org, David Mintz that is, listing my email address twice. Though I in fact get just one copy of the message, it's ugly. But when I send mail to myself through any other means I don't get this behavior. And when I read this same message via my hosting service's web interface, the To header displays thus To: "David Mintz" which is what I want/expect. Comments? Thanks --- David Mintz http://davidmintz.org/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From danielc at analysisandsolutions.com Sat Oct 22 18:31:04 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:31:04 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #320 Message-ID: <20051022213023.6494A11F76A@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #320 APPLICATIONS USING PHP ---------------------- PHPMyAdmin Local File Include Vulnerability http://www.securityfocus.com/bid/15053 Upgrade to phpMyAdmin 2.6.4-pl3 or newer. VersatileBulletinBoard Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15068 VersatileBulletinBoard Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15073 VersatileBulletinBoard Information Disclosure Vulnerability http://www.securityfocus.com/bid/15075 PHP Advanced Transfer Manager Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/15074 Zeroblog Thread.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15078 Xeobook Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/15086 PHPWebSite Search Module SQL Injection Vulnerability http://www.securityfocus.com/bid/15088 Yapig View.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15092 YaPig Homepage Form Field HTML Injection Vulnerability http://www.securityfocus.com/bid/15095 Gallery Main.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/15108 W-Agora Multiple Arbitrary PHP Code Injection Vulnerabilities http://www.securityfocus.com/bid/15110 Complete PHP Counter SQL Injection Vulnerability http://www.securityfocus.com/bid/15111 Complete PHP Counter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15112 PunBB Search.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15114 RELATED STUFF ------------- OpenSSL Insecure Protocol Negotiation Weakness http://www.securityfocus.com/bid/15071 Upgrade to 0.9.7h or 0.9.8a Multiple Vendor WGet/Curl NTLM Username Buffer Overflow Vulnerability http://www.securityfocus.com/bid/15102 curl and libcurl: <= 7.10.5 and >= 7.15.0 are not affected or fixed.
Wget: upgrade to 1.10.2. From danielc at analysisandsolutions.com Sat Oct 22 18:35:02 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:02 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #319 Message-ID: <20051022213421.6717A11F76A@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #319 APPLICATIONS USING PHP ---------------------- PHP-Fusion Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15005 TellMe Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15012 MyBloggie Search.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15017 PHP-Fusion Register.PHP And FAQ.PHP SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15018 OScommerce Additional_Images.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15023 MediaWiki HTML Inline Style Attributes Unspecified Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15024 MediaWiki History Database Corruption Vulnerability http://www.securityfocus.com/bid/15041 Utopia News Pro Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15027 Utopia News Pro SQL Injection Vulnerability http://www.securityfocus.com/bid/15028 Cyphor Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15047 RELATED STUFF ------------- Mozilla Firefox Multiple Unspecified Vulnerabilities http://www.securityfocus.com/bid/15029 If you are using Firefox 1.5, make sure to upgrade to beta 2. From danielc at analysisandsolutions.com Sat Oct 22 18:35:05 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:05 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #318 Message-ID: <20051022213424.D8B2011F76A@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #318 PHP --- PHP Open_BaseDir Security Restriction Bypass Vulnerability http://www.securityfocus.com/bid/14957 This bug (http://bugs.php.net/32937) was fixed in CVS on 2005-09-27 (http://cvs.php.net/php-src/main/fopen_wrappers.c). APPLICATIONS USING PHP ---------------------- AlstraSoft E-Friends Remote File Include Vulnerability http://www.securityfocus.com/bid/14932 UNU Networks MailGust User_email.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14933 SEO-Board Admin.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14936 CMS Made Simple Index.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14937 Riverdark RSS Syndicator Module RSS.PHP Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14940 LucidCMS Index.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14951 CJ LinkOut Top.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14953 CJ Tag Board Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14954 CJ Web2Mail Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14956 PostNuke PN_BBCode Local File Include Vulnerability http://www.securityfocus.com/bid/14958 CubeCart Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14962 PHP-Fusion Messages.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14964 SquirrelMail Address Add Plugin Add.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14973 EasyGuppy Printfaq.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14984 MediaWiki Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14987 PHP-Fusion Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14992 From danielc at analysisandsolutions.com Sat Oct 22 18:35:08 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:08 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #317 Message-ID: <20051022213427.C9CFA9A58F@mailspool3.panix.com> Alerts from SecurityFocus Newsletter #317 APPLICATIONS USING PHP ---------------------- CutePHP CuteNews Flood Protection Client-IP PHP Code Injection Vulnerability http://www.securityfocus.com/bid/14869 EPay Pro Index.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14871 VBulletin Multiple Moderator And Administrator SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14872 VBulletin Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14874 NooToplist Index.PHP Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14873 MX Shop Index.PHP Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14876 Hesk Session ID Authentication Bypass Vulnerability http://www.securityfocus.com/bid/14879 PHP Advanced Transfer Manager Multiple Directory Traversal Vulnerabilities http://www.securityfocus.com/bid/14883 PHP Advanced Transfer Manager Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14887 Land Down Under Multiple Remote SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14896 Simplog Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14897 PunBB Forgotten Email Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14900 PunBB Language Selection File Include Vulnerability http://www.securityfocus.com/bid/14904 GeSHI Example.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14903 My Little Forum Search.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14908 PHPMyFAQ Password.PHP SQL Injection Vulnerabililty http://www.securityfocus.com/bid/14927 PHPMyFAQ Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14928 PHPMyFAQ Local File Include Vulnerability http://www.securityfocus.com/bid/14929 PHPMyFAQ Logs Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14930 UNU Networks MailGust User_email.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14933 RELATED STUFF ------------- Multiple Mozilla Browser/Firefox Vulnerabilities http://www.securityfocus.com/bid/ Make sure to upgrade to versions Firefox/Mozilla. From danielc at analysisandsolutions.com Sat Oct 22 18:35:16 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:16 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #315 Message-ID: <20051022213435.3EEFD9A58F@mailspool3.panix.com> Alerts from SecurityFocus Newsletter #315 APPLICATIONS USING PHP ---------------------- MyBloggie login.php SQL Injection Vulnerability http://www.securityfocus.com/bid/14739 MAXdev MD-Pro Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14742 Land Down Under Events.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/14746 NewsBoard Description Field HTML Injection Vulnerability http://www.securityfocus.com/bid/14748 MAXdev MD-Pro Arbitrary Remote File Upload Vulnerability http://www.securityfocus.com/bid/14750 MAXdev MD-Pro Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14751 GuppY PrintFAQ.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14752 GuppY Error.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/14753 MyBulletinBoard Forumdisplay.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14754 MyBulletinBoard Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14762 MyBulletinBoard Forumdisplay.PHP Fid Parameter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14782 MyBulletinBoard RateThread.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14786 PHPCommunityCalendar Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14763 PHPCommunityCalendar Multiple Remote Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14767 PBLang Bulletin Board System SetCookie.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14765 PBLang Bulletin Board System HTML Injection Vulnerability http://www.securityfocus.com/bid/14766 Class-1 Forum SQL Injection Vulnerability http://www.securityfocus.com/bid/14774 Stylemotion WEB//NEWS Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14776 AMember Remote File Include Vulnerability http://www.securityfocus.com/bid/14777 RELATED STUFF ------------- Mozilla/Netscape/Firefox Browsers Domain Name Remote Buffer Overflow Vulnerability http://www.securityfocus.com/bid/14784 Firefox 1.0.6 and 1.5 Beta 1 are vulnerable to this issue. Mozilla 1.7.11 and Netscape 8.0.3.3 and 7.2 are affected as well.
A temporary fix is to disable International Domain Name support by setting network.enableIDN to false in about:config.
See the announcement on Mozilla's website for more information. From danielc at analysisandsolutions.com Sat Oct 22 18:35:18 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:18 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #314 Message-ID: <20051022213437.E554211F76E@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #314 APPLICATIONS USING PHP ---------------------- PHPMyAdmin Cookie.Auth.Lib.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/14674 This issue has been addressed in phpMyAdmin 2.6.4-rc1. PHPMyAdmin Error.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14675 This issue has been addressed in phpMyAdmin 2.6.4-rc1. Land Down Under Signature HTML Injection Vulnerability http://www.securityfocus.com/bid/14677 FUDforum Avatar Upload Arbitrary Script Upload Vulnerability http://www.securityfocus.com/bid/14678 PHPWebNotes Api.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14679 Simple PHP Blog Comment_Delete_CGI.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14681 MyBB Member.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14684 AutoLinks Pro Al_initialize.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14686 PHP-Fusion BBCode URL Tag Script Injection Vulnerability http://www.securityfocus.com/bid/14688 Hesk Admin.PHP Authentication Bypass Vulnerability http://www.securityfocus.com/bid/14692 PHPLDAPAdmin Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14694 PHPLDAPAdmin Welcome.PHP Multiple Vulnerabilities http://www.securityfocus.com/bid/14695 e107 Forum_post.PHP Arbitrary Post Creation Vulnerability http://www.securityfocus.com/bid/14699 FlatNuke ID Parameter Directory Traversal Vulnerability http://www.securityfocus.com/bid/14702 FlatNuke USR Parameter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14704 CMS Made Simple Lang.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14709 DownFile Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14713 DownFile Administrator Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14714 GBook Multiple Unspecified Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14725 PBLang Bulletin Board System Multiple Remote Vulnerabilities http://www.securityfocus.com/bid/14728 RELATED STUFF ------------- Apache Mod_SSL SSLVerifyClient Restriction Bypass Vulnerability http://www.securityfocus.com/bid/14721 OpenSSH DynamicForward Inadvertent GatewayPorts Activation Vulnerability http://www.securityfocus.com/bid/14727 OpenSSH GSSAPI Credential Disclosure Vulnerability http://www.securityfocus.com/bid/14729 From danielc at analysisandsolutions.com Sat Oct 22 18:35:11 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:11 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #316 Message-ID: <20051022213431.179519A58F@mailspool3.panix.com> Parse error: parse error, unexpected T_STRING, expecting ')' in d:\webroot\phpsec\svn\vulnerabilities\sf.items\316.php on line 60 From danielc at analysisandsolutions.com Sat Oct 22 18:35:22 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:22 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #313 Message-ID: <20051022213442.29E4B9A58F@mailspool3.panix.com> Alerts from SecurityFocus Newsletter #313 APPLICATIONS USING PHP ---------------------- Woltlab Burning Board ModCP.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14617 Land Down Under Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14618 Land Down Under Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14619 Coppermine Displayimage.PHP Script Injection Vulnerability http://www.securityfocus.com/bid/14625 NEPHP Browse.PHP Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14626 PHPKit Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14629 RunCMS NewBB_Plus and Messages Modules Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14631 RunCMS Arbitrary Variable Overwrite Vulnerability http://www.securityfocus.com/bid/14634 PostNuke Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14635 PostNuke DL-viewdownload.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14636 SaveWebPortal Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14639 SaveWebPortal Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/14641 SaveWebPortal Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14642 SaveWebPortal Multiple Directory Traversal Vulnerabilities http://www.securityfocus.com/bid/14643 WebCalendar Send_Reminders.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14651 PAFileDB Auth.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14654 Foojan PHPWeblog Html Injection Vulnerability http://www.securityfocus.com/bid/14658 Simple PHP Blog Remote Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/14667 Gallery Script Injection Vulnerability http://www.securityfocus.com/bid/14668 PHPgraphy Script Injection Vulnerability http://www.securityfocus.com/bid/14669 YaPig Script Injection Vulnerability http://www.securityfocus.com/bid/14670 PhotoPost Script Injection Vulnerability http://www.securityfocus.com/bid/14671 From danielc at analysisandsolutions.com Sat Oct 22 18:35:26 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:26 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #312 Message-ID: <20051022213445.74D349A58F@mailspool3.panix.com> Alerts from SecurityFocus Newsletter #312 APPLICATIONS USING PHP ---------------------- PHPXMLRPC and PEAR XML_RPC Remote Code Injection Vulnerability http://www.securityfocus.com/bid/14560 Dokeos Multiple Directory Traversal Vulnerabilities http://www.securityfocus.com/bid/14563 Discuz! Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/14564 CPaint Unspecified Command Execution and Information Disclosure Vulnerabilities http://www.securityfocus.com/bid/14565 CPaint xmlhttp Request Input Validation Vulnerability http://www.securityfocus.com/bid/14577 My Image Gallery Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14570 SafeHTML UTF-7 And CSS Comment Tag Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14574 ECW Shop Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14576 ECW Shop Index.PHP Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14578 ECW Shop Index.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/14579 ECW Shop Order Input Validation Vulnerability http://www.securityfocus.com/bid/14580 phpPgAds Lib-View-Direct.INC.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14583 phpPgAds Local File Include Vulnerability http://www.securityfocus.com/bid/14584 phpAdsNew Lib-View-Direct.INC.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14588 phpAdsNew Local File Include Vulnerability http://www.securityfocus.com/bid/14591 PHPFreeNews SearchResults.PHP Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14589 PHPFreeNews Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14590 PHPTB Topic Board Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/14592 Mediabox404 Login_Admin_Mediabox404.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14593 W-Agora Site Parameter Directory Traversal Vulnerability http://www.securityfocus.com/bid/14597 ATutor Login.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14598 PHPOutsourcing Zorum Prod.PHP Arbitrary Command Execution Vulnerability http://www.securityfocus.com/bid/14601 BBCaffe HTML Injection Vulnerability http://www.securityfocus.com/bid/14602 Mantis Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/14604 MyBulletinBoard Search.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14615 Woltlab Burning Board ModCP.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14617 Land Down Under Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14618 Land Down Under Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14619 RELATED STUFF ------------- Adobe Acrobat and Adobe Reader Remote Buffer Overflow Vulnerability http://www.securityfocus.com/bid/14603 From danielc at analysisandsolutions.com Sat Oct 22 18:35:29 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:29 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #311 Message-ID: <20051022213448.7F79B11F76A@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #311 APPLICATIONS USING PHP ---------------------- PHP-Fusion Messages.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14489 SysCP Multiple Script Execution Vulnerabilities http://www.securityfocus.com/bid/14490 Invision Power Board Attached File Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14492 PHPSiteStats Unspecified Authentication Bypass Vulnerability http://www.securityfocus.com/bid/14493 OpenBB Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14494 E107 Website System Attached File Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14495 Gravity Board X Login SQL Injection Vulnerability http://www.securityfocus.com/bid/14497 Gravity Board X DeleteThread.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14499 Gravity Board X CSS Template Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14502 MyFAQ Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14503 Calendar Express Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14504 Calendar Express Search.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14505 Chipmunk CMS Fontcolor Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14506 FunkBoard Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14507 E107 Submitted Link HTML Injection Vulnerability http://www.securityfocus.com/bid/14508 TriggerTG TClanPortal Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14516 XMB Forum U2U.Inc.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14523 WordPress Cookie Data PHP Code Injection Vulnerability http://www.securityfocus.com/bid/14533 EZUpload Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/14534 PHPTB Topic Board Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14535 PHlyMail Unspecified Authentication Bypass Vulnerability http://www.securityfocus.com/bid/14537 VegaDNS Index.PHP Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14538 EQDKP Session.PHP Authorization Bypass Vulnerability http://www.securityfocus.com/bid/14541 Gallery PostNuke Integration Access Validation Vulnerability http://www.securityfocus.com/bid/14547 MyBulletinBoard Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14553 PHPBB BBCode IMG Tag Script Injection Vulnerability http://www.securityfocus.com/bid/14555 FUDForum Tree View Access Validation Vulnerability http://www.securityfocus.com/bid/14556 RELATED STUFF ------------- MySQL User-Defined Function Buffer Overflow Vulnerability http://www.securityfocus.com/bid/14509 From danielc at analysisandsolutions.com Sat Oct 22 18:35:32 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:32 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #310 Message-ID: <20051022213451.538019A592@mailspool3.panix.com> Alerts from SecurityFocus Newsletter #310 APPLICATIONS USING PHP ---------------------- MySQL Eventum Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14436 MySQL Eventum Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14437 ChurchInfo Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14438 PHPFreeNews Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14439 PHPFreeNews Admin Login SQL Injection Vulnerability http://www.securityfocus.com/bid/14442 OpenBook Admin.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14444 Naxtor Shopping Cart Lost_password.PHP Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14454 Naxtor Shopping Cart Shop_Display_Products.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14456 Web Content Management Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14464 Web Content Management Administrator Account Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14465 Silvernews Admin.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14466 LogiCampus Helpdesk Unspecified Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14472 PortailPHP Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14474 Comdev ECommerce Config.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14478 Comdev eCommerce WCE.Download.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/14479 Jax PHP Scripts Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14481 Jax PHP Scripts Multiple Remote Information Disclosure Vulnerabilities http://www.securityfocus.com/bid/14482 PHPOpenChat Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/14484 FlatNuke Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14483 FlatNuke User Data Arbitrary PHP Code Execution Vulnerability http://www.securityfocus.com/bid/14485 PHP-Fusion Messages.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14489 From danielc at analysisandsolutions.com Sat Oct 22 18:35:38 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:35:38 -0500 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #309 Message-ID: <20051022213457.25E1311F76A@mailspool2.panix.com> Alerts from SecurityFocus Newsletter #309 APPLICATIONS USING PHP ---------------------- Beehive Forum Webtag Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/14361 Beehive Forum Webtag Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14363 Atomic Photo Album Apa_PHPInclude.INC.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14368 PHPFirstpost Block.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14371 VBZoom Forum Show.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/14383 VBZooM Forum Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14423 NETonE PHPBook Guestbook.PHP Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/14390 Advanced Guestbook User-Agent HTML Injection Vulnerability http://www.securityfocus.com/bid/14391 PNG Counter Demo.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14392 Clever Copy Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14395 Clever Copy Private Message Unauthorized Access Vulnerability http://www.securityfocus.com/bid/14397 Blue Magic Forum Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14396 PHPList Admin Page SQL Injection Vulnerability http://www.securityfocus.com/bid/14403 Website Baker Browse.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14404 Website Baker Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/14406 Gforge Multiple Cross Site Scripting Vulnerabilities http://www.securityfocus.com/bid/14405 Simplicity oF Upload Download.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/14424 Kayako LiveResponse Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/14425 PluggedOut CMS Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/14426 PC-Experience/Toppe Unauthorized User Access Vulnerability http://www.securityfocus.com/bid/14427 PC-Experience/Toppe PM.PHP MSG Parameter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/14428 Ragnarok Online Control Panel Authentication Bypass Vulnerability http://www.securityfocus.com/bid/14429 From yournway at gmail.com Sat Oct 22 17:40:35 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Sat, 22 Oct 2005 22:40:35 +0100 Subject: [nycphp-talk] about SecurityFocus Alerts Message-ID: Let me look at it from the bright side, no Joomla! alerts there... Hey Mitch?, hehe -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From danielc at analysisandsolutions.com Sat Oct 22 17:47:40 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Oct 2005 17:47:40 -0400 Subject: [nycphp-talk] about SecurityFocus Alerts In-Reply-To: References: Message-ID: <20051022214740.GA19317@panix.com> Howdy: On Sat, Oct 22, 2005 at 10:40:35PM +0100, Alberto dos Santos wrote: > Let me look at it from the bright side, no Joomla! alerts there... Sorry for the onslaught. I've been busy with loads of other things and just got a moment to (write a script that automatically generates the text, helping me to...) catch up. By the way, you can also catch these things in other formats: RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html See you, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From dmintz at davidmintz.org Sat Oct 22 18:03:24 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sat, 22 Oct 2005 18:03:24 -0400 (EDT) Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: <001001c5d74a$21934ae0$6401a8c0@GUITAR> References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> Message-ID: Bingo. Of course, the solution you suggest occurred to me as soon as I got into the shower and adjusted the water temperature to my liking. You know: step away from the machine, sir. Thanks. On Sat, 22 Oct 2005, John Daly wrote: > David, > > It looks like you're already setting the To: header when you set recipients > and use it as the first argument to 'send'. Leave out the $headers['To'] > and that should fix it. I'm not familiar with this class, but there might > be another association to set Name. > > JD > > ----- Original Message ----- > From: "David Mintz" > To: > Sent: Saturday, October 22, 2005 4:36 PM > Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity > > > > Anybody see anything wrong with this? > > $mailer = Mail::factory('mail'); > $recipients = 'dmintz at davidmintz.org'; > $headers['From'] = 'vernon at vernontbludgeon.com'; > $headers['To'] = '"David Mintz" '; > $headers['Subject'] = 'Test message'; > $body = "This test used the 'mail' backend and a To field that says: > $header[To]"; > true === $result = $mailer->send($recipients, $headers, $body) > or exit($result->getMessage()); > echo "ok\n" ; > ?> --- David Mintz http://davidmintz.org/ From jdaly at panix.com Sat Oct 22 18:09:52 2005 From: jdaly at panix.com (John Daly) Date: Sat, 22 Oct 2005 18:09:52 -0400 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> Message-ID: <003a01c5d755$53f67560$6401a8c0@GUITAR> Also, I tried it myself and found you can get the formatting you want by setting $recipients as follows, leaving out the $headers['To'] again. $recipients = "John Daly "; $headers['From'] = 'foo at bar.com'; //$headers['To'] = "John Daly "; ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Saturday, October 22, 2005 6:03 PM Subject: Re: [nycphp-talk] PEAR Mail and pine "To:" peculiarity Bingo. Of course, the solution you suggest occurred to me as soon as I got into the shower and adjusted the water temperature to my liking. You know: step away from the machine, sir. Thanks. On Sat, 22 Oct 2005, John Daly wrote: > David, > > It looks like you're already setting the To: header when you set > recipients > and use it as the first argument to 'send'. Leave out the $headers['To'] > and that should fix it. I'm not familiar with this class, but there might > be another association to set Name. > > JD > > ----- Original Message ----- > From: "David Mintz" > To: > Sent: Saturday, October 22, 2005 4:36 PM > Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity > > > > Anybody see anything wrong with this? > > $mailer = Mail::factory('mail'); > $recipients = 'dmintz at davidmintz.org'; > $headers['From'] = 'vernon at vernontbludgeon.com'; > $headers['To'] = '"David Mintz" '; > $headers['Subject'] = 'Test message'; > $body = "This test used the 'mail' backend and a To field that says: > $header[To]"; > true === $result = $mailer->send($recipients, $headers, $body) > or exit($result->getMessage()); > echo "ok\n" ; > ?> --- David Mintz http://davidmintz.org/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From codebowl at gmail.com Sat Oct 22 20:47:22 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 22 Oct 2005 20:47:22 -0400 Subject: [nycphp-talk] Alerts from SecurityFocus Newsletter #309 In-Reply-To: <20051022213457.25E1311F76A@mailspool2.panix.com> References: <20051022213457.25E1311F76A@mailspool2.panix.com> Message-ID: <8d9a42800510221747n7472f492o5d03f7fc386ff0b7@mail.gmail.com> wow that was a lot for one day ;D -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yournway at gmail.com Sun Oct 23 04:06:19 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Sun, 23 Oct 2005 09:06:19 +0100 Subject: [nycphp-talk] about SecurityFocus Alerts In-Reply-To: <20051022214740.GA19317@panix.com> References: <20051022214740.GA19317@panix.com> Message-ID: np On 22/10/05, Daniel Convissor wrote: > Howdy: > > On Sat, Oct 22, 2005 at 10:40:35PM +0100, Alberto dos Santos wrote: > > Let me look at it from the bright side, no Joomla! alerts there... > > Sorry for the onslaught. I've been busy with loads of other things and > just got a moment to (write a script that automatically generates the > text, helping me to...) catch up. > > By the way, you can also catch these things in other formats: > RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml > HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html > > See you, > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From tgales at tgaconnect.com Sun Oct 23 09:18:33 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 23 Oct 2005 09:18:33 -0400 Subject: [nycphp-talk] HAhahahahahahaha Message-ID: <435B8DA9.5020306@tgaconnect.com> shiflett at php.net writes: >Marc said a lot that we already know, but keep in mind that his words >carry a lot of weight in the business community, and they're not as >close to the technology as we are. If this stuff wasn't news to them, >it >wouldn't be getting this much attention. Its great that he is championing PHP. But in terms of what the 'business community' thinks of him, take a look at a weekly stock chart of OPSW (Opsware Inc) since Jan of '04. Jan 04 -- 9.00 Jan 05 -- 7.00 Recently - 5.00 'HAhahahahahahaha' sort of captures the spirit of it... -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com "There's nothing emerging right now. Creativity stopped in 1997." -- Marc Andreessen -- PC World, April 07, 2003 (around the 10th anniversary of Mosaic) From dmintz at davidmintz.org Sun Oct 23 15:02:54 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sun, 23 Oct 2005 15:02:54 -0400 (EDT) Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: <003a01c5d755$53f67560$6401a8c0@GUITAR> References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> <003a01c5d755$53f67560$6401a8c0@GUITAR> Message-ID: On Sat, 22 Oct 2005, John Daly wrote: > > Also, I tried it myself and found you can get the formatting you want by > setting $recipients as follows, leaving out the $headers['To'] again. > > > $recipients = "John Daly "; > $headers['From'] = 'foo at bar.com'; > //$headers['To'] = "John Daly "; Exactly what I did. Seems that's the "right" way to do it, and all the mail readers I worked with ~except~ pine were flexible enough to work with me doing it "wrong." One thing I'm not clear on (said he, modulating into another topic) is whether we are supposed to put double-quotes around "John Daly," to use your example. It appears that we are. Thanks again. --- David Mintz http://davidmintz.org/ From mitch.pirtle at gmail.com Sun Oct 23 20:26:37 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Sun, 23 Oct 2005 20:26:37 -0400 Subject: [nycphp-talk] about SecurityFocus Alerts In-Reply-To: References: Message-ID: <330532b60510231726g4e56e48ax940471f437a348d7@mail.gmail.com> On 10/22/05, Alberto dos Santos wrote: > Let me look at it from the bright side, no Joomla! alerts there... > Hey Mitch?, hehe Speaking of, one of the core developers was at a conference in Europe where they ran an analysis on Joomla! and gave up after about a half hour, with no major XSS issues found. Not to say that we have all holes plugged, but we difinitely could be doing worse ;-) -- Mitch Pirtle Joomla! Core Developer From ashaw at polymerdb.org Mon Oct 24 08:35:57 2005 From: ashaw at polymerdb.org (W. @llen Shaw) Date: Mon, 24 Oct 2005 07:35:57 -0500 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> <003a01c5d755$53f67560$6401a8c0@GUITAR> Message-ID: <435CD52D.5060100@polymerdb.org> David Mintz wrote: > One thing I'm not clear on (said he, modulating into another topic) is > whether we are supposed to put double-quotes around "John Daly," to use > your example. It appears that we are. Right, me too, though it seems to me that rfc 2822 (http://www.rfc-editor.org/rfc/rfc2822.txt) makes no mention of quoting the display-name. However, it is true that if your display-name has any special characters in it (this includes the "period" character ".", among other things) and you don't double-quote it, PEAR Mail is going to refuse to send it, saying "validation failed for W. Allen Shaw " Note this interesting snippet from RFC 2822: > Note: The "period" (or "full stop") character (".") in obs-phrase is > not a form that was allowed in earlier versions of this or any other > standard. Period (nor any other character from specials) was not > allowed in phrase because it introduced a parsing difficulty > distinguishing between phrases and portions of an addr-spec (see > section 4.4). It appears here because the period character is > currently used in many messages in the display-name portion of > addresses, especially for initials in names, and therefore must be > interpreted properly. In the future, period may appear in the > regular syntax of phrase. Apparently current email implementations are handling special characters in display-name on their own terms; I would think it's wise to use double-quotes around the display-name unless you know for sure they won't use special characters. BTW, I'm glad you asked, as it gave me finally the extra curiosity to learn more. Hopefully somebody will correct me if I'm wrong here. Take care, Allen -- Allen Shaw Polymer (http://polymerdb.org) From cliff at pinestream.com Mon Oct 24 09:14:32 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 24 Oct 2005 09:14:32 -0400 Subject: [nycphp-talk] admin user/role management Message-ID: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> It's time for me to change my admin section to more than yep/nay. Does anyone know of an example of a comprehensive roles-based admin system. I looked at the PEAR auth library, but didn't see anything. Cliff Hirsch -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Mon Oct 24 09:14:32 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 24 Oct 2005 09:14:32 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference Message-ID: <000901c5d89c$e1fa1d10$0ca8a8c0@CHirschLaptop> Presented during a NASA rapid application development talk. Very, very interesting Framework. Worth looking into. http://www.qcodo.com/ Cliff Hirsch -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Mon Oct 24 09:24:08 2005 From: ken at secdat.com (Kenneth Downs) Date: Mon, 24 Oct 2005 09:24:08 -0400 (EDT) Subject: [nycphp-talk] admin user/role management In-Reply-To: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> References: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> Message-ID: <35641.38.117.147.25.1130160248.squirrel@38.117.147.25> If you are using a database-centric design, you can do something like this: Table of groups (roles) Table of modules Table of tables Xref groups to modules Xref groups to tables A group has default priveleges of ins, upd, del, sel. The "Xref groups to modules" overrides group settings for a module. the "Xref groups to tables" further overrides at the table level. If you want to start off a little simpler, just to a table of roles and a table of tables. > It's time for me to change my admin section to more than yep/nay. Does > anyone know of an example of a comprehensive roles-based admin system. I > looked at the PEAR auth library, but didn't see anything. > > Cliff Hirsch > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From dcech at phpwerx.net Mon Oct 24 09:25:42 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 24 Oct 2005 09:25:42 -0400 Subject: [nycphp-talk] admin user/role management In-Reply-To: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> References: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> Message-ID: <435CE0D6.5030500@phpwerx.net> Cliff, You may be interested in phpGACL (http://phpgacl.sourceforge.net/), which provides a framework for building very powerful ACL-based permission structures. Dan Cliff Hirsch wrote: > It's time for me to change my admin section to more than yep/nay. Does > anyone know of an example of a comprehensive roles-based admin system. I > looked at the PEAR auth library, but didn't see anything. > > Cliff Hirsch From dallas.devries at gmail.com Mon Oct 24 09:30:17 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Mon, 24 Oct 2005 09:30:17 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <000901c5d89c$e1fa1d10$0ca8a8c0@CHirschLaptop> References: <000901c5d89c$e1fa1d10$0ca8a8c0@CHirschLaptop> Message-ID: <1200dbac0510240630v663288c7o741a5a053ea77404@mail.gmail.com> Easily the best session at the conference. It only works with MySQL right now but creating additional db sources doesn't look too bad. On 10/24/05, Cliff Hirsch wrote: > > Presented during a NASA rapid application development talk. Very, very > interesting Framework. Worth looking into. > http://www.qcodo.com/ > Cliff Hirsch > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at genoverly.net Mon Oct 24 10:26:41 2005 From: lists at genoverly.net (michael) Date: Mon, 24 Oct 2005 10:26:41 -0400 Subject: [nycphp-talk] http analyzer In-Reply-To: References: Message-ID: <20051024102641.7964f19f@genoverly.com> On Thu, 04 Aug 2005 09:43:40 -0400 talk-request at lists.nyphp.org wrote: > http://www.portswigger.net/proxy/ > http://www.xk72.com/charles/ I'm revisitting this thread. While the above mentioned http analyzers are java based, I like their functionality. I've been poking around freshmeat searching for 'http' or 'proxy' but nothing is jumping out at me. Does anyone have any suggestions for non-java solutions.. aside from telnet? Michael From codebowl at gmail.com Mon Oct 24 10:31:53 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 24 Oct 2005 10:31:53 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <1200dbac0510240630v663288c7o741a5a053ea77404@mail.gmail.com> References: <000901c5d89c$e1fa1d10$0ca8a8c0@CHirschLaptop> <1200dbac0510240630v663288c7o741a5a053ea77404@mail.gmail.com> Message-ID: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> Drawback is that most clients now dont want to move to php5, some hosts dont support it etc.. this is why i have not adapted PRADO yet ;( -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From max at neuropunks.org Mon Oct 24 10:30:00 2005 From: max at neuropunks.org (Max Gribov) Date: Mon, 24 Oct 2005 10:30:00 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem Message-ID: <435CEFE8.7000309@neuropunks.org> Hello, I am having an authentication issue with phpmyadmin 2.6.4-pl3. The auth mechanism is set to 'cookie', but I cannot get any users to login. I get 051024 9:19:53 31443 Connect pmacontrol at xxx.xxx.xxx.xxx on 31443 Query SELECT VERSION() AS version 31444 Connect Access denied for user: 'user at xxx.xxx.xxx.xxx' (Using password: YES) in the log file. MySQL stores all user passwords using its internal password('password') function. Proper access lists are defined for both pmacontrol at ip and for user at ip I ran all GRANT statements from documentation. pmacontrol user, as well as the user Im trying to use, are able to login from the host with mysql -h db -u user -p command, I tested it, and I can do select's on mysql database. config.inc.php for phpmyadmin: $cfg['PmaAbsoluteUri'] = 'https://mysql.xxx.com/'; $cfg['blowfish_secret'] = 'bw_password'; $cfg['Servers'][$i]['host'] = 'db'; $cfg['Servers'][$i]['controluser'] = 'pmacontroluser'; $cfg['Servers'][$i]['controlpass'] = 'password'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = ''; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; Everything else is default, database phpmyadmin exists (not really relevant for this it seems), my browser works fine with cookies. I followed all the instructions from documentation, did a bunch of flush privileges; from mysql, but still nothing works. Can anyone shed some light on this? Thank you very much! max From cliff at pinestream.com Mon Oct 24 10:58:23 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 24 Oct 2005 10:58:23 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> Message-ID: <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> Seems like few hosts do support it. But a BIG part of the conference, heard time and time again from many presenters, was how wonderful PHP 5 is -- and for that matter, the new MySQL 5. Seems to me that if you have enough clients, managing a dedicated server might be a good alternative. Or even talk them into it. For a business -- a few hundred bucks a month doesn't seem to bad. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Joseph Crawford Sent: Monday, October 24, 2005 10:32 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Qcodo Framework -- from Zend Conference Drawback is that most clients now dont want to move to php5, some hosts dont support it etc.. this is why i have not adapted PRADO yet ;( -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.loiselle at gmail.com Mon Oct 24 11:09:27 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 24 Oct 2005 11:09:27 -0400 Subject: [nycphp-talk] admin user/role management In-Reply-To: <435CE0D6.5030500@phpwerx.net> References: <000201c5d89c$e08b4ad0$0ca8a8c0@CHirschLaptop> <435CE0D6.5030500@phpwerx.net> Message-ID: <4b1887110510240809y651579cbtb8f3b0516b492b48@mail.gmail.com> Don't forget PEAR:LiveUser. I'm about to embark upon this same road today. Lukas Smith wrote a good article for PHP Magazine explaining its usage a little. http://www.php-mag.net/itr/online_artikel/psecom,id,595,nodeid,114.html --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From rsd at electronink.com Mon Oct 24 11:14:23 2005 From: rsd at electronink.com (Russ Demarest) Date: Mon, 24 Oct 2005 11:14:23 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem In-Reply-To: <435CEFE8.7000309@neuropunks.org> References: <435CEFE8.7000309@neuropunks.org> Message-ID: <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> I had a similar problem. The mysql client was not the same version as the server. I upgraded and the problem went away. Good Luck, On Oct 24, 2005, at 10:30 AM, Max Gribov wrote: > Hello, > I am having an authentication issue with phpmyadmin 2.6.4-pl3. > The auth mechanism is set to 'cookie', but I cannot get any users > to login. > I get > > 051024 9:19:53 31443 Connect pmacontrol at xxx.xxx.xxx.xxx on > 31443 Query SELECT VERSION() AS version > 31444 Connect Access denied for user: 'user at xxx.xxx.xxx.xxx' (Using > password: YES) > > in the log file. > MySQL stores all user passwords using its internal password > ('password') > function. Proper access lists are defined for both pmacontrol at ip > and for > user at ip > I ran all GRANT statements from documentation. > pmacontrol user, as well as the user Im trying to use, are able to > login > from the host with mysql -h db -u user -p command, I tested it, and I > can do select's on mysql database. > > config.inc.php for phpmyadmin: > > $cfg['PmaAbsoluteUri'] = 'https://mysql.xxx.com/'; > $cfg['blowfish_secret'] = 'bw_password'; > $cfg['Servers'][$i]['host'] = 'db'; > $cfg['Servers'][$i]['controluser'] = 'pmacontroluser'; > $cfg['Servers'][$i]['controlpass'] = 'password'; > $cfg['Servers'][$i]['auth_type'] = 'cookie'; > $cfg['Servers'][$i]['user'] = ''; > $cfg['Servers'][$i]['password'] = ''; > $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; > > Everything else is default, database phpmyadmin exists (not really > relevant for this it seems), my browser works fine with cookies. > I followed all the instructions from documentation, did a bunch of > flush > privileges; from mysql, but still nothing works. > Can anyone shed some light on this? > > Thank you very much! > max > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > From rolan at omnistep.com Mon Oct 24 11:31:16 2005 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 24 Oct 2005 11:31:16 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem In-Reply-To: <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> References: <435CEFE8.7000309@neuropunks.org> <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> Message-ID: <435CFE44.1010506@omnistep.com> It is not necessary to upgrade the mysql client, but you do have to jump through an extra hoop to get it working. do an update user set password=old_password('yourpassword') where user='user at xxx.xxx.xxx.xxx'; to the "mysql" database as the root/admin user. An alternative way is to add "old_passwords" to your my.cnf file then restart mysql. ~Rolan Russ Demarest wrote: >I had a similar problem. The mysql client was not the same version as >the server. I upgraded and the problem went away. > > >On Oct 24, 2005, at 10:30 AM, Max Gribov wrote: > > >>Hello, >>I am having an authentication issue with phpmyadmin 2.6.4-pl3. >>The auth mechanism is set to 'cookie', but I cannot get any users >>to login. >>I get >> >>051024 9:19:53 31443 Connect pmacontrol at xxx.xxx.xxx.xxx on >>31443 Query SELECT VERSION() AS version >>31444 Connect Access denied for user: 'user at xxx.xxx.xxx.xxx' (Using >>password: YES) >> >> >> > > From rolan at omnistep.com Mon Oct 24 11:31:51 2005 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 24 Oct 2005 11:31:51 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem In-Reply-To: <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> References: <435CEFE8.7000309@neuropunks.org> <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> Message-ID: <435CFE67.3080307@omnistep.com> There seems to be a lot of discussion about this on http://us3.php.net/function.mysql-connect Go there for more ideas. Russ Demarest wrote: >I had a similar problem. The mysql client was not the same version as >the server. I upgraded and the problem went away. > > > > > From jeff.loiselle at gmail.com Mon Oct 24 11:40:42 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 24 Oct 2005 11:40:42 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> Message-ID: <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> > Seems to me that if you have enough > clients, managing a dedicated server might be a good alternative. Or even > talk them into it. For a business -- a few hundred bucks a month doesn't > seem to bad. It gets even as cheap as $30/month at Serverpronto.com whom I use. However, don't forget all the administration time. Managing a server is also a full time job, especially when you're managing mail and all its associated problems, and not to mention customer support. I've been bitten in the ass by this problem before. --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From max at neuropunks.org Mon Oct 24 11:42:23 2005 From: max at neuropunks.org (Max Gribov) Date: Mon, 24 Oct 2005 11:42:23 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem In-Reply-To: <435CFE67.3080307@omnistep.com> References: <435CEFE8.7000309@neuropunks.org> <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> <435CFE67.3080307@omnistep.com> Message-ID: <435D00DF.9040302@neuropunks.org> Just tried this. Still no effect after running this SQL query, and more, when i put old_passwords into my.cnf or run mysql with --old-passwords and try to shutdown and then start mysql, it fails to start, with no errors in any log files, but once I remove that, it starts fine. Also, at that link it talks about PHP's incompatibility with MySQL's 4.1 and up passwords, but this is PHP5 with MySQL 4.0.18, and I know password authentication works for other applications on that host written in PHP and using that database.. Russ, both client and server are same version.. I am upgrading MySQL to 5, its a shot in the dark, but maybe that will solve this issue. Other than that, I am totally stumped.. Rolan Yang wrote: >There seems to be a lot of discussion about this on >http://us3.php.net/function.mysql-connect >Go there for more ideas. > >Russ Demarest wrote: > > > >>I had a similar problem. The mysql client was not the same version as >>the server. I upgraded and the problem went away. >> >> >> >> >> >> >> >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From chsnyder at gmail.com Mon Oct 24 11:55:17 2005 From: chsnyder at gmail.com (csnyder) Date: Mon, 24 Oct 2005 11:55:17 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> Message-ID: On 10/24/05, Jeff Loiselle wrote: > > Seems to me that if you have enough > > clients, managing a dedicated server might be a good alternative. Or even > > talk them into it. For a business -- a few hundred bucks a month doesn't > > seem to bad. > > It gets even as cheap as $30/month at Serverpronto.com whom I use. > > However, don't forget all the administration time. Managing a server > is also a full time job, especially when you're managing mail and all > its associated problems, and not to mention customer support. I've > been bitten in the ass by this problem before. > It depends on your setup, of course. If you use a stable OS and outsource your email you can reduce your system administration overhead to 1-2 hours per month. It's only a full time job when you are setting up a new client or something goes wrong. -- Chris Snyder http://chxo.com/ From yournway at gmail.com Mon Oct 24 11:59:54 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 24 Oct 2005 16:59:54 +0100 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> Message-ID: Anybody tried it, Qcodo? I've just installed it and it keeps saying: Fatal error: Class 'MySqli' not found in F:\projectos\qCodo\includes\qcodo\database_adapters\MySqliDatabase.inc on line 113 Now, everything is as it should be, acording to the readme file. Clues, anyone? I'm using the latest xampp, apache2 php5, and so on and so forth. Demo looks great, though, hehe. Thanks. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From shiflett at php.net Mon Oct 24 12:01:27 2005 From: shiflett at php.net (Chris Shiflett) Date: Mon, 24 Oct 2005 12:01:27 -0400 Subject: [nycphp-talk] http analyzer In-Reply-To: <20051024102641.7964f19f@genoverly.com> References: <20051024102641.7964f19f@genoverly.com> Message-ID: <435D0557.6070208@php.net> michael wrote: > > http://www.portswigger.net/proxy/ > > http://www.xk72.com/charles/ > > I'm revisitting this thread. > > While the above mentioned http analyzers are java based, I like > their functionality. I've been poking around freshmeat searching > for 'http' or 'proxy' but nothing is jumping out at me. > > Does anyone have any suggestions for non-java solutions.. aside > from telnet? Have you looked at LiveHTTPHeaders? It's a Firefox plugin rather than a proxy, but it's good enough for most situations. I find it a tad frustrating when I need to view the content, and there are some other things that annoy me, but it's worth checking out. There's also this: http://sourceforge.net/projects/protoscope/ I wrote it back in the late 90s and reworked it a bit a few years later. It's nothing great, but it works most of the time. :-) Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From jeff.loiselle at gmail.com Mon Oct 24 12:02:24 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 24 Oct 2005 12:02:24 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> Message-ID: <4b1887110510240902i3774b6cg71a4dfe00d9724a9@mail.gmail.com> Does it require the ext/mysqli php extension? On 10/24/05, Alberto dos Santos wrote: > Anybody tried it, Qcodo? > > I've just installed it and it keeps saying: > > Fatal error: Class 'MySqli' not found in > F:\projectos\qCodo\includes\qcodo\database_adapters\MySqliDatabase.inc > on line 113 > > Now, everything is as it should be, acording to the readme file. > > Clues, anyone? > > I'm using the latest xampp, apache2 php5, and so on and so forth. > > Demo looks great, though, hehe. > > Thanks. > > -- > Alberto dos Santos > Consultor em TI > IT Consultant > > http://www.yournway.com > A internet ? sua maneira. > The Internet your own way. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From shiflett at php.net Mon Oct 24 12:02:50 2005 From: shiflett at php.net (Chris Shiflett) Date: Mon, 24 Oct 2005 12:02:50 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> Message-ID: <435D05AA.30702@php.net> Alberto dos Santos wrote: > Fatal error: Class 'MySqli' not found in > F:\projectos\qCodo\includes\qcodo\database_adapters\MySqliDatabase.inc > on line 113 Sounds to me like you need mysqli or need to choose another database adapter. :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From dallas.devries at gmail.com Mon Oct 24 12:04:43 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Mon, 24 Oct 2005 12:04:43 -0400 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <4b1887110510240902i3774b6cg71a4dfe00d9724a9@mail.gmail.com> References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> <4b1887110510240902i3774b6cg71a4dfe00d9724a9@mail.gmail.com> Message-ID: <1200dbac0510240904n6992d4e5h9da6604c5d794a8a@mail.gmail.com> http://qcodo.com/forums/topic.php/2 On 10/24/05, Jeff Loiselle wrote: > > Does it require the ext/mysqli php extension? > > On 10/24/05, Alberto dos Santos wrote: > > Anybody tried it, Qcodo? > > > > I've just installed it and it keeps saying: > > > > Fatal error: Class 'MySqli' not found in > > F:\projectos\qCodo\includes\qcodo\database_adapters\MySqliDatabase.inc > > on line 113 > > > > Now, everything is as it should be, acording to the readme file. > > > > Clues, anyone? > > > > I'm using the latest xampp, apache2 php5, and so on and so forth. > > > > Demo looks great, though, hehe. > > > > Thanks. > > > > -- > > Alberto dos Santos > > Consultor em TI > > IT Consultant > > > > http://www.yournway.com > > A internet ? sua maneira. > > The Internet your own way. > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > -- > --- > Jeff Loiselle > Web Developer, Musician, and Observer > http://jeff.loiselles.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yournway at gmail.com Mon Oct 24 12:14:20 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 24 Oct 2005 17:14:20 +0100 Subject: [nycphp-talk] Qcodo Framework -- from Zend Conference In-Reply-To: <1200dbac0510240904n6992d4e5h9da6604c5d794a8a@mail.gmail.com> References: <8d9a42800510240731h2c5aa11g42c2d21eaa148e24@mail.gmail.com> <001c01c5d8ab$658f3b20$0ca8a8c0@CHirschLaptop> <4b1887110510240840ha5928d9pce5f5407c563f9e0@mail.gmail.com> <4b1887110510240902i3774b6cg71a4dfe00d9724a9@mail.gmail.com> <1200dbac0510240904n6992d4e5h9da6604c5d794a8a@mail.gmail.com> Message-ID: Doh!!!! I've added msqli.dll on php.ini, and VROUUUUMMMM! Thanks Chris, Jeff and Dallas. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From rolan at omnistep.com Mon Oct 24 12:21:25 2005 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 24 Oct 2005 12:21:25 -0400 Subject: [nycphp-talk] phpMyAdmin 2.6.4-pl3 problem In-Reply-To: <435D00DF.9040302@neuropunks.org> References: <435CEFE8.7000309@neuropunks.org> <050FDC09-B09F-4758-98D4-41D49FB51581@electronink.com> <435CFE67.3080307@omnistep.com> <435D00DF.9040302@neuropunks.org> Message-ID: <435D0A05.8080805@omnistep.com> oops. I forgot to mention, after making changes you have to do a "flush privileges" to refresh the tables. ~Rolan Max Gribov wrote: >Just tried this. >Still no effect after running this SQL query, and more, when i put >old_passwords into my.cnf or run mysql with --old-passwords and try to >shutdown and then start mysql, it fails to start, with no errors in any >log files, but once I remove that, it starts fine. > > > > From lists at zaunere.com Mon Oct 24 12:20:31 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 24 Oct 2005 12:20:31 -0400 Subject: [nycphp-talk] Long MySQL processes, connections In-Reply-To: <6C52C4A2-D964-4A7A-A388-CE794EFFFFDF@matt-roberts.net> Message-ID: <000001c5d8b6$dd8b5270$3dd9a8c0@MZ> Matt Roberts wrote on Saturday, October 22, 2005 4:15 PM: > I'm using mysql_connect() to access a MySQL database at the beginning > of a PHP script. > > This script does long process of a large recordset, and generally > takes 30-40 minutes to process all records. > > My question: what's the best way to handle this long connection? > Could someone please explain the behind the scenes / best practice > around MySQL var "wait_timeout" ? Sometimes the process hangs - > could it be related to this timeout variable? As a workaround I > connect and disconnect at the top and bottom of the processing loop - > is this a bad idea? I'd need more details to truly diagnose this (or even determine if there's something wrong). That said, wait_timeout isn't likely playing a role here. It controls the timeout for inactive/idle connections. The process hangs could be from a number of things, including hardware limitations, large tasks during the course of normal processing, contension, etc. Again, without knowing what type of processing is being done, it's not easy to determine what the problem is, and frankly, if there is even a problem at all. Depending on how many rows you're dealing with, the timeframe might be ok. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From cliff at pinestream.com Mon Oct 24 12:28:02 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 24 Oct 2005 12:28:02 -0400 Subject: [nycphp-talk] admin user/role management In-Reply-To: <4b1887110510240809y651579cbtb8f3b0516b492b48@mail.gmail.com> Message-ID: <000001c5d8b7$e78931b0$0ca8a8c0@CHirschLaptop> Thanks. LiveUser looks like the ticket, although a lot to digest. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Loiselle Sent: Monday, October 24, 2005 11:09 AM To: NYPHP Talk Subject: Re: [nycphp-talk] admin user/role management Don't forget PEAR:LiveUser. I'm about to embark upon this same road today. Lukas Smith wrote a good article for PHP Magazine explaining its usage a little. http://www.php-mag.net/itr/online_artikel/psecom,id,595,nodeid,114.html --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From lists at genoverly.net Mon Oct 24 12:30:28 2005 From: lists at genoverly.net (michael) Date: Mon, 24 Oct 2005 12:30:28 -0400 Subject: [nycphp-talk] http analyzer In-Reply-To: <435D0557.6070208@php.net> References: <20051024102641.7964f19f@genoverly.com> <435D0557.6070208@php.net> Message-ID: <20051024123028.295318e0@genoverly.com> On Mon, 24 Oct 2005 12:01:27 -0400 Chris Shiflett wrote: > michael wrote: > > > http://www.portswigger.net/proxy/ > > > http://www.xk72.com/charles/ > > > > I'm revisitting this thread. > > > > While the above mentioned http analyzers are java based, I like > > their functionality. I've been poking around freshmeat searching > > for 'http' or 'proxy' but nothing is jumping out at me. > > > > Does anyone have any suggestions for non-java solutions.. aside > > from telnet? > > Have you looked at LiveHTTPHeaders? It's a Firefox plugin rather than > a proxy, but it's good enough for most situations. I find it a tad > frustrating when I need to view the content, and there are some other > things that annoy me, but it's worth checking out. ah.. should work well enough, thanks. > There's also this: http://sourceforge.net/projects/protoscope/ > I wrote it back in the late 90s and reworked it a bit a few years > later. It's nothing great, but it works most of the time. :-) yea, saw that.. I'm reading your 'http dev handbook' right now. > Hope that helps. > > Chris Thanks again, Michael From cliff at pinestream.com Mon Oct 24 14:20:48 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 24 Oct 2005 14:20:48 -0400 Subject: [nycphp-talk] LAMP Scaling from Zend/Flicker Presentation Message-ID: <009f01c5d8c7$acdddd80$0ba8a8c0@cliff> Now that you're all having fun with Qcodo, you really need to take a look at this. Ok, so it will cost a bit more than a $30 cheapo dedicated server. John Allspaw of Yahoo/Flicker gave a great presentation on serious LAMP scaling infrastructure, starting with a single server and growing to multiple servers, MySQL farms, load balancers and such, along with the problems incurred along the way. See: http://blog.flickr.com/flickrblog/2005/10/lamp.html Click on the " Hardware Layouts for LAMP Installations" link. Cliff Hirsch -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at matt-roberts.net Mon Oct 24 14:47:41 2005 From: matt at matt-roberts.net (Matt Roberts) Date: Mon, 24 Oct 2005 14:47:41 -0400 (EDT) Subject: [nycphp-talk] Long MySQL processes, connections Message-ID: <59465.199.67.140.20.1130179661.squirrel@matt-roberts.net> >I'd need more details to truly diagnose this (or even determine if there's >something wrong). Thanks Hans, I did some performance tuning around my queries based on advice from this: http://www.databasejournal.com/features/mysql/article.php/1382791 It seems to have sped up the routine significantly. To boil it down to a "best practice" question: of the following two routines, what is preferable in the general case? Process A: --------------------- Connect to mysql for (~ 10k iterations){ Query larger (500k rows) table in mysql Insert into same mysql } Disconnect from mysql --------------------- Process B --------------------- for (~ 10k iterations){ Connect to mysql Query larger (500k rows) table in mysql Insert into same mysql Disconnect to mysql } ---------------------- I've generally seen process A in all books I've read, but in my particular example process B *seems* less error prone (but as you say Hans, it may depend on many other details I'm leaving out here) However, B looks kind of dumb and expensive to me - how costly is the connect / disconnect operation? ---------------- m. roberts matt at matt-roberts.net From leegold at fastmail.fm Tue Oct 25 13:40:01 2005 From: leegold at fastmail.fm (leegold) Date: Tue, 25 Oct 2005 13:40:01 -0400 Subject: [nycphp-talk] make thumbs from video files Message-ID: <1130262001.5990.245987975@webmail.messagingengine.com> Hi, Is there a way using PHP to make jpeg thumbs out of quicktime or windows media files? Preferably a batch job on a folder... Thanks, Lee G From jdj at TruthOverComfort.com Tue Oct 25 13:44:22 2005 From: jdj at TruthOverComfort.com (Jim Johnson) Date: Tue, 25 Oct 2005 13:44:22 -0400 Subject: [nycphp-talk] out-of-town inquiry: anybody here from the greater DC area? Message-ID: <5.2.0.9.0.20051025133541.05cfaea8@mail.sligowebworks.com> I'm one of a few folks trying to get some PHP community going here in the DC area.....with such a vibrant group as NYPHP just a short distance away, I'm hoping to find people on this list that may have been banished or otherwise find themselves in DC....we also have some high hopes and grand visions of getting the feds to do more open source in general and more PHP in particular..... Any DC-area people, please give me a holler off-list.....thanks..... Jim http://public.xdi.org/=jdj -- I saw the angel in the marble and carved until I set him free. - Michelangelo From ken at secdat.com Tue Oct 25 14:24:33 2005 From: ken at secdat.com (Kenneth Downs) Date: Tue, 25 Oct 2005 14:24:33 -0400 (EDT) Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <1130262001.5990.245987975@webmail.messagingengine.com> References: <1130262001.5990.245987975@webmail.messagingengine.com> Message-ID: <33011.38.117.147.25.1130264673.squirrel@38.117.147.25> The online manual is great for keyword searches. There are plenty of functions to manipulate images, so you may also find something to do snapshots out of vids. > Hi, > > Is there a way using PHP to make jpeg thumbs out of quicktime or windows > media files? > Preferably a batch job on a folder... > > Thanks, > Lee G > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From chsnyder at gmail.com Tue Oct 25 15:18:58 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 25 Oct 2005 15:18:58 -0400 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <1130262001.5990.245987975@webmail.messagingengine.com> References: <1130262001.5990.245987975@webmail.messagingengine.com> Message-ID: On 10/25/05, leegold wrote: > Hi, > > Is there a way using PHP to make jpeg thumbs out of quicktime or windows > media files? > Preferably a batch job on a folder... > This is a big can of worms, due to the very large number of different video codecs out there. Within the separate universes of QuickTime and Windows Media, there are mpeg, mpeg2, mpeg4, motion-jpeg, DivX, h264, Indio, Sorenson, etc etc etc. Additionally, which frame do you choose to make the thumbnail from? The first? It's often black. QuickTime files sometimes have a set "poster frame" that the author has designated as a representative still image. The same may be true of Windows Media files, I don't know. Google has obviously managed to solve this problem, though, see http://video.google.com/ -- Chris Snyder http://chxo.com/ From rolan at omnistep.com Tue Oct 25 16:45:51 2005 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 25 Oct 2005 16:45:51 -0400 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: References: <1130262001.5990.245987975@webmail.messagingengine.com> Message-ID: <435E997F.8030702@omnistep.com> csnyder wrote: >On 10/25/05, leegold wrote: > > >>Hi, >> >>Is there a way using PHP to make jpeg thumbs out of quicktime or windows >>media files? >>Preferably a batch job on a folder... >> >> >> > >This is a big can of worms, due to the very large number of different >video codecs out there. Within the separate universes of QuickTime and >Windows Media, there are mpeg, mpeg2, mpeg4, motion-jpeg, DivX, h264, >Indio, Sorenson, etc etc etc. > >Additionally, which frame do you choose to make the thumbnail from? >The first? It's often black. QuickTime files sometimes have a set >"poster frame" that the author has designated as a representative >still image. The same may be true of Windows Media files, I don't >know. > > > It's probably only a small can of worms though. There are only a handful of popular codec's to tackle. I don't think it's exculsively a php job though. There are a few windows and linux video "rippers" which will convert video to frames. Usenet binaries has been doing it for a long time now. Check out an example at: http://www.usenetbinaries.com/groups/alt.binaries.mpeg.videos/2005/10/24/h/1v.html Another video.google.com example would be www.youtube.com ~Rolan From cliff at pinestream.com Tue Oct 25 17:01:01 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Tue, 25 Oct 2005 17:01:01 -0400 Subject: [nycphp-talk] Implode a column of a multi-dim array Message-ID: <002a01c5d9a7$34f16bd0$0ba8a8c0@cliff> I am trying to implode one column of a multidimensional array: $array = array[]['name']; implode("string", $array[]['name']); Is there a simple function for extracting a single column of a multidimensional array other than using a foreach statement? Cliff Hirsch -------------- next part -------------- An HTML attachment was scrubbed... URL: From leegold at fastmail.fm Tue Oct 25 17:43:05 2005 From: leegold at fastmail.fm (leegold) Date: Tue, 25 Oct 2005 17:43:05 -0400 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <435E997F.8030702@omnistep.com> References: <1130262001.5990.245987975@webmail.messagingengine.com> <435E997F.8030702@omnistep.com> Message-ID: <1130276585.30312.246007578@webmail.messagingengine.com> > > > >>Hi, > >> > >>Is there a way using PHP to make jpeg thumbs out of quicktime or windows > >>media files? > >>Preferably a batch job on a folder... > >> ....snip... Check out an example at: > http://www.usenetbinaries.com/groups/alt.binaries.mpeg.videos/2005/10/24/h/1v.html > > Another video.google.com example would be www.youtube.com > You would think there'd be a PHP class or script does does this... I looked thru the manual but doesn't seem like a function that does it out of the "starting gate"... Thanks, Lee G. From rcozzol at optonline.net Tue Oct 25 17:55:49 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Tue, 25 Oct 2005 17:55:49 -0400 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <1130276585.30312.246007578@webmail.messagingengine.com> References: <1130262001.5990.245987975@webmail.messagingengine.com> <435E997F.8030702@omnistep.com> <1130276585.30312.246007578@webmail.messagingengine.com> Message-ID: <435EA9E5.8030801@optonline.net> This is not trivial and requires you to either manually learn some of the codecs or use plugin libraries. I don't really think this is something php is well suited for a believe writing an app in something like C with some of the standard libraries compiled in would be best.. leegold wrote: >>>>Hi, >>>> >>>>Is there a way using PHP to make jpeg thumbs out of quicktime or windows >>>>media files? >>>>Preferably a batch job on a folder... >>>> >>>> >>>> >....snip... >Check out an example at: > > >>http://www.usenetbinaries.com/groups/alt.binaries.mpeg.videos/2005/10/24/h/1v.html >> >>Another video.google.com example would be www.youtube.com >> >> >> > >You would think there'd be a PHP class or script does does this... > >I looked thru the manual but doesn't seem like a function that does it >out of the "starting gate"... > >Thanks, >Lee G. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From ken at secdat.com Tue Oct 25 18:03:33 2005 From: ken at secdat.com (Kenneth Downs) Date: Tue, 25 Oct 2005 18:03:33 -0400 (EDT) Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <435EA9E5.8030801@optonline.net> References: <1130262001.5990.245987975@webmail.messagingengine.com> <435E997F.8030702@omnistep.com> <1130276585.30312.246007578@webmail.messagingengine.com> <435EA9E5.8030801@optonline.net> Message-ID: <33405.38.117.147.25.1130277813.squirrel@38.117.147.25> Well don't forget though that PHP is a wonderful glue language, using backtick and exec you can run any existing CLI interface to any known library. ...if you're on linux of course. > This is not trivial and requires you to either manually learn some of > the codecs or use plugin libraries. I don't really think this is > something php is well suited for a believe writing an app in something > like C with some of the standard libraries compiled in would be best.. > > leegold wrote: > >>>>>Hi, >>>>> >>>>>Is there a way using PHP to make jpeg thumbs out of quicktime or >>>>> windows >>>>>media files? >>>>>Preferably a batch job on a folder... >>>>> >>>>> >>>>> >>....snip... >>Check out an example at: >> >> >>>http://www.usenetbinaries.com/groups/alt.binaries.mpeg.videos/2005/10/24/h/1v.html >>> >>>Another video.google.com example would be www.youtube.com >>> >>> >>> >> >>You would think there'd be a PHP class or script does does this... >> >>I looked thru the manual but doesn't seem like a function that does it >>out of the "starting gate"... >> >>Thanks, >>Lee G. >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >> > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From rcozzol at optonline.net Tue Oct 25 18:08:42 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Tue, 25 Oct 2005 18:08:42 -0400 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <33405.38.117.147.25.1130277813.squirrel@38.117.147.25> References: <1130262001.5990.245987975@webmail.messagingengine.com> <435E997F.8030702@omnistep.com> <1130276585.30312.246007578@webmail.messagingengine.com> <435EA9E5.8030801@optonline.net> <33405.38.117.147.25.1130277813.squirrel@38.117.147.25> Message-ID: <435EACEA.9030109@optonline.net> great point ... if you can find apps that take care of this for you then use php to call, log, manage and run everytyhing. If you plan on building from scratch ... well ... that might be a but difficult. Kenneth Downs wrote: >Well don't forget though that PHP is a wonderful glue language, using >backtick and exec you can run any existing CLI interface to any known >library. > >...if you're on linux of course. > > > >>This is not trivial and requires you to either manually learn some of >>the codecs or use plugin libraries. I don't really think this is >>something php is well suited for a believe writing an app in something >>like C with some of the standard libraries compiled in would be best.. >> >>leegold wrote: >> >> >> >>>>>>Hi, >>>>>> >>>>>>Is there a way using PHP to make jpeg thumbs out of quicktime or >>>>>>windows >>>>>>media files? >>>>>>Preferably a batch job on a folder... >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>....snip... >>>Check out an example at: >>> >>> >>> >>> >>>>http://www.usenetbinaries.com/groups/alt.binaries.mpeg.videos/2005/10/24/h/1v.html >>>> >>>>Another video.google.com example would be www.youtube.com >>>> >>>> >>>> >>>> >>>> >>>You would think there'd be a PHP class or script does does this... >>> >>>I looked thru the manual but doesn't seem like a function that does it >>>out of the "starting gate"... >>> >>>Thanks, >>>Lee G. >>>_______________________________________________ >>>New York PHP Talk Mailing List >>>AMP Technology >>>Supporting Apache, MySQL and PHP >>>http://lists.nyphp.org/mailman/listinfo/talk >>>http://www.nyphp.org >>> >>> >>> >>> >>> >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >> > > > > From rich at f1central.net Tue Oct 25 18:55:34 2005 From: rich at f1central.net (rich) Date: Wed, 26 Oct 2005 00:55:34 +0200 Subject: [nycphp-talk] make thumbs from video files In-Reply-To: <1130262001.5990.245987975@webmail.messagingengine.com> References: <1130262001.5990.245987975@webmail.messagingengine.com> Message-ID: <435EB7E6.7090602@f1central.net> leegold wrote: >Hi, > >Is there a way using PHP to make jpeg thumbs out of quicktime or windows >media files? >Preferably a batch job on a folder... > >Thanks, >Lee G >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > > how about this ... http://ffmpeg-php.sourceforge.net/ cheers rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at jobsforge.com Tue Oct 25 20:30:48 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Tue, 25 Oct 2005 20:30:48 -0400 Subject: [nycphp-talk] google down? Message-ID: off topic here but c'mon , For the first time ever I can't bring google up anyone else? quick From ken at secdat.com Tue Oct 25 20:49:40 2005 From: ken at secdat.com (Kenneth Downs) Date: Tue, 25 Oct 2005 20:49:40 -0400 (EDT) Subject: [nycphp-talk] google down? In-Reply-To: References: Message-ID: <33651.38.117.147.25.1130287780.squirrel@38.117.147.25> had some trouble with DNS, could not seem to find it. This suggests something is wrong in DNS. > > off topic here but c'mon , > > For the first time ever I can't bring google up anyone else? quick > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From papillion at gmail.com Tue Oct 25 21:56:02 2005 From: papillion at gmail.com (Anthony Papillion) Date: Tue, 25 Oct 2005 20:56:02 -0500 Subject: [nycphp-talk] google down? In-Reply-To: <33651.38.117.147.25.1130287780.squirrel@38.117.147.25> References: <33651.38.117.147.25.1130287780.squirrel@38.117.147.25> Message-ID: <5458518f0510251856r6c3c828fuf35f1aff8fe32f79@mail.gmail.com> According to the Internet Traffic Report, there may be some problem here in North America. We're usally in the high 80's to mid 90's but it seems right now we're in the mid 70's. Looks like Qwest and UU.net are having some MAJOR problems (qwest is totally down right now). http://www.internettrafficreport.com/main.htm Anthony On 10/25/05, Kenneth Downs wrote: > > had some trouble with DNS, could not seem to find it. This suggests > something is wrong in DNS. > > > > > off topic here but c'mon , > > > > For the first time ever I can't bring google up anyone else? quick > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > -- > Kenneth Downs > Secure Data Software > 631-379-0010 > ken at secdat.com > PO Box 708 > East Setauket, NY 11733 > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Anthony Papillion Phone: (918) 926-0139 ICQ: 96-698-595 CAN ONE VOICE CHANGE THE WORLD? http://www.one.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From plehrer at gmail.com Tue Oct 25 23:37:25 2005 From: plehrer at gmail.com (Peter Lehrer) Date: Tue, 25 Oct 2005 23:37:25 -0400 Subject: [nycphp-talk] google down? In-Reply-To: <5458518f0510251856r6c3c828fuf35f1aff8fe32f79@mail.gmail.com> References: <33651.38.117.147.25.1130287780.squirrel@38.117.147.25> <5458518f0510251856r6c3c828fuf35f1aff8fe32f79@mail.gmail.com> Message-ID: I've been having some problems connection problems with google too. Peter Lehrer On 10/25/05, Anthony Papillion wrote: > > According to the Internet Traffic Report, there may be some problem here > in North America. We're usally in the high 80's to mid 90's but it seems > right now we're in the mid 70's. Looks like Qwest and UU.net are having > some MAJOR problems (qwest is totally down right now). > > http://www.internettrafficreport.com/main.htm > > Anthony > > > > > On 10/25/05, Kenneth Downs wrote: > > > > had some trouble with DNS, could not seem to find it. This suggests > > something is wrong in DNS. > > > > > > > > off topic here but c'mon , > > > > > > For the first time ever I can't bring google up anyone else? quick > > > > > > _______________________________________________ > > > New York PHP Talk Mailing List > > > AMP Technology > > > Supporting Apache, MySQL and PHP > > > http://lists.nyphp.org/mailman/listinfo/talk > > > http://www.nyphp.org > > > > > > > > > -- > > Kenneth Downs > > Secure Data Software > > 631-379-0010 > > ken at secdat.com > > PO Box 708 > > East Setauket, NY 11733 > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > > -- > Anthony Papillion > Phone: (918) 926-0139 > ICQ: 96-698-595 > > CAN ONE VOICE CHANGE THE WORLD? > http://www.one.org > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at plexpod.com Wed Oct 26 12:00:21 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 26 Oct 2005 12:00:21 -0400 Subject: [nycphp-talk] Implode a column of a multi-dim array In-Reply-To: <002a01c5d9a7$34f16bd0$0ba8a8c0@cliff> References: <002a01c5d9a7$34f16bd0$0ba8a8c0@cliff> Message-ID: <20051026160020.GG6247@desario.homelinux.net> On Tue, Oct 25, 2005 at 05:01:01PM -0400, Cliff Hirsch wrote: > I am trying to implode one column of a multidimensional array: > > $array = array[]['name']; > implode("string", $array[]['name']); > > Is there a simple function for extracting a single column of a > multidimensional array other than using a foreach statement? I'm not 100% clear on what you're looking to do, but this might be an alternative to a foreach if your intention is to get the value of every "name" for each index: $records = array( array ('name'=>'foo', 'junk'=>'asdf'), array ('name'=>'bar', 'junk'=>'asdf'), ); function get_name($array) { return $array['name']; } $names = implode(', ', array_map('get_name', $records)); // $names is 'foo, bar' HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From cliff at pinestream.com Wed Oct 26 12:49:12 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Wed, 26 Oct 2005 12:49:12 -0400 Subject: [nycphp-talk] Implode a column of a multi-dim array In-Reply-To: <20051026160020.GG6247@desario.homelinux.net> Message-ID: <001601c5da4d$316c3840$0ba8a8c0@cliff> Interesting solution. array_map with a callback makes my head spin a bit! I'll try to benchmark this solution versus foreach to see which is faster and will report back. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andrew Yochum Sent: Wednesday, October 26, 2005 12:00 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Implode a column of a multi-dim array On Tue, Oct 25, 2005 at 05:01:01PM -0400, Cliff Hirsch wrote: > I am trying to implode one column of a multidimensional array: > > $array = array[]['name']; > implode("string", $array[]['name']); > > Is there a simple function for extracting a single column of a > multidimensional array other than using a foreach statement? I'm not 100% clear on what you're looking to do, but this might be an alternative to a foreach if your intention is to get the value of every "name" for each index: $records = array( array ('name'=>'foo', 'junk'=>'asdf'), array ('name'=>'bar', 'junk'=>'asdf'), ); function get_name($array) { return $array['name']; } $names = implode(', ', array_map('get_name', $records)); // $names is 'foo, bar' HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From leegold at fastmail.fm Wed Oct 26 13:49:56 2005 From: leegold at fastmail.fm (leegold) Date: Wed, 26 Oct 2005 13:49:56 -0400 Subject: [nycphp-talk] xampp security patching Message-ID: <1130348996.25882.246081557@webmail.messagingengine.com> I use xampp locally on my pc for php development. For a server open to the public is the patching strategy exactly the same if the all the components were individually installed? I asumme the default install would have to be hardened - any Xampp docs on this vs. separate docs for each component? What is the stratagy to take? Thanks, Lee G> From dwclifton at gmail.com Thu Oct 27 00:19:56 2005 From: dwclifton at gmail.com (Douglas Clifton) Date: Thu, 27 Oct 2005 00:19:56 -0400 Subject: [nycphp-talk] talk Digest, Vol 29, Issue 42 In-Reply-To: References: Message-ID: <7d6cdcb0510262119y7c38df3bxf6e8a5858f785c7@mail.gmail.com> Connecting is expensive, connecting over a wire is VERY expensive. Consider a persistent connection. > ---------- Forwarded message ---------- > From: "Matt Roberts" > To: talk at lists.nyphp.org > Date: Mon, 24 Oct 2005 14:47:41 -0400 (EDT) > Subject: Re: [nycphp-talk] Long MySQL processes, connections > I did some performance tuning around my queries based on advice from this: > http://www.databasejournal.com/features/mysql/article.php/1382791 > > It seems to have sped up the routine significantly. > > To boil it down to a "best practice" question: of the following two > routines, what is preferable in the general case? > > > Process A: > --------------------- > Connect to mysql > for (~ 10k iterations){ > Query larger (500k rows) table in mysql > Insert into same mysql > } > Disconnect from mysql > --------------------- > > Process B > --------------------- > for (~ 10k iterations){ > Connect to mysql > Query larger (500k rows) table in mysql > Insert into same mysql > Disconnect to mysql > } > ---------------------- > > I've generally seen process A in all books I've read, but in my particular > example process B *seems* less error prone (but as you say Hans, it may > depend on many other details I'm leaving out here) > > However, B looks kind of dumb and expensive to me - how costly is the > connect / disconnect operation? -- Douglas Clifton dwclifton at gmail.com http://loadaveragezero.com/ http://loadaveragezero.com/app/s9y/ http://loadaveragezero.com/drx/rss/recent From lists at zaunere.com Thu Oct 27 11:52:55 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 27 Oct 2005 11:52:55 -0400 Subject: [nycphp-talk] out-of-town inquiry: anybody here from the greater DCarea? In-Reply-To: <5.2.0.9.0.20051025133541.05cfaea8@mail.sligowebworks.com> Message-ID: <000001c5db0e$809d6170$4fd9a8c0@MobileZ> Jim Johnson wrote on Tuesday, October 25, 2005 1:44 PM: > I'm one of a few folks trying to get some PHP community going here in > the DC area.....with such a vibrant group as NYPHP just a short > distance away, I'm hoping to find people on this list that may have > been banished or otherwise find themselves in DC....we also have some > high hopes and grand visions of getting the feds to do more open > source in general and more PHP in particular..... > > Any DC-area people, please give me a holler off-list.....thanks..... For public reference, there has been a group started in DC. http://www.dcphp.com I haven't spoke to the founding member in some time, but things were off to a good start, and fed open source involvement was mentioned. As things evolve in DC, NYPHP would also be interested in partnering to see what PHP interest there is in the fed. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Thu Oct 27 11:52:55 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 27 Oct 2005 11:52:55 -0400 Subject: [nycphp-talk] Long MySQL processes, connections In-Reply-To: <59465.199.67.140.20.1130179661.squirrel@matt-roberts.net> Message-ID: <000101c5db0e$8159ac90$4fd9a8c0@MobileZ> Matt Roberts wrote on Monday, October 24, 2005 2:48 PM: > > I'd need more details to truly diagnose this (or even determine if > > there's something wrong). > > Thanks Hans, > > I did some performance tuning around my queries based on advice from > this: > http://www.databasejournal.com/features/mysql/article.php/1382791 > > It seems to have sped up the routine significantly. > > To boil it down to a "best practice" question: of the following two > routines, what is preferable in the general case? > > > Process A: > --------------------- > Connect to mysql > for (~ 10k iterations){ > Query larger (500k rows) table in mysql > Insert into same mysql > } > Disconnect from mysql > --------------------- > > Process B > --------------------- > for (~ 10k iterations){ > Connect to mysql > Query larger (500k rows) table in mysql > Insert into same mysql > Disconnect to mysql > } > ---------------------- > > > > I've generally seen process A in all books I've read, but in my > particular example process B *seems* less error prone (but as you say > Hans, it may depend on many other details I'm leaving out here) 'A' is the way it should be done. If things are slowing down as the process goes on, then there's likely some type of memory/resource leak somewhere. When implementing process A it'll be important to close/free the various resources and handles that get created. While PHP does do automatic garbage collection, I've found that when doing intensive long running operations, the best-practice of freeing resources is more important. > However, B looks kind of dumb and expensive to me - how costly is the > connect / disconnect operation? It is. Connection buildup/tear-down with MySQL is probably the lightest of any RDBMS, however there is overhead of course. If you were using Oracle, for example, you'd see a considerable delay during connect/disconnect; so much so, that you'd likely not even consider it an option. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From jeff.loiselle at gmail.com Thu Oct 27 12:12:25 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Thu, 27 Oct 2005 12:12:25 -0400 Subject: [nycphp-talk] Logic Help Message-ID: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> Hello, I will submit that am really just not smart enough to figure this out. My logic sucks. Why am I a programmer? I don't know. Someone must have drugged me the day I picked my career. But I have records in a database that look like this.. array( 'id', 'name' , 'parent_id' ) I want to build a tree. So far I have.. while ($record->fetch()) { $tree[$record->parent_id][$record->id] = $record->name; } That produces something like this. Array ( [] => Array ( [1] => General ) [1] => Array ( [2] => Diseases [5] => Technologies [6] => Financial Data ) [2] => Array ( [3] => Eg 1 [4] => Eg 2 ) [6] => Array ( [7] => Articles [8] => Models [9] => Comps ) ) Now how can I go about appending each node to its matching parent? Or is there a completely better way? Have I made any sense? ;-) --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From glenn310b at mac.com Thu Oct 27 12:32:19 2005 From: glenn310b at mac.com (Glenn) Date: Thu, 27 Oct 2005 12:32:19 -0400 Subject: [nycphp-talk] Long MySQL processes, connections In-Reply-To: <000101c5db0e$8159ac90$4fd9a8c0@MobileZ> References: <000101c5db0e$8159ac90$4fd9a8c0@MobileZ> Message-ID: <4e2c26fb03ef685749949ecf195aa512@mac.com> maybe cooking up something with manual locks and handler would help? http://dev.mysql.com/doc/refman/4.1/en/handler.html glenn On Oct 27, 2005, at 11:52 AM, Hans Zaunere wrote: > > > Matt Roberts wrote on Monday, October 24, 2005 2:48 PM: >>> I'd need more details to truly diagnose this (or even determine if >>> there's something wrong). >> >> Thanks Hans, >> >> I did some performance tuning around my queries based on advice from >> this: >> http://www.databasejournal.com/features/mysql/article.php/1382791 >> >> It seems to have sped up the routine significantly. >> >> To boil it down to a "best practice" question: of the following two >> routines, what is preferable in the general case? >> >> >> Process A: >> --------------------- >> Connect to mysql >> for (~ 10k iterations){ >> Query larger (500k rows) table in mysql >> Insert into same mysql >> } >> Disconnect from mysql >> --------------------- >> >> Process B >> --------------------- >> for (~ 10k iterations){ >> Connect to mysql >> Query larger (500k rows) table in mysql >> Insert into same mysql >> Disconnect to mysql >> } >> ---------------------- >> >> >> >> I've generally seen process A in all books I've read, but in my >> particular example process B *seems* less error prone (but as you say >> Hans, it may depend on many other details I'm leaving out here) > > 'A' is the way it should be done. If things are slowing down as the > process > goes on, then there's likely some type of memory/resource leak > somewhere. > When implementing process A it'll be important to close/free the > various > resources and handles that get created. While PHP does do automatic > garbage > collection, I've found that when doing intensive long running > operations, > the best-practice of freeing resources is more important. > >> However, B looks kind of dumb and expensive to me - how costly is the >> connect / disconnect operation? > > It is. Connection buildup/tear-down with MySQL is probably the > lightest of > any RDBMS, however there is overhead of course. If you were using > Oracle, > for example, you'd see a considerable delay during connect/disconnect; > so > much so, that you'd likely not even consider it an option. > > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From rcozzol at optonline.net Thu Oct 27 12:32:21 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Thu, 27 Oct 2005 12:32:21 -0400 Subject: [nycphp-talk] Logic Help In-Reply-To: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> References: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> Message-ID: <43610115.1040601@optonline.net> One solution is to change your DB design, but I imagine that is not an option. That being said, if you are using balanced trees, you can implement a b-tree algorithm. If you are using unbalanced trees (meaning, nodes can be any number, any depth, etc.) you could opt for a binary tree. Jeff Loiselle wrote: >Hello, > >I will submit that am really just not smart enough to figure this out. >My logic sucks. Why am I a programmer? I don't know. Someone must have >drugged me the day I picked my career. But I have records in a >database that look like this.. > >array( > 'id', > 'name' , > 'parent_id' >) > >I want to build a tree. > >So far I have.. > >while ($record->fetch()) { > $tree[$record->parent_id][$record->id] = $record->name; >} > >That produces something like this. > >Array >( > [] => Array > ( > [1] => General > ) > > [1] => Array > ( > [2] => Diseases > [5] => Technologies > [6] => Financial Data > ) > > [2] => Array > ( > [3] => Eg 1 > [4] => Eg 2 > ) > > [6] => Array > ( > [7] => Articles > [8] => Models > [9] => Comps > ) > >) > >Now how can I go about appending each node to its matching parent? Or >is there a completely better way? > >Have I made any sense? ;-) > > >--- >Jeff Loiselle >Web Developer, Musician, and Observer >http://jeff.loiselles.com >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From cliff at pinestream.com Thu Oct 27 12:36:05 2005 From: cliff at pinestream.com (cliff) Date: Thu, 27 Oct 2005 11:36:05 -0500 Subject: [nycphp-talk] Logic Help In-Reply-To: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> References: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> Message-ID: <20051027163605.M71805@pinestream.com> id/parent id is a performance nightmare. I use a Modified Preordered Tree Traversal (add left, right fields). Google Modified Preordered Tree Traversal Try: http://www.philbrodeur.com/tutorials/mptt/ to start Cliff Hirsch On Thu, 27 Oct 2005 12:12:25 -0400, Jeff Loiselle wrote > Hello, > > I will submit that am really just not smart enough to figure this > out. My logic sucks. Why am I a programmer? I don't know. Someone > must have drugged me the day I picked my career. But I have records > in a database that look like this.. > > array( > 'id', > 'name' , > 'parent_id' > ) > > I want to build a tree. > > So far I have.. > > while ($record->fetch()) { > $tree[$record->parent_id][$record->id] = $record->name; > } > > That produces something like this. > > Array > ( > [] => Array > ( > [1] => General > ) > > [1] => Array > ( > [2] => Diseases > [5] => Technologies > [6] => Financial Data > ) > > [2] => Array > ( > [3] => Eg 1 > [4] => Eg 2 > ) > > [6] => Array > ( > [7] => Articles > [8] => Models > [9] => Comps > ) > > ) > > Now how can I go about appending each node to its matching parent? Or > is there a completely better way? > > Have I made any sense? ;-) > > --- > Jeff Loiselle > Web Developer, Musician, and Observer > http://jeff.loiselles.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From rcozzol at optonline.net Thu Oct 27 12:49:38 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Thu, 27 Oct 2005 12:49:38 -0400 Subject: [nycphp-talk] Logic Help In-Reply-To: <20051027163605.M71805@pinestream.com> References: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> <20051027163605.M71805@pinestream.com> Message-ID: <43610522.9060107@optonline.net> I agree completely (also called nested sets). This can be implemented in both php and the DB for excellent performance, truly unbalanced trees and unlimited depth of parent-child. You would end up with your object (id, name) and a left and right side numeric value. A child is something where its left side > parents left and its right side < parents right here is a poor textual representation (left side, right side): (1 ,10) | -------------- | | (2,7) ( 8,9) | ---------- | | (3,4) (5,6) cliff wrote: >id/parent id is a performance nightmare. > >I use a Modified Preordered Tree Traversal (add left, right fields). >Google Modified Preordered Tree Traversal >Try: http://www.philbrodeur.com/tutorials/mptt/ to start > >Cliff Hirsch > >On Thu, 27 Oct 2005 12:12:25 -0400, Jeff Loiselle wrote > > >>Hello, >> >>I will submit that am really just not smart enough to figure this >>out. My logic sucks. Why am I a programmer? I don't know. Someone >>must have drugged me the day I picked my career. But I have records >>in a database that look like this.. >> >>array( >> 'id', >> 'name' , >> 'parent_id' >>) >> >>I want to build a tree. >> >>So far I have.. >> >>while ($record->fetch()) { >> $tree[$record->parent_id][$record->id] = $record->name; >>} >> >>That produces something like this. >> >>Array >>( >> [] => Array >> ( >> [1] => General >> ) >> >> [1] => Array >> ( >> [2] => Diseases >> [5] => Technologies >> [6] => Financial Data >> ) >> >> [2] => Array >> ( >> [3] => Eg 1 >> [4] => Eg 2 >> ) >> >> [6] => Array >> ( >> [7] => Articles >> [8] => Models >> [9] => Comps >> ) >> >>) >> >>Now how can I go about appending each node to its matching parent? Or >>is there a completely better way? >> >>Have I made any sense? ;-) >> >>--- >>Jeff Loiselle >>Web Developer, Musician, and Observer >>http://jeff.loiselles.com >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From smanes at magpie.com Thu Oct 27 13:12:19 2005 From: smanes at magpie.com (Steve Manes) Date: Thu, 27 Oct 2005 13:12:19 -0400 Subject: [nycphp-talk] Logic Help In-Reply-To: <20051027163605.M71805@pinestream.com> References: <4b1887110510270912j7527792bj4c0d5166e0bf80f9@mail.gmail.com> <20051027163605.M71805@pinestream.com> Message-ID: <43610A73.9080808@magpie.com> cliff wrote: >Now how can I go about appending each node to its matching parent? Or >is there a completely better way? All you need is a record number for each element and an "up" pointer in each child record pointing to its parent's record number. From leegold at fastmail.fm Thu Oct 27 15:48:13 2005 From: leegold at fastmail.fm (leegold) Date: Thu, 27 Oct 2005 15:48:13 -0400 Subject: [nycphp-talk] xampp security patching In-Reply-To: <1130348996.25882.246081557@webmail.messagingengine.com> References: <1130348996.25882.246081557@webmail.messagingengine.com> Message-ID: <1130442493.13323.246181072@webmail.messagingengine.com> On Wed, 26 Oct 2005 13:49:56 -0400, "leegold" said: > I use xampp locally on my pc for php development. > > For a server open to the public is the patching strategy exactly the > same if the all the components were individually installed? After reading more fully I see the idea is that xampp is a developer's platforn - not really conceived as a hardened server... From store at sewfastseweasy.com Thu Oct 27 18:49:03 2005 From: store at sewfastseweasy.com (Customer Service at Sew Fast Sew Easy) Date: Thu, 27 Oct 2005 18:49:03 -0400 Subject: [nycphp-talk] NYC Programmer Needed Message-ID: <000001c5db48$a1276910$7d01a8c0@DESKTOP> We are looking for a Programmer in NYC to telecommute on projects. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, online video learning, Stitch & Bitch products and classes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Thu Oct 27 19:23:24 2005 From: cliff at pinestream.com (cliff) Date: Thu, 27 Oct 2005 18:23:24 -0500 Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <000001c5db48$a1276910$7d01a8c0@DESKTOP> References: <000001c5db48$a1276910$7d01a8c0@DESKTOP> Message-ID: <20051027232324.M16080@pinestream.com> What is the going rate/range for PHP programmers? At the Zend conference, one presenter said he paid $40-$50K. However, he did admit that his talent pool wasn't that skilled (we're not talking computer scientists). And he was located in a depressed, middle-of-nowhere town and his company was the only game around. On Thu, 27 Oct 2005 18:49:03 -0400, Customer Service at Sew Fast Sew Easy wrote > We are looking for a Programmer in NYC to telecommute on projects. > A PHP coder with experience developing ecommerce sites, especially > in a shared hosting environment. Must have strong *nix skills. Must know > MySQL. Moderate to advanced Javascript and CSS. Some experience with > mod_rewrite helpful. > > Must work well with understanding and modifying existing scripts. > Must have experience with PHP's cURL functions. Experience with cron > a plus. > > Please e-mail your qualifications to > store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory > Garvin in the subject line > visit us at www.sewfastseweasy.com > and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need > to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, > online video learning, Stitch & Bitch products and classes. From lists at zaunere.com Thu Oct 27 19:28:04 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 27 Oct 2005 19:28:04 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <43580776.6040501@optonline.net> Message-ID: <009d01c5db4e$15927920$4fd9a8c0@MobileZ> Roland Cozzolino wrote on Thursday, October 20, 2005 5:09 PM: > You can also use nested set theory. This makes retrieval of parents, > children, siblings, etc. extremely fast and efficient. This also allows > for an unlimited hierarchy. The math is a bit more confusing at first, > but quite trivial once you get it. The adjacency list model is > significantly slower but much easier to understand. A good link to help > understand this is > http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=1266295. > Also note, that in Oracle, there is a specific function to deal with > this ... postgres, mysql, sql server and others do not deal with > hierarchical structures in flat format. Hope this helps, although I am > not sure what the question was in the first place. Ahh, good old NSM... New York PHP developed an implementation of NSM, pNSM, as part of the clew project. There is endless discussion on the NYPHP-Org mailing list, including presentations and code here: http://www.nyphp.org/content/presentations/nyphp/index.php?slide=2 http://cvs.nyphp.org/cvsweb.cgi/clew/lib/ --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From jeff.knight at gmail.com Thu Oct 27 19:37:44 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Thu, 27 Oct 2005 18:37:44 -0500 Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <000001c5db48$a1276910$7d01a8c0@DESKTOP> References: <000001c5db48$a1276910$7d01a8c0@DESKTOP> Message-ID: <2ca9ba910510271637l572441d9pbab09ea357d85e7@mail.gmail.com> Please post all job openings to our jobs list at http://lists.nyphp.org/mailman/listinfo/jobs On 10/27/05, Customer Service at Sew Fast Sew Easy wrote: > > something about a job... > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fields at hedge.net Thu Oct 27 19:39:56 2005 From: fields at hedge.net (Adam Fields) Date: Thu, 27 Oct 2005 19:39:56 -0400 Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <000001c5db48$a1276910$7d01a8c0@DESKTOP> References: <000001c5db48$a1276910$7d01a8c0@DESKTOP> Message-ID: <20051027233956.GL14471@lola.aquick.org> On Thu, Oct 27, 2005 at 06:49:03PM -0400, Customer Service at Sew Fast Sew Easy wrote: > We are looking for a Programmer in NYC to telecommute on projects. If you're looking for a telecommuter, why does that person have to be in NYC? -- - Adam ** Expert Technical Project and Business Management **** System Performance Analysis and Architecture ****** [ http://www.everylastounce.com ] [ http://www.aquick.org/blog ] ............ Blog [ http://www.adamfields.com/resume.html ].. Experience [ http://www.flickr.com/photos/fields ] ... Photos [ http://www.buyadam.com/blog ].............Product Reviews [ http://del.icio.us/fields ] ............. Links From mitch.pirtle at gmail.com Thu Oct 27 20:19:58 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 27 Oct 2005 20:19:58 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <009d01c5db4e$15927920$4fd9a8c0@MobileZ> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> Message-ID: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> On 10/27/05, Hans Zaunere wrote: > > Ahh, good old NSM... > > New York PHP developed an implementation of NSM, pNSM, as part of the clew > project. Then let's start that discussion over here, about the performance benefits that turn into performance hits when your one table has 300 million rows... Seriously, this concept makes lots of things seem easier, but next thing you know, you got a really looooooong table on your hands and only Oracle (IIRC) can partition across tablespaces at the table level. What to do when your nested table becomes more than you can manage? Is it time then to go back to a more normalized model, or is this an indication that - before you even implement - you have to take the eventual number of rows that your nested table might have to manage? -- Mitch, loving database discussions for a change ;-) From chsnyder at gmail.com Fri Oct 28 00:14:54 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 28 Oct 2005 00:14:54 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> Message-ID: On 10/27/05, Mitch Pirtle wrote: > On 10/27/05, Hans Zaunere wrote: > > > > Ahh, good old NSM... > > > > New York PHP developed an implementation of NSM, pNSM, as part of the clew > > project. > > Then let's start that discussion over here, about the performance > benefits that turn into performance hits when your one table has 300 > million rows... > > Seriously, this concept makes lots of things seem easier, but next > thing you know, you got a really looooooong table on your hands and > only Oracle (IIRC) can partition across tablespaces at the table > level. > > What to do when your nested table becomes more than you can manage? Is > it time then to go back to a more normalized model, or is this an > indication that - before you even implement - you have to take the > eventual number of rows that your nested table might have to manage? > > -- Mitch, loving database discussions for a change ;-) We were having just this discussion at Friday's after yiou left, Mitch, only my number was much lower than 300 million. The overhead of inserting new nodes into the tree becomes unbearable much more quickly than I expected. On commodity hardware with a stock MySQL binary, it can take four seconds to insert a new node in a tree of 50,000. Then again, for many projects the convenience more than makes up for the insertion overhead, and the read performance on the NSM tree certainly scales as advertised. But what's the answer? You can finesse the problem a bit, depending on your data model, by using sub-trees in their own tables. Or you can use Oracle. Or... ? -- Chris Snyder http://chxo.com/ From rcozzol at optonline.net Fri Oct 28 00:44:44 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Fri, 28 Oct 2005 00:44:44 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> Message-ID: <4361ACBC.8030007@optonline.net> That is a very valid point, ...however (there has to be some sort of argument) ... if you have a table with N-million rows, chances are your DB design isn't very good. No hierarchical algorithm will perform well under conditions like that. Nested sets will at least give you great retrieval times and tons of flexibility with the hierarchy nodes, whereas adjacency lists are very stringent and slow and will still end up giving you 3 bazillion rows. Furthermore, if you are in fact dealing with that many rows, go buy Oracle or use PostGres (which can also partition across tablespaces and allow for OO design). In my opinion, MySQL just falls short when you get into real complicated database design (I am ducking under my desk right now, fearing the MySQL fan-base may come over my house and shoot me). Mitch Pirtle wrote: >On 10/27/05, Hans Zaunere wrote: > > >>Ahh, good old NSM... >> >>New York PHP developed an implementation of NSM, pNSM, as part of the clew >>project. >> >> > >Then let's start that discussion over here, about the performance >benefits that turn into performance hits when your one table has 300 >million rows... > >Seriously, this concept makes lots of things seem easier, but next >thing you know, you got a really looooooong table on your hands and >only Oracle (IIRC) can partition across tablespaces at the table >level. > >What to do when your nested table becomes more than you can manage? Is >it time then to go back to a more normalized model, or is this an >indication that - before you even implement - you have to take the >eventual number of rows that your nested table might have to manage? > >-- Mitch, loving database discussions for a change ;-) >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From Consult at CovenantEDesign.com Fri Oct 28 01:08:11 2005 From: Consult at CovenantEDesign.com (CED) Date: Fri, 28 Oct 2005 01:08:11 -0400 Subject: [nycphp-talk] NYC Programmer Needed References: <000001c5db48$a1276910$7d01a8c0@DESKTOP> Message-ID: <00b301c5db7d$986be550$1519a8c0@ced> MessageHmm.... Is it me or does "Stitch & Bitch" seem a little off... Did anyone get a reply from this poster? IS this a spam bot? Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Customer Service at Sew Fast Sew Easy To: talk at lists.nyphp.org Sent: Thursday, October 27, 2005 6:49 PM Subject: [nycphp-talk] NYC Programmer Needed We are looking for a Programmer in NYC to telecommute on projects. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, online video learning, Stitch & Bitch products and classes. ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From george at omniti.com Fri Oct 28 08:57:55 2005 From: george at omniti.com (George Schlossnagle) Date: Fri, 28 Oct 2005 08:57:55 -0400 Subject: [nycphp-talk] database performance In-Reply-To: References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> Message-ID: On Oct 28, 2005, at 12:14 AM, csnyder wrote: > > We were having just this discussion at Friday's after yiou left, > Mitch, only my number was much lower than 300 million. The overhead of > inserting new nodes into the tree becomes unbearable much more quickly > than I expected. On commodity hardware with a stock MySQL binary, it > can take four seconds to insert a new node in a tree of 50,000. In my experience, the only place I've implemented this was where I could do batched inserts via rebuilds. Why inserting individual nodes can be a pain, it's on the same order of complexity as rebuilding the entire table. George From george at omniti.com Fri Oct 28 09:00:45 2005 From: george at omniti.com (George Schlossnagle) Date: Fri, 28 Oct 2005 09:00:45 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <4361ACBC.8030007@optonline.net> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> <4361ACBC.8030007@optonline.net> Message-ID: <52FA8DDF-3368-427D-9E56-5F5C1C5F5CC2@omniti.com> On Oct 28, 2005, at 12:44 AM, Roland Cozzolino wrote: > That is a very valid point, ...however (there has to be some sort of > argument) ... if you have a table with N-million rows, chances are > your > DB design isn't very good. That claim reads to me like 'no data set reasonably has 3 million distinct members in it', which is kinda obviously bogus. I manage a number of ~1T sized databases. I can guarantee you that there are a number of tables in them that have N-million rows, where N is not small. Data points on customer behavior spanning a couple years, things like that. George From rcozzol at optonline.net Fri Oct 28 09:17:55 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Fri, 28 Oct 2005 09:17:55 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <52FA8DDF-3368-427D-9E56-5F5C1C5F5CC2@omniti.com> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> <4361ACBC.8030007@optonline.net> <52FA8DDF-3368-427D-9E56-5F5C1C5F5CC2@omniti.com> Message-ID: <43622503.50003@optonline.net> Flat data no problem, but hierarchies of that size? Better ways to do that outside of a DB. George Schlossnagle wrote: >On Oct 28, 2005, at 12:44 AM, Roland Cozzolino wrote: > > > >>That is a very valid point, ...however (there has to be some sort of >>argument) ... if you have a table with N-million rows, chances are >>your >>DB design isn't very good. >> >> > >That claim reads to me like 'no data set reasonably has 3 million >distinct members in it', which is kinda obviously bogus. > >I manage a number of ~1T sized databases. I can guarantee you that >there are a number of tables in them that have N-million rows, where >N is not small. Data points on customer behavior spanning a couple >years, things like that. > >George >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From mitch.pirtle at gmail.com Fri Oct 28 09:54:44 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Fri, 28 Oct 2005 09:54:44 -0400 Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <00b301c5db7d$986be550$1519a8c0@ced> References: <000001c5db48$a1276910$7d01a8c0@DESKTOP> <00b301c5db7d$986be550$1519a8c0@ced> Message-ID: <330532b60510280654r6d24dd9dpb3f10a46deeb8799@mail.gmail.com> On 10/28/05, CED wrote: > > Hmm.... > > Is it me or does "Stitch & Bitch" seem a little off... Nope, sounds like your typical bigfixing session to me. -- Mitch From jay_nyphp at fastmail.fm Fri Oct 28 10:04:54 2005 From: jay_nyphp at fastmail.fm (Jayesh Sheth) Date: Fri, 28 Oct 2005 10:04:54 -0400 Subject: [nycphp-talk] Freelancer survey Message-ID: <1130508294.20188.246238725@webmail.messagingengine.com> Hi fellow NYPHP'ers, I work with the Freelancers Union / Working Today, which is a national non-profit that represents the needs and concerns of the independent workforce through advocacy, information, and service. We rely on PHP and open source software extensively for our technology needs. We are currently looking for freelancer respondents to help us determine which companies in New York City are the best (and worst) to freelance for. Since many NYPHP members are freelancers / consultants, and since the aggregated information that all of you could provide through this survey could be valuable, I thought I would post this here. Take the survey: http://www.surveymonkey.com/s.asp?u=394831315905 Email it to your friends: http://www.workingtoday.org/stf/index2.php?cID=2 Thanks, - Jay From chsnyder at gmail.com Fri Oct 28 10:54:19 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 28 Oct 2005 10:54:19 -0400 Subject: [nycphp-talk] database performance In-Reply-To: <43622503.50003@optonline.net> References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> <4361ACBC.8030007@optonline.net> <52FA8DDF-3368-427D-9E56-5F5C1C5F5CC2@omniti.com> <43622503.50003@optonline.net> Message-ID: On 10/28/05, Roland Cozzolino wrote: > Flat data no problem, but hierarchies of that size? Better ways to do > that outside of a DB. In the filesystem? Using IMAP for searching and sorting? :-) My lack of imagination is holding me back here, I know, but a large hierarchy seems much *less* useful when outside of a DB. -- Chris Snyder http://chxo.com/ From jdaly at panix.com Fri Oct 28 11:06:05 2005 From: jdaly at panix.com (John Daly) Date: Fri, 28 Oct 2005 11:06:05 -0400 Subject: [nycphp-talk] HTML_Quickform question Message-ID: <007f01c5dbd1$4b7c43d0$6401a8c0@GUITAR> All, I'm using the Pear HTML_Quickform package to create forms for the latest project I'm working on, and I'm running up against something that I can't yet figure out: For complex templated forms, how can I get the form elements to display in place, and not only where I explicitly call form->display() ? Let's say I have a table two columns wide, and six rows long, and I want to spread form elements over all rows of the first column and have them display where they are added. Can this be done? Thanks, John From chsnyder at gmail.com Fri Oct 28 11:14:26 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 28 Oct 2005 11:14:26 -0400 Subject: [nycphp-talk] database performance In-Reply-To: References: <43580776.6040501@optonline.net> <009d01c5db4e$15927920$4fd9a8c0@MobileZ> <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> Message-ID: On 10/28/05, George Schlossnagle wrote: > In my experience, the only place I've implemented this was where I > could do batched inserts via rebuilds. Why inserting individual > nodes can be a pain, it's on the same order of complexity as > rebuilding the entire table. > This is only partly true -- you can queue new nodes and batch-insert them, provided they are all going to the same place. But if the append points are scattered throughout the tree, batching doesn't give you anything. "Walking the tree" to rebuild the table takes much much longer than simply appending a node. One strategy I considered was inserting two or more "unattached" nodes on any append, to provide spare capacity in the tree with no extra cost (adding 4 to each left and right value is the same as adding 2). But this just seems like madness since it will inflate the tree to twice its optimal size, and end up compounding the problem. Grrrrr. Creating a loosely-connected hierarchy, some means of distributing the tree across multiple tables (or even multiple databases) seems like the only sustainable solution. Hans Z. has been musing about multi-dimensional NSM, whereas I keep coming back to namespaces. But I still don't know what either of those solutions really looks like... -- Chris Snyder http://chxo.com/ From tom at supertom.com Fri Oct 28 11:16:09 2005 From: tom at supertom.com (Tom Melendez) Date: Fri, 28 Oct 2005 11:16:09 -0400 Subject: [nycphp-talk] HTML_Quickform question In-Reply-To: <007f01c5dbd1$4b7c43d0$6401a8c0@GUITAR> References: <007f01c5dbd1$4b7c43d0$6401a8c0@GUITAR> Message-ID: <436240B9.5030706@supertom.com> Hi John, If understand your question correctly, it sounds like you need to look at Renders (they let you format the HTML that the element sits in) and perhaps the createElement method. Also, you may use the html parameter to addElement to force HTML into your forms. You may also choose to use HTML_Quickform with one of the template engines, for maximum flexibility. Good Luck! Tom http://www.liphp.org John Daly wrote: >All, > >I'm using the Pear HTML_Quickform package to create forms for the latest >project I'm working on, and I'm running up against something that I can't >yet figure out: For complex templated forms, how can I get the form >elements to display in place, and not only where I explicitly call >form->display() ? Let's say I have a table two columns wide, and six rows >long, and I want to spread form elements over all rows of the first column >and have them display where they are added. Can this be done? > >Thanks, > >John > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From agfische at email.smith.edu Fri Oct 28 16:10:15 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 28 Oct 2005 16:10:15 -0400 Subject: [nycphp-talk] Variables syntax Message-ID: <436285A7.9050404@email.smith.edu> Greetings listers, A basic question I'm sure... (I have checked PHundamentals and did some googling and manual searching and book skimming but haven't come up with the answers I'm looking for.) I have currently been setting variable like so: Version A: $print_first_name = "You said your first name is {$_SESSION['first_name']}."; At one time I think I had something like: Version B: $print_first_name = "You said your first_name is $_SESSION[first_name]."; This would yield the same result on my server, but I think version B is incorrect and version A is correct. I am thinking that Version B is incorrect as it is missing the single quotes around the var name, even though it does render OK on my server, perhaps it would not in another environment? Then I also had something like: Version C: $print_first_name = "You said your first_name is " . $_SESSION['first_name'] . "."; Now I think Version C is technically correct, and the decision to use A or C is based on personal preference. Basically I'd like to establish a standard for myself and want to make sure I'm understanding the usage and scenario's which can arise. Is there a better alternative method? Comments, thoughts, suggestions? Thanks! -Aaron From codebowl at gmail.com Fri Oct 28 16:14:17 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Fri, 28 Oct 2005 16:14:17 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <436285A7.9050404@email.smith.edu> References: <436285A7.9050404@email.smith.edu> Message-ID: <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> It's all based on your coding preference. Version A works because of the {} it evaluates the variable, however version A would work even without the {} The reason being is because when using double quotes variables are evaluated before being printed. Version C is the same type i use because from my understanding using double quotes is bad because it takes longer processing to evaluate the variables when they are injected into a string in that manner, maybe i am wrong and just typing more than i have to. It all boils down to your coding style, preference. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Fri Oct 28 16:29:40 2005 From: dmintz at davidmintz.org (David Mintz) Date: Fri, 28 Oct 2005 16:29:40 -0400 (EDT) Subject: [nycphp-talk] Variables syntax In-Reply-To: <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: AFAIK: there is absolutely nothing unkosher about the "this is a $array[key]" syntax because PHP does not try to evaluate constants within double-quoted strings (which makes sense, if you think about it -- it would have to check every word). That's why you don't get a warning as you do if you simply say echo $array[key] --- David Mintz http://davidmintz.org/ From agfische at email.smith.edu Fri Oct 28 16:32:11 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 28 Oct 2005 16:32:11 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: <43628ACB.109@email.smith.edu> Joseph Crawford wrote: > > Version A works because of the {} it evaluates the variable, however > version A would work even without the {} > > The reason being is because when using double quotes variables are > evaluated before being printed. > On my server, version A without {} produces errors when the script runs: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in (home/filepath/filename.php) on line 45 To confirm, Version A is when the var is inside a double quoted string, with single quotes around the array['varname'] > Version C is the same type i use because from my understanding using > double quotes is bad because it takes longer processing to evaluate > the variables when they are injected into a string in that manner, > maybe i am wrong and just typing more than i have to. Interesting. I hadn't seen mention of that in my books. It's just further confirmation that I need more books! =) Thanks, -Aaron From php at tmcode.com Fri Oct 28 16:50:56 2005 From: php at tmcode.com (Tim McEwen) Date: Fri, 28 Oct 2005 16:50:56 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: Not sure I agree that Version C will give you a speed improvement. I think gluing strings together is more expensive than expanding a double quoted string. Take the following two scripts: Using AB produces the following: ab -n 10 http://localhost/test_a.php ... Time per request: 28574.142 [ms] (mean) ... ab -n 10 http://localhost/test_b.php ... Time per request: 14057.574 [ms] (mean) ... Seems like the concatenate operation is 2x slower? So I would vote for Version A being the "best practice." I too have heard the argument that you should use single quotes (especially for array element keys) because your code will preform better. Has anyone done any benchmarking on this? Does using $row ['column'] really perform that much better than $row["column"]? -Tim On Oct 28, 2005, at 4:14 PM, Joseph Crawford wrote: > It's all based on your coding preference. > > Version A works because of the {} it evaluates the variable, > however version A would work even without the {} > > The reason being is because when using double quotes variables are > evaluated before being printed. > > Version C is the same type i use because from my understanding > using double quotes is bad because it takes longer processing to > evaluate the variables when they are injected into a string in that > manner, maybe i am wrong and just typing more than i have to. > > It all boils down to your coding style, preference. > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at frozenpc.net Fri Oct 28 16:57:43 2005 From: lists at frozenpc.net (Aaron Axelsen) Date: Fri, 28 Oct 2005 15:57:43 -0500 Subject: [nycphp-talk] LDAP SSL with Active Directory Message-ID: <436290C7.6040000@frozenpc.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I have been trying to search out how to setup my Redhat server so that php can use ldap over ssl to connect to an active directory server. I have the server ca cert, but I'm not finding a clear answer of what to do with it to get php to work. Any suggestions? Thanks! - -- Aaron Axelsen lists at frozenpc.net Great hosting, low prices. Modevia Web Services LLC -- http://www.modevia.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDYpDHuucONIvD0AMRAjnYAKCDDH19q38THZU/s8k6j9p02hjK4ACg+bMx ku9VSJW/SXS/TCmXQsHlPs8= =HDRt -----END PGP SIGNATURE----- From dcech at phpwerx.net Fri Oct 28 17:12:58 2005 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 28 Oct 2005 17:12:58 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <436285A7.9050404@email.smith.edu> References: <436285A7.9050404@email.smith.edu> Message-ID: <4362945A.5000708@phpwerx.net> I tend to go with version D: $print_first_name = 'You said your first_name is '. $_SESSION['first_name'] .'.'; As you can see I use single-quotes around the 'string' portions and I have modified the spacing rule a little so that I don't leave a space between the 'string' portions and the . concatenation operator. There are a few reasons I use this approach, but chief among them is that it makes child's play of spotting variables, especially in a syntax-highlighting editor. If they're embedded within a string they're much harder to spot (for me at least). In the end it comes down to personal preference, my testing indicates that the performance difference between single-quotes, double-quotes or double-quotes with complex (curly) braces is not large enough to really be worth considering unless you are talking about a LOT (> 100,000) embedded variables. I would suggest going with whatever makes your code the most consistent and easiest to maintain. Dan Aaron Fischer wrote: > Greetings listers, > > A basic question I'm sure... (I have checked PHundamentals and did some > googling and manual searching and book skimming but haven't come up with > the answers I'm looking for.) > > I have currently been setting variable like so: > Version A: > $print_first_name = "You said your first name is > {$_SESSION['first_name']}."; > > At one time I think I had something like: > Version B: > $print_first_name = "You said your first_name is $_SESSION[first_name]."; > > This would yield the same result on my server, but I think version B is > incorrect and version A is correct. I am thinking that Version B is > incorrect as it is missing the single quotes around the var name, even > though it does render OK on my server, perhaps it would not in another > environment? > > Then I also had something like: > Version C: > $print_first_name = "You said your first_name is " . > $_SESSION['first_name'] . "."; > > Now I think Version C is technically correct, and the decision to use A > or C is based on personal preference. > > Basically I'd like to establish a standard for myself and want to make > sure I'm understanding the usage and scenario's which can arise. > > Is there a better alternative method? > > Comments, thoughts, suggestions? > > Thanks! > > -Aaron From agfische at email.smith.edu Fri Oct 28 17:42:30 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 28 Oct 2005 17:42:30 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <4362945A.5000708@phpwerx.net> References: <436285A7.9050404@email.smith.edu> <4362945A.5000708@phpwerx.net> Message-ID: <43629B46.3000108@email.smith.edu> Dan Cech wrote: >I tend to go with version D: > >$print_first_name = 'You said your first_name is '. >$_SESSION['first_name'] .'.'; > >As you can see I use single-quotes around the 'string' portions and I >have modified the spacing rule a little so that I don't leave a space >between the 'string' portions and the . concatenation operator. > >There are a few reasons I use this approach, but chief among them is >that it makes child's play of spotting variables, especially in a >syntax-highlighting editor. If they're embedded within a string they're >much harder to spot (for me at least). > > > That is indeed one of the drawbacks I have noticed as well, if I embed the var within the string I lose the syntax highlighting which make the variables much harder to spot (for me as well). >In the end it comes down to personal preference, my testing indicates >that the performance difference between single-quotes, double-quotes or >double-quotes with complex (curly) braces is not large enough to really >be worth considering unless you are talking about a LOT (> 100,000) >embedded variables. I would suggest going with whatever makes your >code the most consistent and easiest to maintain. > >Dan > > > Benchmark testing is something I have on my list of "to learn about" stuff. It hasn't been mentioned in the books that I have (again, I suppose that's further justification for more books). -Aaron From ashaw at polymerdb.org Fri Oct 28 18:30:56 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 28 Oct 2005 17:30:56 -0500 Subject: [nycphp-talk] getting my head around heirarchical structures Message-ID: <4362A6A0.8090504@polymerdb.org> All this heirarchical structure talk happens to come up as I'm trying to implement a data filtering scheme for an ad-hoc querying interface. Basically I want to allow queries as complex as the user wants -- not just on one or two fields at a time -- so this has to be open-ended, and it seems to be pointing me to a heirarchical structure. I think I've found something that will work, but I wonder a) if I'm just reinventing the wheel somehow, and b) if I should go with this, am I doing it right? Here goes (in English as simple as my gabby self can make it): We store all the filters using a table with these fields: CREATE TABLE `filters` ( `filterid` int(11), `parentid` int(11), -- keys to filterid `booltype` enum('and','or'), `criteria` varchar(255), PRIMARY KEY (`filterid`) ); And then we start filling it with filters. Any 'parent' filter doesn't store a `criteria` for itself, just the `booltype` value for all its children. INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (1, NULL, 'and', NULL); INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (2, 1, NULL, 'hair=''brown'''); INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (3, 1, NULL, 'age=''32'''); INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (4, 1, 'or', NULL); INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (5, 4, NULL, 'city=''boston'''); INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) VALUES (6, 4, NULL, 'city=''houston'''); So this way I get parent filter 1 joining its children 2, 3 and 4 with an 'and' operator; 4 itself also is a parent of 5 and 6, which it joins with an 'or' operator. The result is a filter that says: hair = 'brown' and age='32' and (city='boston' or city='houston') This seems open-ended enough to be very flexible, and it makes sense to my feeble brain, but is there a better way to do it? - Allen -- Allen Shaw Polymer (http://polymerdb.org) From rcozzol at optonline.net Fri Oct 28 22:25:08 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Fri, 28 Oct 2005 22:25:08 -0400 Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4362A6A0.8090504@polymerdb.org> References: <4362A6A0.8090504@polymerdb.org> Message-ID: <4362DD84.9030906@optonline.net> Just curious, it this something that needs to be saved to the database (sort of like saved queries a user can bring back)? If not, you can do this with sessions. I am actually implementing something very similar right now with open ended queries where we simply give the user a buttload of fields to choose from including boolean options. Since I don't care about the query once it returns a result, I assemble it on the fly and use DOM/DHTML and a bit of ajax to deal with the addition/subtraction of query fields. Not sure if this helps. Allen Shaw wrote: >All this heirarchical structure talk happens to come up as I'm trying to >implement a data filtering scheme for an ad-hoc querying interface. >Basically I want to allow queries as complex as the user wants -- not >just on one or two fields at a time -- so this has to be open-ended, and >it seems to be pointing me to a heirarchical structure. I think I've >found something that will work, but I wonder a) if I'm just reinventing >the wheel somehow, and b) if I should go with this, am I doing it right? > >Here goes (in English as simple as my gabby self can make it): > >We store all the filters using a table with these fields: >CREATE TABLE `filters` ( > `filterid` int(11), > `parentid` int(11), -- keys to filterid > `booltype` enum('and','or'), > `criteria` varchar(255), > PRIMARY KEY (`filterid`) >); >And then we start filling it with filters. Any 'parent' filter doesn't >store a `criteria` for itself, just the `booltype` value for all its >children. > >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (1, NULL, 'and', NULL); >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (2, 1, NULL, 'hair=''brown'''); >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (3, 1, NULL, 'age=''32'''); >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (4, 1, 'or', NULL); >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (5, 4, NULL, 'city=''boston'''); >INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) >VALUES (6, 4, NULL, 'city=''houston'''); > >So this way I get parent filter 1 joining its children 2, 3 and 4 with >an 'and' operator; 4 itself also is a parent of 5 and 6, which it joins >with an 'or' operator. The result is a filter that says: hair = >'brown' and age='32' and (city='boston' or city='houston') > >This seems open-ended enough to be very flexible, and it makes sense to >my feeble brain, but is there a better way to do it? > >- Allen > > > From ashaw at polymerdb.org Sat Oct 29 00:39:32 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 28 Oct 2005 23:39:32 -0500 Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4362DD84.9030906@optonline.net> References: <4362A6A0.8090504@polymerdb.org> <4362DD84.9030906@optonline.net> Message-ID: <4362FD04.6090402@polymerdb.org> Yeah, this is going to be saved in the database to have on hand for later, part of a saved query setup. And although the "buttload of fields" idea occurred to me, the idea here is that I have to design this to work even for tables that don't even exist yet. Once a table or relational set of tables is offered for querying, the admin has to mark which columns are available, and then the user should be able to pick any of those columns to display in the query *and* define filters based on any combination of those available columns. The more I think about this the more it seems like I'm on the right track with the recursive parent/child structure, but one thing that's giving me pause is that a parent record has no criteria of its own, and a child record has no boolean-type of its own; meaning I wind up with basically two types of records in this one table. Still, normalizing beyond this point and trying to put those two types of records in two different tables seems just insanely and unnecessarily complicated. Um... right? Roland Cozzolino wrote: > Just curious, it this something that needs to be saved to the database > (sort of like saved queries a user can bring back)? If not, you can do > this with sessions. I am actually implementing something very similar > right now with open ended queries where we simply give the user a > buttload of fields to choose from including boolean options. Since I > don't care about the query once it returns a result, I assemble it on > the fly and use DOM/DHTML and a bit of ajax to deal with the > addition/subtraction of query fields. Not sure if this helps. > > Allen Shaw wrote: > > >>All this heirarchical structure talk happens to come up as I'm trying to >>implement a data filtering scheme for an ad-hoc querying interface. >>Basically I want to allow queries as complex as the user wants -- not >>just on one or two fields at a time -- so this has to be open-ended, and >>it seems to be pointing me to a heirarchical structure. I think I've >>... -- Allen Shaw Polymer (http://polymerdb.org) From gatzby3jr at gmail.com Sat Oct 29 02:47:01 2005 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Sat, 29 Oct 2005 02:47:01 -0400 Subject: [nycphp-talk] Variables syntax In-Reply-To: <43629B46.3000108@email.smith.edu> References: <436285A7.9050404@email.smith.edu> <4362945A.5000708@phpwerx.net> <43629B46.3000108@email.smith.edu> Message-ID: <29da5d150510282347i49f7df04n15b90577f7f748e2@mail.gmail.com> >From what I've heard using single quotes in strings and arrays help improve speed, although very minimally and is only noticable in very large applciations. The reason being that php does not parse for variables in single-quoted strings, and in double quoted it does. I personally code with method B, but I guess I should start changing (for the reasons that Dan Cech pointed out). On 10/28/05, Aaron Fischer wrote: > > Dan Cech wrote: > > >I tend to go with version D: > > > >$print_first_name = 'You said your first_name is '. > >$_SESSION['first_name'] .'.'; > > > >As you can see I use single-quotes around the 'string' portions and I > >have modified the spacing rule a little so that I don't leave a space > >between the 'string' portions and the . concatenation operator. > > > >There are a few reasons I use this approach, but chief among them is > >that it makes child's play of spotting variables, especially in a > >syntax-highlighting editor. If they're embedded within a string they're > >much harder to spot (for me at least). > > > > > > > > That is indeed one of the drawbacks I have noticed as well, if I embed > the var within the string I lose the syntax highlighting which make the > variables much harder to spot (for me as well). > > > >In the end it comes down to personal preference, my testing indicates > >that the performance difference between single-quotes, double-quotes or > >double-quotes with complex (curly) braces is not large enough to really > >be worth considering unless you are talking about a LOT (> 100,000) > >embedded variables. I would suggest going with whatever makes your > >code the most consistent and easiest to maintain. > > > >Dan > > > > > > > Benchmark testing is something I have on my list of "to learn about" > stuff. It hasn't been mentioned in the books that I have (again, I > suppose that's further justification for more books). > > -Aaron > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Sat Oct 29 11:00:49 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 29 Oct 2005 09:00:49 -0600 Subject: [nycphp-talk] getting my head around heirarchical structures Message-ID: <43638EA1.8090906@tgaconnect.com> On 10/28/2005 04:30 PM Allen Shaw writes: > All this heirarchical structure talk happens to come up as I'm trying to > implement a data filtering scheme for an ad-hoc querying interface. > Basically I want to allow queries as complex as the user wants -- not > just on one or two fields at a time -- so this has to be open-ended, and > it seems to be pointing me to a heirarchical structure. I think I've > found something that will work, but I wonder a) if I'm just > reinventing the wheel somehow, It looks to me as if you are trying to implement views. Is going to MySQL 5 (or a DBMS that supports views) an option? -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From rcozzol at optonline.net Sat Oct 29 09:15:26 2005 From: rcozzol at optonline.net (Roland Cozzolino) Date: Sat, 29 Oct 2005 09:15:26 -0400 Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4362FD04.6090402@polymerdb.org> References: <4362A6A0.8090504@polymerdb.org> <4362DD84.9030906@optonline.net> <4362FD04.6090402@polymerdb.org> Message-ID: <436375EE.4000303@optonline.net> I am not sure how flexible you are making this (can users do inner/outer joins, group by, etc.) but the way you set up the system seems a bit over complicated. Based on what you said, there seems to be 2 rather simple options: 1) create a view with the parameters the user specifies. I am not sure what db you are using, but if this option is available it is rather helpful and simple. 2) construct the query in php and save the query in the db with a name or something valid the user remembers. If you allow users to name the query they construct, then you can save it to a table like this: table: user_query query_id: 1 name: 'Customer Report' query: 'select customer_id, customer_name from customer' This will also allow for some nasty queries, joins, etc., where the hierarchical thing might get a bit on the insane side with a large complex query. Allen Shaw wrote: >Yeah, this is going to be saved in the database to have on hand for >later, part of a saved query setup. And although the "buttload of >fields" idea occurred to me, the idea here is that I have to design this >to work even for tables that don't even exist yet. Once a table or >relational set of tables is offered for querying, the admin has to mark >which columns are available, and then the user should be able to pick >any of those columns to display in the query *and* define filters based >on any combination of those available columns. > >The more I think about this the more it seems like I'm on the right >track with the recursive parent/child structure, but one thing that's >giving me pause is that a parent record has no criteria of its own, and >a child record has no boolean-type of its own; meaning I wind up with >basically two types of records in this one table. Still, normalizing >beyond this point and trying to put those two types of records in two >different tables seems just insanely and unnecessarily complicated. >Um... right? > >Roland Cozzolino wrote: > > >>Just curious, it this something that needs to be saved to the database >>(sort of like saved queries a user can bring back)? If not, you can do >>this with sessions. I am actually implementing something very similar >>right now with open ended queries where we simply give the user a >>buttload of fields to choose from including boolean options. Since I >>don't care about the query once it returns a result, I assemble it on >>the fly and use DOM/DHTML and a bit of ajax to deal with the >>addition/subtraction of query fields. Not sure if this helps. >> >>Allen Shaw wrote: >> >> >> >> >>>All this heirarchical structure talk happens to come up as I'm trying to >>>implement a data filtering scheme for an ad-hoc querying interface. >>>Basically I want to allow queries as complex as the user wants -- not >>>just on one or two fields at a time -- so this has to be open-ended, and >>>it seems to be pointing me to a heirarchical structure. I think I've >>> >>> > >>... > > > From ken at secdat.com Sat Oct 29 09:56:10 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 29 Oct 2005 09:56:10 -0400 (EDT) Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <43638EA1.8090906@tgaconnect.com> References: <43638EA1.8090906@tgaconnect.com> Message-ID: <40739.38.117.147.25.1130594170.squirrel@38.117.147.25> It is not so much implementing views as giving users a way to specify views. Since a view is just a stored query, it is just as well to generate the query at run-time if doing so gives more flexibility to the user. A view on the other hand must be defined by an administrator and so is outside normal user activity. > On 10/28/2005 04:30 PM Allen Shaw writes: >> All this heirarchical structure talk happens to come up as I'm trying to >> implement a data filtering scheme for an ad-hoc querying interface. >> Basically I want to allow queries as complex as the user wants -- not >> just on one or two fields at a time -- so this has to be open-ended, and >> it seems to be pointing me to a heirarchical structure. I think I've >> found something that will work, but I wonder a) if I'm just >> reinventing the wheel somehow, > > It looks to me as if you are trying to implement views. > > Is going to MySQL 5 (or a DBMS that supports views) > an option? > > -- > > T. Gales & Associates > 'Helping People Connect with Technology' > > http://www.tgaconnect.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From ken at secdat.com Sat Oct 29 10:10:47 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 29 Oct 2005 10:10:47 -0400 (EDT) Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4362A6A0.8090504@polymerdb.org> References: <4362A6A0.8090504@polymerdb.org> Message-ID: <40741.38.117.147.25.1130595047.squirrel@38.117.147.25> Allen, This is an interesting thread you have started. I have some suggestions to add to the thoughts already expressed. A very big design decision at the start is whether you will support the validation of the "criteria" values before attempting to execute the query. Leaving out the validation makes it simpler to handle the overall organization, but then the error messages given to users will be SQL messages that they may or may not be able to figure out. If you make it possible to validate the expressions yourself then you can control the error messages. One suggestion I would make is that each filter be given a name instead of an ID, and possibly let the user choose the name. Then the filters behave like functions. This makes nesting more intuitive. So I can put two filters into your table: OVER18 => 'Age >= 18' NATIVE => 'State_where_born = State_where_lives' Then build up complex functions through composition, so that I can have this function: NAT_18 => OVER18 && NATIVE This requires your table to be set up a little differently, but will give you complete expressive power. A query is then really a separate thing, not stored in the same table as the filters. A query needs to know a table, a list of columns, and a list of functions. If your queries can also pull from other queries in JOIN and UNION then you have a generalized report writer. If you have a very sophisticated data dictionary then your report writer can even figure out when to JOIN and when to UNION. > All this heirarchical structure talk happens to come up as I'm trying to > implement a data filtering scheme for an ad-hoc querying interface. > Basically I want to allow queries as complex as the user wants -- not > just on one or two fields at a time -- so this has to be open-ended, and > it seems to be pointing me to a heirarchical structure. I think I've > found something that will work, but I wonder a) if I'm just reinventing > the wheel somehow, and b) if I should go with this, am I doing it right? > > Here goes (in English as simple as my gabby self can make it): > > We store all the filters using a table with these fields: > CREATE TABLE `filters` ( > `filterid` int(11), > `parentid` int(11), -- keys to filterid > `booltype` enum('and','or'), > `criteria` varchar(255), > PRIMARY KEY (`filterid`) > ); > And then we start filling it with filters. Any 'parent' filter doesn't > store a `criteria` for itself, just the `booltype` value for all its > children. > > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (1, NULL, 'and', NULL); > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (2, 1, NULL, 'hair=''brown'''); > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (3, 1, NULL, 'age=''32'''); > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (4, 1, 'or', NULL); > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (5, 4, NULL, 'city=''boston'''); > INSERT INTO `filters` (`filterid`, `parentid`, `booltype`, `criteria`) > VALUES (6, 4, NULL, 'city=''houston'''); > > So this way I get parent filter 1 joining its children 2, 3 and 4 with > an 'and' operator; 4 itself also is a parent of 5 and 6, which it joins > with an 'or' operator. The result is a filter that says: hair = > 'brown' and age='32' and (city='boston' or city='houston') > > This seems open-ended enough to be very flexible, and it makes sense to > my feeble brain, but is there a better way to do it? > > - Allen > > -- > Allen Shaw > Polymer (http://polymerdb.org) > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From tgales at tgaconnect.com Sat Oct 29 13:24:46 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 29 Oct 2005 11:24:46 -0600 Subject: [nycphp-talk] getting my head around heirarchical structures Message-ID: <4363B05E.5000900@tgaconnect.com> On 07:56 AM Kenneth Downs wrote: > It is not so much implementing views as giving users a way to specify > views. Since a view is just a stored query, it is just as well to > generate the query at run-time if doing so gives more flexibility to > the user. > A view on the other hand must be defined by an administrator > and so is outside normal user activity. Creating views is not outside user activity: Create_view_priv has been available since MySQL 5.0.1. Originally Allen asked am I just reinventing the wheel. I would say he is not *just* reinventing views -- this approach could be quite valuable to people with a dbms that doesn't implement views. The tree he described is reminiscent of a syntax tree. So, taking a look at: http://www.dbs.ethz.ch/education/isk/WS_97/syntax_diagramme/sld004.html might spark some ideas. -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From ken at secdat.com Sat Oct 29 15:41:56 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 29 Oct 2005 15:41:56 -0400 (EDT) Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4363B05E.5000900@tgaconnect.com> References: <4363B05E.5000900@tgaconnect.com> Message-ID: <40773.38.117.147.25.1130614916.squirrel@38.117.147.25> > On 07:56 AM Kenneth Downs wrote: >> It is not so much implementing views as giving users a way to specify >> views. Since a view is just a stored query, it is just as well to >> generate the query at run-time if doing so gives more flexibility to >> the user. > > A view on the other hand must be defined by an administrator >> and so is outside normal user activity. > > Creating views is not outside user activity: > Create_view_priv has been available since MySQL 5.0.1. Perhaps I should phrase it differently. When a user is specifying search criteria, they are not interested in whether they are creating some server-side object, they just want the result. So while it may or may not be a programmer's decision to implement the result as a view, the design decisions in the original post should focus more on how to lay out tables that will allow the user to specify criteria. Also, there are other databases in the world besides MySQL. -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From ashaw at polymerdb.org Sat Oct 29 22:55:25 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Sat, 29 Oct 2005 21:55:25 -0500 Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <40773.38.117.147.25.1130614916.squirrel@38.117.147.25> References: <4363B05E.5000900@tgaconnect.com> <40773.38.117.147.25.1130614916.squirrel@38.117.147.25> Message-ID: <4364361D.1060904@polymerdb.org> Hi All, Wow, I see a lot of discussion has happened since I read my mail last night. (Shame on me for starting a thread at 6 PM on a Friday, anyway...) Without backing up too much, I guess I should clarify a little bit more. What I'm looking for here is a way to store and retrieve an unlimited combination of boolean filters against a flat table of information. To get a little more real-world, I should tell you the idea is that this interface will offer users a choice of several pre-defined views (which are created using whatever/however in a backend that's not known), so the user picks one of those and effectively has access to one flattened summary set of data. So we're not going to have this user making joins or creating table relationships or whatever, just looking at a flat view, and allowing them to filter it if they want. I want to make sure the user can filter that data in as simple or complex a manner as he or she needs. A system like this needs to be able to store criteria in boolean relationships with precedence grouping, so it could record structures like "(criteria_A and criteria_B) or (criteria_C and criteria_D)", etc. As long as we can track simple boolean operators (basically and|or) and record correct precedence groupings for combinations of those operators (basically, putting the parentheses in the right places), then we can create filters of unlimitted complexity. You can see this is a kind of generic discussion. By that I mean that the format or content of "criteria_A" or "criteria_B" would depend heavily on the backend system, whether it's a particular database server product or some custom parser that applies criteria agains flat-file data or XML files or whatever. (For example, if we're talking PHP/SQL here, the filter described above would amount to something like "where ($criteria_A and $criteria_B) or ($criteria_C and $criteria_D)".) The application of course has to figure out whether the criteria are valid, help the user enter valid criteria, etc., and it also has to be responsible for creating the views in the first place, and applying that filter, etc. But I think the actual process of tracking these nested filter criteria will 1) be a good context for discussion of heirarchical data structures, and 2) result in a reusable structure that could be applied in any filtering system, regardless of the data backend or type of data. Kenneth Downs wrote: >> One suggestion I would make is that each filter be given a name instead of >> an ID, and possibly let the user choose the name. Then the filters behave >> like functions. This makes nesting more intuitive. So I can put two >> filters into your table: This is not such a bad idea, but it requires me (or whatever admin) to create the filters ahead of time and offer them to the user. Hopefully I can come up with a structure that allows for recording whatever filters the user can come up with based on the existing columns in the flat data view. Sorry if I didn't explain myself well in the beginning. I think right now it's really just about defining the best structure for storing filter criteria and the criteria's relationships to each other. If we can do that we have a method that could be useful in numerous different systems. Isn't that right? - Allen Kenneth Downs wrote: >>On 07:56 AM Kenneth Downs wrote: >> >>>It is not so much implementing views as giving users a way to specify >>>views. Since a view is just a stored query, it is just as well to >>>generate the query at run-time if doing so gives more flexibility to >>>the user. >> >> > A view on the other hand must be defined by an administrator >> >>>and so is outside normal user activity. >> >>Creating views is not outside user activity: >>Create_view_priv has been available since MySQL 5.0.1. > > > Perhaps I should phrase it differently. When a user is specifying search > criteria, they are not interested in whether they are creating some > server-side object, they just want the result. So while it may or may not > be a programmer's decision to implement the result as a view, the design > decisions in the original post should focus more on how to lay out tables > that will allow the user to specify criteria. > > Also, there are other databases in the world besides MySQL. > -- Allen Shaw Polymer (http://polymerdb.org) From susan_shemin at yahoo.com Sun Oct 30 00:54:32 2005 From: susan_shemin at yahoo.com (Susan Shemin) Date: Sat, 29 Oct 2005 21:54:32 -0700 (PDT) Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <00b301c5db7d$986be550$1519a8c0@ced> Message-ID: <20051030045433.26414.qmail@web50214.mail.yahoo.com> Your comment is inappropriate. There are women on this list even though you guys try to keep us out of programming. CED wrote:Hmm.... Is it me or does "Stitch & Bitch" seem a little off... Did anyone get a reply from this poster? IS this a spam bot? Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Customer Service at Sew Fast Sew Easy To: talk at lists.nyphp.org Sent: Thursday, October 27, 2005 6:49 PM Subject: [nycphp-talk] NYC Programmer Needed We are looking for a Programmer in NYC to telecommute on projects. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, online video learning, Stitch & Bitch products and classes. --------------------------------- _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org_______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From susan_shemin at yahoo.com Sun Oct 30 00:58:26 2005 From: susan_shemin at yahoo.com (Susan Shemin) Date: Sat, 29 Oct 2005 21:58:26 -0700 (PDT) Subject: [nycphp-talk] Fwd: NYC Programmer Needed Message-ID: <20051030045827.59946.qmail@web50207.mail.yahoo.com> You've come to the wrong place for your request because your post has been made fun of. Try craigslist.org -- you'll be treated better. Susan Customer Service at Sew Fast Sew Easy wrote: From: "Customer Service at Sew Fast Sew Easy" To: Date: Thu, 27 Oct 2005 18:49:03 -0400 Subject: [nycphp-talk] NYC Programmer Needed We are looking for a Programmer in NYC to telecommute on projects. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, online video learning, Stitch & Bitch products and classes. _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From Consult at CovenantEDesign.com Sun Oct 30 03:23:29 2005 From: Consult at CovenantEDesign.com (CED) Date: Sun, 30 Oct 2005 03:23:29 -0500 Subject: [nycphp-talk] NYC Programmer Needed References: <20051030045433.26414.qmail@web50214.mail.yahoo.com> Message-ID: <002201c5dd2b$3545db70$6401a8c0@ced> "inappropriate"?? I think you NEED to Re-Read the posters original post... Scroll down and read the 'advertisement' at the bottom of this persons spam post. My questioning of it's validaty was based on the fact that at the end of it it said something about "Stitch & Bitch", which I believe to be derragatory, hence I thought the post to be spam. Get your facts straight before you start gender wars on the php list. No one is out to get you. Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Susan Shemin To: NYPHP Talk Sent: Saturday, October 29, 2005 11:54 PM Subject: Re: [nycphp-talk] NYC Programmer Needed Your comment is inappropriate. There are women on this list even though you guys try to keep us out of programming. CED wrote: Hmm.... Is it me or does "Stitch & Bitch" seem a little off... Did anyone get a reply from this poster? IS this a spam bot? Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Customer Service at Sew Fast Sew Easy To: talk at lists.nyphp.org Sent: Thursday, October 27, 2005 6:49 PM Subject: [nycphp-talk] NYC Programmer Needed We are looking for a Programmer in NYC to telecommute on projects. A PHP coder with experience developing ecommerce sites, especially in a shared hosting environment. Must have strong *nix skills. Must know MySQL. Moderate to advanced Javascript and CSS. Some experience with mod_rewrite helpful. Must work well with understanding and modifying existing scripts. Must have experience with PHP's cURL functions. Experience with cron a plus. Please e-mail your qualifications to store at sewfastseweasy.com or fax them to 212-268-4321 with ATTN: Gregory Garvin in the subject line visit us at www.sewfastseweasy.com and buy the best beginner sewing book, "Sew Fast Sew Easy: All You Need to Know When You Start to Sew" by Elissa Meyrich, sewing patterns, online video learning, Stitch & Bitch products and classes. -------------------------------------------------------------------------- _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org ------------------------------------------------------------------------------ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshmccormack at travelersdiary.com Sun Oct 30 07:01:30 2005 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Sun, 30 Oct 2005 07:01:30 -0500 Subject: [nycphp-talk] similar open source program? Message-ID: <4364B61A.2090106@travelersdiary.com> Anyone know of a photo gallery script that's open source and similar to this: http://www.lightboxphoto.com/gallery_software/features.htm Particularly the sales related things, like invoicing, tax, shipping, download rights, etc. Thanks, Josh From codebowl at gmail.com Sun Oct 30 07:28:58 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sun, 30 Oct 2005 07:28:58 -0500 Subject: [nycphp-talk] similar open source program? In-Reply-To: <4364B61A.2090106@travelersdiary.com> References: <4364B61A.2090106@travelersdiary.com> Message-ID: <8d9a42800510300428p613eeb96pcf843338bbce841b@mail.gmail.com> is coppermine open source look into that one On 10/30/05, Josh McCormack wrote: > > Anyone know of a photo gallery script that's open source and similar to > this: > > http://www.lightboxphoto.com/gallery_software/features.htm > > Particularly the sales related things, like invoicing, tax, shipping, > download rights, etc. > > Thanks, > > Josh > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From list at harveyk.com Sun Oct 30 08:21:45 2005 From: list at harveyk.com (harvey) Date: Sun, 30 Oct 2005 08:21:45 -0500 Subject: [nycphp-talk] Fwd: NYC Programmer Needed In-Reply-To: <20051030045827.59946.qmail@web50207.mail.yahoo.com> References: <20051030045827.59946.qmail@web50207.mail.yahoo.com> Message-ID: <6.2.5.6.2.20051030081724.03420ac0@harveyk.com> I think it might be a good idea to let sewfastseweasy know of the misunderstanding since you took it upon yourself to speak for the rest of the list and basically tell sewfastseweasty they were not welcome here. At 11:58 PM 10/29/2005, Susan Shemin wrote: >You've come to the wrong place for your request because your post >has been made fun of. Try craigslist.org -- you'll be treated better. > >Susan > >Customer Service at Sew Fast Sew Easy wrote: >From: "Customer Service at Sew Fast Sew Easy" >To: >Date: Thu, 27 Oct 2005 18:49:03 -0400 >Subject: [nycphp-talk] NYC Programmer Needed > >We are looking for a Programmer in NYC to telecommute on projects. > >A PHP coder with experience developing ecommerce sites, especially >in a shared hosting environment. Must have strong *nix skills. Must >know MySQL. Moderate to advanced Javascript and CSS. Some experience >with mod_rewrite helpful. > >Must work well with understanding and modifying existing scripts. >Must have experience with PHP's cURL functions. Experience with cron a plus. > >Please e-mail your qualifications to >store at sewfastseweasy.com or fax >them to 212-268-4321 with ATTN: Gregory Garvin in the subject line > > > >visit us at >www.sewfastseweasy.com and buy >the best beginner sewing book, "Sew Fast Sew Easy: All You Need to >Know When You Start to Sew" by Elissa Meyrich, sewing patterns, >online video learning, Stitch & Bitch products and classes. > > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Sun Oct 30 10:18:39 2005 From: ken at secdat.com (Kenneth Downs) Date: Sun, 30 Oct 2005 10:18:39 -0500 (EST) Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <4364361D.1060904@polymerdb.org> References: <4363B05E.5000900@tgaconnect.com> <40773.38.117.147.25.1130614916.squirrel@38.117.147.25> <4364361D.1060904@polymerdb.org> Message-ID: <41120.38.117.147.25.1130685519.squirrel@38.117.147.25> > > Kenneth Downs wrote: >>> One suggestion I would make is that each filter be given a name instead >>> of >>> an ID, and possibly let the user choose the name. Then the filters >>> behave >>> like functions. This makes nesting more intuitive. So I can put two >>> filters into your table: > > This is not such a bad idea, but it requires me (or whatever admin) to > create the filters ahead of time and offer them to the user. Hopefully > I can come up with a structure that allows for recording whatever > filters the user can come up with based on the existing columns in the > flat data view. Not at all. You can provide pre-defined filters if you like, or fall back to system-generated pseudo-names when the user is just typing in criteria. To validate the criteria, you need a data dictionary. To make the validation completely simple, you need to specify the criteria entirely in atomic values, and not allow parsable expressions. -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From shiflett at php.net Sun Oct 30 10:59:59 2005 From: shiflett at php.net (Chris Shiflett) Date: Sun, 30 Oct 2005 10:59:59 -0500 Subject: [nycphp-talk] NYC Programmer Needed In-Reply-To: <20051030045433.26414.qmail@web50214.mail.yahoo.com> References: <20051030045433.26414.qmail@web50214.mail.yahoo.com> Message-ID: <4364EDFF.5060703@php.net> Susan Shemin wrote: > Your comment is inappropriate. There are women on this list even > though you guys try to keep us out of programming. Actually, your comment is inappropriate: 1. What you found offensive in Edward's post is exactly what he is questioning. In other words, he also found the phrase alarming and is asking whether the post is legitimate. Because he had the same reaction as you, you've chosen to personally attack him. Personal attacks are not tolerated here. 2. Your generalization is exactly the type of offensive remark that you mistakenly thought Edward had made. This is blatant hypocrisy and a step (or several steps) in the wrong direction. For the record, "Stitch and Bitch" seems legitimate: http://www.sewfastseweasy.com/stitch.html Most of the people there (mostly women) seem to "get it" and realize that it's an informal, funny reference to sewing and chatting. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From danielc at analysisandsolutions.com Sun Oct 30 11:05:02 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 30 Oct 2005 11:05:02 -0500 Subject: [nycphp-talk] PHP in SecurityFocus #321 Message-ID: <20051030160410.0652E318E07@mailspool3.panix.com> These summaries are available online RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html Alerts from SecurityFocus Newsletter #321 PHP --- PHP Safedir Restriction Bypass Vulnerabilities http://www.securityfocus.com/bid/15119 This report is a bit off base. The reporter calls it "safedir" when they probably mean "safe_mode" and these issues were already raised in SF report 14957. That aside, these issues are fixed in the upcoming 4.4.1 and 5.0.6 releases of PHP. APPLICATIONS USING PHP ---------------------- phpMyAdmin Theme Variable Local File Inclusion Vulnerability http://www.securityfocus.com/bid/15169 PHPNuke Modules.PHP Search Module Remote Directory Traversal Vulnerability http://www.securityfocus.com/bid/15137 PHP-Nuke Modules.PHP NukeFixes Addon Remote Directory Traversal Vulnerability http://www.securityfocus.com/bid/15150 phpBB Avatar Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15170 E107 Resetcore.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15125 MySource Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15132 MySource Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/15133 Chipmunk Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15149 Splatt Forums Remote Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15152 AL-Caricatier SS.PHP Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15162 TikiWiki Unspecified Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15164 Nuked Klan Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/15166 Zomplog Detail.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/15168 FlatNuke Index.PHP Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/15172 From shiflett at php.net Sun Oct 30 11:06:36 2005 From: shiflett at php.net (Chris Shiflett) Date: Sun, 30 Oct 2005 11:06:36 -0500 Subject: [nycphp-talk] Fwd: NYC Programmer Needed In-Reply-To: <20051030045827.59946.qmail@web50207.mail.yahoo.com> References: <20051030045827.59946.qmail@web50207.mail.yahoo.com> Message-ID: <4364EF8C.5040502@php.net> Susan Shemin wrote: > You've come to the wrong place for your request because your post > has been made fun of. No, you've come to the right place, although you might want to try to our jobs list: jobs at lists.nyphp.org Susan misunderstood the purpose of the phrase "Stitch and Bitch" in your post. Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From lists at zaunere.com Sun Oct 30 15:29:08 2005 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 30 Oct 2005 15:29:08 -0500 Subject: [nycphp-talk] database performance In-Reply-To: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> Message-ID: <004201c5dd90$955238f0$6401a8c0@MobileZ> Mitch Pirtle wrote on Thursday, October 27, 2005 8:20 PM: > On 10/27/05, Hans Zaunere wrote: > > > > Ahh, good old NSM... > > > > New York PHP developed an implementation of NSM, pNSM, as part of > > the clew project. > > Then let's start that discussion over here, about the performance > benefits that turn into performance hits when your one table has 300 > million rows... Sure - the more rows, the more time it takes to do updates. Keep in mind, however, that while a lot of rows may need to be touched, it's lightweight. The only operation is an update of an integer - based on an integer constraint. > Seriously, this concept makes lots of things seem easier, but next > thing you know, you got a really looooooong table on your hands and > only Oracle (IIRC) can partition across tablespaces at the table > level. As Snyder mentioned, we were just discussing this after last week's meeting. Partitioning can help dramatically, but what if those types of features aren't available? Well, while the update of many rows may seem to be a big hit, I'd much rather do that than recursive queries, especially in deep trees. > What to do when your nested table becomes more than you can manage? Is > it time then to go back to a more normalized model, or is this an > indication that - before you even implement - you have to take the > eventual number of rows that your nested table might have to manage? As Roland points out, for huge tree structures, it's better done outside of SQL. SQL isn't well suited for describing complex tree structures, but NSM has been the most versatile, robust and fastest implementation I've seen. I've had test trees with well over 100k rows and no problems. The 80/20 rule applies here - for the majority of tree implementations in SQL, NSM is the elegant solution. If you're maintaining giant structures, however, then a relational database probably isn't the right choice anyway. But NSM solves the common problem of trees in your typical php/mysql/web environment. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Sun Oct 30 15:37:20 2005 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 30 Oct 2005 15:37:20 -0500 Subject: [nycphp-talk] Variables syntax In-Reply-To: <436285A7.9050404@email.smith.edu> Message-ID: <004301c5dd91$ba6d5150$6401a8c0@MobileZ> Aaron Fischer wrote on Friday, October 28, 2005 4:10 PM: > Greetings listers, > > A basic question I'm sure... (I have checked PHundamentals and did > some googling and manual searching and book skimming but haven't come > up with the answers I'm looking for.) > > I have currently been setting variable like so: > Version A: > $print_first_name = "You said your first name is > {$_SESSION['first_name']}."; This is my standard... > At one time I think I had something like: > Version B: > $print_first_name = "You said your first_name is > $_SESSION[first_name]."; Ewww.... > This would yield the same result on my server, but I think version B > is incorrect and version A is correct. I am thinking that Version B > is incorrect as it is missing the single quotes around the var name, > even though it does render OK on my server, perhaps it would not in > another environment? Absolutely - it's bad and sloppy. Version B is creating notices (because PHP first would try to interpret first_name as a constant) but you won't see them unless you have E_ALL as your error reporting level. This is an instance of PHP being "nice" by second guessing what the code actually means. > Then I also had something like: > Version C: > $print_first_name = "You said your first_name is " . > $_SESSION['first_name'] . "."; > > Now I think Version C is technically correct, and the decision to use > A or C is based on personal preference. Agreed, it's a matter of preference. There was a time in PHP when using double quotes resulted in extra overhead because of some bug. I don't remember all the details, but as I remember this has been long corrected (I believe by Andi). Personally, I prefer Version A because it's easier to read. I've never been a fan of breaking strings up into a lot of concatenations with the period. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From 1j0lkq002 at sneakemail.com Sun Oct 30 16:18:42 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 30 Oct 2005 13:18:42 -0800 Subject: [nycphp-talk] similar open source program? In-Reply-To: <4364B61A.2090106@travelersdiary.com> References: <4364B61A.2090106@travelersdiary.com> Message-ID: <9112-93907@sneakemail.com> Josh McCormack joshmccormack-at-travelersdiary.com |nyphp dev/internal group use| wrote: >Anyone know of a photo gallery script that's open source and similar to >this: > >http://www.lightboxphoto.com/gallery_software/features.htm > >Particularly the sales related things, like invoicing, tax, shipping, >download rights, etc. > >Thanks, > >Josh > > Never sure but this smells like spam.... I just turned down a request to "ninja market" a web service doing this. The client spec was a perfect fit (although it was a different product): - locate up to 100 mailing lists of open source programers or hackers - post an inquiry looking for "anything similar" to our product, and use the URL provided - make an "in search of" post looking for anything better than our product. Use URL below. - be sure to mention the features marked "A" and optionally those marked "B" - you may deviate of course from the suggestions but do not mention items D or E - save initial post and subsequent posts to same thread, or parallel threads if datestamped after initial post and discussing our product. You get credit for them all. I wish people would understand than SEO is not "spamming" because I seem to get 10 requests to spam for every request for optimization. With the latest Google update it seems things will only get worse. My apologies if Josh was *not* spamming the list... I tried to make this post demonstrative, because it is so much like list spam. -=john andrews http://www.seo-fun.com From rolan at omnistep.com Sun Oct 30 16:48:08 2005 From: rolan at omnistep.com (Rolan Yang) Date: Sun, 30 Oct 2005 16:48:08 -0500 Subject: [nycphp-talk] similar open source program? In-Reply-To: <9112-93907@sneakemail.com> References: <4364B61A.2090106@travelersdiary.com> <9112-93907@sneakemail.com> Message-ID: <43653F98.7050807@omnistep.com> inforequest wrote: >Josh McCormack joshmccormack-at-travelersdiary.com |nyphp dev/internal >group use| wrote: > > >>this: >> >>http: / /www.l-i-g-h-t-b-o-x-p-h-o-t-o.com/gallery_software/features.htm >> >>Particularly the sales related things, like invoicing, tax, shipping, >>downloa >> >> >Never sure but this smells like spam.... I just turned down a request to >"ninja market" a web service doing this. The client spec was a perfect >fit (although it was a different product): > >..... snip... > > >My apologies if Josh was *not* spamming the list... I tried to make this >post demonstrative, because it is so much like list spam. > >-=john andrews > > That is really clever. The thought of this never even crossed my mind. ~Rolan From Consult at CovenantEDesign.com Sun Oct 30 17:00:10 2005 From: Consult at CovenantEDesign.com (CED) Date: Sun, 30 Oct 2005 17:00:10 -0500 Subject: [nycphp-talk] NYC Programmer Needed References: <20051030045433.26414.qmail@web50214.mail.yahoo.com> <4364EDFF.5060703@php.net> Message-ID: <006f01c5dd9d$4c8b9ff0$6401a8c0@ced> Chris, Thanks for the moderation/clarification. Sometimes e-mail juist has that way of displacing tone and vocal inflection... go figure. =D Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Sunday, October 30, 2005 10:59 AM Subject: Re: [nycphp-talk] NYC Programmer Needed Susan Shemin wrote: > Your comment is inappropriate. There are women on this list even > though you guys try to keep us out of programming. Actually, your comment is inappropriate: 1. What you found offensive in Edward's post is exactly what he is questioning. In other words, he also found the phrase alarming and is asking whether the post is legitimate. Because he had the same reaction as you, you've chosen to personally attack him. Personal attacks are not tolerated here. 2. Your generalization is exactly the type of offensive remark that you mistakenly thought Edward had made. This is blatant hypocrisy and a step (or several steps) in the wrong direction. For the record, "Stitch and Bitch" seems legitimate: http://www.sewfastseweasy.com/stitch.html Most of the people there (mostly women) seem to "get it" and realize that it's an informal, funny reference to sewing and chatting. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From joshmccormack at travelersdiary.com Sun Oct 30 17:17:48 2005 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Sun, 30 Oct 2005 17:17:48 -0500 Subject: [nycphp-talk] similar open source program? In-Reply-To: <9112-93907@sneakemail.com> References: <4364B61A.2090106@travelersdiary.com> <9112-93907@sneakemail.com> Message-ID: <4365468C.100@travelersdiary.com> I wrote it with my own little spam free fingers. I have a pro photographer friend of mine who was thinking of buying that software, but it seemed like there must be something similar in the open source world. And if not a perfect fit, I'd happily contribute time/money to bring it along. Josh inforequest wrote: > Josh McCormack joshmccormack-at-travelersdiary.com |nyphp dev/internal > group use| wrote: > > >>Anyone know of a photo gallery script that's open source and similar to >>this: >> >>http://www.lightboxphoto.com/gallery_software/features.htm >> >>Particularly the sales related things, like invoicing, tax, shipping, >>download rights, etc. >> >>Thanks, >> >>Josh >> >> > > Never sure but this smells like spam.... I just turned down a request to > "ninja market" a web service doing this. The client spec was a perfect > fit (although it was a different product): > > - locate up to 100 mailing lists of open source programers or hackers > - post an inquiry looking for "anything similar" to our product, and use > the URL provided > - make an "in search of" post looking for anything better than our > product. Use URL below. > - be sure to mention the features marked "A" and optionally those marked "B" > - you may deviate of course from the suggestions but do not mention > items D or E > - save initial post and subsequent posts to same thread, or parallel > threads if datestamped after initial post and discussing our product. > You get credit for them all. > > > I wish people would understand than SEO is not "spamming" because I seem > to get 10 requests to spam for every request for optimization. With the > latest Google update it seems things will only get worse. > > My apologies if Josh was *not* spamming the list... I tried to make this > post demonstrative, because it is so much like list spam. > > -=john andrews > http://www.seo-fun.com > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From danielc at analysisandsolutions.com Sun Oct 30 17:51:22 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 30 Oct 2005 17:51:22 -0500 Subject: [nycphp-talk] freebsd, apache, mod_ssl problems Message-ID: <20051030225122.GA28381@panix.com> Hey Folks: I've installed FreeBSD on my laptop. I've compiled Apache with mod_ssl. When I go to http://localhost/, we're good. But when I try to do https://localhost/, I get a connection refused error. I set up the test cert using "localhost" as the domain name. The only change I made to httpd.conf is setting ServerName to "localhost". The logs are below: error_log --------- [Sun Oct 30 18:13:01 2005] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sun Oct 30 18:13:01 2005] [notice] Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7e configured -- resuming normal operations [Sun Oct 30 18:13:01 2005] [notice] Accept mutex: flock (Default: flock) ssl_engine_log -------------- [30/Oct/2005 18:13:01 52128] [info] Init: 1st restart round (already detached) [30/Oct/2005 18:13:01 52128] [info] Init: Seeding PRNG with 1160 bytes of entropy [30/Oct/2005 18:13:01 52128] [info] Init: Configuring temporary RSA private keys (512/1024 bits) [30/Oct/2005 18:13:01 52128] [info] Init: Configuring temporary DH parameters (512/1024 bits) [30/Oct/2005 18:13:01 52128] [info] Init: Initializing (virtual) servers for SSL Any ideas, please? Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From krook at us.ibm.com Sun Oct 30 18:07:03 2005 From: krook at us.ibm.com (Daniel Krook) Date: Sun, 30 Oct 2005 18:07:03 -0500 Subject: [nycphp-talk] freebsd, apache, mod_ssl problems In-Reply-To: <20051030225122.GA28381@panix.com> Message-ID: > Hey Folks: > > I've installed FreeBSD on my laptop. I've compiled Apache > with mod_ssl. > When I go to http://localhost/, we're good. But when I try to do > https://localhost/, I get a connection refused error. > > I set up the test cert using "localhost" as the domain name. > > The only change I made to httpd.conf is setting ServerName > to "localhost". Dan, This could be a lot of things, but since you say you didn't make any modifications to httpd.conf this would be my first guess... do you have this in there? Listen 80 Listen 443 And started w/ apachectl startssl ? Daniel Krook, Advisory IT Specialist Application Development, Production Services - Tools, ibm.com Personal: http://info.krook.org/ BluePages: http://bluepages.redirect.webahead.ibm.com/ BlogPages: http://blogpages.redirect.webahead.ibm.com/ From andrew at plexpod.com Sun Oct 30 18:09:30 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Sun, 30 Oct 2005 18:09:30 -0500 Subject: [nycphp-talk] freebsd, apache, mod_ssl problems In-Reply-To: <20051030225122.GA28381@panix.com> References: <20051030225122.GA28381@panix.com> Message-ID: <20051030230930.GB12063@desario.homelinux.net> On Sun, Oct 30, 2005 at 05:51:22PM -0500, Daniel Convissor wrote: > Hey Folks: > > I've installed FreeBSD on my laptop. I've compiled Apache with mod_ssl. > When I go to http://localhost/, we're good. But when I try to do > https://localhost/, I get a connection refused error. Your SSL config might be in an block... If so, make sure you start it with the "-D SSL" options to define that var at startup. Some apache init scripts have a "start" (w/o -D SSL) and a "startssl" (w/ -D SSL) if you're using one... I can't say what the FreeBSD default setup is though. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From danielc at analysisandsolutions.com Sun Oct 30 18:14:25 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 30 Oct 2005 18:14:25 -0500 Subject: [nycphp-talk] freebsd, apache, mod_ssl problems In-Reply-To: References: <20051030225122.GA28381@panix.com> Message-ID: <20051030231425.GA27898@panix.com> On Sun, Oct 30, 2005 at 06:07:03PM -0500, Daniel Krook wrote: > > And started w/ apachectl startssl ? DING! Thanks! --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From chsnyder at gmail.com Sun Oct 30 18:24:12 2005 From: chsnyder at gmail.com (csnyder) Date: Sun, 30 Oct 2005 18:24:12 -0500 Subject: [nycphp-talk] database performance In-Reply-To: <004201c5dd90$955238f0$6401a8c0@MobileZ> References: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> <004201c5dd90$955238f0$6401a8c0@MobileZ> Message-ID: On 10/30/05, Hans Zaunere wrote: > As Roland points out, for huge tree structures, it's better done outside of > SQL. SQL isn't well suited for describing complex tree structures, but NSM > has been the most versatile, robust and fastest implementation I've seen. > I've had test trees with well over 100k rows and no problems. Hans (or anyone) you can contact me off-list if this is too basic a question, but what are the other ways to store tree structures outside of SQL? -- Chris Snyder http://chxo.com/ From tgales at tgaconnect.com Sun Oct 30 19:37:15 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 30 Oct 2005 19:37:15 -0500 Subject: [nycphp-talk] database performance In-Reply-To: References: <330532b60510271719t566febc1s696946feb2e71945@mail.gmail.com> <004201c5dd90$955238f0$6401a8c0@MobileZ> Message-ID: <43656739.7000207@tgaconnect.com> chsnyder at gmail.com writes: >Hans (or anyone) you can contact me off-list if this is too basic a >question, but what are the other ways to store tree structures outside >of SQL? Okay, this is not a direct answer to 'ways to store trees' But this page: http://www.nist.gov/dads/terms2.html has information about ways to do lots of things... -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From 1j0lkq002 at sneakemail.com Sun Oct 30 21:55:45 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 30 Oct 2005 18:55:45 -0800 Subject: [nycphp-talk] similar open source program? In-Reply-To: <4365468C.100@travelersdiary.com> References: <4364B61A.2090106@travelersdiary.com> <9112-93907@sneakemail.com> <4365468C.100@travelersdiary.com> Message-ID: <5663-11249@sneakemail.com> Josh McCormack joshmccormack-at-travelersdiary.com |nyphp dev/internal group use| wrote: >I wrote it with my own little spam free fingers. I have a pro >photographer friend of mine who was thinking of buying that software, >but it seemed like there must be something similar in the open source >world. And if not a perfect fit, I'd happily contribute time/money to >bring it along. > >Josh > There you go. Spammers are achieving perfection; mimicking you. Take it as a compliment ;-) As for galleries, I can't stop and look at the one you posted, but ZenPhoto is in beta (that's Photostack revisited). http://www.zenphoto.org/ I've worked with http://pixelpost.org/ Pixelpost and minigal http://www.minigal.dk with good results. -=john andrews http://www.seo-fun.com From 1j0lkq002 at sneakemail.com Sun Oct 30 21:57:01 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 30 Oct 2005 18:57:01 -0800 Subject: [nycphp-talk] similar open source program? In-Reply-To: <4365468C.100@travelersdiary.com> References: <4364B61A.2090106@travelersdiary.com> <9112-93907@sneakemail.com> <4365468C.100@travelersdiary.com> Message-ID: <9491-98141@sneakemail.com> and of course many others http://wiki.photoblogs.org/wiki/Photoblog_Scripts_and_Programs -=john andrews http://www.seo-fun.com From codebowl at gmail.com Mon Oct 31 09:14:55 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 31 Oct 2005 09:14:55 -0500 Subject: [nycphp-talk] Exporting Gmail Contacts Message-ID: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Hey guys, I came accross a script called handshake it is a social networking application, once i registered i noticed they had the ability for you to import your gmail contacts so that you could easilly invite people to the site by using your gmail contacts. Has anyone see how to read a list from your contacts on gmail? This site asked for your gmail username/password then would reach out and grab your lost of contacts for use on the site. Has anyone seen anything pre-made that will do this or is this something i will have to make myself ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Mon Oct 31 09:41:24 2005 From: chsnyder at gmail.com (csnyder) Date: Mon, 31 Oct 2005 09:41:24 -0500 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: On 10/31/05, Joseph Crawford wrote: > Hey guys, > > I came accross a script called handshake it is a social networking > application, once i registered i noticed they had the ability for you to > import your gmail contacts so that you could easilly invite people to the > site by using your gmail contacts. Has anyone see how to read a list from > your contacts on gmail? This site asked for your gmail username/password > then would reach out and grab your lost of contacts for use on the site. > Has anyone seen anything pre-made that will do this or is this something i > will have to make myself ;) Grab an RSS parser and a Gmail account and get to it. On the whole, GMail is RSS enabled throughout, so you can grab feeds of current messages, contacts, label contents, etc. There is also a handy export function within the GMail Contacts interface (upper right). From the GUI: "Export Contacts Export your contacts so you can transfer them to other accounts or save them offline. We will export all of your contacts in the CSV file format (Comma Separated Values). Learn more Gmail CSV (for import into another Gmail account) Outlook CSV (for import into Outlook clients)" What more would you need? -- Chris Snyder http://chxo.com/ From yournway at gmail.com Mon Oct 31 09:46:35 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 31 Oct 2005 14:46:35 +0000 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: uhhh Chris... Maybe it's just me, but on my gmail I don't see any "export" feature... not anywhere... though I'd like too, .-) On 31/10/05, csnyder wrote: > On 10/31/05, Joseph Crawford wrote: > > Hey guys, > > > > I came accross a script called handshake it is a social networking > > application, once i registered i noticed they had the ability for you to > > import your gmail contacts so that you could easilly invite people to the > > site by using your gmail contacts. Has anyone see how to read a list from > > your contacts on gmail? This site asked for your gmail username/password > > then would reach out and grab your lost of contacts for use on the site. > > Has anyone seen anything pre-made that will do this or is this something i > > will have to make myself ;) > ) > Grab an RSS parser and a Gmail account and get to it. > > On the whole, GMail is RSS enabled throughout, so you can grab feeds > of current messages, contacts, label contents, etc. > > There is also a handy export function within the GMail Contacts > interface (upper right). From the GUI: > > "Export Contacts > Export your contacts so you can transfer them to other accounts or > save them offline. > We will export all of your contacts in the CSV file format (Comma > Separated Values). Learn more > Gmail CSV (for import into another Gmail account) > Outlook CSV (for import into Outlook clients)" > > What more would you need? > > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From codebowl at gmail.com Mon Oct 31 09:48:57 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 31 Oct 2005 09:48:57 -0500 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: <8d9a42800510310648y16f663d0g9bd898ff4836baf5@mail.gmail.com> i do see the export feature however trying to figure out how to link directly so that it returned the csv i have been unable to figure out. as for the RSS i have not looked into that yet. Although using php on my site to remotely grab a csv file would be perfect. I am not looking to export from within my browser while looking at my gmail account, i am trying to do this behind the scenes from my website. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Mon Oct 31 09:50:46 2005 From: chsnyder at gmail.com (csnyder) Date: Mon, 31 Oct 2005 09:50:46 -0500 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: On 10/31/05, Alberto dos Santos wrote: > uhhh Chris... > > Maybe it's just me, but on my gmail I don't see any "export" > feature... not anywhere... though I'd like too, .-) > Hmmm. I click Contacts, and in the upper right above my List of Contacts I see Import and Export links. Granted, the Export link is marked "New!" so maybe this isn't rolled out completely. -- Chris Snyder http://chxo.com/ From yournway at gmail.com Mon Oct 31 09:51:53 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 31 Oct 2005 14:51:53 +0000 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: maybe, because mine just shows import...you lucky you... On 31/10/05, csnyder wrote: > On 10/31/05, Alberto dos Santos wrote: > > uhhh Chris... > > > > Maybe it's just me, but on my gmail I don't see any "export" > > feature... not anywhere... though I'd like too, .-) > > > > Hmmm. > > I click Contacts, and in the upper right above my List of Contacts I > see Import and Export links. Granted, the Export link is marked "New!" > so maybe this isn't rolled out completely. > > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From yournway at gmail.com Mon Oct 31 10:28:13 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 31 Oct 2005 15:28:13 +0000 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: <435CD52D.5060100@polymerdb.org> References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> <003a01c5d755$53f67560$6401a8c0@GUITAR> <435CD52D.5060100@polymerdb.org> Message-ID: Hello, I chose to follow this thread because it's exacly what I need. I need a mailer class but I don't use PEAR, can anybody recommend an easy and tested one (if there is such a thing) Thank you. On 24/10/05, W. @llen Shaw wrote: > David Mintz wrote: > > One thing I'm not clear on (said he, modulating into another topic) is > > whether we are supposed to put double-quotes around "John Daly," to use > > your example. It appears that we are. > > Right, me too, though it seems to me that rfc 2822 > (http://www.rfc-editor.org/rfc/rfc2822.txt) makes no mention of quoting > the display-name. > > However, it is true that if your display-name has any special characters > in it (this includes the "period" character ".", among other things) and > you don't double-quote it, PEAR Mail is going to refuse to send it, > saying "validation failed for W. Allen Shaw " > > Note this interesting snippet from RFC 2822: > > Note: The "period" (or "full stop") character (".") in obs-phrase is > > not a form that was allowed in earlier versions of this or any other > > standard. Period (nor any other character from specials) was not > > allowed in phrase because it introduced a parsing difficulty > > distinguishing between phrases and portions of an addr-spec (see > > section 4.4). It appears here because the period character is > > currently used in many messages in the display-name portion of > > addresses, especially for initials in names, and therefore must be > > interpreted properly. In the future, period may appear in the > > regular syntax of phrase. > > Apparently current email implementations are handling special characters > in display-name on their own terms; I would think it's wise to use > double-quotes around the display-name unless you know for sure they > won't use special characters. > > BTW, I'm glad you asked, as it gave me finally the extra curiosity to > learn more. Hopefully somebody will correct me if I'm wrong here. > > Take care, > Allen > > > -- > Allen Shaw > Polymer (http://polymerdb.org) > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From dcech at phpwerx.net Mon Oct 31 10:33:27 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 31 Oct 2005 10:33:27 -0500 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> <003a01c5d755$53f67560$6401a8c0@GUITAR> <435CD52D.5060100@polymerdb.org> Message-ID: <43663947.4080602@phpwerx.net> PHPMailer (http://phpmailer.sourceforge.net/) Done. Dan Cech Alberto dos Santos wrote: > Hello, > > I chose to follow this thread because it's exacly what I need. > I need a mailer class but I don't use PEAR, can anybody recommend an > easy and tested one (if there is such a thing) > > Thank you. From yournway at gmail.com Mon Oct 31 10:34:34 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 31 Oct 2005 15:34:34 +0000 Subject: [nycphp-talk] PEAR Mail and pine "To:" peculiarity In-Reply-To: <43663947.4080602@phpwerx.net> References: <001001c5d74a$21934ae0$6401a8c0@GUITAR> <003a01c5d755$53f67560$6401a8c0@GUITAR> <435CD52D.5060100@polymerdb.org> <43663947.4080602@phpwerx.net> Message-ID: Thanks. On 31/10/05, Dan Cech wrote: > PHPMailer (http://phpmailer.sourceforge.net/) > > Done. > > Dan Cech > > Alberto dos Santos wrote: > > Hello, > > > > I chose to follow this thread because it's exacly what I need. > > I need a mailer class but I don't use PEAR, can anybody recommend an > > easy and tested one (if there is such a thing) > > > > Thank you. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From codebowl at gmail.com Mon Oct 31 10:56:51 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 31 Oct 2005 10:56:51 -0500 Subject: [nycphp-talk] Exporting Gmail Contacts In-Reply-To: References: <8d9a42800510310614q77c25ff9ia12bdf7e146f5d27@mail.gmail.com> Message-ID: <8d9a42800510310756i3d601da7wd66e89cd8d65f718@mail.gmail.com> i have found libgmailer and gmail-lite, libgmailer allows me to grab my contacts, it shows exactly how to grab them, must use cookies etc.. and curl to fetch them ;) Maybe i will write my own maybe i will just use this library ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Mon Oct 31 11:20:11 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 31 Oct 2005 10:20:11 -0600 Subject: [nycphp-talk] getting my head around heirarchical structures In-Reply-To: <41120.38.117.147.25.1130685519.squirrel@38.117.147.25> References: <4363B05E.5000900@tgaconnect.com> <40773.38.117.147.25.1130614916.squirrel@38.117.147.25> <4364361D.1060904@polymerdb.org> <41120.38.117.147.25.1130685519.squirrel@38.117.147.25> Message-ID: <4366443B.6080704@polymerdb.org> Kenneth Downs wrote: >>Kenneth Downs wrote: >> >>>>One suggestion I would make is that each filter be given a name instead >>>>of >>>>an ID, and possibly let the user choose the name. Then the filters >>>>behave >>>>like functions. This makes nesting more intuitive. So I can put two >>>>filters into your table: >> >>This is not such a bad idea, but it requires me (or whatever admin) to >>create the filters ahead of time and offer them to the user. ... > > > Not at all. You can provide pre-defined filters if you like, or fall back > to system-generated pseudo-names when the user is just typing in criteria. > > To validate the criteria, you need a data dictionary. To make the > validation completely simple, you need to specify the criteria entirely in > atomic values, and not allow parsable expressions. Just as a follow-up: I think this discussion and the few days it's taken to transpire have led me to believe that, on the original question of data structure for nested filter criteria, my basic idea in the beginning was right: this is clearly a heirarchical relationship. But after digging more on the nested set model (reference recent thread "database performance"), I think I should be using that model rather than trying to tie records back to their parent nodes with a "parentID" column. Thanks to Ken and others for ideas on the interface and management of those filters. - Allen -- Allen Shaw Polymer (http://polymerdb.org) From ken at secdat.com Mon Oct 31 12:02:04 2005 From: ken at secdat.com (Kenneth Downs) Date: Mon, 31 Oct 2005 12:02:04 -0500 (EST) Subject: [nycphp-talk] freebsd, apache, mod_ssl problems In-Reply-To: <20051030225122.GA28381@panix.com> References: <20051030225122.GA28381@panix.com> Message-ID: <32809.38.117.147.25.1130778124.squirrel@38.117.147.25> In Gentoo Linux we have to activate SSL by using the parameter "-D SSL" which is set in /etc/conf.d/apache2. I would think it would be close if not the same in BSD, since it is an apache configuration issue. If there is a place where you turned on PHP, that is where you turn on SSL, so that in my /ect/conf.d/apache2 I also have to set "-D PHP5" > Hey Folks: > > I've installed FreeBSD on my laptop. I've compiled Apache with mod_ssl. > When I go to http://localhost/, we're good. But when I try to do > https://localhost/, I get a connection refused error. > > I set up the test cert using "localhost" as the domain name. > > The only change I made to httpd.conf is setting ServerName to "localhost". > > The logs are below: > > error_log > --------- > [Sun Oct 30 18:13:01 2005] [alert] httpd: Could not determine the > server's fully qualified domain name, using 127.0.0.1 for ServerName > [Sun Oct 30 18:13:01 2005] [notice] Apache/1.3.34 (Unix) mod_ssl/2.8.25 > OpenSSL/0.9.7e configured -- resuming normal operations > [Sun Oct 30 18:13:01 2005] [notice] Accept mutex: flock (Default: flock) > > ssl_engine_log > -------------- > [30/Oct/2005 18:13:01 52128] [info] Init: 1st restart round (already > detached) > [30/Oct/2005 18:13:01 52128] [info] Init: Seeding PRNG with 1160 bytes > of entropy > [30/Oct/2005 18:13:01 52128] [info] Init: Configuring temporary RSA > private keys (512/1024 bits) > [30/Oct/2005 18:13:01 52128] [info] Init: Configuring temporary DH > parameters (512/1024 bits) > [30/Oct/2005 18:13:01 52128] [info] Init: Initializing (virtual) servers > for SSL > > Any ideas, please? > > Thanks, > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From jkelly at sussex.edu Mon Oct 31 13:51:25 2005 From: jkelly at sussex.edu (jessica kelly) Date: Mon, 31 Oct 2005 13:51:25 -0500 Subject: [nycphp-talk] htaccess/php question Message-ID: Hi All, Trying to get a single .htm file in one directory parsed by PHP using htaccess in the directory. Powers that be won't let me use a .php extension. Can't seem to get it going. Don't want it parsing in lower directories. This is what I have in the htaccess file in the folder I want the file to be parsed: AddType application/x-httpd-php .htm .html This is what I have in the httpd.conf file: Options All AllowOverride All Been googling & reading the htaccess manual but at a loss. TIA, Jessica From dcech at phpwerx.net Mon Oct 31 15:40:58 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 31 Oct 2005 15:40:58 -0500 Subject: [nycphp-talk] htaccess/php question In-Reply-To: References: Message-ID: <4366815A.7060101@phpwerx.net> Jessica, Unfortunately the Files directive only operates on the basename of the file, so in your case the directive would be: AddType application/x-httpd-php .htm You could also use the ForceType directive instead of AddType, like so: ForceType application/x-httpd-php This is probably the best way to do what you're after. HTH Dan jessica kelly wrote: > Hi All, > > Trying to get a single .htm file in one directory parsed by PHP using htaccess in the directory. Powers that be won't let me use a .php extension. Can't seem to get it going. Don't want it parsing in lower directories. This is what I have in the htaccess file in the folder I want the file to be parsed: > > > AddType application/x-httpd-php .htm .html > > > This is what I have in the httpd.conf file: > > > Options All > AllowOverride All > > > Been googling & reading the htaccess manual but at a loss. > > TIA, > > Jessica From suzerain at suzerain.com Mon Oct 31 16:54:07 2005 From: suzerain at suzerain.com (Marc Antony Vose) Date: Mon, 31 Oct 2005 16:54:07 -0500 Subject: [nycphp-talk] form element arrays In-Reply-To: <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: Hi there: Honestly, I'm posting this before I've completely exhausted my troubleshooting options, but I figured someone might be bored enough to beat me to it. I have a select element for which I need to return multiply selected items to PHP. In other words, I guess it has to have the name 'something[]', with brackets. However, I also need to add options to the select list via javascript, but it seems like the addition of the brackets makes the form element name invalid, by javascript's standards, since you access attributes of objects with brackets (i.e., JavaScript can't see an element named 'something[]'). It looks like I'm going to have to use the select list to just display the options to the user, but really use DOM to dynamically add hidden form elements to the form which hold the values I need, as a nasty workaround, but I was wondering if anyone else had any silver bullet for this. Cheers, -- Marc Antony Vose http://www.suzerain.com/ Never underestimate the power of human stupidity. -- Lazarus Long From ashaw at polymerdb.org Mon Oct 31 17:14:59 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 31 Oct 2005 16:14:59 -0600 Subject: [nycphp-talk] pretty-print / parse sql Message-ID: <43669763.9070006@polymerdb.org> Hi All, Does anyone know of an existing (open-source) PHP library that will pretty-print sql statements? I'm looking into phpMyAdmin code, and it doesn't seem such a mess as I might make myself, but if there's something that could work for this out-of-th-box, I'd much rather use it than decipher and re-assemble phpMyAdmin for my own use. I googled around for and found several programs to parse sql statements, but none in PHP. Seems like this is something people would use... Thanks, Allen -- Allen Shaw Polymer (http://polymerdb.org) From tgales at tgaconnect.com Mon Oct 31 17:22:59 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 31 Oct 2005 17:22:59 -0500 Subject: [nycphp-talk] form element arrays In-Reply-To: References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: <43669943.4010101@tgaconnect.com> Marc Antony Vose wrote: >I have a select element for which I need to return multiply selected >items to PHP. In other words, I guess it has to have the name >'something[]', with brackets. > >However, I also need to add options to the select list via >javascript, but it seems like the addition of the brackets makes the >form element name invalid, by javascript's standards, since you >access attributes of objects with brackets (i.e., JavaScript can't >see an element named 'something[]'). Maybe getElementById() can help. see: http://lists.nyphp.org/pipermail/talk/2004-July/011083.html and http://lists.nyphp.org/pipermail/talk/2004-July/011100.html -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From dcech at phpwerx.net Mon Oct 31 17:24:11 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 31 Oct 2005 17:24:11 -0500 Subject: [nycphp-talk] pretty-print / parse sql In-Reply-To: <43669763.9070006@polymerdb.org> References: <43669763.9070006@polymerdb.org> Message-ID: <4366998B.105@phpwerx.net> I've had success with PEAR::Text_Highlighter in the past, it has a pretty robust parsing engine and plenty of flexibility. http://pear.php.net/package/Text_Highlighter Dan Allen Shaw wrote: > Hi All, > > Does anyone know of an existing (open-source) PHP library that will > pretty-print sql statements? I'm looking into phpMyAdmin code, and it > doesn't seem such a mess as I might make myself, but if there's > something that could work for this out-of-th-box, I'd much rather use it > than decipher and re-assemble phpMyAdmin for my own use. > > I googled around for and found several programs to parse sql statements, > but none in PHP. Seems like this is something people would use... > > Thanks, > Allen From dcech at phpwerx.net Mon Oct 31 17:27:53 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 31 Oct 2005 17:27:53 -0500 Subject: [nycphp-talk] form element arrays In-Reply-To: References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: <43669A69.7070908@phpwerx.net> There are a couple of ways I know of to work around this problem. 1. Set your form up like: use a javascript like document.example_form.elements['userdata[hidden_group_2][third]'].value On 10/31/05, Marc Antony Vose wrote: > > Hi there: > > Honestly, I'm posting this before I've completely exhausted my > troubleshooting options, but I figured someone might be bored enough > to beat me to it. > > I have a select element for which I need to return multiply selected > items to PHP. In other words, I guess it has to have the name > 'something[]', with brackets. > > However, I also need to add options to the select list via > javascript, but it seems like the addition of the brackets makes the > form element name invalid, by javascript's standards, since you > access attributes of objects with brackets (i.e., JavaScript can't > see an element named 'something[]'). > > It looks like I'm going to have to use the select list to just > display the options to the user, but really use DOM to dynamically > add hidden form elements to the form which hold the values I need, as > a nasty workaround, but I was wondering if anyone else had any silver > bullet for this. > > Cheers, > > -- > Marc Antony Vose > http://www.suzerain.com/ > > Never underestimate the power of human stupidity. > -- Lazarus Long > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Oct 31 19:58:27 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 31 Oct 2005 19:58:27 -0500 Subject: [nycphp-talk] Variables syntax In-Reply-To: References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> Message-ID: <20051101005827.GA18350@panix.com> Hey Tim: On Fri, Oct 28, 2005 at 04:50:56PM -0400, Tim McEwen wrote: > > ab -n 10 http://localhost/test_a.php > ... > Time per request: 28574.142 [ms] (mean) > ... > > ab -n 10 http://localhost/test_b.php > ... > Time per request: 14057.574 [ms] (mean) > ... How many times did you run your test? Things vary between requests. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409