From chsnyder at gmail.com Fri Aug 1 16:43:34 2008 From: chsnyder at gmail.com (csnyder) Date: Fri, 1 Aug 2008 16:43:34 -0400 Subject: [nycphp-talk] nested set tree sorting In-Reply-To: <0C283277-BB21-4B34-A848-627710FFE82C@suzerain.com> References: <445707.55595.qm@web54112.mail.re2.yahoo.com> <5458db3c0807300822x2bbaecbfve1e16d929363e405@mail.gmail.com> <5458db3c0807301722x2a6d1b30va70149bc6626b2fa@mail.gmail.com> <0C283277-BB21-4B34-A848-627710FFE82C@suzerain.com> Message-ID: On Thu, Jul 31, 2008 at 2:06 AM, Marc Antony Vose wrote: > Has anyone previously tackled this problem > before, and have some sample code to rebuild the entire tree, but > alphabetize or sort the entries in each level? > Heh, that's a nice problem. You could write a recursive function that builds a new tree by walking the existing one, but with everything properly alphabetized. This is expensive, and memory could be an issue if you have a lot of categories at high depths, but it's a straightforward approach. You could also create a hierarchical naming scheme for the categories ( /fruit/apples, /fruit/organges, etc ) and rebuild the tree in chunks based on name. That gets around memory limitations, but of course it still takes time to build the new tree. If you don't want to build a new tree each time, you'll need a way to move the categories around arbitrarily. I can point you to my implementation at http://trac.dey.fcny.org/browser/fcnyl3/lib/fcnyNode.php#L505 It's a bit mind-bending, but the general idea is to move the set you are working with out of the tree, move the nodes around (update the left and right values) within the set, and then move the reorganized set back into its old place in the tree. In practice, it might not be that big a deal to leave them out of order and use an ORDER BY clause to sort the categories at runtime. Chris Snyder http://chxor.chxo.com/ From brian at realm3.com Mon Aug 4 10:03:14 2008 From: brian at realm3.com (Brian D.) Date: Mon, 4 Aug 2008 07:03:14 -0700 Subject: [nycphp-talk] nested set tree sorting In-Reply-To: References: <445707.55595.qm@web54112.mail.re2.yahoo.com> <5458db3c0807300822x2bbaecbfve1e16d929363e405@mail.gmail.com> <5458db3c0807301722x2a6d1b30va70149bc6626b2fa@mail.gmail.com> <0C283277-BB21-4B34-A848-627710FFE82C@suzerain.com> Message-ID: I've dealt with this in several different applications and I've used the CakePHP Tree model behavior, which in turn uses the nested set model layed out here: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html You might find the article above helpful. If you want to see how it works in CakePHP, download it from cakephp.org and look at tree.php. For a quick overview you can check: http://realm3.com/articles/drag_and_drop_trees_with_cakephp On Fri, Aug 1, 2008 at 1:43 PM, csnyder wrote: > On Thu, Jul 31, 2008 at 2:06 AM, Marc Antony Vose wrote: >> Has anyone previously tackled this problem >> before, and have some sample code to rebuild the entire tree, but >> alphabetize or sort the entries in each level? >> > > Heh, that's a nice problem. > > You could write a recursive function that builds a new tree by walking > the existing one, but with everything properly alphabetized. This is > expensive, and memory could be an issue if you have a lot of > categories at high depths, but it's a straightforward approach. > > You could also create a hierarchical naming scheme for the categories > ( /fruit/apples, /fruit/organges, etc ) and rebuild the tree in chunks > based on name. That gets around memory limitations, but of course it > still takes time to build the new tree. > > If you don't want to build a new tree each time, you'll need a way to > move the categories around arbitrarily. I can point you to my > implementation at > http://trac.dey.fcny.org/browser/fcnyl3/lib/fcnyNode.php#L505 > It's a bit mind-bending, but the general idea is to move the set you > are working with out of the tree, move the nodes around (update the > left and right values) within the set, and then move the reorganized > set back into its old place in the tree. > > In practice, it might not be that big a deal to leave them out of > order and use an ORDER BY clause to sort the categories at runtime. > > Chris Snyder > http://chxor.chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- realm3 web applications [realm3.com] Information architecture, application development. phone: (917) 512-3594 fax: (440) 744-3559 From brian at realm3.com Mon Aug 4 11:14:48 2008 From: brian at realm3.com (Brian D.) Date: Mon, 4 Aug 2008 11:14:48 -0400 Subject: [nycphp-talk] Fw: soccer website - need help ASAP! (susanna thornton STUDIO) In-Reply-To: <445707.55595.qm@web54112.mail.re2.yahoo.com> References: <445707.55595.qm@web54112.mail.re2.yahoo.com> Message-ID: Great information, Rada, thanks for sending it in. On Wed, Jul 30, 2008 at 10:34 AM, -- rada -- wrote: > Below are current Cut-off Wages for computer specialists from the New York > State Department of Labor. These are not some extravagant rates. These are > rates that the NYS DOL considers so low that if you are unemployed and > someone offers you work below this rate, you can refuse the job without > losing your unemployment insurance. Needless to say, nobody with a brain > will work for cut-off wages, these are just examples of absolute rock-bottom > rates. > > Occupation Cut-off Wage > Computer Programmers $31.77 > Computer Software Engineers $35.79 > Computer Support Specialists $24.30 > > The above hourly rates are for full-time work. For less than 40 hours/week, > the rates have to be proportionately higher. For example, if you are a > "Computer Programmer", the hourly cut-off wage is $31.77 but the > corresponding yearly wage is $74,626.00. > To Susanna: > This is a professional PHP community and frankly, your $10/hour for > part-time work is inappropriate to the point of being insulting. You may > think that an offer is just an offer and those who don't like it could > simply pass on by, but I'd rather not see this online space turn into a > craigslist ghetto with its infamous "looking for someone to build me > a YouTube/Ebay combo for $1,000" ads. > > To fellow PHP developers: > I know we are all flooded with work and don't necesarily have time for > nonsense, but let's try and take care of each other. Save this link for the > DOL minimum wages page and let unethical would-be clients know when they've > crossed the line. For sample language, please refer to the No Spec project > which contains lots of great examples like this. > > > Sincerely > Rada Lapsker > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- realm3 web applications [realm3.com] Information architecture, application development. phone: (917) 512-3594 fax: (440) 744-3559 From mmwaldman at optonline.net Mon Aug 4 14:49:15 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 14:49:15 -0400 Subject: [nycphp-talk] PHP Bcc Headers Message-ID: <0K53007ZVB1IT5O0@mta1.srv.hcvlny.cv.net> I call a mail function with bcc and from in the header. It worked fine on my development server, but when I copied the code to production, the headers stopped working. The versions of php on the production server are 4.4.4 and 5 something. I added a handler to the htaccess to use php5. Does anyone know if there's something that has to be set in the environment for headers to work? Margaret Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzcoder at bzcode.com Mon Aug 4 14:55:54 2008 From: bzcoder at bzcode.com (bzcoder) Date: Mon, 04 Aug 2008 14:55:54 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K53007ZVB1IT5O0@mta1.srv.hcvlny.cv.net> References: <0K53007ZVB1IT5O0@mta1.srv.hcvlny.cv.net> Message-ID: <489750BA.1060706@bzcode.com> (Margaret) Michele Waldman wrote: > > I call a mail function with bcc and from in the header. > > It worked fine on my development server, but when I copied the code to > production, the headers stopped working. > ... > > Does anyone know if there?s something that has to be set in the > environment for headers to work? > It all depends on how your PHP mail server configuration and your mail server itself is configured. There are a lot of variables there that makes life difficult when using the built in mail() function. I highly recommend that, unless your like me and love to twiddle with your email server configuration to get things working 'just so', that you use either SwiftMailer, http://www.swiftmailer.org/ or PHPMailer http://phpmailer.codeworxtech.com/index.php?pg=phpmailer Configure them to connect to your SMTP server using your user account and password for authenticated email and let them handle all the issues. From chsnyder at gmail.com Mon Aug 4 15:15:28 2008 From: chsnyder at gmail.com (csnyder) Date: Mon, 4 Aug 2008 15:15:28 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K53007ZVB1IT5O0@mta1.srv.hcvlny.cv.net> References: <0K53007ZVB1IT5O0@mta1.srv.hcvlny.cv.net> Message-ID: On Mon, Aug 4, 2008 at 2:49 PM, (Margaret) Michele Waldman wrote: > I call a mail function with bcc and from in the header. > > It worked fine on my development server, but when I copied the code to > production, the headers stopped working. Same OS? Are you using "\r\n" at the end of each line, or just "\n"? I've had to switch between them before, even going from one version of Debian to another. Do the headers appear in the raw email at all, or are they being completely ignored by PHP and/or the mailer? Chris Snyder http://chxor.chxo.com/ From mmwaldman at optonline.net Mon Aug 4 15:17:32 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 15:17:32 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: Message-ID: <0K5300N7RCCM2MO0@mta3.srv.hcvlny.cv.net> I'm using "\r\n" at the end of each line. The headers are being completely ignored. I'll try switching. The did cross my mind before, but I wasn't sure what to test other than "\r\n". -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Monday, August 04, 2008 3:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers On Mon, Aug 4, 2008 at 2:49 PM, (Margaret) Michele Waldman wrote: > I call a mail function with bcc and from in the header. > > It worked fine on my development server, but when I copied the code to > production, the headers stopped working. Same OS? Are you using "\r\n" at the end of each line, or just "\n"? I've had to switch between them before, even going from one version of Debian to another. Do the headers appear in the raw email at all, or are they being completely ignored by PHP and/or the mailer? Chris Snyder http://chxor.chxo.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From chsnyder at gmail.com Mon Aug 4 15:37:11 2008 From: chsnyder at gmail.com (csnyder) Date: Mon, 4 Aug 2008 15:37:11 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300N7RCCM2MO0@mta3.srv.hcvlny.cv.net> References: <0K5300N7RCCM2MO0@mta3.srv.hcvlny.cv.net> Message-ID: On Mon, Aug 4, 2008 at 3:17 PM, (Margaret) Michele Waldman wrote: > I'm using "\r\n" at the end of each line. > > The headers are being completely ignored. > > I'll try switching. The did cross my mind before, but I wasn't sure what to > test other than "\r\n". Completely ignored is probably a bad sign, but you could try using just "\n". When that doesn't work, try setting just a single "X-sent-by: php" header to avoid line-ending issues altogether. It may be worth creating a test script that does nothing but send a simple email so you can isolate the problem from other potential bugs, post the code to this list for review, etc. From mmwaldman at optonline.net Mon Aug 4 15:40:53 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 15:40:53 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: Message-ID: <0K5300BAZDFJTAQ0@mta2.srv.hcvlny.cv.net> I have a test script already. Bcc doesn't work on either. And -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Monday, August 04, 2008 3:37 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers On Mon, Aug 4, 2008 at 3:17 PM, (Margaret) Michele Waldman wrote: > I'm using "\r\n" at the end of each line. > > The headers are being completely ignored. > > I'll try switching. The did cross my mind before, but I wasn't sure what to > test other than "\r\n". Completely ignored is probably a bad sign, but you could try using just "\n". When that doesn't work, try setting just a single "X-sent-by: php" header to avoid line-ending issues altogether. It may be worth creating a test script that does nothing but send a simple email so you can isolate the problem from other potential bugs, post the code to this list for review, etc. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From patrick at hexane.org Mon Aug 4 15:46:47 2008 From: patrick at hexane.org (Patrick May) Date: Mon, 4 Aug 2008 15:46:47 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300BAZDFJTAQ0@mta2.srv.hcvlny.cv.net> References: <0K5300BAZDFJTAQ0@mta2.srv.hcvlny.cv.net> Message-ID: Hello, I recommend following bzcoder's suggestion of using PHP Mailer, or simply calling mail() twice: Cheers, Patrick On Mon, Aug 4, 2008 at 3:40 PM, (Margaret) Michele Waldman < mmwaldman at optonline.net> wrote: > I have a test script already. > > Bcc doesn't work on either. > > $headers = "From: member at sovsite.com" . "\r\n"; > $headers .= "Bcc: mmwaldman at optonline.net" . "\r\n"; > $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; > > mail("greg at lioncube.com", "test", "test", $headers); > ?> > > And > > $headers = "From: member at sovsite.com" . "\n"; > $headers .= "Bcc: mmwaldman at optonline.net" . "\n"; > $headers .= "X-Mailer: PHP/" . phpversion() . "\n"; > > mail("greg at lioncube.com", "test", "test", $headers); > ?> > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On > Behalf Of csnyder > Sent: Monday, August 04, 2008 3:37 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Bcc Headers > > On Mon, Aug 4, 2008 at 3:17 PM, (Margaret) Michele Waldman > wrote: > > I'm using "\r\n" at the end of each line. > > > > The headers are being completely ignored. > > > > I'll try switching. The did cross my mind before, but I wasn't sure what > to > > test other than "\r\n". > > Completely ignored is probably a bad sign, but you could try using just > "\n". > > When that doesn't work, try setting just a single "X-sent-by: php" > header to avoid line-ending issues altogether. It may be worth > creating a test script that does nothing but send a simple email so > you can isolate the problem from other potential bugs, post the code > to this list for review, etc. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Patrick May 135 Oak Street Brooklyn, NY 11222 +1 (347) 232-5208 patrick at hexane.org http://www.hexane.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcampbell1 at gmail.com Mon Aug 4 16:04:44 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Mon, 4 Aug 2008 16:04:44 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300BAZDFJTAQ0@mta2.srv.hcvlny.cv.net> References: <0K5300BAZDFJTAQ0@mta2.srv.hcvlny.cv.net> Message-ID: <8f0676b40808041304x2976e1a8l494ed79470e60188@mail.gmail.com> On Mon, Aug 4, 2008 at 3:40 PM, (Margaret) Michele Waldman wrote: > I have a test script already. > > Bcc doesn't work on either. > A few questions to help narrow this down: Have you checked that the To: part is working? When you say the Bcc: doesn't work, does greg at lioncube.com get the message but not mmwaldman at optonline.net? Are you absolutely sure the bcc isn't ending up in a spam folder? John C. From ajai at bitblit.net Mon Aug 4 16:43:06 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 4 Aug 2008 16:43:06 -0400 (EDT) Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <489750BA.1060706@bzcode.com> Message-ID: On Mon, 4 Aug 2008, bzcoder wrote: > I highly recommend that, unless your like me and love to twiddle with > your email server configuration to get things working 'just so', that > you use either SwiftMailer, http://www.swiftmailer.org/ or PHPMailer > http://phpmailer.codeworxtech.com/index.php?pg=phpmailer +1 SwiftMailer -- Aj. From mmwaldman at optonline.net Mon Aug 4 17:29:57 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 17:29:57 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <8f0676b40808041304x2976e1a8l494ed79470e60188@mail.gmail.com> Message-ID: <0K5300DBBIHB43N0@mta4.srv.hcvlny.cv.net> Yes. I've used just my email addresses. No bcc even in the spam folder. It's definitely a issue on that particular server. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Monday, August 04, 2008 4:05 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers On Mon, Aug 4, 2008 at 3:40 PM, (Margaret) Michele Waldman wrote: > I have a test script already. > > Bcc doesn't work on either. > A few questions to help narrow this down: Have you checked that the To: part is working? When you say the Bcc: doesn't work, does greg at lioncube.com get the message but not mmwaldman at optonline.net? Are you absolutely sure the bcc isn't ending up in a spam folder? John C. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From smanes at magpie.com Mon Aug 4 17:32:46 2008 From: smanes at magpie.com (Steve Manes) Date: Mon, 04 Aug 2008 17:32:46 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300N7RCCM2MO0@mta3.srv.hcvlny.cv.net> References: <0K5300N7RCCM2MO0@mta3.srv.hcvlny.cv.net> Message-ID: <4897757E.3000900@magpie.com> (Margaret) Michele Waldman wrote: > I'm using "\r\n" at the end of each line. > > The headers are being completely ignored. > > I'll try switching. The did cross my mind before, but I wasn't sure what to > test other than "\r\n". Just to rule it out, have you successfully sent Bcc mail to this address using a garden variety email client? From mmwaldman at optonline.net Mon Aug 4 17:32:03 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 17:32:03 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: Message-ID: <0K5300DT6IKTVUR0@mta2.srv.hcvlny.cv.net> I did resort to calling mail() twice. I hated doing it. Then he called me and said there was no from on the email and the client isn't getting the email, which made me think it was a header issue again. However, My testing shows there is a from. I think the email in question has spam filters set too high. _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Patrick May Sent: Monday, August 04, 2008 3:47 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers Hello, I recommend following bzcoder's suggestion of using PHP Mailer, or simply calling mail() twice: Cheers, Patrick On Mon, Aug 4, 2008 at 3:40 PM, (Margaret) Michele Waldman wrote: I have a test script already. Bcc doesn't work on either. And -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Monday, August 04, 2008 3:37 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers On Mon, Aug 4, 2008 at 3:17 PM, (Margaret) Michele Waldman wrote: > I'm using "\r\n" at the end of each line. > > The headers are being completely ignored. > > I'll try switching. The did cross my mind before, but I wasn't sure what to > test other than "\r\n". Completely ignored is probably a bad sign, but you could try using just "\n". When that doesn't work, try setting just a single "X-sent-by: php" header to avoid line-ending issues altogether. It may be worth creating a test script that does nothing but send a simple email so you can isolate the problem from other potential bugs, post the code to this list for review, etc. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -- Patrick May 135 Oak Street Brooklyn, NY 11222 +1 (347) 232-5208 patrick at hexane.org http://www.hexane.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at optonline.net Mon Aug 4 17:33:18 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 17:33:18 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <4897757E.3000900@magpie.com> Message-ID: <0K5300BIDIMWD3S0@mta5.srv.hcvlny.cv.net> The identical code send out a bcc on my development server. It's definitely the production server issue. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Steve Manes Sent: Monday, August 04, 2008 5:33 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers (Margaret) Michele Waldman wrote: > I'm using "\r\n" at the end of each line. > > The headers are being completely ignored. > > I'll try switching. The did cross my mind before, but I wasn't sure what to > test other than "\r\n". Just to rule it out, have you successfully sent Bcc mail to this address using a garden variety email client? _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From smanes at magpie.com Mon Aug 4 17:41:15 2008 From: smanes at magpie.com (Steve Manes) Date: Mon, 04 Aug 2008 17:41:15 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300BIDIMWD3S0@mta5.srv.hcvlny.cv.net> References: <0K5300BIDIMWD3S0@mta5.srv.hcvlny.cv.net> Message-ID: <4897777B.70808@magpie.com> (Margaret) Michele Waldman wrote: > The identical code send out a bcc on my development server. > > It's definitely the production server issue. Sometimes this works: set an explicit "Return-Path" header to your email address to catch any bounce mail. From rolan at omnistep.com Mon Aug 4 17:50:15 2008 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 04 Aug 2008 17:50:15 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300DT6IKTVUR0@mta2.srv.hcvlny.cv.net> References: <0K5300DT6IKTVUR0@mta2.srv.hcvlny.cv.net> Message-ID: <48977997.3010804@omnistep.com> Some mail servers will send out email using a default envelope like "apache at localhost.com" (even though the email header reads "From:member at sovsite.com"). The receiving mail server will see this domain as bogus and reject the email as spam. If this is done at the start of the smtp session, the recipient will never even see it. Try adding this additional parameter to your mail function: mail("greg at lioncube.com ", "test", "test", $headers,'-f member at sovsite.com'); The "-f" passes the value to sendmail or postfix to use as the envelope sender. ~Rolan (Margaret) Michele Waldman wrote: > > I did resort to calling mail() twice. I hated doing it. > > Then he called me and said there was no from on the email and the > client isn?t getting the email, which made me think it was a header > issue again. > > However, My testing shows there is a from. > > I think the email in question has spam filters set too high. > > ------------------------------------------------------------------------ > > *From:* talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] *On Behalf Of *Patrick May > *Sent:* Monday, August 04, 2008 3:47 PM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] PHP Bcc Headers > > Hello, > > I recommend following bzcoder's suggestion of using PHP Mailer, or > simply calling mail() twice: > > $headers = "From: member at sovsite.com " . > "\r\n"; > $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; > > mail("greg at lioncube.com ", "test", "test", > $headers); > mail("mmwaldman at optonline.net ", > "test", "test", $headers); > ?> > > Cheers, > > Patrick > > On Mon, Aug 4, 2008 at 3:40 PM, (Margaret) Michele Waldman > > wrote: > > I have a test script already. > > Bcc doesn't work on either. > > $headers = "From: member at sovsite.com " . > "\r\n"; > $headers .= "Bcc: mmwaldman at optonline.net > " . "\r\n"; > $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; > > mail("greg at lioncube.com ", "test", "test", > $headers); > ?> > > And > > $headers = "From: member at sovsite.com " . "\n"; > $headers .= "Bcc: mmwaldman at optonline.net > " . "\n"; > $headers .= "X-Mailer: PHP/" . phpversion() . "\n"; > > mail("greg at lioncube.com ", "test", "test", > $headers); > ?> > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org > ] On > Behalf Of csnyder > > Sent: Monday, August 04, 2008 3:37 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Bcc Headers > > On Mon, Aug 4, 2008 at 3:17 PM, (Margaret) Michele Waldman > > wrote: > > I'm using "\r\n" at the end of each line. > > > > The headers are being completely ignored. > > > > I'll try switching. The did cross my mind before, but I wasn't sure what > to > > test other than "\r\n". > > Completely ignored is probably a bad sign, but you could try using just > "\n". > > When that doesn't work, try setting just a single "X-sent-by: php" > header to avoid line-ending issues altogether. It may be worth > creating a test script that does nothing but send a simple email so > you can isolate the problem from other potential bugs, post the code > to this list for review, etc. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > -- > Patrick May > 135 Oak Street > Brooklyn, NY 11222 > +1 (347) 232-5208 > patrick at hexane.org > http://www.hexane.org > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From bzcoder at bzcode.com Mon Aug 4 17:58:39 2008 From: bzcoder at bzcode.com (bzcoder) Date: Mon, 04 Aug 2008 17:58:39 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <0K5300DT6IKTVUR0@mta2.srv.hcvlny.cv.net> References: <0K5300DT6IKTVUR0@mta2.srv.hcvlny.cv.net> Message-ID: <48977B8F.9010807@bzcode.com> (Margaret) Michele Waldman wrote: > > I did resort to calling mail() twice. I hated doing it. > > Then he called me and said there was no from on the email and the > client isn?t getting the email, which made me think it was a header > issue again. > > However, My testing shows there is a from. > > I think the email in question has spam filters set too high. > Ok, if you really want to troubleshoot this, first thing to do is to do a phpinfo(); on both systems and look for your mail settings. For example, Path to sendmail : /usr/sbin/sendmail -t -i That means that when you use the mail() function, "sendmail" is invoked with the -t and -i parameters and then passed the rest of the email message from the command line. So a complete command would be: /usr/sbin/sendmail -t -i $fullmessage The -t tells sendmail to extract the information for to, cc, and bcc from the header of the text message. The -i tells sendmail not to treat a dot by itself as the end of the message(so if your message is this is . my text Sendmail doesn't truncate at the end of is). A lot of times the -t is left off the command, which mucks you up. Then there is running a non sendmail mail server which won't accept /n/r as end of line statements, so it treats the entire header as part of the body and makes up it's own header. Then there is whether or not your mail server will stick it's own from on the message and ignore the form in the message itself. And of course a lot of people stick their own sendmail command stub in place of the command line because they run into problems, and now it's not documented so a new programmer doesn't know the rules of that road. Plus it's just a really really bad idea, and a security hole, to allow programs to send email from the command line these days when it is so easy to just give a program a userid and password and have it send via authenticated SMTP(now, if you send out a few hundred thousand emails at a time, like I do with the mailling lists I support, suddenly that security whole seems less problematic than the added time for authentication and connection setup/teardown and moving it all to a server dedicated just to email processing of authenticated programs is not such a bad idea. :-)) From mmwaldman at optonline.net Mon Aug 4 20:19:40 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 04 Aug 2008 20:19:40 -0400 Subject: [nycphp-talk] PHP Bcc Headers In-Reply-To: <48977B8F.9010807@bzcode.com> Message-ID: <0K53009S2QC6W6Y0@mta5.srv.hcvlny.cv.net> Sendmail has the right flags. I had already checked that. I found out the from is working, just not the bcc and the client isn't receiving email at his preferred account, we're having to use a secondary account. I think that has something to do with his mail account setup. I don't think I'm going to replace mail with an smtp mail because I don't know what his email account is working and we would have to retest and send the code. If it was my app, I might, but it just isn't a good idea in this case. Plus, this is a website template which may be moved around from server to server and possibly hosting company to hosting company. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of bzcoder Sent: Monday, August 04, 2008 5:59 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Bcc Headers (Margaret) Michele Waldman wrote: > > I did resort to calling mail() twice. I hated doing it. > > Then he called me and said there was no from on the email and the > client isn't getting the email, which made me think it was a header > issue again. > > However, My testing shows there is a from. > > I think the email in question has spam filters set too high. > Ok, if you really want to troubleshoot this, first thing to do is to do a phpinfo(); on both systems and look for your mail settings. For example, Path to sendmail : /usr/sbin/sendmail -t -i That means that when you use the mail() function, "sendmail" is invoked with the -t and -i parameters and then passed the rest of the email message from the command line. So a complete command would be: /usr/sbin/sendmail -t -i $fullmessage The -t tells sendmail to extract the information for to, cc, and bcc from the header of the text message. The -i tells sendmail not to treat a dot by itself as the end of the message(so if your message is this is . my text Sendmail doesn't truncate at the end of is). A lot of times the -t is left off the command, which mucks you up. Then there is running a non sendmail mail server which won't accept /n/r as end of line statements, so it treats the entire header as part of the body and makes up it's own header. Then there is whether or not your mail server will stick it's own from on the message and ignore the form in the message itself. And of course a lot of people stick their own sendmail command stub in place of the command line because they run into problems, and now it's not documented so a new programmer doesn't know the rules of that road. Plus it's just a really really bad idea, and a security hole, to allow programs to send email from the command line these days when it is so easy to just give a program a userid and password and have it send via authenticated SMTP(now, if you send out a few hundred thousand emails at a time, like I do with the mailling lists I support, suddenly that security whole seems less problematic than the added time for authentication and connection setup/teardown and moving it all to a server dedicated just to email processing of authenticated programs is not such a bad idea. :-)) _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ka at kacomputerconsulting.com Mon Aug 4 21:52:10 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Mon, 4 Aug 2008 18:52:10 -0700 Subject: [nycphp-talk] PHP Bcc Headers Message-ID: <1217901130.8685@coral.he.net> We had severe problems with PHP mail() this spring on a project and ended up switching servers, and then having to work with sys admins for hours to figure out why certain stuff wasn't working quite right (we have code that sends emails including to bcc's and multi recipient lists). One thing we did discover was that between servers, and between different web hosts, there are some serious differences in configuration that can break mail() code. Another thing we discovered is that when something with mail() is not working, it can be very difficult to figure out why. Also someone mentioned to me a couple of months ago that when sending volume increases, mail() exhibits unexpected behaviors...i.e. cr*ps out without warning. We are fine with mail() for the beta but will most definitely be switching to a more robust solution in the very near future. -- Kristina > Sendmail has the right flags. I had already checked that. > > I found out the from is working, just not the bcc and the client isn't > receiving email at his preferred account, we're having to use a secondary > account. I think that has something to do with his mail account setup. > > I don't think I'm going to replace mail with an smtp mail because I don't > know what his email account is working and we would have to retest and send > the code. If it was my app, I might, but it just isn't a good idea in this > case. Plus, this is a website template which may be moved around from > server to server and possibly hosting company to hosting company. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- bounces at lists.nyphp.org] On > Behalf Of bzcoder > Sent: Monday, August 04, 2008 5:59 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Bcc Headers > > (Margaret) Michele Waldman wrote: > > > > I did resort to calling mail() twice. I hated doing it. > > > > Then he called me and said there was no from on the email and the > > client isn't getting the email, which made me think it was a header > > issue again. > > > > However, My testing shows there is a from. > > > > I think the email in question has spam filters set too high. > > > > Ok, if you really want to troubleshoot this, first thing to do is to do > a phpinfo(); on both systems and look for your mail settings. > > For example, > Path to sendmail : /usr/sbin/sendmail -t -i > > That means that when you use the mail() function, "sendmail" is invoked > with the -t and -i parameters and then passed the rest of the email > message from the command line. > > So a complete command would be: > /usr/sbin/sendmail -t -i $fullmessage > > The -t tells sendmail to extract the information for to, cc, and bcc > from the header of the text message. > > The -i tells sendmail not to treat a dot by itself as the end of the > message(so if your message is > this is > . > my text > > Sendmail doesn't truncate at the end of is). > > A lot of times the -t is left off the command, which mucks you up. > > Then there is running a non sendmail mail server which won't accept /n/r > as end of line statements, so it treats the entire header as part of the > body and makes up it's own header. > > Then there is whether or not your mail server will stick it's own from > on the message and ignore the form in the message itself. > > And of course a lot of people stick their own sendmail command stub in > place of the command line because they run into problems, and now it's > not documented so a new programmer doesn't know the rules of that road. > > > Plus it's just a really really bad idea, and a security hole, to allow > programs to send email from the command line these days when it is so > easy to just give a program a userid and password and have it send via > authenticated SMTP(now, if you send out a few hundred thousand emails at > a time, like I do with the mailling lists I support, suddenly that > security whole seems less problematic than the added time for > authentication and connection setup/teardown and moving it all to a > server dedicated just to email processing of authenticated programs is > not such a bad idea. :-)) > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ka at kacomputerconsulting.com Mon Aug 4 21:52:10 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Mon, 4 Aug 2008 18:52:10 -0700 Subject: [nycphp-talk] PHP Bcc Headers Message-ID: <1217901130.8685@coral.he.net> We had severe problems with PHP mail() this spring on a project and ended up switching servers, and then having to work with sys admins for hours to figure out why certain stuff wasn't working quite right (we have code that sends emails including to bcc's and multi recipient lists). One thing we did discover was that between servers, and between different web hosts, there are some serious differences in configuration that can break mail() code. Another thing we discovered is that when something with mail() is not working, it can be very difficult to figure out why. Also someone mentioned to me a couple of months ago that when sending volume increases, mail() exhibits unexpected behaviors...i.e. cr*ps out without warning. We are fine with mail() for the beta but will most definitely be switching to a more robust solution in the very near future. -- Kristina > Sendmail has the right flags. I had already checked that. > > I found out the from is working, just not the bcc and the client isn't > receiving email at his preferred account, we're having to use a secondary > account. I think that has something to do with his mail account setup. > > I don't think I'm going to replace mail with an smtp mail because I don't > know what his email account is working and we would have to retest and send > the code. If it was my app, I might, but it just isn't a good idea in this > case. Plus, this is a website template which may be moved around from > server to server and possibly hosting company to hosting company. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- bounces at lists.nyphp.org] On > Behalf Of bzcoder > Sent: Monday, August 04, 2008 5:59 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Bcc Headers > > (Margaret) Michele Waldman wrote: > > > > I did resort to calling mail() twice. I hated doing it. > > > > Then he called me and said there was no from on the email and the > > client isn't getting the email, which made me think it was a header > > issue again. > > > > However, My testing shows there is a from. > > > > I think the email in question has spam filters set too high. > > > > Ok, if you really want to troubleshoot this, first thing to do is to do > a phpinfo(); on both systems and look for your mail settings. > > For example, > Path to sendmail : /usr/sbin/sendmail -t -i > > That means that when you use the mail() function, "sendmail" is invoked > with the -t and -i parameters and then passed the rest of the email > message from the command line. > > So a complete command would be: > /usr/sbin/sendmail -t -i $fullmessage > > The -t tells sendmail to extract the information for to, cc, and bcc > from the header of the text message. > > The -i tells sendmail not to treat a dot by itself as the end of the > message(so if your message is > this is > . > my text > > Sendmail doesn't truncate at the end of is). > > A lot of times the -t is left off the command, which mucks you up. > > Then there is running a non sendmail mail server which won't accept /n/r > as end of line statements, so it treats the entire header as part of the > body and makes up it's own header. > > Then there is whether or not your mail server will stick it's own from > on the message and ignore the form in the message itself. > > And of course a lot of people stick their own sendmail command stub in > place of the command line because they run into problems, and now it's > not documented so a new programmer doesn't know the rules of that road. > > > Plus it's just a really really bad idea, and a security hole, to allow > programs to send email from the command line these days when it is so > easy to just give a program a userid and password and have it send via > authenticated SMTP(now, if you send out a few hundred thousand emails at > a time, like I do with the mailling lists I support, suddenly that > security whole seems less problematic than the added time for > authentication and connection setup/teardown and moving it all to a > server dedicated just to email processing of authenticated programs is > not such a bad idea. :-)) > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From paul at devonianfarm.com Tue Aug 5 10:37:06 2008 From: paul at devonianfarm.com (paul at devonianfarm.com) Date: Tue, 5 Aug 2008 10:37:06 -0400 (EDT) Subject: [nycphp-talk] "Finally" missing in PHP... Message-ID: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> I've been using exceptions more in PHP. I've found some fun things lately, like how to reroute errors, warnings and notices as exceptions. It bugs me a lot that PHP doesn't support 'finally', however, because I've found that, overall, it's better than catch... http://gen5.info/q/2008/07/31/stop-catching-exceptions/ Any chance we can pressure the PHP team to get it in 5.3 or 6? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Tue Aug 5 10:50:10 2008 From: david at davidmintz.org (David Mintz) Date: Tue, 5 Aug 2008 10:50:10 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> Message-ID: <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> On Tue, Aug 5, 2008 at 10:37 AM, wrote: > I've been using exceptions more in PHP. I've found some fun things > lately, like how to reroute errors, warnings and notices as exceptions. > It bugs me a lot that PHP doesn't support 'finally', however, because I've > found that, overall, it's better than catch... > > http://gen5.info/q/2008/07/31/stop-catching-exceptions/ > "Better" than catch? Do explain. Because AFAIK once it's thrown, somebody has to handle it somewhere along the stack, and _finally_ won't do it unless you die. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Tue Aug 5 10:56:16 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Tue, 5 Aug 2008 10:56:16 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> Message-ID: <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> On Tue, Aug 5, 2008 at 10:50 AM, David Mintz wrote: > > > On Tue, Aug 5, 2008 at 10:37 AM, wrote: >> >> I've been using exceptions more in PHP. I've found some fun things >> lately, like how to reroute errors, warnings and notices as exceptions. >> It bugs me a lot that PHP doesn't support 'finally', however, because I've >> found that, overall, it's better than catch... >> >> http://gen5.info/q/2008/07/31/stop-catching-exceptions/ > > > "Better" than catch? Do explain. Because AFAIK once it's thrown, somebody > has to handle it somewhere along the stack, and _finally_ won't do it unless > you die. Finally is not better than catch, its different. You can use both on a try in most languages that support it. But where do you find yourself using it? For cleaning up database connection strings? Also, finally is always fired after a try block exits, unless there is a catch block in which case its after successful completion of the try block or exiting of the catch block. From guilhermeblanco at gmail.com Tue Aug 5 11:09:11 2008 From: guilhermeblanco at gmail.com (Guilherme Blanco) Date: Tue, 5 Aug 2008 12:09:11 -0300 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> Message-ID: You can do an ugly hack.... supported: try { // ... } catch (Exception $e) { // ... } // finally... you can use $e here, you know?!!?!? =) Cheers, On Tue, Aug 5, 2008 at 11:56 AM, Justin Dearing wrote: > On Tue, Aug 5, 2008 at 10:50 AM, David Mintz wrote: >> >> >> On Tue, Aug 5, 2008 at 10:37 AM, wrote: >>> >>> I've been using exceptions more in PHP. I've found some fun things >>> lately, like how to reroute errors, warnings and notices as exceptions. >>> It bugs me a lot that PHP doesn't support 'finally', however, because I've >>> found that, overall, it's better than catch... >>> >>> http://gen5.info/q/2008/07/31/stop-catching-exceptions/ >> >> >> "Better" than catch? Do explain. Because AFAIK once it's thrown, somebody >> has to handle it somewhere along the stack, and _finally_ won't do it unless >> you die. > > Finally is not better than catch, its different. You can use both on a > try in most languages that support it. > > But where do you find yourself using it? For cleaning up database > connection strings? > > Also, finally is always fired after a try block exits, unless there is > a catch block in which case its after successful completion of the try > block or exiting of the catch block. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: guilhermeblanco at hotmail.com URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil From zippy1981 at gmail.com Tue Aug 5 11:14:33 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Tue, 5 Aug 2008 11:14:33 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> Message-ID: <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> So your saying finally could be implemented as if($e != null){ //finally stuff } On Tue, Aug 5, 2008 at 11:09 AM, Guilherme Blanco wrote: > You can do an ugly hack.... supported: > > > try { > // ... > } catch (Exception $e) { > // ... > } > > // finally... you can use $e here, you know?!!?!? =) > > > > Cheers, > > On Tue, Aug 5, 2008 at 11:56 AM, Justin Dearing wrote: >> On Tue, Aug 5, 2008 at 10:50 AM, David Mintz wrote: >>> >>> >>> On Tue, Aug 5, 2008 at 10:37 AM, wrote: >>>> >>>> I've been using exceptions more in PHP. I've found some fun things >>>> lately, like how to reroute errors, warnings and notices as exceptions. >>>> It bugs me a lot that PHP doesn't support 'finally', however, because I've >>>> found that, overall, it's better than catch... >>>> >>>> http://gen5.info/q/2008/07/31/stop-catching-exceptions/ >>> >>> >>> "Better" than catch? Do explain. Because AFAIK once it's thrown, somebody >>> has to handle it somewhere along the stack, and _finally_ won't do it unless >>> you die. >> >> Finally is not better than catch, its different. You can use both on a >> try in most languages that support it. >> >> But where do you find yourself using it? For cleaning up database >> connection strings? >> >> Also, finally is always fired after a try block exits, unless there is >> a catch block in which case its after successful completion of the try >> block or exiting of the catch block. >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > > > -- > Guilherme Blanco - Web Developer > CBC - Certified Bindows Consultant > Cell Phone: +55 (16) 9166-6902 > MSN: guilhermeblanco at hotmail.com > URL: http://blog.bisna.com > Rio de Janeiro - RJ/Brazil > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From guilhermeblanco at gmail.com Tue Aug 5 11:18:55 2008 From: guilhermeblanco at gmail.com (Guilherme Blanco) Date: Tue, 5 Aug 2008 12:18:55 -0300 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> Message-ID: exactly =) On Tue, Aug 5, 2008 at 12:14 PM, Justin Dearing wrote: > So your saying finally could be implemented as > > if($e != null){ > //finally stuff > } > > > On Tue, Aug 5, 2008 at 11:09 AM, Guilherme Blanco > wrote: >> You can do an ugly hack.... supported: >> >> >> try { >> // ... >> } catch (Exception $e) { >> // ... >> } >> >> // finally... you can use $e here, you know?!!?!? =) >> >> >> >> Cheers, >> >> On Tue, Aug 5, 2008 at 11:56 AM, Justin Dearing wrote: >>> On Tue, Aug 5, 2008 at 10:50 AM, David Mintz wrote: >>>> >>>> >>>> On Tue, Aug 5, 2008 at 10:37 AM, wrote: >>>>> >>>>> I've been using exceptions more in PHP. I've found some fun things >>>>> lately, like how to reroute errors, warnings and notices as exceptions. >>>>> It bugs me a lot that PHP doesn't support 'finally', however, because I've >>>>> found that, overall, it's better than catch... >>>>> >>>>> http://gen5.info/q/2008/07/31/stop-catching-exceptions/ >>>> >>>> >>>> "Better" than catch? Do explain. Because AFAIK once it's thrown, somebody >>>> has to handle it somewhere along the stack, and _finally_ won't do it unless >>>> you die. >>> >>> Finally is not better than catch, its different. You can use both on a >>> try in most languages that support it. >>> >>> But where do you find yourself using it? For cleaning up database >>> connection strings? >>> >>> Also, finally is always fired after a try block exits, unless there is >>> a catch block in which case its after successful completion of the try >>> block or exiting of the catch block. >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >> >> >> >> -- >> Guilherme Blanco - Web Developer >> CBC - Certified Bindows Consultant >> Cell Phone: +55 (16) 9166-6902 >> MSN: guilhermeblanco at hotmail.com >> URL: http://blog.bisna.com >> Rio de Janeiro - RJ/Brazil >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: guilhermeblanco at hotmail.com URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil From zippy1981 at gmail.com Tue Aug 5 11:24:03 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Tue, 5 Aug 2008 11:24:03 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> Message-ID: <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco wrote: > exactly =) Adding a key word would make code more readable. Just like the using keyword is redundant in C#, but still useful. From guilhermeblanco at gmail.com Tue Aug 5 11:31:17 2008 From: guilhermeblanco at gmail.com (Guilherme Blanco) Date: Tue, 5 Aug 2008 12:31:17 -0300 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> Message-ID: I agree too.... =) Maybe I should spend some time looking at PHP source and try a patch. I know it was rejected due to PHP being a dynamic language or something similar, can't remember the exact reason. Cheers, On Tue, Aug 5, 2008 at 12:24 PM, Justin Dearing wrote: > On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco > wrote: >> exactly =) > > Adding a key word would make code more readable. Just like the using > keyword is redundant in C#, but still useful. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: guilhermeblanco at hotmail.com URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil From zippy1981 at gmail.com Tue Aug 5 11:38:26 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Tue, 5 Aug 2008 11:38:26 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> Message-ID: <5458db3c0808050838w68c76f50gd12f95bcddb09b1d@mail.gmail.com> If a finally patch was rejected on principle, I'd like to see the rejection explanation. On Tue, Aug 5, 2008 at 11:31 AM, Guilherme Blanco wrote: > I agree too.... =) > > Maybe I should spend some time looking at PHP source and try a patch. > I know it was rejected due to PHP being a dynamic language or > something similar, can't remember the exact reason. > > > Cheers, > > On Tue, Aug 5, 2008 at 12:24 PM, Justin Dearing wrote: >> On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco >> wrote: >>> exactly =) >> >> Adding a key word would make code more readable. Just like the using >> keyword is redundant in C#, but still useful. >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > > > -- > Guilherme Blanco - Web Developer > CBC - Certified Bindows Consultant > Cell Phone: +55 (16) 9166-6902 > MSN: guilhermeblanco at hotmail.com > URL: http://blog.bisna.com > Rio de Janeiro - RJ/Brazil > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From chsnyder at gmail.com Tue Aug 5 11:38:39 2008 From: chsnyder at gmail.com (csnyder) Date: Tue, 5 Aug 2008 11:38:39 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> Message-ID: On Tue, Aug 5, 2008 at 11:14 AM, Justin Dearing wrote: > So your saying finally could be implemented as > > if($e != null){ > //finally stuff > } > So for those of us who "grew up" on PHP, this is to handle cases when an exception was caught somewhere in the try block, but not necessarily caught by the top-level catch? A real world example? From chsnyder at gmail.com Tue Aug 5 11:41:04 2008 From: chsnyder at gmail.com (csnyder) Date: Tue, 5 Aug 2008 11:41:04 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> Message-ID: On Tue, Aug 5, 2008 at 11:24 AM, Justin Dearing wrote: > On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco > wrote: >> exactly =) > > Adding a key word would make code more readable. Just like the using > keyword is redundant in C#, but still useful. Adding a keyword would also prevent a mistake caused by $e being set somewhere else in the program. From guilhermeblanco at gmail.com Tue Aug 5 11:42:30 2008 From: guilhermeblanco at gmail.com (Guilherme Blanco) Date: Tue, 5 Aug 2008 12:42:30 -0300 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050838w68c76f50gd12f95bcddb09b1d@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> <5458db3c0808050824h50824660m67efe5818c68b20a@mail.gmail.com> <5458db3c0808050838w68c76f50gd12f95bcddb09b1d@mail.gmail.com> Message-ID: http://wiki.php.net/todo/php60 Check out the Dropped Items. Cheers, On Tue, Aug 5, 2008 at 12:38 PM, Justin Dearing wrote: > If a finally patch was rejected on principle, I'd like to see the > rejection explanation. > > On Tue, Aug 5, 2008 at 11:31 AM, Guilherme Blanco > wrote: >> I agree too.... =) >> >> Maybe I should spend some time looking at PHP source and try a patch. >> I know it was rejected due to PHP being a dynamic language or >> something similar, can't remember the exact reason. >> >> >> Cheers, >> >> On Tue, Aug 5, 2008 at 12:24 PM, Justin Dearing wrote: >>> On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco >>> wrote: >>>> exactly =) >>> >>> Adding a key word would make code more readable. Just like the using >>> keyword is redundant in C#, but still useful. >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >> >> >> >> -- >> Guilherme Blanco - Web Developer >> CBC - Certified Bindows Consultant >> Cell Phone: +55 (16) 9166-6902 >> MSN: guilhermeblanco at hotmail.com >> URL: http://blog.bisna.com >> Rio de Janeiro - RJ/Brazil >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: guilhermeblanco at hotmail.com URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil From jcampbell1 at gmail.com Tue Aug 5 11:51:31 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Tue, 5 Aug 2008 11:51:31 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> Message-ID: <8f0676b40808050851g2c95ed08hf2aa1dce31f278bc@mail.gmail.com> On Tue, Aug 5, 2008 at 11:14 AM, Justin Dearing wrote: > So your saying finally could be implemented as > > if($e != null){ > //finally stuff > } > Not quite. A finally block is supposed to execute no matter whether an exection occurs and regardless of whether it is caught. It is more akin to try { doStuff(); } catch (Exception $e) { } // finally code here if($e) throw $e So imagine we have something like try{ mysql_query("ALTER TABLE foo DISABLE KEYS") // a bunch of queries } finally { mysql_query("ALTER TABLE foo ENABLE KEYS") } This needs to be rewritten as: try{ mysql_query("ALTER TABLE foo DISABLE KEYS") // a bunch of queries } catch (Exception $e) { } mysql_query("ALTER TABLE foo ENABLE KEYS") if($e) throw $e This pattern quickly becomes a mess if you want to catch certain Exceptions but not others. -John C. From ioplex at gmail.com Tue Aug 5 16:19:44 2008 From: ioplex at gmail.com (Michael B Allen) Date: Tue, 5 Aug 2008 16:19:44 -0400 Subject: [nycphp-talk] "Finally" missing in PHP... In-Reply-To: References: <55927.192.168.1.70.1217947026.webmail@192.168.1.70> <721f1cc50808050750q502dbc2aq3dfdcf1f41da4a5d@mail.gmail.com> <5458db3c0808050756o6dd0c670m871013c908ce208@mail.gmail.com> <5458db3c0808050814s1102e727ma40628ef271047f6@mail.gmail.com> Message-ID: <78c6bd860808051319y75a77aa3ne47ae9c6f53f7362@mail.gmail.com> The most common scenario for try / finally is to release some resources regardless of whether or not an exception occurred. For example: try { $r = new Something(); $r->doStuff(); } finally { $r->cleanup(); } So $r->cleanup() will run regardless of whether or not the try block code throws an exception. The "ugly hack" cited catches the exception. You could re-throw it but that may not be the desired behavior. You might want to catch one type of exception and yet re-throw another. That's more logic you have to consider. With a finally clause it's very clear that that code is to be executed regardless of what happens (sans program exit). A finally clause would be a good addition to PHP. Mike On Tue, Aug 5, 2008 at 11:18 AM, Guilherme Blanco wrote: > exactly =) > > On Tue, Aug 5, 2008 at 12:14 PM, Justin Dearing wrote: >> So your saying finally could be implemented as >> >> if($e != null){ >> //finally stuff >> } >> >> >> On Tue, Aug 5, 2008 at 11:09 AM, Guilherme Blanco >> wrote: >>> You can do an ugly hack.... supported: >>> >>> >>> try { >>> // ... >>> } catch (Exception $e) { >>> // ... >>> } >>> >>> // finally... you can use $e here, you know?!!?!? =) -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ps at sun-code.com Wed Aug 6 18:42:12 2008 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 6 Aug 2008 18:42:12 -0400 Subject: [nycphp-talk] [OT] SEO and Meta Data Message-ID: <000001c8f815$ab4f6d10$01ee4730$@com> Recently I was examining some meta data and found some meta data keywords entered like so [meta data snippet]: "mountainview+real+estate, orange+real+estate, las vegas". Is this keyword with plus signs entry style attempting to: a) literally match users entering "mountainview+real+estate" as a search term, b) attempting to match any occurrences of those three words and any other words (noise) entered in between (Can this actually work in meta data?), or c) trying to communicate to the search engine (google) to accept these meta data keywords as a keyword phrase? Additionally, what is the attempted result of extra keywords being loaded into the Head section as a comment like so: Would the above comments effort lead to search engine penalty? If you can provide some info I'd appreciate hearing. Warmest regards, ? Peter Sawczynec Technology Dir. Sun-code Interactive Sun-code.com 646.316.3678 ps at sun-code.com From ps at sun-code.com Wed Aug 6 18:59:33 2008 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 6 Aug 2008 18:59:33 -0400 Subject: [nycphp-talk] [OT] SEO and Meta Data, Pt. 2 Message-ID: <000101c8f818$17998620$46cc9260$@com> I've also always wanted to know, does using these types of symbols: [colon], [double colon], [bar], {double bar], [plus sign] and/or [dash] ":", "::", " |", "||", "+" and/or "-" ...as separators between words in the page Title impact negatively on search engine performance? That is, do search engines get derailed by these symbols or do they just parse them out and get straight at your net Title words? In other words, is this type of Title bad form: Tall Joe Koffee Kafe :: Best Dang Cafe Au Lait Anywheres - Just Ask Round || Tall Joe Koffee Kafe, Midleton, WY Warmest regards, ? Peter Sawczynec Technology Dir. Sun-code Interactive Sun-code.com 646.316.3678 ps at sun-code.com From 1j0lkq002 at sneakemail.com Wed Aug 6 19:24:28 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 06 Aug 2008 16:24:28 -0700 Subject: [nycphp-talk] [OT] SEO and Meta Data In-Reply-To: <000001c8f815$ab4f6d10$01ee4730$@com> References: <000001c8f815$ab4f6d10$01ee4730$@com> Message-ID: <2159-04802@sneakemail.com> It is my firm belief that attempts to game the keywords meta tag demonstrate nothing more than a failure to understand SEO. The keyword meta tag has some relevance in some search marketing situations, but there is no reason for it not to simply list a small number of relevant keywords separated with commas. Of course there are always hacks and exploits, so if you enjoy chasing those ignore my comment because I know of no such opportunity with this. As for penalties, stuffing your keyword meta tag shouldn't hurt you at all, but it might earn you a reputation for not understanding SEO. I know some SEOs who use the keywords meta tag to mislead their competitors. As for comments, yes that can earn a serious response from search engines. Not so much because it works, but because it demonstrates an obvious intent to game the system. please don't tell that realtor. It's better for all of us if those spamming realtors stay out of the legitimate search results. Happily submitted...... john andrews SEO and competitive web consultant in Seattle blogging on issues of Competitive Webmastering at www.johnon.com Peter Sawczynec ps-at-sun-code.com |nyphp MAIN ONE dev/internal group use| wrote: >Recently I was examining some meta data and found some meta data >keywords entered like so [meta data snippet]: >"mountainview+real+estate, orange+real+estate, las vegas". > >Is this keyword with plus signs entry style attempting to: >a) literally match users entering "mountainview+real+estate" as a search >term, >b) attempting to match any occurrences of those three words and any >other words (noise) entered in between (Can this actually work in meta >data?), >or >c) trying to communicate to the search engine (google) to accept these >meta data keywords as a keyword phrase? > >Additionally, what is the attempted result of extra keywords being >loaded into the Head section as a comment like so: > > >Would the above comments effort lead to search engine penalty? > >If you can provide some info I'd appreciate hearing. > >Warmest regards, > >Peter Sawczynec >Technology Dir. >Sun-code Interactive >Sun-code.com >646.316.3678 >ps at sun-code.com > > > From 1j0lkq002 at sneakemail.com Wed Aug 6 19:40:41 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 06 Aug 2008 16:40:41 -0700 Subject: [nycphp-talk] [OT] SEO and Meta Data, Pt. 2 In-Reply-To: <000101c8f818$17998620$46cc9260$@com> References: <000101c8f818$17998620$46cc9260$@com> Message-ID: <32075-68096@sneakemail.com> Match your target search query, use a dash/hyphen as a separator if you must, and avoid more than a few to avoid looking spammy. Again, attempting to keyword stuff your title elements a low-impact SEO technique at best for most markets. Is that example you gave "in bad form" ? Google says "Make sure that your TITLE tags and ALT attributes are descriptive and accurate." http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769 That said, there are optimal ways to craft title elements, and they are tied to specific strategies for publishing content on web sites seeking search engine referrals. No, I won't list them. I don't know your strategy. Happily submitted...... john andrews SEO and competitive web consultant in Seattle blogging on issues of Competitive Webmastering at www.johnon.com Peter Sawczynec ps-at-sun-code.com |nyphp MAIN ONE dev/internal group use| wrote: >I've also always wanted to know, does using these types of symbols: > >[colon], [double colon], [bar], {double bar], [plus sign] and/or [dash] >":", "::", " |", "||", "+" and/or "-" > >...as separators between words in the page Title impact negatively on >search engine performance? >That is, do search engines get derailed by these symbols or do they just >parse them out and get straight at your net Title words? > >In other words, is this type of Title bad form: > >Tall Joe Koffee Kafe :: Best Dang Cafe Au Lait Anywheres - Just >Ask Round || Tall Joe Koffee Kafe, Midleton, WY > >Warmest regards, > >Peter Sawczynec >Technology Dir. >Sun-code Interactive >Sun-code.com >646.316.3678 > From 1j0lkq002 at sneakemail.com Fri Aug 8 19:14:38 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Fri, 08 Aug 2008 16:14:38 -0700 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <32075-68096@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> Message-ID: <847-77570@sneakemail.com> On the (excellent) advice of the PHP community almost 4 years ago, I bought a Thinkpad t42p. I still love it but it's time to plan retirement. Can anyone recommend the Lenovo t61p as a replacement, or is there something clearly better? No, I'm not going to switch to a mac. Thanks. -=john From ben at projectskyline.com Fri Aug 8 19:19:29 2008 From: ben at projectskyline.com (Ben Sgro) Date: Fri, 08 Aug 2008 19:19:29 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <847-77570@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: <489CD481.5010303@projectskyline.com> Hello, I'm rocking a Lenovo T61 w/Ubuntu - entry level model, no extras. Works well, APM and all the function key's work! amazing. Overall, its a pretty solid laptop. However, I only use if for robotics research and gcc related stuff. Battery life and screen brightness are good. I love the thinkpad keyboard mounted mouse. My everyday is a MBPro. = ] - Ben inforequest wrote: > On the (excellent) advice of the PHP community almost 4 years ago, I > bought a Thinkpad t42p. I still love it but it's time to plan retirement. > > Can anyone recommend the Lenovo t61p as a replacement, or is there > something clearly better? No, I'm not going to switch to a mac. Thanks. > > -=john > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From tedd at sperling.com Fri Aug 8 19:38:55 2008 From: tedd at sperling.com (tedd) Date: Fri, 8 Aug 2008 19:38:55 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <847-77570@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: At 4:14 PM -0700 8/8/08, inforequest wrote: >No, I'm not going to switch to a mac. Thanks. We all have to learn for ourselves. :-) Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From jmcgraw1 at gmail.com Fri Aug 8 21:23:05 2008 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 8 Aug 2008 21:23:05 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: On Fri, Aug 8, 2008 at 7:38 PM, tedd wrote: > At 4:14 PM -0700 8/8/08, inforequest wrote: > >> No, I'm not going to switch to a mac. Thanks. > > But with the Intel based macs, you can choose the OS you'd like to use. - jake > >> > We all have to learn for ourselves. :-) > > Cheers, > > tedd > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri Aug 8 21:53:44 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 8 Aug 2008 21:53:44 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <847-77570@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: <01c701c8f9c2$c1b20460$45160d20$@com> > On the (excellent) advice of the PHP community almost 4 years ago, I > bought a Thinkpad t42p. I still love it but it's time to plan retirement. > > Can anyone recommend the Lenovo t61p as a replacement, or is there > something clearly better? No, I'm not going to switch to a mac. Thanks. I'm not paid, but I would definitely go with another Lenovo. I have the T61P and the only thing I'm waiting for is getting the new T400/T500. Quick note though: Disable the fingerprint reader, especially if you'll be using Windows Vista. I had the fingerprint reader on my laptop for years, but frankly, I rarely use it, and your system will get better drivers (ie, SP1). End of the day, while I thought the fingerprint reader was real useful at first, you'll likely end up typing your password more than anything else. All that said, Vista Business has worked great on my T61P. If portability is more than an issue than screen view, then go for the 14 inch. Otherwise, vice-versa. The 15 inch though, or any widescreen, is too heavy IMHO. Best laptops ever though, seriously... H From ioplex at gmail.com Fri Aug 8 22:25:17 2008 From: ioplex at gmail.com (Michael B Allen) Date: Fri, 8 Aug 2008 22:25:17 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <847-77570@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: <78c6bd860808081925u3e37bc32w41aee4765627725c@mail.gmail.com> On Fri, Aug 8, 2008 at 7:14 PM, inforequest <1j0lkq002 at sneakemail.com> wrote: > On the (excellent) advice of the PHP community almost 4 years ago, I bought > a Thinkpad t42p. I still love it but it's time to plan retirement. > > Can anyone recommend the Lenovo t61p as a replacement, or is there something > clearly better? No, I'm not going to switch to a mac. Thanks. I recently got a T61 15" widescreen 1600x1050, Intel video and Intel AGN wireless (model 6465-CTO). I let it "age" a while before installing Fedora 9 which ran on it with very little help. IIRC Fedora didn't install the wireless firmware out-of-the-box but I think that was about it. Originally I got the lower resolution screen, hated it, had to send it back and Lenovo charged me a 15% restocking fee. So pay close attention to the screen resolutions. If you like smaller text, make sure you upgrade the screen. On a related note, note that the T61p (which has the highest resolution) requires the Nvidia chip last I checked which non-Windows systems do not support as well (Linux uses that driver wrapper business). I was a little disappointed with the screen. If you move your head back and forth it looks like there are shadows behind it. It's fine but it's definitely not as *consistently* bright as my now quite old T30. The lid is somewhat hard to open and now it seems I can rock the hinges a little in the open position. It's not a problem. It just makes me wonder if there's an engineering flaw that might become a problem later. I think the machine is a little big. I don't know if Lenovo designed the IBM Thinkpads but it seems to me they could do a little better job squeezing things into smaller spaces (note that I'm talking about the widescreen version). Finally, I'm a little worried about Lenovo. I could be wrong, but for some reason I don't think IBM would have charged me a restocking fee for a "I don't like the screen" kind of problem. But then again, the prices have really come down over the past year so I guess we end up paying for things either way. Despite the above mentioned minor issues, I looked closely at alternatives and there simply were none. I don't understand how anyone could buy anything other then a Thinkpad. ALL the other offerings out there are more expensive, have fewer features, and are bigger / heavier. The only contender is Apple because OSX gives you a UNIX based OS, a really nice desktop and very sleek looking hardware. But Apples are much more expensive and have fewer features so if you can't really use OSX (e.g. you want to dual boot w/ Windows) or you don't care about weight and sleek design, it's not compelling enough to usurp a Thinkpad. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From zippy1981 at gmail.com Sat Aug 9 08:39:55 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Sat, 9 Aug 2008 08:39:55 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <78c6bd860808081925u3e37bc32w41aee4765627725c@mail.gmail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> <78c6bd860808081925u3e37bc32w41aee4765627725c@mail.gmail.com> Message-ID: <5458db3c0808090539u319cd191ue98b57a5466ffb32@mail.gmail.com> I personally like the lattitude D820 my company gives me to use. The D830 models are out and I don't think much has changed other than ram/cpu configurations. I never ran linux on it or vista on mines. The D830s seem to run vista fine. My laptop screen has a higher resolution than either of my 20" flatscreen monitors that the docking station is hooked up to. Yes its big and heavy, Thats' something I don't care about. On Fri, Aug 8, 2008 at 10:25 PM, Michael B Allen wrote: > On Fri, Aug 8, 2008 at 7:14 PM, inforequest <1j0lkq002 at sneakemail.com> wrote: >> On the (excellent) advice of the PHP community almost 4 years ago, I bought >> a Thinkpad t42p. I still love it but it's time to plan retirement. >> >> Can anyone recommend the Lenovo t61p as a replacement, or is there something >> clearly better? No, I'm not going to switch to a mac. Thanks. > > I recently got a T61 15" widescreen 1600x1050, Intel video and Intel > AGN wireless (model 6465-CTO). > > I let it "age" a while before installing Fedora 9 which ran on it with > very little help. IIRC Fedora didn't install the wireless firmware > out-of-the-box but I think that was about it. > > Originally I got the lower resolution screen, hated it, had to send it > back and Lenovo charged me a 15% restocking fee. So pay close > attention to the screen resolutions. If you like smaller text, make > sure you upgrade the screen. > > On a related note, note that the T61p (which has the highest > resolution) requires the Nvidia chip last I checked which non-Windows > systems do not support as well (Linux uses that driver wrapper > business). > > I was a little disappointed with the screen. If you move your head > back and forth it looks like there are shadows behind it. It's fine > but it's definitely not as *consistently* bright as my now quite old > T30. > > The lid is somewhat hard to open and now it seems I can rock the > hinges a little in the open position. It's not a problem. It just > makes me wonder if there's an engineering flaw that might become a > problem later. > > I think the machine is a little big. I don't know if Lenovo designed > the IBM Thinkpads but it seems to me they could do a little better job > squeezing things into smaller spaces (note that I'm talking about the > widescreen version). > > Finally, I'm a little worried about Lenovo. I could be wrong, but for > some reason I don't think IBM would have charged me a restocking fee > for a "I don't like the screen" kind of problem. But then again, the > prices have really come down over the past year so I guess we end up > paying for things either way. > > Despite the above mentioned minor issues, I looked closely at > alternatives and there simply were none. I don't understand how anyone > could buy anything other then a Thinkpad. ALL the other offerings out > there are more expensive, have fewer features, and are bigger / > heavier. The only contender is Apple because OSX gives you a UNIX > based OS, a really nice desktop and very sleek looking hardware. But > Apples are much more expensive and have fewer features so if you can't > really use OSX (e.g. you want to dual boot w/ Windows) or you don't > care about weight and sleek design, it's not compelling enough to > usurp a Thinkpad. > > Mike > > -- > Michael B Allen > PHP Active Directory SPNEGO SSO > http://www.ioplex.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From dcech at phpwerx.net Sat Aug 9 09:39:53 2008 From: dcech at phpwerx.net (Dan Cech) Date: Sat, 09 Aug 2008 09:39:53 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <5458db3c0808090539u319cd191ue98b57a5466ffb32@mail.gmail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> <78c6bd860808081925u3e37bc32w41aee4765627725c@mail.gmail.com> <5458db3c0808090539u319cd191ue98b57a5466ffb32@mail.gmail.com> Message-ID: <489D9E29.2090907@phpwerx.net> Justin Dearing wrote: > On Fri, Aug 8, 2008 at 10:25 PM, Michael B Allen wrote: >> On Fri, Aug 8, 2008 at 7:14 PM, inforequest <1j0lkq002 at sneakemail.com> wrote: >>> On the (excellent) advice of the PHP community almost 4 years ago, I bought >>> a Thinkpad t42p. I still love it but it's time to plan retirement. >>> >>> Can anyone recommend the Lenovo t61p as a replacement, or is there something >>> clearly better? No, I'm not going to switch to a mac. Thanks. > > I personally like the lattitude D820 my company gives me to use. The > D830 models are out and I don't think much has changed other than > ram/cpu configurations. I've been using the now discontinued Z61m for a year or 2 now, and I've been very happy with it. The only issue I've had is that the built-in bluetooth is very flaky, but that seems to only affect the z-series. I used to have a Dell D830 as well (was given it by a company I was doing work for), and imho compared to the ThinkPad it was junk. The keyboard in particular was springy and the whole thing felt more like a BestBuy $600 special than a real business machine. Right now I'd probably go with something like a T400 2767-R3U or 2765-T7U, though if you can wait a month or so the 2767-R9U looks like a very nice machine. Those are both 14.1" 1440x900 models, but I think the reduction in bulk is worth the loss of screen real estate vs the 15.4" 1680x1050 on the T500 and my Z61m. For those not familiar with it, you can find a PDF with the complete details of every standard ThinkPad configuration here: ftp://ftp.software.ibm.com/pc/pcinstitute/psref/tabook.pdf Dan From krook at us.ibm.com Sat Aug 9 09:43:49 2008 From: krook at us.ibm.com (Daniel Krook) Date: Sat, 9 Aug 2008 09:43:49 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <847-77570@sneakemail.com> References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: Hi John, > "inforequest" <1j0lkq002 at sneakemail.com> > > On the (excellent) advice of the PHP community almost 4 > years ago, I > bought a Thinkpad t42p. I still love it but it's time to > plan retirement. > > Can anyone recommend the Lenovo t61p as a replacement, or is there > something clearly better? No, I'm not going to switch to a > mac. Thanks. > > -=john I've ordered five T61s of varying configurations over the past year or so for family members using them for various purposes. They're all pretty happy with them. I'm using a 14.1 widescreen model for work and it's much less bulky than the 15.4 screen ones I got for my wife and sister. I normally dock it with larger monitor so the smaller real estate is not as much a concern for me. There is a shop right across from the 590 Madison meeting location that sells them (I'm not sure if it is still the only place they are available retail in the city), so it may be worth popping in to have a look at them in person. Or, you could just hop in a cab after Hans and have a look at the one he's probably left behind on the back seat :) Thanks, -Dan Daniel Krook Senior IT Specialist Content Tools Developer - SCSA, SCJP, SCWCD, ZCE, ICDAssoc. Global Solutions, ibm.com From gatzby3jr at gmail.com Sat Aug 9 11:37:10 2008 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Sat, 9 Aug 2008 11:37:10 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: References: <000101c8f818$17998620$46cc9260$@com> <32075-68096@sneakemail.com> <847-77570@sneakemail.com> Message-ID: <29da5d150808090837m2439ca7cm73412aa5356618ac@mail.gmail.com> While I don't have one and my needs are limited for a laptop ( I have a desktop which I do most of my work on, game on), the next laptop I'm going to purchase is an eeepc. Ive been saying for a few years now that laptops are too bulky and include too much fluff (my current laptop has a serial printer port...). Unless you need a ton of power, and the ability to play games, I'd look at the eeepc. Light, very good battery life, no fluff. On Sat, Aug 9, 2008 at 9:43 AM, Daniel Krook wrote: > Hi John, > > > "inforequest" <1j0lkq002 at sneakemail.com> > > > > On the (excellent) advice of the PHP community almost 4 > > years ago, I > > bought a Thinkpad t42p. I still love it but it's time to > > plan retirement. > > > > Can anyone recommend the Lenovo t61p as a replacement, or is there > > something clearly better? No, I'm not going to switch to a > > mac. Thanks. > > > > -=john > > > I've ordered five T61s of varying configurations over the past year or so > for family members using them for various purposes. They're all pretty > happy with them. I'm using a 14.1 widescreen model for work and it's much > less bulky than the 15.4 screen ones I got for my wife and sister. I > normally dock it with larger monitor so the smaller real estate is not as > much a concern for me. > > There is a shop right across from the 590 Madison meeting location that > sells them (I'm not sure if it is still the only place they are available > retail in the city), so it may be worth popping in to have a look at them > in person. Or, you could just hop in a cab after Hans and have a look at > the one he's probably left behind on the back seat :) > > > Thanks, > -Dan > > > Daniel Krook > Senior IT Specialist > Content Tools Developer - SCSA, SCJP, SCWCD, ZCE, ICDAssoc. > Global Solutions, ibm.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Sat Aug 9 12:28:40 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 9 Aug 2008 09:28:40 -0700 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? Message-ID: <17492-07901@sneakemail.com> I need a serial port often...its still used quite a bit for null modem connections. I don't expect a 9 pin on my new notebook, but I wouldn't regret one -----Original Message----- From: Brian O'Connor gatzby3jr-at-gmail.com |nyphp MAIN ONE dev/internal group use| <...> Sent: Saturday, August 09, 2008 8:37 AM To: NYPHP Talk Subject: Re: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? While I don't have one and my needs are limited for a laptop ( I have a desktop which I do most of my work on, game on), the next laptop I'm going to purchase is an eeepc. Ive been saying for a few years now that laptops are too bulky and include too much fluff (my current laptop has a serial printer port...). Unless you need a ton of power, and the ability to play games, I'd look at the eeepc. Light, very good battery life, no fluff. On Sat, Aug 9, 2008 at 9:43 AM, Daniel Krook wrote: > Hi John, > > > "inforequest" <1j0lkq002 at sneakemail.com> > > > > On the (excellent) advice of the PHP community almost 4 > > years ago, I > > bought a Thinkpad t42p. I still love it but it's time to > > plan retirement. > > > > Can anyone recommend the Lenovo t61p as a replacement, or is there > > something clearly better? No, I'm not going to switch to a > > mac. Thanks. > > > > -=john > > > I've ordered five T61s of varying configurations over the past year or so > for family members using them for various purposes. They're all pretty > happy with them. I'm using a 14.1 widescreen model for work and it's much > less bulky than the 15.4 screen ones I got for my wife and sister. I > normally dock it with larger monitor so the smaller real estate is not as > much a concern for me. > > There is a shop right across from the 590 Madison meeting location that > sells them (I'm not sure if it is still the only place they are available > retail in the city), so it may be worth popping in to have a look at them > in person. Or, you could just hop in a cab after Hans and have a look at > the one he's probably left behind on the back seat :) > > > Thanks, > -Dan > > > Daniel Krook > Senior IT Specialist > Content Tools Developer - SCSA, SCJP, SCWCD, ZCE, ICDAssoc. > Global Solutions, ibm.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Brian O'Connor From consult at covenantedesign.com Sat Aug 9 12:39:51 2008 From: consult at covenantedesign.com (consult at covenantedesign.com) Date: Sat, 9 Aug 2008 11:39:51 -0500 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo\'s t61p? Message-ID: <200808091639.m79GdpYV002920@web55.opentransfer.com> ditto to Hans. I roll with a X61 (tablet) with 5GB Ram and a Core2DUO running Vista^$ (anti bloated), and I\'ve never had a better portable workstation (and gaming pad) Hans Zaunere wrote: >> On the (excellent) advice of the PHP community almost 4 years ago, I >> bought a Thinkpad t42p. I still love it but it\'s time to plan retirement. >> >> Can anyone recommend the Lenovo t61p as a replacement, or is there >> something clearly better? No, I\'m not going to switch to a mac. Thanks. > > I\'m not paid, but I would definitely go with another Lenovo. I have the > T61P and the only thing I\'m waiting for is getting the new T400/T500. > > Quick note though: Disable the fingerprint reader, especially if you\'ll be > using Windows Vista. I had the fingerprint reader on my laptop for years, > but frankly, I rarely use it, and your system will get better drivers (ie, > SP1). End of the day, while I thought the fingerprint reader was real > useful at first, you\'ll likely end up typing your password more than > anything else. All that said, Vista Business has worked great on my T61P. > > If portability is more than an issue than screen view, then go for the 14 > inch. Otherwise, vice-versa. The 15 inch though, or any widescreen, is too > heavy IMHO. > > Best laptops ever though, seriously... > > H > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From consult at covenantedesign.com Sat Aug 9 12:56:55 2008 From: consult at covenantedesign.com (consult at covenantedesign.com) Date: Sat, 9 Aug 2008 11:56:55 -0500 Subject: [nycphp-talk] Re: [nycphp-jobs] Freelance Remote PHP/MySQL gig with about 5+ yrs ofexp & good client references Message-ID: <200808091656.m79GutOJ004103@web55.opentransfer.com> Long answer: I think the majority of PHP engineers on this list are either appalled or simnply don\'t value an immature (un supported claim) notion such as this to warrant a response. I do recall gettign very agressive over a very similar situation, inwhich it was apparent that it was not founded on reseach, study and investigation, but was the outworkings of emotion and opinion. And as i recall not everyone was happy that i assaulted the topic. =D Short Answer: Ben, don\'t be the \'best pretty code police\', if he sucks at coding, he\'ll get his just desserts. PS: I\'m hiring a Junior level programmer, feel free to send me resumes offlist: i-Centrix Location: Albany NY Salary: 40-50K Great opportunity for someone green to get some valuable hands-on experience with a thriving company. ---------------------------------------- I disagree. This wasn\'t a former employer complaining about a consultant\'s work, this was another consultant, a competitor if you will, stating as fact something that no one can possibly double-check. I think it\'s unfair, and am surprised that, on a list dedicated to helping consultants find jobs, you folks would not be more concerned about it. I think this is the first time I have seen someone in a public forum accuse someone of something and not be called to provide proof of their claims. Very puzzling. No one knows what the job requirements were, what the client\'s expectations were, or what the budget was. Did the client provide enough time and budget to have the job done right, or did they just say, \"Get it done for next to nothing,\" and then when they realized the short-sidedness of their approach, hire Ben to clean up the mess rather than go back to the developer they low-balled and admit that they didn\'t give him enough time and $$ to do the job correctly. We don\'t know. Ben won\'t even tell the list who the client was or produce evidence of the inferior work. So to my mind, this whole thread is quite unfair to the developer who originally posted his availability and should be dropped. Finally, as you read this, please keep in mind that we are a company that employs people on this list, that\'s why I subscribe. I have employed developers here in the US and in six other countries. I find *no* geo-political differences in coding skills. We evaluate developers based on samples, client references and their ability to follow directions. I have had more than a few developers who are so focused on developing \"great code\" that they completely ignore the project specs, budget and time-lines. Those people don\'t last long, but people who follow directions do. Again, without knowing the original assignment that Sundar was given and what went on between he and the client at that time, facts which I doubt even Ben knows, we really can\'t draw any useful conclusions nor should we try. Just my $.02. sean From mmwaldman at optonline.net Sat Aug 9 22:38:02 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Sat, 09 Aug 2008 22:38:02 -0400 Subject: [nycphp-talk] Email Pain Message-ID: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> Folks, I'm working with this mail function again. Unhappily. The mail message is created using data off of an html form using radio buttons, selects, text input, etc. The oddest thing is happening. Sometimes newlines are ignored. Where formated like this: $message = @<< From compustretch at gmail.com Sat Aug 9 23:33:27 2008 From: compustretch at gmail.com (forest mars) Date: Sat, 9 Aug 2008 23:33:27 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> References: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> Message-ID: "The Unicode standard addresses the problem by defining a large number of characters that conforming applications should recognize as line terminators" LF: Line Feed, U+000A CR: Carriage Return , U+000D CR+LF: CR followed by LF, U+000D followed by U+000A NEL: Next Line, U+0085 FF: Form Feed, U+000C LS: Line Separator, U+2028 PS: Paragraph Separator, U+2029 HTH, -- "In theory, theory and practice are exactly the same. In practice, they're completely different." ------------------------------------------------------------------ -----BEGIN PGP SIGNATURE----- Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies. (Diffie-Helman/DSS-only version) iQA/AwUBRkjTLDbz7LySoccvEQJDcQCguZZj4M4kOVOlOX4CtbgR0rppsdovAjra 3RRXIlkdzuYI0YJz4WyvKlTn =MLhk -----END PGP SIGNATURE----- This email is: [ ] private: do not forward [ x ] o.k. to forward [ x ] o.k. to blog [ ] ask first On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman < mmwaldman at optonline.net> wrote: > Folks, > > > > I'm working with this mail function again. > > > > Unhappily. > > > > The mail message is created using data off of an html form using radio > buttons, selects, text input, etc. > > > > The oddest thing is happening. Sometimes newlines are ignored. > > > > Where formated like this: > > > > $message = @<< > This is field 1: $field1 > > This is field 2: $field2 > > This is field 3: $field3 > > This is field 4: $field4 > > END; > > > > Or like this: > > $message = "This is field 1:".$field1."\n"; > > $message .= "This is field 2:".$field2."\n"; > > $message .= "This is field 3:".$field3."\n"; > > $message .= "This is field 4:".$field4."\n"; > > > > The message might look like this: > > > > This is field 1: data > > This is field 2: data This is field 3: data > > This is field 4: $field4 > > > > The only think I could figure out to do was put a \t after $field2 to force > the newline. Nothing else I did seem to work. The data doesn't appear to > have trailing garage either. > > > > Any ideas? > > > > Margaret Michele > > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Sat Aug 9 23:33:53 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sat, 9 Aug 2008 23:33:53 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> References: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> Message-ID: <78c6bd860808092033p4f38eb93xa223247a19f6a903@mail.gmail.com> On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman wrote: > Folks, > > > > I'm working with this mail function again. > > > > Unhappily. > > > > The mail message is created using data off of an html form using radio > buttons, selects, text input, etc. > > > > The oddest thing is happening. Sometimes newlines are ignored. > > > > Where formated like this: > > > > $message = @<< > This is field 1: $field1 > > This is field 2: $field2 > > This is field 3: $field3 > > This is field 4: $field4 > > END; > > > > Or like this: > > $message = "This is field 1:".$field1."\n"; > > $message .= "This is field 2:".$field2."\n"; > > $message .= "This is field 3:".$field3."\n"; > > $message .= "This is field 4:".$field4."\n"; > > > > The message might look like this: > > > > This is field 1: data > > This is field 2: data This is field 3: data > > This is field 4: $field4 What mail sending routines are you using? If you're using the 'mail' function, first simplify your test case. Try something like the following: $email = 'whomever at example.com'; $subject = 'This is the subject'; $headers = "From: $email\r\nReply-To: $email"; $message = "This is a message\nwith multiple\nlines\nof\ntext\n"; mail($email, $subject, $message, $headers); Note that the headers should use "\r\n" as opposed to just "\n" (technically you should use the linebreak indicated by the server but that's more involved). If that works, then narrow down the difference with trial and error. If it doesn't work, get a packet capture, open it with WireShark and verify the content of the outgoing message. If the message is screwed up going out that narrows down things quite a bit. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ioplex at gmail.com Sat Aug 9 23:41:10 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sat, 9 Aug 2008 23:41:10 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: References: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> Message-ID: <78c6bd860808092041w23c4194dwe892560115642f93@mail.gmail.com> On Sat, Aug 9, 2008 at 11:33 PM, forest mars wrote: > "The Unicode standard addresses the problem by defining a large number of > characters that conforming applications should recognize as line > terminators" > > LF: Line Feed, U+000A > CR: Carriage Return, U+000D > CR+LF: CR followed by LF, U+000D followed by U+000A > NEL: Next Line, U+0085 > FF: Form Feed, U+000C > LS: Line Separator, U+2028 > PS: Paragraph Separator, U+2029 > > HTH, RFC 2821 states that linebreaks after SMTP commands and headers are "\r\n" and makes no mention of Unicode. Mike > On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman > wrote: >> >> Folks, >> >> >> >> I'm working with this mail function again. >> >> >> >> Unhappily. >> >> >> >> The mail message is created using data off of an html form using radio >> buttons, selects, text input, etc. >> >> >> >> The oddest thing is happening. Sometimes newlines are ignored. >> >> >> >> Where formated like this: >> >> >> >> $message = @<<> >> This is field 1: $field1 >> >> This is field 2: $field2 >> >> This is field 3: $field3 >> >> This is field 4: $field4 >> >> END; >> >> >> >> Or like this: >> >> $message = "This is field 1:".$field1."\n"; >> >> $message .= "This is field 2:".$field2."\n"; >> >> $message .= "This is field 3:".$field3."\n"; >> >> $message .= "This is field 4:".$field4."\n"; >> >> >> >> The message might look like this: >> >> >> >> This is field 1: data >> >> This is field 2: data This is field 3: data >> >> This is field 4: $field4 >> >> >> >> The only think I could figure out to do was put a \t after $field2 to >> force the newline. Nothing else I did seem to work. The data doesn't >> appear to have trailing garage either. >> >> >> >> Any ideas? >> >> >> >> Margaret Michele >> >> >> >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From mmwaldman at optonline.net Sat Aug 9 23:48:12 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Sat, 09 Aug 2008 23:48:12 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <78c6bd860808092033p4f38eb93xa223247a19f6a903@mail.gmail.com> Message-ID: <0K5D00GH998C2YM0@mta3.srv.hcvlny.cv.net> First thing I tried was \r\n. Didn't fix the problem. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michael B Allen Sent: Saturday, August 09, 2008 11:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Email Pain On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman wrote: > Folks, > > > > I'm working with this mail function again. > > > > Unhappily. > > > > The mail message is created using data off of an html form using radio > buttons, selects, text input, etc. > > > > The oddest thing is happening. Sometimes newlines are ignored. > > > > Where formated like this: > > > > $message = @<< > This is field 1: $field1 > > This is field 2: $field2 > > This is field 3: $field3 > > This is field 4: $field4 > > END; > > > > Or like this: > > $message = "This is field 1:".$field1."\n"; > > $message .= "This is field 2:".$field2."\n"; > > $message .= "This is field 3:".$field3."\n"; > > $message .= "This is field 4:".$field4."\n"; > > > > The message might look like this: > > > > This is field 1: data > > This is field 2: data This is field 3: data > > This is field 4: $field4 What mail sending routines are you using? If you're using the 'mail' function, first simplify your test case. Try something like the following: $email = 'whomever at example.com'; $subject = 'This is the subject'; $headers = "From: $email\r\nReply-To: $email"; $message = "This is a message\nwith multiple\nlines\nof\ntext\n"; mail($email, $subject, $message, $headers); Note that the headers should use "\r\n" as opposed to just "\n" (technically you should use the linebreak indicated by the server but that's more involved). If that works, then narrow down the difference with trial and error. If it doesn't work, get a packet capture, open it with WireShark and verify the content of the outgoing message. If the message is screwed up going out that narrows down things quite a bit. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From mmwaldman at optonline.net Sun Aug 10 00:25:31 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Sun, 10 Aug 2008 00:25:31 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <0K5D00GH998C2YM0@mta3.srv.hcvlny.cv.net> Message-ID: <0K5D00F4JAYIM8Q0@mta3.srv.hcvlny.cv.net> It seems to be a problem when the $field contains spaces. Then the carriage return is ignored. When I replace spaces with _ the formatting is correct. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of (Margaret) Michele Waldman Sent: Saturday, August 09, 2008 11:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Email Pain First thing I tried was \r\n. Didn't fix the problem. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michael B Allen Sent: Saturday, August 09, 2008 11:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Email Pain On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman wrote: > Folks, > > > > I'm working with this mail function again. > > > > Unhappily. > > > > The mail message is created using data off of an html form using radio > buttons, selects, text input, etc. > > > > The oddest thing is happening. Sometimes newlines are ignored. > > > > Where formated like this: > > > > $message = @<< > This is field 1: $field1 > > This is field 2: $field2 > > This is field 3: $field3 > > This is field 4: $field4 > > END; > > > > Or like this: > > $message = "This is field 1:".$field1."\n"; > > $message .= "This is field 2:".$field2."\n"; > > $message .= "This is field 3:".$field3."\n"; > > $message .= "This is field 4:".$field4."\n"; > > > > The message might look like this: > > > > This is field 1: data > > This is field 2: data This is field 3: data > > This is field 4: $field4 What mail sending routines are you using? If you're using the 'mail' function, first simplify your test case. Try something like the following: $email = 'whomever at example.com'; $subject = 'This is the subject'; $headers = "From: $email\r\nReply-To: $email"; $message = "This is a message\nwith multiple\nlines\nof\ntext\n"; mail($email, $subject, $message, $headers); Note that the headers should use "\r\n" as opposed to just "\n" (technically you should use the linebreak indicated by the server but that's more involved). If that works, then narrow down the difference with trial and error. If it doesn't work, get a packet capture, open it with WireShark and verify the content of the outgoing message. If the message is screwed up going out that narrows down things quite a bit. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From mmwaldman at optonline.net Sun Aug 10 00:52:39 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Sun, 10 Aug 2008 00:52:39 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <0K5D00F4JAYIM8Q0@mta3.srv.hcvlny.cv.net> Message-ID: <0K5D00IF5C7Q3AQ0@mta4.srv.hcvlny.cv.net> Duh! When reading an email, you have to select format, unwrap text. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of (Margaret) Michele Waldman Sent: Sunday, August 10, 2008 12:26 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Email Pain It seems to be a problem when the $field contains spaces. Then the carriage return is ignored. When I replace spaces with _ the formatting is correct. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of (Margaret) Michele Waldman Sent: Saturday, August 09, 2008 11:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Email Pain First thing I tried was \r\n. Didn't fix the problem. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michael B Allen Sent: Saturday, August 09, 2008 11:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Email Pain On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman wrote: > Folks, > > > > I'm working with this mail function again. > > > > Unhappily. > > > > The mail message is created using data off of an html form using radio > buttons, selects, text input, etc. > > > > The oddest thing is happening. Sometimes newlines are ignored. > > > > Where formated like this: > > > > $message = @<< > This is field 1: $field1 > > This is field 2: $field2 > > This is field 3: $field3 > > This is field 4: $field4 > > END; > > > > Or like this: > > $message = "This is field 1:".$field1."\n"; > > $message .= "This is field 2:".$field2."\n"; > > $message .= "This is field 3:".$field3."\n"; > > $message .= "This is field 4:".$field4."\n"; > > > > The message might look like this: > > > > This is field 1: data > > This is field 2: data This is field 3: data > > This is field 4: $field4 What mail sending routines are you using? If you're using the 'mail' function, first simplify your test case. Try something like the following: $email = 'whomever at example.com'; $subject = 'This is the subject'; $headers = "From: $email\r\nReply-To: $email"; $message = "This is a message\nwith multiple\nlines\nof\ntext\n"; mail($email, $subject, $message, $headers); Note that the headers should use "\r\n" as opposed to just "\n" (technically you should use the linebreak indicated by the server but that's more involved). If that works, then narrow down the difference with trial and error. If it doesn't work, get a packet capture, open it with WireShark and verify the content of the outgoing message. If the message is screwed up going out that narrows down things quite a bit. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From rolan at omnistep.com Sun Aug 10 01:32:52 2008 From: rolan at omnistep.com (Rolan Yang) Date: Sun, 10 Aug 2008 01:32:52 -0400 Subject: [nycphp-talk] Email Pain In-Reply-To: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> References: <0K5D00CKD5ZDK0G0@mta2.srv.hcvlny.cv.net> Message-ID: <489E7D84.9030107@omnistep.com> (Margaret) Michele Waldman wrote: > > The oddest thing is happening. Sometimes newlines are ignored. > > > Some purists would cry "blasphemy", but if you're emailing html form data, you might want to consider sending that data as an html formatted table within the email. ~Rolan From jbaltz at altzman.com Sun Aug 10 11:14:33 2008 From: jbaltz at altzman.com (Jerry B. Altzman) Date: Sun, 10 Aug 2008 11:14:33 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <17492-07901@sneakemail.com> References: <17492-07901@sneakemail.com> Message-ID: <489F05D9.5040301@altzman.com> on 2008-08-09 12:28 inforequest said the following: > I need a serial port often...its still used quite a bit for null modem connections. I don't expect a 9 pin on my new notebook, but I wouldn't regret one USB->serial connectors are cheap, plentiful, and work like a charm in Windows and Linux. //jbaltz -- jerry b. altzman jbaltz at altzman.com www.jbaltz.com thank you for contributing to the heat death of the universe. From ben at projectskyline.com Sun Aug 10 11:26:01 2008 From: ben at projectskyline.com (Ben Sgro) Date: Sun, 10 Aug 2008 11:26:01 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <489F05D9.5040301@altzman.com> References: <17492-07901@sneakemail.com> <489F05D9.5040301@altzman.com> Message-ID: <489F0889.1020400@projectskyline.com> Hello, I have a PCMCIA rs232 for my t61 and it works great. When using a USB->rs232 under windows, running ubuntu in a VM, I notice really low throughput or just tons of lag. Not sure why, but the performance is abysmal. - Ben Jerry B. Altzman wrote: > on 2008-08-09 12:28 inforequest said the following: >> I need a serial port often...its still used quite a bit for null >> modem connections. I don't expect a 9 pin on my new notebook, but I >> wouldn't regret one > > USB->serial connectors are cheap, plentiful, and work like a charm in > Windows and Linux. > > //jbaltz From lists at zaunere.com Sun Aug 10 11:48:32 2008 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 10 Aug 2008 11:48:32 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <489F0889.1020400@projectskyline.com> References: <17492-07901@sneakemail.com> <489F05D9.5040301@altzman.com> <489F0889.1020400@projectskyline.com> Message-ID: <032b01c8fb00$8ae95b60$a0bc1220$@com> > I have a PCMCIA rs232 for my t61 and it works great. > > When using a USB->rs232 under windows, running ubuntu in a VM, I notice > really low throughput or just tons of lag. > Not sure why, but the performance is abysmal. The translation between USB/RS232 isn't very good (although, if it's REALLY slow in your case, it might be a driver issue, but just a guess). That said, for real-time data - for instance as a data entry point for GPS - USB/serial won't cut it. A real serial port is needed in that case. H From ramons at gmx.net Sun Aug 10 12:56:26 2008 From: ramons at gmx.net (David Krings) Date: Sun, 10 Aug 2008 12:56:26 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <489F05D9.5040301@altzman.com> References: <17492-07901@sneakemail.com> <489F05D9.5040301@altzman.com> Message-ID: <489F1DBA.90701@gmx.net> Jerry B. Altzman wrote: > USB->serial connectors are cheap, plentiful, and work like a charm in > Windows and Linux. Cheap - true, plentiful - true as well, work like a charm - well,not if you need real RS232C. When I worked at IR we had an adaptor for programming elecrtronic locks and it required a true serial port. The vast majority of USB to serial converters we tried were fakers or just plain junk. Most of them could run a seril mouse, but that was about it. The only one we found that works fine is the Belkin F5U103, which I think Belkin no longer makes, but it is still sold. That thing looks like crap, but it works well and is fast. The only other good, fully compatible serial port for a laptop I know of is the SocketCOM Ruggedized Serial I/O card. Supposedly, the Port Authority USB to Serial adaptor from CablesToGo works as well, but I know who tested that one back at IR and I recommend to opt for that one only when it can be returned or is cheap enough that it doesn't matter. Honestly, most of the USB to serial convertes have a USB cable and a D-Sub 9 pin connector commonly found for serial ports, but that is it for most of the "converters". David From ioplex at gmail.com Sun Aug 10 14:24:48 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 10 Aug 2008 14:24:48 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS Message-ID: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> Can someone share their best practices regarding transitioning between HTTP and HTTPS protected resources? For example, consider a page with several tabs - one of which is linked to a shopping cart. The shopping cart should be protected with HTTPS whereas the other tabs should not. It's not hard to make the shopping cart link https:// but once at the shopping cart page, all links back to non-SSL protected resources would need to be emitted (or rewritten) as full non-HTTPS URLs. And that's not really desirable anyway since many browsers can flag such pages as non-fully protected. One relatively simple solution is to maintain a list of protected resources and then redirect the client to HTTPS if the target is to be protected and the client is not already under HTTPS. If the route does not match and the client is under HTTPS then they are redirected back. The downside is that the redirection is not terribly efficient. How do you handle this scenario? Mike From jcampbell1 at gmail.com Sun Aug 10 14:41:15 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Sun, 10 Aug 2008 14:41:15 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> Message-ID: <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> > How do you handle this scenario? I looked at what amazon.com does and assumed they have it right. The only process that is https is the checkout process. Once you enter the checkout process, there are essentially zero links on the https pages. I feel that once someone clicks "checkout", there should be zero distractions. Amazon does a really good job with this; most of the airlines have checkout processes that include unnecessary stuff like site navigation. This doesn't really answer your question, but if the checkout process is really simple, the problem of http/https switching tends to go away. -John C. From 1j0lkq002 at sneakemail.com Sun Aug 10 14:49:29 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 10 Aug 2008 11:49:29 -0700 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? Message-ID: <9057-96024@sneakemail.com> As I recall the market was flooded with emulators meant for mouse use, and not actually rs232. There is a big difference between adresing hardware thru the os and talking -----Original Message----- From: Jerry B. Altzman jbaltz-at-altzman.com |nyphp MAIN ONE dev/internal group use| <...> Sent: Sunday, August 10, 2008 8:14 AM To: NYPHP Talk Subject: Re: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? on 2008-08-09 12:28 inforequest said the following: > I need a serial port often...its still used quite a bit for null modem connections. I don't expect a 9 pin on my new notebook, but I wouldn't regret one USB->serial connectors are cheap, plentiful, and work like a charm in Windows and Linux. [The entire original message is not included] From 1j0lkq002 at sneakemail.com Sun Aug 10 14:52:33 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 10 Aug 2008 11:52:33 -0700 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS Message-ID: <24429-75582@sneakemail.com> Keep https on a subdomain like secure.example.com Anything else is problematic later when you want dedicated robots.txt versions etc. -----Original Message----- From: Michael B Allen ioplex-at-gmail.com |nyphp MAIN ONE dev/internal group use| <...> Sent: Sunday, August 10, 2008 11:24 AM To: nyphp Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS Can someone share their best practices regarding transitioning between HTTP and HTTPS protected resources? For example, consider a page with several tabs - one of which is linked to a shopping cart. The shopping cart should be protected with HTTPS whereas the other tabs should not. [The entire original message is not included] From jbaltz at altzman.com Sun Aug 10 17:03:20 2008 From: jbaltz at altzman.com (Jerry B. Altzman) Date: Sun, 10 Aug 2008 17:03:20 -0400 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo's t61p? In-Reply-To: <489F1DBA.90701@gmx.net> References: <17492-07901@sneakemail.com> <489F05D9.5040301@altzman.com> <489F1DBA.90701@gmx.net> Message-ID: <489F5798.9060901@altzman.com> on 2008-08-10 12:56 David Krings said the following: > Jerry B. Altzman wrote: >> USB->serial connectors are cheap, plentiful, and work like a charm in >> Windows and Linux. > Cheap - true, plentiful - true as well, work like a charm - well,not if > you need real RS232C. When I worked at IR we had an adaptor for Sorry about that -- all the RS232 I need is talking to serial ports on the backs of servers and Ciscos -- and for THAT purpose, I've had nothing but good vibes and warm fuzzies. I've heard them also work with weather station outputs as well. > programming elecrtronic locks and it required a true serial port. The > vast majority of USB to serial converters we tried were fakers or just > plain junk. Most of them could run a seril mouse, but that was about it. Your mileage varied. > David //jbaltz -- jerry b. altzman jbaltz at altzman.com www.jbaltz.com thank you for contributing to the heat death of the universe. From tedd at sperling.com Sun Aug 10 19:10:45 2008 From: tedd at sperling.com (tedd) Date: Sun, 10 Aug 2008 19:10:45 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> Message-ID: At 2:24 PM -0400 8/10/08, Michael B Allen wrote: >Can someone share their best practices regarding transitioning between >HTTP and HTTPS protected resources? > >For example, consider a page with several tabs - one of which is >linked to a shopping cart. The shopping cart should be protected with >HTTPS whereas the other tabs should not. > >It's not hard to make the shopping cart link https:// but once at the >shopping cart page, all links back to non-SSL protected resources >would need to be emitted (or rewritten) as full non-HTTPS URLs. And >that's not really desirable anyway since many browsers can flag such >pages as non-fully protected. > >One relatively simple solution is to maintain a list of protected >resources and then redirect the client to HTTPS if the target is to be >protected and the client is not already under HTTPS. If the route does >not match and the client is under HTTPS then they are redirected back. >The downside is that the redirection is not terribly efficient. > >How do you handle this scenario? > >Mike Mike: The way I do it, once you go https, you don't go back until the transaction is approved, denied, or canceled. In fact, when it's finished all data (i.e., session, post, get, whatever) is expunged except for the data that's legal to keep (i.e., the order), which is recorded in the dB. No data leaves. That's a little hard on a shopping cart when people want to add stuff to their order, but if that's the case, then cookie their order before you go to https and reload the cookie when you leave. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ioplex at gmail.com Sun Aug 10 19:52:17 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 10 Aug 2008 19:52:17 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> Message-ID: <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> On Sun, Aug 10, 2008 at 2:41 PM, John Campbell wrote: >> How do you handle this scenario? > > I looked at what amazon.com does and assumed they have it right. The > only process that is https is the checkout process. Once you enter > the checkout process, there are essentially zero links on the https > pages. > > I feel that once someone clicks "checkout", there should be zero > distractions. Amazon does a really good job with this; most of the > airlines have checkout processes that include unnecessary stuff like > site navigation. > > This doesn't really answer your question, but if the checkout process > is really simple, the problem of http/https switching tends to go > away. The "no distractions" method is pretty much what my current site does. But now I'm developing a generic framework and my new site will have other pages aside from the cart that need to be protected. So I'm trying to normalize things a little. I'd rather not use an application specific solution. I'm starting to think that the redirect technique is the way to go since it can be cleanly implemented (see pseudo code below) in the bootstrap orthogonally to everything else and can give total separation regarding host, cookies sessions and so on if security is critical. $https_routes = array( 'cart' => true, 'account/logon' => true, 'contacts' => true, ); $scheme = false; if (does_request_target_match_route($https_routes)) { if (!is_https()) { $scheme = 'https://'; } } else { if (is_https()) { $scheme = 'http://'; } } if ($scheme) { header('Location: ' . rebuild_url_with_new_scheme($scheme)); exit(); } Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From 1j0lkq002 at sneakemail.com Sun Aug 10 19:56:39 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 10 Aug 2008 16:56:39 -0700 Subject: [nycphp-talk] [OT] notebook recommendations - time to retire the Thinkpad t42p... anyone know Lenovo\'s t61p? In-Reply-To: <200808091639.m79GdpYV002920@web55.opentransfer.com> References: <200808091639.m79GdpYV002920@web55.opentransfer.com> Message-ID: <7779-15275@sneakemail.com> 5GB of RAM on Vista? Is that Vista 64? Lenova says you're not accessing "4GB or greater" unless you 64 bit. >ditto to Hans. > >I roll with a X61 (tablet) with 5GB Ram and a Core2DUO running Vista^$ (anti bloated), and I\'ve never had a better portable workstation (and gaming pad) > > > > > > From jcampbell1 at gmail.com Sun Aug 10 21:21:37 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Sun, 10 Aug 2008 21:21:37 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> Message-ID: <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> On 8/10/08, Michael B Allen wrote: > if ($scheme) { > header('Location: ' . rebuild_url_with_new_scheme($scheme)); > exit(); > } The code above won't always work because if the request is a post request, the post data will not get passed to the https url. I think the http spec says it is supposed to, but in reality the POST data is not sent to the redirected location. Maybe the thing to do is throw a 404 if post data is sent to a script that requires ssl. I would also use a 301 redirect in this case. -John C From ioplex at gmail.com Sun Aug 10 22:46:38 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 10 Aug 2008 22:46:38 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> Message-ID: <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> On Sun, Aug 10, 2008 at 9:21 PM, John Campbell wrote: > On 8/10/08, Michael B Allen wrote: >> if ($scheme) { >> header('Location: ' . rebuild_url_with_new_scheme($scheme)); >> exit(); >> } > > > The code above won't always work because if the request is a post > request, the post data will not get passed to the https url. I think > the http spec says it is supposed to, but in reality the POST data is > not sent to the redirected location. Maybe the thing to do is throw a > 404 if post data is sent to a script that requires ssl. True. But POST-ing while also transitioning between HTTP and HTTPS is not terribly common. > I would also use a 301 redirect in this case. Why is that exactly? I think I agree with you, but I just want to make sure I know why 301 would be better. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From jcampbell1 at gmail.com Sun Aug 10 23:31:16 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Sun, 10 Aug 2008 23:31:16 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> Message-ID: <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> On 8/10/08, Michael B Allen wrote: > > True. But POST-ing while also transitioning between HTTP and HTTPS is > not terribly common. There are cases when you want this... imagine an "express buy" button. It would post the item data to an https page. You are right that it isn't terribly common. Just out of curiosity, is this going to be your primary method to set http vs https, or is this just a fallback in case there is a bad link somewhere? > > I would also use a 301 redirect in this case. > > Why is that exactly? I think I agree with you, but I just want to make > sure I know why 301 would be better. > The short answer is, 301 passes google page rank, 302 does not. -John C From ioplex at gmail.com Mon Aug 11 02:18:53 2008 From: ioplex at gmail.com (Michael B Allen) Date: Mon, 11 Aug 2008 02:18:53 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> Message-ID: <78c6bd860808102318p514b0ff6haed815260e5e71d5@mail.gmail.com> On Sun, Aug 10, 2008 at 11:31 PM, John Campbell wrote: > On 8/10/08, Michael B Allen wrote: >> >> True. But POST-ing while also transitioning between HTTP and HTTPS is >> not terribly common. > > There are cases when you want this... imagine an "express buy" > button. It would post the item data to an https page. You are right > that it isn't terribly common. > > Just out of curiosity, is this going to be your primary method to set > http vs https, or is this just a fallback in case there is a bad link > somewhere? As of right now, yes I'm relying entirely with the redirecting code I posted earlier. >> > I would also use a 301 redirect in this case. >> >> Why is that exactly? I think I agree with you, but I just want to make >> sure I know why 301 would be better. >> > > The short answer is, 301 passes google page rank, 302 does not. Understood. Thanks, Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From 1j0lkq002 at sneakemail.com Mon Aug 11 03:18:33 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 11 Aug 2008 00:18:33 -0700 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> Message-ID: <25138-06766@sneakemail.com> John Campbell jcampbell1-at-gmail.com |nyphp MAIN ONE dev/internal group use| wrote: >On 8/10/08, Michael B Allen wrote: > > >>True. But POST-ing while also transitioning between HTTP and HTTPS is >> not terribly common. >> >> > >There are cases when you want this... imagine an "express buy" >button. It would post the item data to an https page. You are right >that it isn't terribly common. > >Just out of curiosity, is this going to be your primary method to set >http vs https, or is this just a fallback in case there is a bad link >somewhere? > > > >> > I would also use a 301 redirect in this case. >> >>Why is that exactly? I think I agree with you, but I just want to make >> sure I know why 301 would be better. >> >> >> > >The short answer is, 301 passes google page rank, 302 does not. > >-John C > > I'm not sure page rank is an issue here, as you probably want to restrict search engines from spidering/indexing your secure pages (especially any shopping cart stuff that would make for meaningless duplicate junk). If you've told the search engines that https is off-limits, then who cares what sort of redirect you use? Which brings me to my initial point about moving the cert to a subdomain... good luck working out the details of that "tell search engines not to index the https stuff" with your cert on your primary domain. Remember that to search engines, http://www.example.com/robots.txt is a different file than httpS://www.example.com/robots.txt, and you will have to manage that. -=john andrews From ioplex at gmail.com Mon Aug 11 12:06:36 2008 From: ioplex at gmail.com (Michael B Allen) Date: Mon, 11 Aug 2008 12:06:36 -0400 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <25138-06766@sneakemail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> <25138-06766@sneakemail.com> Message-ID: <78c6bd860808110906w35fd55dct4097cdc8577ab2e9@mail.gmail.com> On Mon, Aug 11, 2008 at 3:18 AM, inforequest <1j0lkq002 at sneakemail.com> wrote: > John Campbell jcampbell1-at-gmail.com |nyphp MAIN ONE dev/internal group >>> Why is that exactly? I think I agree with you, but I just want to make >>> sure I know why 301 would be better. >>> >>> >> >> The short answer is, 301 passes google page rank, 302 does not. >> >> -John C >> > > I'm not sure page rank is an issue here, as you probably want to restrict > search engines from spidering/indexing your secure pages (especially any > shopping cart stuff that would make for meaningless duplicate junk). If > you've told the search engines that https is off-limits, then who cares what > sort of redirect you use? But I think that's a different issue that should be dealt with using different methods (e.g. robots.txt). Someone might want crawlers under HTTPS. It's not likely. But it's possible. Conceptually a 301 means "the resource you're trying to access is actually invalid and is represented by the following resource instead". So the HTTP to HTTPS transition would be much better characterized by the 301. The 302 is better for things like redirects after form posts. For example, you might access the route /account/logon and get a valid 200 response that presents a form and then submit that to the same route and get a 302 to a different page. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From 1j0lkq002 at sneakemail.com Mon Aug 11 15:21:25 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 11 Aug 2008 12:21:25 -0700 Subject: [nycphp-talk] Switching Forth and Back Between HTTP and HTTPS In-Reply-To: <78c6bd860808110906w35fd55dct4097cdc8577ab2e9@mail.gmail.com> References: <78c6bd860808101124g1ac6d184g9846e65389c3397d@mail.gmail.com> <8f0676b40808101141pc1a97c5l80639daacffd8bf9@mail.gmail.com> <78c6bd860808101652y5dec8ffax63d9083bf6e38172@mail.gmail.com> <8f0676b40808101821g3621a99am9d51d4f515954c76@mail.gmail.com> <78c6bd860808101946g41ad32a9s481c0df96c60d3a6@mail.gmail.com> <8f0676b40808102031l4016bf4eqb0083f7a27b6da@mail.gmail.com> <25138-06766@sneakemail.com> <78c6bd860808110906w35fd55dct4097cdc8577ab2e9@mail.gmail.com> Message-ID: <5938-78141@sneakemail.com> Michael B Allen ioplex-at-gmail.com |nyphp MAIN ONE dev/internal group use| wrote: >On Mon, Aug 11, 2008 at 3:18 AM, inforequest <1j0lkq002 at sneakemail.com> wrote: > > >>John Campbell jcampbell1-at-gmail.com |nyphp MAIN ONE dev/internal group >> >> >>>>Why is that exactly? I think I agree with you, but I just want to make >>>>sure I know why 301 would be better. >>>> >>>> >>>> >>>> >>>The short answer is, 301 passes google page rank, 302 does not. >>> >>>-John C >>> >>> >>> >>I'm not sure page rank is an issue here, as you probably want to restrict >>search engines from spidering/indexing your secure pages (especially any >>shopping cart stuff that would make for meaningless duplicate junk). If >>you've told the search engines that https is off-limits, then who cares what >>sort of redirect you use? >> >> > >But I think that's a different issue that should be dealt with using >different methods (e.g. robots.txt). Someone might want crawlers under >HTTPS. It's not likely. But it's possible. > >Conceptually a 301 means "the resource you're trying to access is >actually invalid and is represented by the following resource >instead". > >So the HTTP to HTTPS transition would be much better characterized by the 301. > >The 302 is better for things like redirects after form posts. For >example, you might access the route /account/logon and get a valid 200 >response that presents a form and then submit that to the same route >and get a 302 to a different page. > >Mike > > > Yes. Wonderful to see this level of discussion on the list btw.... -=john From pyurt at yahoo.com Mon Aug 11 20:55:52 2008 From: pyurt at yahoo.com (pyurt) Date: Mon, 11 Aug 2008 20:55:52 -0400 Subject: [nycphp-talk] Compress interface pages using gzip compression Message-ID: <02ef01c8fc16$2c2743f0$64680a0a@Pres2103> Is there a simple way to compress my interface pages using gzip compression. My content is generated from PHP5 scripts? I installed mod_deflate. Environment: Linux Apache2.2 PHP 5.2.x Paul Yurt www.mastermoz.com Make the Internet Work for You! MasterMOZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at mastermoz.com Mon Aug 11 21:06:05 2008 From: paul at mastermoz.com (paul) Date: Mon, 11 Aug 2008 21:06:05 -0400 Subject: [nycphp-talk] Compress interface pages using gzip compression Message-ID: <02f401c8fc17$9a1c1c40$64680a0a@Pres2103> Is there a simple way to compress my interface pages using gzip compression. My content is generated from PHP5 scripts? I installed mod_deflate. Environment: Linux Apache2.2 PHP 5.2.x Paul Yurt www.mastermoz.com Make the Internet Work for You! MasterMOZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at mastermoz.com Mon Aug 11 21:08:43 2008 From: paul at mastermoz.com (paul) Date: Mon, 11 Aug 2008 21:08:43 -0400 Subject: [nycphp-talk] Compress interface pages using gzip compression Message-ID: <02ff01c8fc17$f9e6a9b0$64680a0a@Pres2103> Is there a simple way to compress my interface pages using gzip compression. My content is generated from PHP5 scripts? I installed mod_deflate. Environment: Linux Apache2.2 PHP 5.2.x Paul Yurt www.mastermoz.com Make the Internet Work for You! MasterMOZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcampbell1 at gmail.com Mon Aug 11 21:12:25 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Mon, 11 Aug 2008 21:12:25 -0400 Subject: [nycphp-talk] Compress interface pages using gzip compression In-Reply-To: <02ef01c8fc16$2c2743f0$64680a0a@Pres2103> References: <02ef01c8fc16$2c2743f0$64680a0a@Pres2103> Message-ID: <8f0676b40808111812o1764d17cqb45e81ac9b80af51@mail.gmail.com> On Mon, Aug 11, 2008 at 8:55 PM, pyurt wrote: > Is there a simple way to compress my interface pages using gzip compression. > add the following to an .htaccess at the lowest level in the document root: AddOutputFilterByType DEFLATE text/html text/plain text/xml see http://httpd.apache.org/docs/2.0/mod/mod_deflate.html for more details. Regards, John Campbell From smanes at magpie.com Mon Aug 11 21:58:29 2008 From: smanes at magpie.com (Steve Manes) Date: Mon, 11 Aug 2008 21:58:29 -0400 Subject: [nycphp-talk] Compress interface pages using gzip compression In-Reply-To: <02ef01c8fc16$2c2743f0$64680a0a@Pres2103> References: <02ef01c8fc16$2c2743f0$64680a0a@Pres2103> Message-ID: <48A0EE45.9090908@magpie.com> pyurt wrote: > Is there a simple way to compress my interface pages using gzip > compression. This is what I use: AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/xhtml+xml application/xml application/ x-javascript DeflateFilterNote Input input_info DeflateFilterNote Output output_info DeflateFilterNote Ratio ratio_info LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate CustomLog {LOGDIR}/deflate_log deflate BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html From mikesz at qualityadvantages.com Tue Aug 12 01:20:36 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 12 Aug 2008 13:20:36 +0800 Subject: [nycphp-talk] Need suggestions on building a hacker trap... Message-ID: <459223760.20080812132036@qualityadvantages.com> Hello NYPHP, I found the following attempted hack in the access log on one of my sites: "GET /index.php?Mode=http://badguyurl.ru/index.html?" In this case, the hacker didn't gain access to the site because a database script failed instead. I would like to be more proactive with trapping this and sending the results of the trap back to me so I can track and ban IP addresses etc. I have a procedure that I hacked for previous exploits but am interested now in other options that I may not have used previously. -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From bzcoder at bzcode.com Tue Aug 12 05:29:56 2008 From: bzcoder at bzcode.com (bzcoder) Date: Tue, 12 Aug 2008 05:29:56 -0400 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <459223760.20080812132036@qualityadvantages.com> References: <459223760.20080812132036@qualityadvantages.com> Message-ID: <48A15814.3070903@bzcode.com> mod_Security -http://www.modsecurity.org/ Allows you to at the server level detect and log hack attempts Note: it's default ruleset can be very aggressive against some CMS applications, leading to adding exceptions to the ruleset for normal functionality(or more accurately, it leads to people posting on forums saying "help, my web site suddenly stopped working today when you do X" only to discover their web provider enabled mod_security and they need an exception to the ruleset to function) PHPIDS - http://php-ids.org/ Instead of functioning at the web server level, this functions at the PHP level and gives you a much easier ability to modify your actions using PHP. You can use the auto-prepend PHP function to add your IDS script to every PHP script file automatically at runtime if you wish. mikesz at qualityadvantages.com wrote: > Hello NYPHP, > > I found the following attempted hack in the access log on one of my sites: > > "GET /index.php?Mode=http://badguyurl.ru/index.html?" > > In this case, the hacker didn't gain access to the site because a > database script failed instead. > > I would like to be more proactive with trapping this and sending the > results of the trap back to me so I can track and ban IP addresses > etc. > > I have a procedure that I hacked for previous exploits but am > interested now in other options that I may not have used previously. > > From ramons at gmx.net Tue Aug 12 06:58:11 2008 From: ramons at gmx.net (David Krings) Date: Tue, 12 Aug 2008 06:58:11 -0400 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <459223760.20080812132036@qualityadvantages.com> References: <459223760.20080812132036@qualityadvantages.com> Message-ID: <48A16CC3.5080709@gmx.net> mikesz at qualityadvantages.com wrote: > Hello NYPHP, > > I found the following attempted hack in the access log on one of my sites: > > "GET /index.php?Mode=http://badguyurl.ru/index.html?" > > In this case, the hacker didn't gain access to the site because a > database script failed instead. > > I would like to be more proactive with trapping this and sending the > results of the trap back to me so I can track and ban IP addresses > etc. > > I have a procedure that I hacked for previous exploits but am > interested now in other options that I may not have used previously. So what exactly does the parameter Mode do? Isn't this line showing that a parameter with value got passed to a script with GET? In that case, which input validation / processing do your scripts have? David From mikesz at qualityadvantages.com Tue Aug 12 07:14:44 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 12 Aug 2008 19:14:44 +0800 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <48A16CC3.5080709@gmx.net> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> Message-ID: <1803386940.20080812191444@qualityadvantages.com> "So what exactly does the parameter Mode do? " Normally, Mode= takes query parameters like "latest" or "featured" member for sorting to select the correct display values. One of the "correct" script generated calls is "index.php?Mode=last&Sex=all" which tells the script to do a select for the latest members, both male and female. This will display a block containing thumbnails of members who meet the selection criteria. -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From mikesz at qualityadvantages.com Tue Aug 12 07:26:07 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 12 Aug 2008 19:26:07 +0800 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <48A16CC3.5080709@gmx.net> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> Message-ID: <1174346887.20080812192607@qualityadvantages.com> Hello David, > So what exactly does the parameter Mode do? Isn't this line showing that a > parameter with value got passed to a script with GET? In that case, which > input validation / processing do your scripts have? > David > _______________________________________________ Indeed, it was a GET passed directly through the browser as a URL. At first I didn't understand where it came from because the "selector" is a link not a form. When you click on the link on the index page, it does a page refresh and passes the new selection criteria so that when the page comes back it contains the thumbnails for the new request. Frankly, I didn't know the script did that until I started to analyze the badguy's submission and discovered what 'Mode' did by doing a print_r of $_REQUEST in a test. -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From kenrbnsn at rbnsn.com Tue Aug 12 08:11:58 2008 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Tue, 12 Aug 2008 08:11:58 -0400 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <1174346887.20080812192607@qualityadvantages.com> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> <1174346887.20080812192607@qualityadvantages.com> Message-ID: At 07:26 AM 8/12/2008, mikesz at qualityadvantages.com wrote: >Hello David, > > > So what exactly does the parameter Mode do? Isn't this line showing that a > > parameter with value got passed to a script with GET? In that case, which > > input validation / processing do your scripts have? > > > David > > _______________________________________________ > >Indeed, it was a GET passed directly through the browser as a URL. At >first I didn't understand where it came from because the "selector" is >a link not a form. When you click on the link on the index page, it Always, always, always sanitized input from the user. These hackers will screen scrap web pages to get interesting looking links/forms and then send them directly to your script trying to break it. I usually check for certain strings, like "http://" and "ftp://", in the $_GET and $_POST arrays and reject the attempt if they are present. I also automatically ban the IP via my firewall program so they can't get in again. Ken Ken From brenttech at gmail.com Tue Aug 12 08:45:07 2008 From: brenttech at gmail.com (Brent Baisley) Date: Tue, 12 Aug 2008 08:45:07 -0400 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <48a17e40.1e2d400a.4c9d.ffffd752SMTPIN_ADDED@mx.google.com> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> <1174346887.20080812192607@qualityadvantages.com> <48a17e40.1e2d400a.4c9d.ffffd752SMTPIN_ADDED@mx.google.com> Message-ID: <5d515c620808120545x6f872a89kd3644aebf3c1ef1d@mail.gmail.com> > Always, always, always sanitized input from the user. These hackers will > screen scrap web pages to get interesting looking links/forms and then send > them directly to your script trying to break it. > As Ken said, always sanitize. Your input should assume that the data came from a source you know nothing about, not by a form or link you created. Forms and links should be designed to assist the user, not dictate your input structure. It really shouldn't matter that someone is trying to hack your site in the way you presented. It's just extra traffic. If your site can be compromised in that way, then the problem is with your code. What if someone submitted: Mode=last" OR 1=1 Would your query select the latest members or those where 1=1 (all). Anyone can ticker with a URL and it's not that hard to "emulate" a form post using curl. -- Brent Baisley From mikesz at qualityadvantages.com Tue Aug 12 09:02:43 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 12 Aug 2008 21:02:43 +0800 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <5d515c620808120545x6f872a89kd3644aebf3c1ef1d@mail.gmail.com> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> <1174346887.20080812192607@qualityadvantages.com> <48a17e40.1e2d400a.4c9d.ffffd752SMTPIN_ADDED@mx.google.com> <5d515c620808120545x6f872a89kd3644aebf3c1ef1d@mail.gmail.com> Message-ID: <394288509.20080812210243@qualityadvantages.com> Hello Brent, > What if someone submitted: > Mode=last" OR 1=1 Thanks for the input, I get the same database error submitting your suggestion that I got when I submitted the hack, btw. -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From ben at projectskyline.com Tue Aug 12 09:31:56 2008 From: ben at projectskyline.com (Ben Sgro) Date: Tue, 12 Aug 2008 09:31:56 -0400 Subject: [nycphp-talk] Need suggestions on building a hacker trap... In-Reply-To: <1803386940.20080812191444@qualityadvantages.com> References: <459223760.20080812132036@qualityadvantages.com> <48A16CC3.5080709@gmx.net> <1803386940.20080812191444@qualityadvantages.com> Message-ID: <48A190CC.20006@projectskyline.com> Hello, One way to enforce this is to do (example): $validMode = array('last' => 'last', 'first' => 'first', 'all' => 'all'); if (!isset($validMode['$_GET['mode']])) { /* bad input */ } else $sqlWhere = $validMode['$_GET['mode']])); Which is essentially enforcing a white list. There's a ton of permutation of this type of validation. It obviously won't work for a form field or something, where the input is truly random and dynamic, but for fixed values, it works fine. - Ben mikesz at qualityadvantages.com wrote: > "So what exactly does the parameter Mode do? " > > Normally, Mode= takes query parameters like "latest" or "featured" > member for sorting to select the correct display values. One of the > "correct" script generated calls is "index.php?Mode=last&Sex=all" > which tells the script to do a select for the latest members, both > male and female. This will display a block containing thumbnails of > members who meet the selection criteria. > > From jhy2104 at columbia.edu Tue Aug 12 11:19:33 2008 From: jhy2104 at columbia.edu (Dave Youn) Date: Tue, 12 Aug 2008 11:19:33 -0400 Subject: [nycphp-talk] Columbia University Medical Center - Web Developer Position Message-ID: Hi: We are looking to fill a Web Developer position here at Columbia University Medical Center. The job would be ideal for someone who enjoys creating/maintaining multiple websites and has experience creating templates with CMS (Drupal ideal) and creating pages with HTML and CSS. Basic knowledge of PHP/MySQL is a big plus. Link to the full job description and application: http://jobs.columbia.edu/applicants/Central?quickFind=111299 We?re starting interviews now, so I would act quick. Please pass this along to anyone who might be a good interested and a good fit. Columbia offers great benefits; tuition reimbursement, 24 days of vacation a year, and I have enjoyed working here for the past 4 years. No Recruiters, first parties contacts only. ***************************************** David Youn - Webmaster Columbia University Medical Center http://www.cubhis.org/wds/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzcoder at bzcode.com Wed Aug 13 08:31:46 2008 From: bzcoder at bzcode.com (bzcoder) Date: Wed, 13 Aug 2008 08:31:46 -0400 Subject: [nycphp-talk] Re: [nycphp-jobs] Please remove me from you distribution list In-Reply-To: <48A2C4F3.5030808@enobrev.com> References: <20080812151209.fe8357a1bd7c26a8ea0a0bcbcdb71bc2.d32b8caa31.wbe@email.secureserver.net> <48A21751.203@omnistep.com> <48A2B6ED.9010607@bzcode.com> <48A2C4F3.5030808@enobrev.com> Message-ID: <48A2D432.90400@bzcode.com> Mark Armendariz wrote: > >> Received: from ne3.nyphp.com ([207.58.185.222]:48172) >> by cl38.gs02.gridserver.com with esmtps >> (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) >> (Exim 4.63) >> (envelope-from ) >> id 1KT3E1-0004Vs-TV >> for bzcoder at bzcode.com; Tue, 12 Aug 2008 16:24:27 -0700 >> >> To determine that despite this email coming to my private email box, >> it was sent to my public bzcoder throwaway address. >> >> BTW, this especially applies for commercial email as you don't want >> people to start hitting the "this is spam" button in frustration. > > This reminds me of a thought I had the other day. Wouldn't it make > sense to add an "unsubscribe" field to the email spec, which would > allow spam blockers to start an "auto-unsubscribe" conversation with > the originating sender before explicitly marking it as spam? Would > also allow a default "unsubscribe" button in all email clients. I > hate to think of how many legitimate mailing lists have been marked as > spam as a simplified (and reliable) means to unsubscribe. I've copied this over to the NYPHP list since it is not "job" related. No, it would not make any sense at all to add such a field to the email spec. Mainly because there already IS such a field. :-) _See http://www.ietf.org/rfc/rfc2369.txt for the spec. From the spec, my preferred implementation is a take on ___ List-Unsubscribe: , However you should include some identifying information in both those fields to make life easy. Ie add a "uid=someid&idverify=verifycode" The idverify can be as simple as a crc hash of the email address, the basic idea here[and mind you, I speak from the commercial emailer perspective where every unsub is lost circulation which means less advertising revenue.] is to keep yahoo's from cycling through every charector combination for userids and unsubbing all your users! By adding a verify code, you can ensure the id is for that address. [Note: the simple solution is to make it uid=recipent at host.com - ie make it their email address. That works right up until some giant email provider decides to start stripping recipeint addresses from email "just in case" it is forwarded and replacing it with EMAIL.] There is a company out there that makes a plug in for outlook that has a "get me off this list" button. It checks the email message and using a number of string detection logics, including checking for this header, it will try to automatically unsubscribe you from a message. Since my main ESP does not support this feature[grumble] I haven't done much testing, but I'm told that some of the major webmail providers also include an "unsubscribe" button when this field is present. If given the option to hit "unsubscribe" or "report spam" users will tend towards unsub, which helps on deliberability to everyone else on that mail network. Now, to bring this subject around marginally to PHP: PHPList, the open source PHP newsletter management application is a bit of an odd duck. If you send mail /directly/ it will generate the 2369 fields for the headers. However, if you send mail through PHPMailer, it does not. It's an easy item to patch, so if some young PHP coder would like to submit a patch to them I'm guessing it would be appreciated. I haven't done so myself because every time I go into that code, I start seeing a dozen things to fix/change and then get interrupted by paying work. From bzcoder at bzcode.com Wed Aug 13 08:41:05 2008 From: bzcoder at bzcode.com (bzcoder) Date: Wed, 13 Aug 2008 08:41:05 -0400 Subject: [nycphp-talk] CAN SPAM updates In-Reply-To: <48A2D432.90400@bzcode.com> References: <20080812151209.fe8357a1bd7c26a8ea0a0bcbcdb71bc2.d32b8caa31.wbe@email.secureserver.net> <48A21751.203@omnistep.com> <48A2B6ED.9010607@bzcode.com> <48A2C4F3.5030808@enobrev.com> <48A2D432.90400@bzcode.com> Message-ID: <48A2D661.9030804@bzcode.com> bzcoder wrote: > keep yahoo's from cycling through every charector combination for > userids and unsubbing all your users! Ack! I complete forgot to mention why you can't do simple stuff like confirm the unsubscribe request via email, or send them to a second page after the first is submitted to confirm them again. Note: you should not do that anyway to be a good, responsible emailler, it is against best practices and common courtesy to make people jump through hoops to unsubscribe. However, the Can Spam act guidelines were recently updated and it is now /illegal/ to make people jump through hoops. You cannot require a person to go to more than ONE web page or send ONE email message in order to unsubscribe. (ok, technically they go to two web pages, one web page to submit their data, and one page for that submission to be processed. However, even if they never see the second web page, submitting the first unsubscribed them so their gone. This avoids unscrupulous: Are you sure you want to go? Look at our spammy Ad Click next to contine Followed by We'd like to know why you want to go Look at our spammy Ad Enter your reason Click next to continue Followed by But we love you, you should stay Look at our spammy Ad Click next to really really unsubscribe [Opinionated about spammers? Me? Never.] Ok, enough yaking, I just didn't want someone to mistakenly think that an email unsubscribe confirmation[you can send the email to let them know, you can't require them to do anything with the email to confirm] would be acceptable. I know for small lists its not such a big deal, and honest mistakes happen. But considering the consequences.... From lists at enobrev.com Wed Aug 13 13:26:31 2008 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 13 Aug 2008 13:26:31 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 Message-ID: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Can anyone recommend an open source CMS (or possibly commercial if worthwhile) that works natively on php5 (e_strict)and MySQL 5 (strict). I need it to install easily on Win32 and Linux. And the ability to handle multiple domains with a single installation would be great as well. This morning I've installed Expression Engine. Failed Miserably (doesn't like mysql strict mode - when i worked around it, i get a blank screen on the installation script). Then I installed Joomla and I get strict warnings EVERYWHERE. Then I tried Cake, which seems to be more of a framework than a cms. Cake's not happy with p5 strict and their developers feel you deserve the middle finger if you think otherwise. Ok, they're not that harsh, but it's still not happening any time today. https://trac.cakephp.org/ticket/4163 I tried Drupal for a project last year and I'm just plain not a fan. I usually build custom CMS's for my clients, but this client specifically wants something readily available and widely used. Thus far I can't get anything to Just Work, which makes it rather hard to recommend anything at all. Sure I could grab any one of these and php5-strictify it within a day, but isn't that contrary to the point of using something that's already built? Thanks! Mark From justin at justinhileman.info Wed Aug 13 13:50:54 2008 From: justin at justinhileman.info (justin) Date: Wed, 13 Aug 2008 13:50:54 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <1dc0e7e00808131050t6038db54n75f564caf6f3cdd0@mail.gmail.com> On Wed, Aug 13, 2008 at 1:26 PM, Mark Armendariz wrote: > I tried Drupal for a project last year and I'm just plain not a fan. I'd give Drupal 6 a shot before discounting it entirely. justin -- http://justinhileman.com From anthony at thrillist.com Wed Aug 13 14:29:54 2008 From: anthony at thrillist.com (Anthony Wlodarski) Date: Wed, 13 Aug 2008 14:29:54 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <1dc0e7e00808131050t6038db54n75f564caf6f3cdd0@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <1dc0e7e00808131050t6038db54n75f564caf6f3cdd0@mail.gmail.com> Message-ID: <48A32822.7050008@thrillist.com> An HTML attachment was scrubbed... URL: From susan_shemin at yahoo.com Wed Aug 13 14:46:21 2008 From: susan_shemin at yahoo.com (Susan Shemin) Date: Wed, 13 Aug 2008 11:46:21 -0700 (PDT) Subject: [nycphp-talk] calculating state taxes? Message-ID: <64644.19031.qm@web50205.mail.re2.yahoo.com> I have a shopping cart and need to calculate state taxes on the products for the state the business is in.? Is there some type of script/code that already is set up to calculate this? Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Wed Aug 13 14:50:00 2008 From: ken at secdat.com (Kenneth Downs) Date: Wed, 13 Aug 2008 14:50:00 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <64644.19031.qm@web50205.mail.re2.yahoo.com> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> Message-ID: <48A32CD8.3090403@secdat.com> Susan Shemin wrote: > I have a shopping cart and need to calculate state taxes on the > products for the state the business is in. Is there some type of > script/code that already is set up to calculate this? Tax tables are available from NYS gov site. The calculation is easy, record the taxable county in your table, fetch in the rate, and multiply it by the taxable product total. Presumably the customer will need a report that prints out the tax collected by county for a given period. > > Susan > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Wed Aug 13 14:51:35 2008 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 13 Aug 2008 14:51:35 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <64644.19031.qm@web50205.mail.re2.yahoo.com> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> Message-ID: <271626E1-C9CA-440E-B8AF-ACF153AE3EE1@gmail.com> const('TAX_RATE', 0.06); $tax = $total * TAX_RATE; just set your own tax rate, that simple ;) Joseph Crawford On Aug 13, 2008, at 2:46 PM, Susan Shemin wrote: > I have a shopping cart and need to calculate state taxes on the > products for the state the business is in. Is there some type of > script/code that already is set up to calculate this? > > Susan > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Wed Aug 13 14:52:31 2008 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 13 Aug 2008 14:52:31 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A32CD8.3090403@secdat.com> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> <48A32CD8.3090403@secdat.com> Message-ID: <3A904ADF-6D53-4C95-AEB0-FA4E975C4CA1@gmail.com> Yes this makes sense if you are dealing with NYC but not many other places have county set tax rates ;) If you are dealing with NYC use Ken's suggestion Joseph Crawford On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: > Susan Shemin wrote: >> >> I have a shopping cart and need to calculate state taxes on the >> products for the state the business is in. Is there some type of >> script/code that already is set up to calculate this? > > Tax tables are available from NYS gov site. > > The calculation is easy, record the taxable county in your table, > fetch in the rate, and multiply it by the taxable product total. > > Presumably the customer will need a report that prints out the tax > collected by county for a given period. > >> >> Susan >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > > -- > Kenneth Downs > Secure Data Software, Inc. > www.secdat.com www.andromeda-project.org > 631-689-7200 Fax: 631-689-0527 > cell: 631-379-0010 > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhy2104 at columbia.edu Wed Aug 13 15:00:20 2008 From: jhy2104 at columbia.edu (Dave Youn) Date: Wed, 13 Aug 2008 15:00:20 -0400 Subject: [nycphp-talk] Columbia University Medical Center - Web Developer Position In-Reply-To: <200808131600.m7DG0CDP009330@cayenne.cc.columbia.edu> Message-ID: Hi Tedd: The position would be have to be on-site. But I encourage "off-site" people to apply because we will have a need for freelancers in the future. Thanks, Dave ***************************************** > From: tedd > Date: Tue, 12 Aug 2008 18:11:01 -0400 > To: Dave Youn > Subject: Re: [nycphp-talk] Columbia University Medical Center - Web Developer > Position > > Dave: > > The information provided does not indicate if the position has to be "on > site". > > Can "off-site" people apply for "off-site" employment? > > Thanks, > > tedd From ajai at bitblit.net Wed Aug 13 15:01:18 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 13 Aug 2008 15:01:18 -0400 (EDT) Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: On Wed, 13 Aug 2008, Mark Armendariz wrote: > Can anyone recommend an open source CMS (or possibly commercial if > worthwhile) that works natively on php5 (e_strict)and MySQL 5 > (strict). Do you think that perhaps all of these CMSes might have some problems with all the strict requirements? After all, people use these packages every day without the problems you've experienced... -- Aj. From volcimaster at gmail.com Wed Aug 13 15:06:35 2008 From: volcimaster at gmail.com (Warren Myers) Date: Wed, 13 Aug 2008 15:06:35 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <3A904ADF-6D53-4C95-AEB0-FA4E975C4CA1@gmail.com> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> <48A32CD8.3090403@secdat.com> <3A904ADF-6D53-4C95-AEB0-FA4E975C4CA1@gmail.com> Message-ID: In New York, every country adds a county sales tax to the state sales tax. North Carolina (my current residence) does this, too. I know many other states work like this, too. WMM On Wed, Aug 13, 2008 at 2:52 PM, Joseph Crawford wrote: > Yes this makes sense if you are dealing with NYC but not many other places > have county set tax rates ;) > If you are dealing with NYC use Ken's suggestion > > Joseph Crawford > > > On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: > > Susan Shemin wrote: > > I have a shopping cart and need to calculate state taxes on the products > for the state the business is in. Is there some type of script/code that > already is set up to calculate this? > > > Tax tables are available from NYS gov site. > > The calculation is easy, record the taxable county in your table, fetch in > the rate, and multiply it by the taxable product total. > > Presumably the customer will need a report that prints out the tax > collected by county for a given period. > > > Susan > > ------------------------------ > _______________________________________________ > New York PHP Community Talk Mailing Listhttp://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Onlinehttp://www.nyphpcon.com > > Show Your Participation in New York PHPhttp://www.nyphp.org/show_participation.php > > > > -- > Kenneth Downs > Secure Data Software, Inc.www.secdat.com www.andromeda-project.org > 631-689-7200 Fax: 631-689-0527 > cell: 631-379-0010 > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Warren Myers http://warrenmyers.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at enobrev.com Wed Aug 13 15:56:23 2008 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 13 Aug 2008 15:56:23 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: > On Wed, 13 Aug 2008, Mark Armendariz wrote: > >> Can anyone recommend an open source CMS (or possibly commercial if >> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >> (strict). > > Do you think that perhaps all of these CMSes might have some problems with > all the strict requirements? > > After all, people use these packages every day without the problems you've > experienced... > > I've just installed them all (not drupal) this morning and they all have problems with strict. A few minutes with google confirms this fact (including the link I provided to cake where the devs explicitly state that they don't plan on updating for strict mode). It's not that people don't have this problem, it's that they turn off E_STRICT and go about their way. A similar configuration issue has come up in the past with everyone turning on "register_globals" and going about their way and don't we all just love register_globals. I personally have a hard time saying ok to source code that throws warnings and notices on a vanilla install, even if they are just strict warnings. I know people use them every day, but that doesn't make them reliable. PHP Nuke and OSCommerce have been used by hundreds of thousands for years and I wouldn't trust either for client work. I'll take a look at Drupal 6 per recommendations, but 5 scared me plenty. I spent more time working around drupal 5 than I would have writing my own solution. Any others out there? Thanks again. Mark From mmwaldman at optonline.net Wed Aug 13 16:00:00 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 16:00:00 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: Message-ID: <0K5K00EEI27V0B70@mta4.srv.hcvlny.cv.net> While were on the topic, does the store just charge local tax from where the store is located? Or does it have to charge tax from the purchasers locale? We were thinking from where the store is located, because after all isn't that where it's being sold from. I've got a store going live any day now. Margaret Michele _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Warren Myers Sent: Wednesday, August 13, 2008 3:07 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? In New York, every country adds a county sales tax to the state sales tax. North Carolina (my current residence) does this, too. I know many other states work like this, too. WMM On Wed, Aug 13, 2008 at 2:52 PM, Joseph Crawford wrote: Yes this makes sense if you are dealing with NYC but not many other places have county set tax rates ;) If you are dealing with NYC use Ken's suggestion Joseph Crawford On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: Susan Shemin wrote: I have a shopping cart and need to calculate state taxes on the products for the state the business is in. Is there some type of script/code that already is set up to calculate this? Tax tables are available from NYS gov site. The calculation is easy, record the taxable county in your table, fetch in the rate, and multiply it by the taxable product total. Presumably the customer will need a report that prints out the tax collected by county for a given period. Susan _____ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -- Warren Myers http://warrenmyers.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at optonline.net Wed Aug 13 16:14:22 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 16:14:22 -0400 Subject: [nycphp-talk] Columbia University Medical Center - Web DeveloperPosition In-Reply-To: Message-ID: <0K5K004SO2VTJJF0@mta5.srv.hcvlny.cv.net> Tedd, I don't know what I'm applying for, but I'd like to throw my company in. Sovereign Sites L.L.C. with development in php, mysql, javascript, html, ajax* and the like. Available for new site development or to fix that which has already been "finished". Thank you, Margaret Waldman Sovereign Sites L.L.C. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Dave Youn Sent: Wednesday, August 13, 2008 3:00 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Columbia University Medical Center - Web DeveloperPosition Hi Tedd: The position would be have to be on-site. But I encourage "off-site" people to apply because we will have a need for freelancers in the future. Thanks, Dave ***************************************** > From: tedd > Date: Tue, 12 Aug 2008 18:11:01 -0400 > To: Dave Youn > Subject: Re: [nycphp-talk] Columbia University Medical Center - Web Developer > Position > > Dave: > > The information provided does not indicate if the position has to be "on > site". > > Can "off-site" people apply for "off-site" employment? > > Thanks, > > tedd _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From Veronika at dotcalm.ws Wed Aug 13 16:13:20 2008 From: Veronika at dotcalm.ws (Veronika) Date: Wed, 13 Aug 2008 16:13:20 -0400 Subject: [nycphp-talk] calculating state taxes? References: <0K5K00EEI27V0B70@mta4.srv.hcvlny.cv.net> Message-ID: <004d01c8fd82$96c11070$65bca8c0@VeronikaXP> I thought the store charged tax to the delivery state - that's why some people wouldn't pay and some would - I have to pay sales tax depending on the county of DELIVERY not where I live. V ----- Original Message ----- From: (Margaret) Michele Waldman To: 'NYPHP Talk' Sent: Wednesday, August 13, 2008 4:00 PM Subject: RE: [nycphp-talk] calculating state taxes? While were on the topic, does the store just charge local tax from where the store is located? Or does it have to charge tax from the purchasers locale? We were thinking from where the store is located, because after all isn't that where it's being sold from. I've got a store going live any day now. Margaret Michele ------------------------------------------------------------------------------ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Warren Myers Sent: Wednesday, August 13, 2008 3:07 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? In New York, every country adds a county sales tax to the state sales tax. North Carolina (my current residence) does this, too. I know many other states work like this, too. WMM On Wed, Aug 13, 2008 at 2:52 PM, Joseph Crawford wrote: Yes this makes sense if you are dealing with NYC but not many other places have county set tax rates ;) If you are dealing with NYC use Ken's suggestion Joseph Crawford On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: Susan Shemin wrote: I have a shopping cart and need to calculate state taxes on the products for the state the business is in. Is there some type of script/code that already is set up to calculate this? Tax tables are available from NYS gov site. The calculation is easy, record the taxable county in your table, fetch in the rate, and multiply it by the taxable product total. Presumably the customer will need a report that prints out the tax collected by county for a given period. Susan ------------------------------------------------------------------------------ _______________________________________________New York PHP Community Talk Mailing Listhttp://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Onlinehttp://www.nyphpcon.com Show Your Participation in New York PHPhttp://www.nyphp.org/show_participation.php -- Kenneth DownsSecure Data Software, Inc.www.secdat.com www.andromeda-project.org631-689-7200 Fax: 631-689-0527cell: 631-379-0010_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -- Warren Myers http://warrenmyers.com ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkamm at rvyriptide.org Wed Aug 13 16:33:23 2008 From: wkamm at rvyriptide.org (wkamm at rvyriptide.org) Date: Wed, 13 Aug 2008 16:33:23 -0400 (EDT) Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <004d01c8fd82$96c11070$65bca8c0@VeronikaXP> References: <0K5K00EEI27V0B70@mta4.srv.hcvlny.cv.net> <004d01c8fd82$96c11070$65bca8c0@VeronikaXP> Message-ID: <63093.192.128.167.68.1218659603.squirrel@www.rvyriptide.org> Maybe it depends on the state, but here is how it works in New Jersey. If you have a store in NJ, and ship something to an address within NJ, you must collect sales tax from the customer. If you ship it out of state, you don't collect tax. (Otherwise you would go crazy trying to figure out how mush to collect.) And then you periodically remit the collected sales tax to the state of NJ. > I thought the store charged tax to the delivery state - that's why some > people wouldn't pay and some would - I have to pay sales tax depending on > the county of DELIVERY not where I live. > V > ----- Original Message ----- > From: (Margaret) Michele Waldman > To: 'NYPHP Talk' > Sent: Wednesday, August 13, 2008 4:00 PM > Subject: RE: [nycphp-talk] calculating state taxes? > > > While were on the topic, does the store just charge local tax from where > the store is located? Or does it have to charge tax from the purchasers > locale? > > > > We were thinking from where the store is located, because after all > isn't > that where it's being sold from. > > > > I've got a store going live any day now. > > > > Margaret Michele > > > > > ------------------------------------------------------------------------------ > > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Warren Myers > Sent: Wednesday, August 13, 2008 3:07 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] calculating state taxes? > > > > In New York, every country adds a county sales tax to the state sales > tax. > North Carolina (my current residence) does this, too. > > I know many other states work like this, too. > > WMM > > On Wed, Aug 13, 2008 at 2:52 PM, Joseph Crawford > wrote: > > Yes this makes sense if you are dealing with NYC but not many other > places > have county set tax rates ;) > > > > If you are dealing with NYC use Ken's suggestion > > > > Joseph Crawford > > > > > > On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: > > > > > > Susan Shemin wrote: > > I have a shopping cart and need to calculate state taxes on the products > for the state the business is in. Is there some type of script/code that > already is set up to calculate this? > > > Tax tables are available from NYS gov site. > > The calculation is easy, record the taxable county in your table, fetch > in > the rate, and multiply it by the taxable product total. > > Presumably the customer will need a report that prints out the tax > collected by county for a given period. > > > > > > > Susan > > > > ------------------------------------------------------------------------------ > > _______________________________________________New York PHP Community Talk > Mailing Listhttp://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 > Presentations Onlinehttp://www.nyphpcon.com Show Your Participation in New > York PHPhttp://www.nyphp.org/show_participation.php > > > > > -- Kenneth DownsSecure Data Software, Inc.www.secdat.com > www.andromeda-project.org631-689-7200 Fax: 631-689-0527cell: > 631-379-0010_______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > -- > > Warren Myers > http://warrenmyers.com > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From rmarscher at beaffinitive.com Wed Aug 13 16:37:03 2008 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 13 Aug 2008 16:37:03 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <42BCFED8-9F41-4A0B-9AFD-02E68011554B@beaffinitive.com> On Aug 13, 2008, at 1:26 PM, Mark Armendariz wrote: > Can anyone recommend an open source CMS (or possibly commercial if > worthwhile) that works natively on php5 (e_strict)and MySQL 5 > (strict). I need it to install easily on Win32 and Linux. And the > ability to handle multiple domains with a single installation would be > great as well. I have a feeling that any CMS you can find that operates in strict mode might not be terribly fully featured. Here's one that was built off of Zend Framework, so I'd guess that the odds of it running E_STRICT are pretty good: http://code.google.com/p/digitalus-site-manager/ TYPO3 is another popular big cms written in php... I would guess it has the same issues as Drupal/Joomla in running E_STRICT. I think for any project that existed in php4, it's questionable whether it's worth the effort to get it to run in strict mode in php5. For MySQL5 strict (i.e. STRICT_ALL_TABLES or TRADITIONAL), I have rarely met another php developer that knows about it. So good luck on that... but definitely let us know if you find anything. :) -Rob From ajai at bitblit.net Wed Aug 13 16:41:09 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 13 Aug 2008 16:41:09 -0400 (EDT) Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> Message-ID: On Wed, 13 Aug 2008, Mark Armendariz wrote: > I've just installed them all (not drupal) this morning and they all > have problems with strict. A few minutes with google confirms this > fact (including the link I provided to cake where the devs explicitly > state that they don't plan on updating for strict mode). It's not > that people don't have this problem, it's that they turn off E_STRICT > and go about their way. Or rather, the install on many Linux distros (to pick an example) are not E_STRICT by default. So most of these packages work just fine out of the box. > Any others out there? Many years ago, I played with Xaraya. Ive used Joomla to built various sites, but these days Id much rather use a framework and roll-my-own. The amount of contortions^h^h^h^h^h^h^h^h^h^h^hwork required to customize and write custom components for some of these packages is almost as much as writing your own from scratch using a decent framework so I dont bother anymore. Some frameworks have admin generators which you can use to build most of the backend pretty quickly (e.g. symfony). -- Aj. From ramons at gmx.net Wed Aug 13 16:46:34 2008 From: ramons at gmx.net (David Krings) Date: Wed, 13 Aug 2008 16:46:34 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A32CD8.3090403@secdat.com> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> <48A32CD8.3090403@secdat.com> Message-ID: <48A3482A.8080501@gmx.net> Kenneth Downs wrote: > Susan Shemin wrote: >> I have a shopping cart and need to calculate state taxes on the >> products for the state the business is in. Is there some type of >> script/code that already is set up to calculate this? > > Tax tables are available from NYS gov site. > I think the request is to get a table for all of the US states, which then should include county differences and potentially even city taxes. I know up here in the Electric City area the sales tax is 8.00% to 8.25%. From chsnyder at gmail.com Wed Aug 13 16:59:14 2008 From: chsnyder at gmail.com (csnyder) Date: Wed, 13 Aug 2008 16:59:14 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A3482A.8080501@gmx.net> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> <48A32CD8.3090403@secdat.com> <48A3482A.8080501@gmx.net> Message-ID: On Wed, Aug 13, 2008 at 4:46 PM, David Krings wrote: > Kenneth Downs wrote: >> >> Susan Shemin wrote: >>> >>> I have a shopping cart and need to calculate state taxes on the products >>> for the state the business is in. Is there some type of script/code that >>> already is set up to calculate this? >> >> Tax tables are available from NYS gov site. >> > > I think the request is to get a table for all of the US states, which then > should include county differences and potentially even city taxes. I know up > here in the Electric City area the sales tax is 8.00% to 8.25%. Funny thing, I've never been asked what county I live in by an online retailer. And sales tax rates definitely vary by county. I think the standard approach is to put your head in the sand and hope the state attorneys general never decide to go after e-tailers for taxes owed on the last 7 years worth of sales. ;-) All kidding aside, this is an issue that is probably best answered by your lawyer and/or accountant, and not by the wisdom (wise as it is) of this list. chris. From jcampbell1 at gmail.com Wed Aug 13 17:08:23 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 13 Aug 2008 17:08:23 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A3482A.8080501@gmx.net> References: <64644.19031.qm@web50205.mail.re2.yahoo.com> <48A32CD8.3090403@secdat.com> <48A3482A.8080501@gmx.net> Message-ID: <8f0676b40808131408k202aab3dq5918260883f5cfb6@mail.gmail.com> >> Tax tables are available from NYS gov site. >> The state taxes are based on County and City, which is nearly impossible to deal with. Zip codes aren't completely accurate but much easier. You can find the zip code data here: http://www.oscommerce.com/community/contributions,2792 The only problem is that there are a few customers who will be pissed that they are being over charged sales tax. However, it if is a national business, it will be less than 1 in 10,000 customers (a few people are in white plains and yonkers zip codes but not in that tax jurisdiction). To do it exactly right, you have to geocode the address and use a geo tax database. this is offered as a service, but it cost roughly $500/year. Hope that helps. John Campbell From lists at enobrev.com Wed Aug 13 18:07:01 2008 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 13 Aug 2008 18:07:01 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> Message-ID: <58f08dcf0808131507g10c9f9b3r210722464c90e9de@mail.gmail.com> On Wed, Aug 13, 2008 at 4:37 PM, Rob Marscher wrote: > Here's one that was built off of Zend Framework, so I'd guess that the odds > of it running E_STRICT are pretty good: > http://code.google.com/p/digitalus-site-manager/ > > TYPO3 is another popular big cms written in php... I would guess it has the > same issues as Drupal/Joomla in running E_STRICT. I think for any project > that existed in php4, it's questionable whether it's worth the effort to get > it to run in strict mode in php5. Great Suggestions!! Will have to give both a shot, thanks! On Wed, Aug 13, 2008 at 4:41 PM, Ajai Khattri wrote: > The amount of contortions^h^h^h^h^h^h^h^h^h^h^hwork required to customize and > write custom components for some of these packages is almost as much as > writing your own from scratch using a decent framework so I dont bother > anymore. Indeed, and well put. I tend to be strongly biased towards rolling my own - for contortions I'm comfortable with, which is why this CMS search has been enlightening and a bit painful. Thanks everyone for your input. Mark From mmwaldman at optonline.net Wed Aug 13 19:14:41 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 19:14:41 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <8f0676b40808131408k202aab3dq5918260883f5cfb6@mail.gmail.com> Message-ID: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Here's another question. Is an ebusinesses supposed to file taxes and licenses in every state they are doing business? How else are those sales taxes paid? If you charge them you are supposed to pay them to the state. NY has a line on the tax return for people to pay their online purchases taxes. That's crazy. If the store is in NJ, it should pay NJ taxes. That's where the product is being sold and shipped from. You would definitely need a cron job to keep track of the changing sales taxes. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Wednesday, August 13, 2008 5:08 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? >> Tax tables are available from NYS gov site. >> The state taxes are based on County and City, which is nearly impossible to deal with. Zip codes aren't completely accurate but much easier. You can find the zip code data here: http://www.oscommerce.com/community/contributions,2792 The only problem is that there are a few customers who will be pissed that they are being over charged sales tax. However, it if is a national business, it will be less than 1 in 10,000 customers (a few people are in white plains and yonkers zip codes but not in that tax jurisdiction). To do it exactly right, you have to geocode the address and use a geo tax database. this is offered as a service, but it cost roughly $500/year. Hope that helps. John Campbell _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From mmwaldman at optonline.net Wed Aug 13 19:16:44 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 19:16:44 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <63093.192.128.167.68.1218659603.squirrel@www.rvyriptide.org> Message-ID: <0K5K0003OBBRQMU0@mta1.srv.hcvlny.cv.net> Thank you. The current state I'm dealing with is New Jersey. The next state will be New York, but since it's local fast food service I think that's a fairly clear cut situation. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of wkamm at rvyriptide.org Sent: Wednesday, August 13, 2008 4:33 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? Maybe it depends on the state, but here is how it works in New Jersey. If you have a store in NJ, and ship something to an address within NJ, you must collect sales tax from the customer. If you ship it out of state, you don't collect tax. (Otherwise you would go crazy trying to figure out how mush to collect.) And then you periodically remit the collected sales tax to the state of NJ. > I thought the store charged tax to the delivery state - that's why some > people wouldn't pay and some would - I have to pay sales tax depending on > the county of DELIVERY not where I live. > V > ----- Original Message ----- > From: (Margaret) Michele Waldman > To: 'NYPHP Talk' > Sent: Wednesday, August 13, 2008 4:00 PM > Subject: RE: [nycphp-talk] calculating state taxes? > > > While were on the topic, does the store just charge local tax from where > the store is located? Or does it have to charge tax from the purchasers > locale? > > > > We were thinking from where the store is located, because after all > isn't > that where it's being sold from. > > > > I've got a store going live any day now. > > > > Margaret Michele > > > > > ---------------------------------------------------------------------------- -- > > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Warren Myers > Sent: Wednesday, August 13, 2008 3:07 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] calculating state taxes? > > > > In New York, every country adds a county sales tax to the state sales > tax. > North Carolina (my current residence) does this, too. > > I know many other states work like this, too. > > WMM > > On Wed, Aug 13, 2008 at 2:52 PM, Joseph Crawford > wrote: > > Yes this makes sense if you are dealing with NYC but not many other > places > have county set tax rates ;) > > > > If you are dealing with NYC use Ken's suggestion > > > > Joseph Crawford > > > > > > On Aug 13, 2008, at 2:50 PM, Kenneth Downs wrote: > > > > > > Susan Shemin wrote: > > I have a shopping cart and need to calculate state taxes on the products > for the state the business is in. Is there some type of script/code that > already is set up to calculate this? > > > Tax tables are available from NYS gov site. > > The calculation is easy, record the taxable county in your table, fetch > in > the rate, and multiply it by the taxable product total. > > Presumably the customer will need a report that prints out the tax > collected by county for a given period. > > > > > > > Susan > > > > ---------------------------------------------------------------------------- -- > > _______________________________________________New York PHP Community Talk > Mailing Listhttp://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 > Presentations Onlinehttp://www.nyphpcon.com Show Your Participation in New > York PHPhttp://www.nyphp.org/show_participation.php > > > > > -- Kenneth DownsSecure Data Software, Inc.www.secdat.com > www.andromeda-project.org631-689-7200 Fax: 631-689-0527cell: > 631-379-0010_______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > -- > > Warren Myers > http://warrenmyers.com > > > > ---------------------------------------------------------------------------- -- > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From jcampbell1 at gmail.com Wed Aug 13 19:32:04 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 13 Aug 2008 19:32:04 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> References: <8f0676b40808131408k202aab3dq5918260883f5cfb6@mail.gmail.com> <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: <8f0676b40808131632g73625816gfe3d82a4742c6469@mail.gmail.com> On Wed, Aug 13, 2008 at 7:14 PM, (Margaret) Michele Waldman wrote: > Here's another question. > > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? No, only in states which they have a "nexus". The judicial system ruled that it is too much of a burden for small businesses to file taxes covering 4000+ tax jurisdictions. > How else are those sales taxes paid? They aren't. > If you charge them you are supposed to pay them to the state. Don't charge sales tax for states you don't have to. > NY has a line on the tax return for people to pay their online purchases > taxes. Yeah, but the number of people who actually do this can be counted on one hand. > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. Why should a customer in California have to pay NJ sales taxes? If that was the case, every mail order business in the country would be located in New Hampshire where there is no sales tax. > You would definitely need a cron job to keep track of the changing sales > taxes. You only have to keep track in NJ. It doesn't change that often. You generally only have to make updates 1 a year... and for sales tax holidays. -John C. From mmwaldman at optonline.net Wed Aug 13 19:39:03 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 19:39:03 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <8f0676b40808131632g73625816gfe3d82a4742c6469@mail.gmail.com> Message-ID: <0K5K001WYCD46LR0@mta1.srv.hcvlny.cv.net> -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Wednesday, August 13, 2008 7:32 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? On Wed, Aug 13, 2008 at 7:14 PM, (Margaret) Michele Waldman wrote: > Here's another question. > > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? No, only in states which they have a "nexus". The judicial system ruled that it is too much of a burden for small businesses to file taxes covering 4000+ tax jurisdictions. > How else are those sales taxes paid? They aren't. > If you charge them you are supposed to pay them to the state. Don't charge sales tax for states you don't have to. > NY has a line on the tax return for people to pay their online purchases > taxes. Yeah, but the number of people who actually do this can be counted on one hand. > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. Why should a customer in California have to pay NJ sales taxes? If that was the case, every mail order business in the country would be located in New Hampshire where there is no sales tax. ***** That's why a lot of companies not even located in New Hampshire form there. I was advised by my accountant to form there, not New York for the savings of filing and publication fees. You don't have to be located in the state where you form your company apparently. > You would definitely need a cron job to keep track of the changing sales > taxes. You only have to keep track in NJ. It doesn't change that often. You generally only have to make updates 1 a year... and for sales tax holidays. -John C. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From mmwaldman at optonline.net Wed Aug 13 19:40:57 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 19:40:57 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <8f0676b40808131632g73625816gfe3d82a4742c6469@mail.gmail.com> Message-ID: <0K5K00CYICG4G2R0@mta2.srv.hcvlny.cv.net> One more question. How do I find out which states I have to file taxes in? Is there a website that covers this? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Wednesday, August 13, 2008 7:32 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? On Wed, Aug 13, 2008 at 7:14 PM, (Margaret) Michele Waldman wrote: > Here's another question. > > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? No, only in states which they have a "nexus". The judicial system ruled that it is too much of a burden for small businesses to file taxes covering 4000+ tax jurisdictions. > How else are those sales taxes paid? They aren't. > If you charge them you are supposed to pay them to the state. Don't charge sales tax for states you don't have to. > NY has a line on the tax return for people to pay their online purchases > taxes. Yeah, but the number of people who actually do this can be counted on one hand. > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. Why should a customer in California have to pay NJ sales taxes? If that was the case, every mail order business in the country would be located in New Hampshire where there is no sales tax. > You would definitely need a cron job to keep track of the changing sales > taxes. You only have to keep track in NJ. It doesn't change that often. You generally only have to make updates 1 a year... and for sales tax holidays. -John C. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From mmwaldman at optonline.net Wed Aug 13 19:46:39 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 19:46:39 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K001WYCD46LR0@mta1.srv.hcvlny.cv.net> Message-ID: <0K5K009V3CPMSOL0@mta3.srv.hcvlny.cv.net> Or was that Delaware. It's seemed bizarre to me to form where I wasn't located so I went against my account's advice and formded in NY. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of (Margaret) Michele Waldman Sent: Wednesday, August 13, 2008 7:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] calculating state taxes? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Wednesday, August 13, 2008 7:32 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? On Wed, Aug 13, 2008 at 7:14 PM, (Margaret) Michele Waldman wrote: > Here's another question. > > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? No, only in states which they have a "nexus". The judicial system ruled that it is too much of a burden for small businesses to file taxes covering 4000+ tax jurisdictions. > How else are those sales taxes paid? They aren't. > If you charge them you are supposed to pay them to the state. Don't charge sales tax for states you don't have to. > NY has a line on the tax return for people to pay their online purchases > taxes. Yeah, but the number of people who actually do this can be counted on one hand. > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. Why should a customer in California have to pay NJ sales taxes? If that was the case, every mail order business in the country would be located in New Hampshire where there is no sales tax. ***** That's why a lot of companies not even located in New Hampshire form there. I was advised by my accountant to form there, not New York for the savings of filing and publication fees. You don't have to be located in the state where you form your company apparently. > You would definitely need a cron job to keep track of the changing sales > taxes. You only have to keep track in NJ. It doesn't change that often. You generally only have to make updates 1 a year... and for sales tax holidays. -John C. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From jcampbell1 at gmail.com Wed Aug 13 19:46:40 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 13 Aug 2008 19:46:40 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K00CYICG4G2R0@mta2.srv.hcvlny.cv.net> References: <8f0676b40808131632g73625816gfe3d82a4742c6469@mail.gmail.com> <0K5K00CYICG4G2R0@mta2.srv.hcvlny.cv.net> Message-ID: <8f0676b40808131646i5b9b726cv2e86aec39a5b7bed@mail.gmail.com> On Wed, Aug 13, 2008 at 7:40 PM, (Margaret) Michele Waldman wrote: > One more question. How do I find out which states I have to file taxes in? IANAL, but every state that the company has a physical presence is a good guideline. My guess is this is only NJ. -John C. From wkamm at rvyriptide.org Wed Aug 13 20:06:51 2008 From: wkamm at rvyriptide.org (wkamm at rvyriptide.org) Date: Wed, 13 Aug 2008 20:06:51 -0400 (EDT) Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <8f0676b40808131646i5b9b726cv2e86aec39a5b7bed@mail.gmail.com> References: <8f0676b40808131632g73625816gfe3d82a4742c6469@mail.gmail.com> <0K5K00CYICG4G2R0@mta2.srv.hcvlny.cv.net> <8f0676b40808131646i5b9b726cv2e86aec39a5b7bed@mail.gmail.com> Message-ID: <3955.24.0.92.254.1218672411.squirrel@www.rvyriptide.org> Yes, physical presence is what matters. When I order from Newegg for example, they charge me sales tax. I live in NJ, and the item usually ships from their warehouse in NJ. Here is their explanation of which states they charge sales tax in: http://www.newegg.com/HelpInfo/FAQDetail.aspx?Module=2 They only charge sales tax if the item is going to California, New Jersey, New York, or Tennessee, even though we know that many other states have sales taxes. That's because Newegg has a physical presence in those 4 states. And don't forget that the NJ sales tax law changed within the past year or so, and shipping charges are now taxable. In the past they weren't. Finally, an interesting article about Amazon and the states they charge sales tax in: http://blogs.zdnet.com/BTL/?p=5302 Bill > On Wed, Aug 13, 2008 at 7:40 PM, (Margaret) Michele Waldman > wrote: >> One more question. How do I find out which states I have to file taxes >> in? > > IANAL, but every state that the company has a physical presence is a > good guideline. > > My guess is this is only NJ. > > -John C. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From susan_shemin at yahoo.com Wed Aug 13 20:08:35 2008 From: susan_shemin at yahoo.com (Susan Shemin) Date: Wed, 13 Aug 2008 17:08:35 -0700 (PDT) Subject: [nycphp-talk] calculating state taxes? Message-ID: <22531.49998.qm@web50207.mail.re2.yahoo.com> My simple request sure triggered an interested dialog!? Right now customers only pay sales taxes if they are in the same state as where the website business has a physical presense.? J&R online customers only pay sales taxes if they live in NY, not if they live in New Jersey. New York state is trying to change this and broaden the definition of "presence".? Recently, the AG?said if affiliate marketers put links for Amazon on their websites, then Amazon has a "presence" in every state where there's Amazon affiliate marketers (which, of course, is all 50 states).? Amazon actually?canceled all affiliate marketers' accounts in New York because of this, and filed a lawsuit against the NY Attorney General.? It still hasn't been completely resolved, but companies like Amazon are very fearful of states demanding sales taxes from all online purchases. Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd at sperling.com Wed Aug 13 20:38:26 2008 From: tedd at sperling.com (tedd) Date: Wed, 13 Aug 2008 20:38:26 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: At 7:14 PM -0400 8/13/08, (Margaret) Michele Waldman wrote: >Here's another question. > >Is an ebusinesses supposed to file taxes and licenses in every state they >are doing business? I'm not a tax man nor an attorney, but the problem is much more complicated than anyone here has stated. Clearly, if you're doing business in State X and a customer who lives in State X buys something, then you are required to collect and pay State X's sales tax. That's pretty simple. But the net complicates things a lot. But here is a typical problem that my wife and I face everyday, she is a jeweler located in Lansing, Michigan (http://earthstones.com). One of our customers in California contacted us for a piece of jewelry. We show them a picture of the item via our web site which is located on a server in Springfield MO. The customer likes it and wants to purchase the piece and pays us via PayPal (a global company). The manufactor of the jewelry is located in Columbus Ohio and per our instructions and payment, they drop-ship directly to the customer in California. Now, who owes what State taxes? Remember, there are four States involved (not counting PayPal) -- and I am positive not one of them will say "No thanks" to the possibility of cashing-in IF they can. When we have congressmen like Ted Stevens who was opposed to an amendment regarding network neutrality and called the Internet a "series of tubes", we are far from resolving the State tax problem. As Will Rogers once said "Be thankful we are not getting all the government we are paying for." Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From tedd at sperling.com Wed Aug 13 20:42:47 2008 From: tedd at sperling.com (tedd) Date: Wed, 13 Aug 2008 20:42:47 -0400 Subject: [nycphp-talk] Columbia University Medical Center - Web DeveloperPosition In-Reply-To: <0K5K004SO2VTJJF0@mta5.srv.hcvlny.cv.net> References: <0K5K004SO2VTJJF0@mta5.srv.hcvlny.cv.net> Message-ID: At 4:14 PM -0400 8/13/08, (Margaret) Michele Waldman wrote: >Tedd, > >I don't know what I'm applying for, but I'd like to throw my company in. Hi Margaret: You're hired! Go tell the Columbia University Medical Center - that I said it was ok to hire you. And while you're at it, tell them it's ok to hire me too! :-) Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From mmwaldman at optonline.net Wed Aug 13 20:52:44 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Wed, 13 Aug 2008 20:52:44 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <22531.49998.qm@web50207.mail.re2.yahoo.com> Message-ID: <0K5K004V0FS5F7P0@mta5.srv.hcvlny.cv.net> It was said taxing for every state is too much of a burden on small businesses. Amazon.com, walmart, target, and such are not small businesses, so they may be required to pay per state. _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Susan Shemin Sent: Wednesday, August 13, 2008 8:09 PM To: NYPHP Talk Subject: Re: [nycphp-talk] calculating state taxes? My simple request sure triggered an interested dialog! Right now customers only pay sales taxes if they are in the same state as where the website business has a physical presense. J&R online customers only pay sales taxes if they live in NY, not if they live in New Jersey. New York state is trying to change this and broaden the definition of "presence". Recently, the AG said if affiliate marketers put links for Amazon on their websites, then Amazon has a "presence" in every state where there's Amazon affiliate marketers (which, of course, is all 50 states). Amazon actually canceled all affiliate marketers' accounts in New York because of this, and filed a lawsuit against the NY Attorney General. It still hasn't been completely resolved, but companies like Amazon are very fearful of states demanding sales taxes from all online purchases. Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkamm at rvyriptide.org Wed Aug 13 21:06:57 2008 From: wkamm at rvyriptide.org (wkamm at rvyriptide.org) Date: Wed, 13 Aug 2008 21:06:57 -0400 (EDT) Subject: [nycphp-talk] calculating state taxes? In-Reply-To: References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: <4112.24.0.92.254.1218676017.squirrel@www.rvyriptide.org> I'm no tax accountant either, but it seems to me that the location of your dropshipper is irrelevant. He is not the one selling the product to your customer. He is selling it to you. And you don't have to pay sales tax to him because you should have a state resale certificate, making you exempt from having to pay sales taxes. And, IMO, the location of your web server is meaningless. I've never heard of that being an issue. So, the only transaction that could possibly be taxable is between you (in Michigan) and the end customer (in California). Unless Michigan law requires you to collect sales tax on something sold to a person in California, and I doubt that is true, no sales tax gets collected at all here. > At 7:14 PM -0400 8/13/08, (Margaret) Michele Waldman wrote: >>Here's another question. >> >>Is an ebusinesses supposed to file taxes and licenses in every state they >>are doing business? > > I'm not a tax man nor an attorney, but the problem is much more > complicated than anyone here has stated. > > Clearly, if you're doing business in State X and a customer who lives > in State X buys something, then you are required to collect and pay > State X's sales tax. That's pretty simple. But the net complicates > things a lot. > > But here is a typical problem that my wife and I face everyday, she > is a jeweler located in Lansing, Michigan (http://earthstones.com). > > One of our customers in California contacted us for a piece of > jewelry. We show them a picture of the item via our web site which is > located on a server in Springfield MO. The customer likes it and > wants to purchase the piece and pays us via PayPal (a global > company). The manufactor of the jewelry is located in Columbus Ohio > and per our instructions and payment, they drop-ship directly to the > customer in California. Now, who owes what State taxes? > > Remember, there are four States involved (not counting PayPal) -- and > I am positive not one of them will say "No thanks" to the possibility > of cashing-in IF they can. > > When we have congressmen like Ted Stevens who was opposed to an > amendment regarding network neutrality and called the Internet a > "series of tubes", we are far from resolving the State tax problem. > > As Will Rogers once said "Be thankful we are not getting all the > government we are paying for." > > Cheers, > > tedd > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From jcampbell1 at gmail.com Wed Aug 13 21:25:45 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 13 Aug 2008 21:25:45 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K004V0FS5F7P0@mta5.srv.hcvlny.cv.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <0K5K004V0FS5F7P0@mta5.srv.hcvlny.cv.net> Message-ID: <8f0676b40808131825h3c1a00b1hb41533202c63ee3c@mail.gmail.com> On Wed, Aug 13, 2008 at 8:52 PM, (Margaret) Michele Waldman wrote: > It was said taxing for every state is too much of a burden on small > businesses. > > Amazon.com, walmart, target, and such are not small businesses, so they may > be required to pay per state. The distinction is not small vs large, but "substantial nexus" (physical presence). From danielc at analysisandsolutions.com Wed Aug 13 22:12:21 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 13 Aug 2008 22:12:21 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K00EEI27V0B70@mta4.srv.hcvlny.cv.net> References: <0K5K00EEI27V0B70@mta4.srv.hcvlny.cv.net> Message-ID: <20080814021220.GA10860@panix.com> Hi: On Wed, Aug 13, 2008 at 04:00:00PM -0400, (Margaret) Michele Waldman wrote: > does the store just charge local tax from where the > store is located? Or does it have to charge tax from the purchasers > locale? In New York, shipped sales should be charged the tax of the recipient. --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 rotsen at gmail.com Wed Aug 13 22:22:21 2008 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Wed, 13 Aug 2008 19:22:21 -0700 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> Message-ID: Hi Mark et all, I am trying to use drupal 5 and I am reading the documentation and tutorails and I still not able to create a static web page. They tell you htat you have to download this module and that module. I was able to find out how to create a static page using postnuke. N?stor :-) On Wed, Aug 13, 2008 at 12:56 PM, Mark Armendariz wrote: > On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: >> On Wed, 13 Aug 2008, Mark Armendariz wrote: >> >>> Can anyone recommend an open source CMS (or possibly commercial if >>> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >>> (strict). >> >> Do you think that perhaps all of these CMSes might have some problems with >> all the strict requirements? >> >> After all, people use these packages every day without the problems you've >> experienced... >> >> > > I've just installed them all (not drupal) this morning and they all > have problems with strict. A few minutes with google confirms this > fact (including the link I provided to cake where the devs explicitly > state that they don't plan on updating for strict mode). It's not > that people don't have this problem, it's that they turn off E_STRICT > and go about their way. A similar configuration issue has come up in > the past with everyone turning on "register_globals" and going about > their way and don't we all just love register_globals. I personally > have a hard time saying ok to source code that throws warnings and > notices on a vanilla install, even if they are just strict warnings. > > I know people use them every day, but that doesn't make them reliable. > PHP Nuke and OSCommerce have been used by hundreds of thousands for > years and I wouldn't trust either for client work. > > I'll take a look at Drupal 6 per recommendations, but 5 scared me > plenty. I spent more time working around drupal 5 than I would have > writing my own solution. > > Any others out there? > > Thanks again. > > Mark > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From lists at zaunere.com Wed Aug 13 22:23:13 2008 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 13 Aug 2008 22:23:13 -0400 Subject: [nycphp-talk] Columbia University Medical Center - Web DeveloperPosition In-Reply-To: References: <0K5K004SO2VTJJF0@mta5.srv.hcvlny.cv.net> Message-ID: <004101c8fdb4$b41c3ff0$1c54bfd0$@com> All, Please, job postings and discussion should be at the NYPHP-Jobs list, and from recent activity, unneeded posts should be minimized because of the high volume of traffic in general. If a job strikes your fancy, please reply directly to the poster off-list. Thanks, --- Hans Zaunere / President / New York PHP www.nyphp.org / ?www.nyphp.com > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On > Behalf Of tedd > Sent: Wednesday, August 13, 2008 8:43 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Columbia University Medical Center - Web > DeveloperPosition > > At 4:14 PM -0400 8/13/08, (Margaret) Michele Waldman wrote: > >Tedd, > > > >I don't know what I'm applying for, but I'd like to throw my company in. > > Hi Margaret: > > You're hired! > > Go tell the Columbia University Medical Center - that I said it was > ok to hire you. > > And while you're at it, tell them it's ok to hire me too! :-) > > Cheers, > > tedd > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From danielc at analysisandsolutions.com Wed Aug 13 22:23:56 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 13 Aug 2008 22:23:56 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> References: <8f0676b40808131408k202aab3dq5918260883f5cfb6@mail.gmail.com> <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: <20080814022356.GB10860@panix.com> On Wed, Aug 13, 2008 at 07:14:41PM -0400, (Margaret) Michele Waldman wrote: > > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? Oh, you may want to check this out: http://www.tax.state.ny.us/pdf/publications/sales/pub32_1196.pdf It's a voluntary program for business in NY or NJ to collect the other state's tax. --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 jbaltz at altzman.com Wed Aug 13 22:33:44 2008 From: jbaltz at altzman.com (Jerry B. Altzman) Date: Wed, 13 Aug 2008 22:33:44 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: <48A39988.5080606@altzman.com> on 2008-08-13 19:14 (Margaret) Michele Waldman said the following: > Is an ebusinesses supposed to file taxes and licenses in every state they > are doing business? It's an open question. > How else are those sales taxes paid? ??? Typically, it is up to the individual to file and pay sales tax on any purchases he makes where the merchant doesn't collect and submit the tax. > If you charge them you are supposed to pay them to the state. That's why stores have those silly signs: "We don't *charge* sales tax, we *collect* it." > NY has a line on the tax return for people to pay their online purchases > taxes. > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. Whether or not it's crazy, that's not the way things work. I cannot emphasize this enough: be careful. States have very different ideas about what's taxable, what's not, and what constitutes a "business presence" in the state (the typical way they USED to decide if you had to collect and submit sales tax). As far as I can tell, NY is making any "large" retailer ANYWHERE nowadays collect and submit sales tax to NYS on your behalf. vis. http://www.nytimes.com/2008/05/02/nyregion/02amazon.html > You would definitely need a cron job to keep track of the changing sales > taxes. Or an accountant, or a tax lawyer. Or both. And you thought keeping abreast of Linux security updates was a pain! //jbaltz -- jerry b. altzman jbaltz at altzman.com www.jbaltz.com thank you for contributing to the heat death of the universe. From sbeam at onsetcorps.net Wed Aug 13 23:18:26 2008 From: sbeam at onsetcorps.net (sbeam) Date: Wed, 13 Aug 2008 23:18:26 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <22531.49998.qm@web50207.mail.re2.yahoo.com> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> Message-ID: <200808132318.27142.sbeam@onsetcorps.net> On Wednesday 13 August 2008 20:08, Susan Shemin wrote: > Amazon actually?canceled all affiliate marketers' accounts in New York > because of this, and filed a lawsuit against the NY Attorney General. such is the genius of the NY legislature - business has left the state, and residents have one more reason to move to NJ, CT or VT (or NH, in my case :). By increasing tax revenue they decreased it. They are apparently hoping 49 other states will pass similar laws, and Kaleeefoooohnya might, but the court will strike it down anyway, their argument is nonsense - basically that contracting with someone in a state creates a nexus there. I mean, IANAL, but c'mon. SCOTUS heard in 1992 a case involving mail-order catalogs in North Dakota, where ND tried to argue that the presence of the catalogs constituted a "presence" in that state. They said that A) no it doesn't and B) even if it did, the obligation of every retailer to track sales tax rates and categories for 6000+ jurisdictions nationwide was too onerous to contemplate. So NY will have a hard time overturning that, especially with the current crop of judges. And even if I am wrong, which is *very rare*, the affiliates can physically take their laptops out of states that do pass such laws. In any case it won't affect you unless you employ "affiliates" (however that is defined) Sam From bzcoder at bzcode.com Thu Aug 14 06:03:23 2008 From: bzcoder at bzcode.com (bzcoder) Date: Thu, 14 Aug 2008 06:03:23 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A39988.5080606@altzman.com> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> <48A39988.5080606@altzman.com> Message-ID: <48A402EB.6030103@bzcode.com> Jerry B. Altzman wrote: > As far as I can tell, NY is making any "large" retailer ANYWHERE > nowadays collect and submit sales tax to NYS on your behalf. vis. > http://www.nytimes.com/2008/05/02/nyregion/02amazon.html > Bad example, Amazon has a distribution center in Queens. I think their arguement was along the lines "we have products stored there, we fufill orders from there, but technically a shell company owns it so it's not a presence". From bzcoder at bzcode.com Thu Aug 14 06:45:53 2008 From: bzcoder at bzcode.com (bzcoder) Date: Thu, 14 Aug 2008 06:45:53 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A402EB.6030103@bzcode.com> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> <48A39988.5080606@altzman.com> <48A402EB.6030103@bzcode.com> Message-ID: <48A40CE1.5070607@bzcode.com> bzcoder wrote: > Jerry B. Altzman wrote: >> As far as I can tell, NY is making any "large" retailer ANYWHERE >> nowadays collect and submit sales tax to NYS on your behalf. vis. >> http://www.nytimes.com/2008/05/02/nyregion/02amazon.html >> > > Bad example, Amazon has a distribution center in Queens. I think > their arguement was along the lines "we have products stored there, we > fufill orders from there, but technically a shell company owns it so > it's not a presence". > _______________________________________________ My mistake, I had not heard about that affiliate business - so as I understand it, in order not to send states selling outside NYS fleeing, NY State law only applies to companies with a sales outlet/office in New York. So that distribution center doesn't matter. From ramons at gmx.net Thu Aug 14 07:04:14 2008 From: ramons at gmx.net (David Krings) Date: Thu, 14 Aug 2008 07:04:14 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> Message-ID: <48A4112E.3000208@gmx.net> (Margaret) Michele Waldman wrote: > That's crazy. If the store is in NJ, it should pay NJ taxes. That's where > the product is being sold and shipped from. > > You would definitely need a cron job to keep track of the changing sales > taxes. There are varying approaches and they idffer from state to state. In some cases the state demands that any online purchase is taxed with the applicable tax rate of the state/county/city/borough/street corner. In other cases the tax only has to be paid when the seller or one of its subsidiaries or one of its partners involved in the deal have a physical presence in the state. And the of course if you do innerstate sales the tax typically applies, which for example makes ordering from J&R when living in upstate NY sometimes still a deal as they charge the 6%, not the 8% from up here. I was always in favor of a nationwide sales tax of 10% (and drop several of the other dubious taxes, such as the sugar tax). It is the same all over the place and easy to calculate. And I'd wish that they add the tax into the sale price as it is done with gas. In other countries it is illegal not to quote the final price. Yea, it is crazy. Keep in mind that the USA is not a federation of states, but a union of states. That means you need to treat New Jersey as if it was Australia, just that the 50 US states have a bit more in common. There are drastic differences among the states in regards to laws. For example, in NY it is legal to go topless in public for both men and women, while it is illegal in all other states. Some states require a medial exam prior to issuing a marriage license, others don't. In some states all vehicles have to stop before railroad crossings, in other states only trucks and buses, in other states no vehicle at all. The list is endless and shows that sales tax isn't the odd one out. Does that all rapidly inhale? Yea! David From ramons at gmx.net Thu Aug 14 07:14:42 2008 From: ramons at gmx.net (David Krings) Date: Thu, 14 Aug 2008 07:14:42 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <4112.24.0.92.254.1218676017.squirrel@www.rvyriptide.org> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> <4112.24.0.92.254.1218676017.squirrel@www.rvyriptide.org> Message-ID: <48A413A2.7030500@gmx.net> wkamm at rvyriptide.org wrote: > I'm no tax accountant either, but it seems to me that the location of your > dropshipper is irrelevant. He is not the one selling the product to your > customer. He is selling it to you. And you don't have to pay sales tax > to him because you should have a state resale certificate, making you > exempt from having to pay sales taxes. And, IMO, the location of your web > server is meaningless. I've never heard of that being an issue. > > So, the only transaction that could possibly be taxable is between you (in > Michigan) and the end customer (in California). Unless Michigan law > requires you to collect sales tax on something sold to a person in > California, and I doubt that is true, no sales tax gets collected at all > here. Again, IANAL, but from what I read that may not be correct. The "sales tax" is considered to be a tax on the added value (which is in some places it is called value added tax). And vene besides that, the shipping of goods is also a sale of services. So what at least should happen is if any sales tax is to be collected the tax from the shipping location (that is where the customer buys the shipping service from) and the tax from the sales location are to be applied. The supplier (manufacturer of the piece of jewelry) charges the seller the applicable tax since that sale happened before the end-user made the purchse. Leaves the only question where the location of sale is when buying on the web. Is it where one of the parties involved is located, where the server is located offering the product, or where the server is located that is used for conducting the money transaction? That is why one hires accountants and at least one lawyer that makes sure that the accountant doesn't screw up. Depending on how much budget there is, hire another lawyer to take care of the other lawyer. Or just pay the sales taxes, whatever is cheaper. David From ramons at gmx.net Thu Aug 14 07:18:11 2008 From: ramons at gmx.net (David Krings) Date: Thu, 14 Aug 2008 07:18:11 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <200808132318.27142.sbeam@onsetcorps.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <200808132318.27142.sbeam@onsetcorps.net> Message-ID: <48A41473.3090605@gmx.net> sbeam wrote: > such is the genius of the NY legislature - business has left the state, and > residents have one more reason to move to NJ, CT or VT (or NH, in my case :). > By increasing tax revenue they decreased it. They are apparently hoping 49 CT?? I moved from CT to NY and stuff is way cheaper here. Gas is cheaper, food is cheaper, and especially beer is cheaper...and sold on sundays...and sold in pharmacies (very convenient when picking up the liver pills). Just look at the sales taxes charged in the EU. The lower end is around 18%. Income taxes are higher in Europe as well. But in exchange they got streets rather than a series of potholes and people have health insurance. You get what you pay for and sometimes less. David From tedd at sperling.com Thu Aug 14 07:59:11 2008 From: tedd at sperling.com (tedd) Date: Thu, 14 Aug 2008 07:59:11 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <4112.24.0.92.254.1218676017.squirrel@www.rvyriptide.org> References: <0K5K009NKB8CHEB0@mta1.srv.hcvlny.cv.net> <4112.24.0.92.254.1218676017.squirrel@www.rvyriptide.org> Message-ID: At 9:06 PM -0400 8/13/08, wkamm at rvyriptide.org wrote: >I'm no tax accountant either, but it seems to me that the location of your >dropshipper is irrelevant. He is not the one selling the product to your >customer. He is selling it to you. And you don't have to pay sales tax >to him because you should have a state resale certificate, making you >exempt from having to pay sales taxes. And, IMO, the location of your web >server is meaningless. I've never heard of that being an issue. > >So, the only transaction that could possibly be taxable is between you (in >Michigan) and the end customer (in California). Unless Michigan law >requires you to collect sales tax on something sold to a person in >California, and I doubt that is true, no sales tax gets collected at all >here. I was just pointing out that Internet business has more State involvement than typical sales. While you may say the location of the server is not an issue, I would bet that you would get an argument from MO's state tax revenue service if you told them they had no taxable part in the transaction I described. And as far as the location of the drop-shipper, what if I was not in this country while making the sale, do you think that OH's state tax revenue service would find the drop-shipper exempt from collecting taxes by a company selling something in their state? Currently, there are very few laws (that I am aware) that requires you to collect taxes on Internet sales, but every State in the union is scrambling to figure out how they can lay their greedy little hands on Internet sales. And lastly, while Michigan doesn't have the specifics in-place, Michigan still requires you to collect whatever they finally deem required ex post facto. While this doesn't seem reasonable, I've seen this happen before. I remember the Feds ('80's) requiring us to pay taxes that they had not figured out the formula for nor even created the paperwork. You actually had to guess how much you owed and make payment. AND if your payment was off by more than 10 percent, there would be penalties. That's a true story! Now, does any of that make you feel better about Internet taxation? Just a word of concern from someone who has been down this road before. Cheers, tedd - previously said > >> At 7:14 PM -0400 8/13/08, (Margaret) Michele Waldman wrote: >>>Here's another question. >>> >>>Is an ebusinesses supposed to file taxes and licenses in every state they >>>are doing business? >> >> I'm not a tax man nor an attorney, but the problem is much more >> complicated than anyone here has stated. >> >> Clearly, if you're doing business in State X and a customer who lives >> in State X buys something, then you are required to collect and pay >> State X's sales tax. That's pretty simple. But the net complicates >> things a lot. >> >> But here is a typical problem that my wife and I face everyday, she >> is a jeweler located in Lansing, Michigan (http://earthstones.com). >> >> One of our customers in California contacted us for a piece of >> jewelry. We show them a picture of the item via our web site which is >> located on a server in Springfield MO. The customer likes it and >> wants to purchase the piece and pays us via PayPal (a global >> company). The manufactor of the jewelry is located in Columbus Ohio >> and per our instructions and payment, they drop-ship directly to the >> customer in California. Now, who owes what State taxes? >> >> Remember, there are four States involved (not counting PayPal) -- and >> I am positive not one of them will say "No thanks" to the possibility >> of cashing-in IF they can. >> >> When we have congressmen like Ted Stevens who was opposed to an >> amendment regarding network neutrality and called the Internet a >> "series of tubes", we are far from resolving the State tax problem. >> >> As Will Rogers once said "Be thankful we are not getting all the >> government we are paying for." >> >> Cheers, >> >> tedd >> >> -- >> ------- > > http://sperling.com http://ancientstones.com http://earthstones.com >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From sbeam at onsetcorps.net Thu Aug 14 09:46:56 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 14 Aug 2008 09:46:56 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A41473.3090605@gmx.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <200808132318.27142.sbeam@onsetcorps.net> <48A41473.3090605@gmx.net> Message-ID: <200808140946.56160.sbeam@onsetcorps.net> On Thursday 14 August 2008 07:18, David Krings wrote: > CT?? I moved from CT to NY and stuff is way cheaper here. Gas is cheaper, > food is cheaper, and especially beer is cheaper...and sold on sundays...and > sold in pharmacies (very convenient when picking up the liver pills). May be cheaper at retail, but in fact the state with the highest net state/local tax burden is NJ, followed closely by NY and then CT. So with those neighbors, there may not be a lot of dis-incentive in the "Amazon tax", but it is one more straw. http://www.taxfoundation.org/taxdata/show/335.html That's why a messy union of loosely federated states is preferable to a single central government. State competition is sometimes bad for the environment etc., but it has its benefits. If there was your 10% national sales tax (which would, at least, be Constitutional, as opposed to the federal income tax), we would have no choice but to sit and watch while 10 turned to 10.5, then 11.... they might slow down around 30, which is what the total tax share is now. Government tends to expand its monopoly just as any large corporation does, through whatever means available to it. > Just > look at the sales taxes charged in the EU. The lower end is around 18%. > Income taxes are higher in Europe as well. But in exchange they got streets > rather than a series of potholes and people have health insurance. You get > what you pay for and sometimes less. Higher taxes do not correlate to better living standards, but free commerce and rule of law do. Actually the EU is a similar entity to the one created in 1787 in Philadelphia, designed only to regulate currency and commerce and ensure a base level of human rights, but with an even weaker central government and no common defense (so far). Tax collection, healthcare and potholes are still administered by the member states. So we will see how it plays out long term, since it seems Europeans are not getting much for their money except a gigantic bureaucracy. It is standardization and freedom from tariffs that is creating benefit. And to come back around, the EU is very eager to get a piece of internet commerce as well, and does in the case of any large corp in its jurisdiction. If you sell a digital download to someone there you are supposed to collect VAT and mail a check to Brussels. http://www.wired.com/science/discoveries/news/2003/06/59167 From mitch.pirtle at gmail.com Thu Aug 14 10:11:03 2008 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 14 Aug 2008 10:11:03 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> Message-ID: <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> Or you could just build your own specifically to suit your needs and workflow using CakePHP :-) -- Mitch On Wed, Aug 13, 2008 at 10:22 PM, N?stor wrote: > Hi Mark et all, > > I am trying to use drupal 5 and I am reading the documentation and tutorails > and I still not able to create a static web page. They tell you htat > you have to download > this module and that module. I was able to find out how to create a static page > using postnuke. > > N?stor :-) > > On Wed, Aug 13, 2008 at 12:56 PM, Mark Armendariz wrote: >> On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: >>> On Wed, 13 Aug 2008, Mark Armendariz wrote: >>> >>>> Can anyone recommend an open source CMS (or possibly commercial if >>>> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >>>> (strict). >>> >>> Do you think that perhaps all of these CMSes might have some problems with >>> all the strict requirements? >>> >>> After all, people use these packages every day without the problems you've >>> experienced... >>> >>> >> >> I've just installed them all (not drupal) this morning and they all >> have problems with strict. A few minutes with google confirms this >> fact (including the link I provided to cake where the devs explicitly >> state that they don't plan on updating for strict mode). It's not >> that people don't have this problem, it's that they turn off E_STRICT >> and go about their way. A similar configuration issue has come up in >> the past with everyone turning on "register_globals" and going about >> their way and don't we all just love register_globals. I personally >> have a hard time saying ok to source code that throws warnings and >> notices on a vanilla install, even if they are just strict warnings. >> >> I know people use them every day, but that doesn't make them reliable. >> PHP Nuke and OSCommerce have been used by hundreds of thousands for >> years and I wouldn't trust either for client work. >> >> I'll take a look at Drupal 6 per recommendations, but 5 scared me >> plenty. I spent more time working around drupal 5 than I would have >> writing my own solution. >> >> Any others out there? >> >> Thanks again. >> >> Mark >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From ramons at gmx.net Thu Aug 14 10:25:15 2008 From: ramons at gmx.net (David Krings) Date: Thu, 14 Aug 2008 10:25:15 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <200808140946.56160.sbeam@onsetcorps.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <200808132318.27142.sbeam@onsetcorps.net> <48A41473.3090605@gmx.net> <200808140946.56160.sbeam@onsetcorps.net> Message-ID: <48A4404B.4070509@gmx.net> sbeam wrote: > > That's why a messy union of loosely federated states is preferable to a single > central government. State competition is sometimes bad for the environment > etc., but it has its benefits. If there was your 10% national sales tax > (which would, at least, be Constitutional, as opposed to the federal income > tax), we would have no choice but to sit and watch while 10 turned to 10.5, > then 11.... they might slow down around 30, which is what the total tax > share is now. Government tends to expand its monopoly just as any large > corporation does, through whatever means available to it. Well, that may be good for corporations, but regular people usually don't change their residence permanently just lower their tax burden. And what the government is concerned, there are also those who vote them into office. >> Just >> look at the sales taxes charged in the EU. The lower end is around 18%. >> Income taxes are higher in Europe as well. But in exchange they got streets >> rather than a series of potholes and people have health insurance. You get >> what you pay for and sometimes less. > > Higher taxes do not correlate to better living standards, but free commerce > and rule of law do. Then how come that the standard of living in Western Europe is better than in the US? > Actually the EU is a similar entity to the one created in 1787 in > Philadelphia, designed only to regulate currency and commerce and ensure a > base level of human rights, but with an even weaker central government and no > common defense (so far). Tax collection, healthcare and potholes are still > administered by the member states. So we will see how it plays out long term, > since it seems Europeans are not getting much for their money except a > gigantic bureaucracy. It is standardization and freedom from tariffs that is > creating benefit. Europeans get nice streets, working infrastructure, health care, and yes, a big bureaucracy. But when I look at department like Homeland Security and the paperwork one has to go through constantly being a legal resident the magnitude of needless actions is about the same. In regards to pot holes, many infrastructure projects within the EU get EU subsidies. Yes, the member states administer these projects, but they are not the only ones paying for it. Why else would places like Portugal have been so successful in the past twenty years? And the US companies are the nemesis of standardization and the US is one of the worst tariff offenders (with the EU up there). I don't know if you meant it as a comparison, but if one compares US/EU they each end up being as bad. > > And to come back around, the EU is very eager to get a piece of internet > commerce as well, and does in the case of any large corp in its jurisdiction. > If you sell a digital download to someone there you are supposed to collect > VAT and mail a check to Brussels. > > http://www.wired.com/science/discoveries/news/2003/06/59167 That VAT is collected by the individual states and not set by the EU although there are attempts to make the tax level even among states. So there is no check mailed to Brussels. Besides tha european banks no longer use checks since paper checks are insanely expensive and insecure. I have no idea why US banks still deal with that crap. Wow, another innocent developer question entirely derailed just due to my doing. Sorry about that. David From bzcoder at bzcode.com Thu Aug 14 10:31:29 2008 From: bzcoder at bzcode.com (bzcoder) Date: Thu, 14 Aug 2008 10:31:29 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <48A441C1.8060208@bzcode.com> Mark Armendariz wrote: > Can anyone recommend an open source CMS (or possibly commercial if > worthwhile) that works natively on php5 (e_strict)and MySQL 5 > (strict). I think you will run into problems as most popular CMS creators, Open Source or Commercial, are unwilling to tell the majority of their users(PHP version 4) that they won't provide a product for them - which is why their popular. I'd suggest checking out the goPHP5 website, http://www.gophp5.org/projects and see if any CMS's listed there have made the switch to pure PHP5. Though I must say I think that will counter the goal of your client, as I'm assuming they want an open source or commercial CMS so that they are not locked into a single programmer for making changes. Sure, your code is clean and wonderful and works exactly the way you think. But that means any other programmer has to figure out how you think, wheras if you use an open source application instead they get to figure out how half a dozen different programmers thought and evolved over time. Isn't that much better? :-) (Actually, to be honest I prefer inheriting an open source application to a single developer's best practices because at least with open source, there is background on how things are done outside the developers head. But there is much to be said for following your own pattern than using someone else's) From bzcoder at bzcode.com Thu Aug 14 10:40:33 2008 From: bzcoder at bzcode.com (bzcoder) Date: Thu, 14 Aug 2008 10:40:33 -0400 Subject: [nycphp-talk] FirePHP Message-ID: <48A443E1.8010004@bzcode.com> I was wondering if anyone else has been using FirePHP? I find it great for inherited websites where I need to troubleshoot problems on live servers, as I can have all the debug/variable dump/etc crap dump to the FirePHP console so it doesn't show up on the website while I'm trying to track down a problem and the budget is not there to make a dev copy of the system[they need an in and out fix, 4 hours tops] Originally I felt it was somewhat of a waste, since you can use debugging tools much more easily, but when I don't always have the luxury of working with a server that gives me debug capabilities, it seems a great solution for low end work. http://www.firephp.org/ I'm wondering if anyone has any other thoughts on low end debugging tricks that might be easier/better or such - or any thoughts on tricks to using firephp more robustly. From tedd at sperling.com Thu Aug 14 10:57:41 2008 From: tedd at sperling.com (tedd) Date: Thu, 14 Aug 2008 10:57:41 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A4404B.4070509@gmx.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <200808132318.27142.sbeam@onsetcorps.net> <48A41473.3090605@gmx.net> <200808140946.56160.sbeam@onsetcorps.net> <48A4404B.4070509@gmx.net> Message-ID: At 10:25 AM -0400 8/14/08, David Krings wrote: >Wow, another innocent developer question entirely derailed just due >to my doing. Sorry about that. > >David David: Yes, but derailed for a good purpose. :-) Unfortunately, while we have the freedom/right to say whatever we want about our US government, it no longer matters, because they no longer listen. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From lists at enobrev.com Thu Aug 14 12:00:56 2008 From: lists at enobrev.com (Mark Armendariz) Date: Thu, 14 Aug 2008 12:00:56 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <48A441C1.8060208@bzcode.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48A441C1.8060208@bzcode.com> Message-ID: <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> On Thu, Aug 14, 2008 at 10:31 AM, bzcoder wrote: > Mark Armendariz wrote: >> >> Can anyone recommend an open source CMS (or possibly commercial if >> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >> (strict). > > I think you will run into problems as most popular CMS creators, Open Source > or Commercial, are unwilling to tell the majority of their users(PHP version > 4) that they won't provide a product for them - which is why their popular. I've been hoping to find a branch, at least, for strict p5 support. It seems Cake 2.0 is headed in that direction. > > I'd suggest checking out the goPHP5 website, http://www.gophp5.org/projects > and see if any CMS's listed there have made the switch to pure PHP5. I will check it out, thanks. > > Though I must say I think that will counter the goal of your client, as I'm > assuming they want an open source or commercial CMS so that they are not > locked into a single programmer for making changes. You're absolutely right, and being that this potential client is in the public sector, I wholeheartedly (and mind-edly) agree with their decision to use an open source project. This is why, instead of outright turning down the project, I went on a discovery mission to find something suitable. It seems to me that once php4 got it's end of support announcement that these projects should have branches ready for those of us who want p5 strict support I've another project that came in disallowing me to take this project, so I'll likely be moving on - but I'm still largely surprised by the results. If I had the time to keep a blog, this would likely be a very long demonstrative post about the issue, including some eventual patches. Hopefully maybe I still can do that some time soon. digitalUs - The installation had p5 strict issues (un-initialized vars throwing notices, which could be easily caught with __get methods - also some method signature differences. once fixed (and @'d), ran fairly well). typo3 - only required 2 minor changes to kill strict warnings (was running mysql_fetch methods on invalid result vars), But once it was running, I couldn't get a new page added. Seems a minor but obviously significant bug in the page adding form processor. Haven't had the chance to dig in to find out why. Thanks again for your responses. It seems that if I were to take this project, I would have to pick my favorite according to features and maintainability and modify it accordingly - which is just fine - this is just a surprising result. Mark From justin at justinhileman.info Thu Aug 14 12:10:36 2008 From: justin at justinhileman.info (justin) Date: Thu, 14 Aug 2008 12:10:36 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <1dc0e7e00808140910h45760a70i559e62ccc51422bf@mail.gmail.com> On Wed, Aug 13, 2008 at 1:26 PM, Mark Armendariz wrote: > Can anyone recommend an open source CMS (or possibly commercial if > worthwhile) that works natively on php5 (e_strict)and MySQL 5 > (strict). Unfortunately most webhosts and end users are still reluctant to commit fully to php5. As a result, CMS developers are reluctant to drop support for php4, since they would lose a significant chunk of their potential (and actual) userbase. Drupal, for example, won't drop php4 support in core until the Drupal 7.0 release, and they'll continue to provide php4 compatibility for all releases < 7.0. I'm not saying this is how it should be. I'd love for everyone to move to php5. But the market doesn't make that very viable right now. See Dries Buytaert's thoughts on the whole mess here: http://buytaert.net/php-is-dead-long-live-php Honestly, I don't know of an answer for you, short of rolling your own. Perhaps it's time to branch cake, expression engine or typo3 to create a php5 strict release? -- http://justinhileman.com From sbeam at onsetcorps.net Thu Aug 14 13:18:43 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 14 Aug 2008 13:18:43 -0400 Subject: [nycphp-talk] calculating state taxes? In-Reply-To: <48A4404B.4070509@gmx.net> References: <22531.49998.qm@web50207.mail.re2.yahoo.com> <200808140946.56160.sbeam@onsetcorps.net> <48A4404B.4070509@gmx.net> Message-ID: <200808141318.43291.sbeam@onsetcorps.net> On Thursday 14 August 2008 10:25, you wrote: > Well, that may be good for corporations, but regular people usually don't > change their residence permanently just lower their tax burden. Usually not, but there is an effect - especially among those who can afford to move, which are exactly they ones you would like not to, from a revenue maximization perspective. > > Higher taxes do not correlate to better living standards, but free > > commerce and rule of law do. > > Then how come that the standard of living in Western Europe is better than > in the US? Even if it does, by some measure, that does not prove correlation or causation. High or low tax rates do not cause a high or low standard of living. A high standard of living enables a country or state to levy high taxes. Education is a much better correlate, and you easily see where the causation is in that. Anyway, the Soviet Union had rather high tax rates... obviously at either extreme things tend to go haywire. In between we just hope they spend some of the haul on something useful, once in a while it even happens. > And the US companies are the nemesis of > standardization and the US is one of the worst tariff offenders (with the > EU up there). I don't know if you meant it as a comparison, but if one > compares US/EU they each end up being as bad. You are right about that, I was just talking about the economic benefits of regulated commerce among the member states, not general international trade issues. Don't think we need to get into that unless there is a degree from the University of NYPHP waiting at the end of this discussion. > Wow, another innocent developer question entirely derailed just due to my > doing. Sorry about that. I know when is Social Studies class over? :) regards, Sam From ajai at bitblit.net Thu Aug 14 13:42:57 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 14 Aug 2008 13:42:57 -0400 (EDT) Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> Message-ID: On Thu, 14 Aug 2008, Mark Armendariz wrote: > I've been hoping to find a branch, at least, for strict p5 support. > It seems Cake 2.0 is headed in that direction. I should also point out that symfony has always been pure PHP5 from day one (symfony-project.com). > If I had the time to keep a blog, this would likely be a > very long demonstrative post about the issue, including some eventual > patches. Hopefully maybe I still can do that some time soon. That would be something worth reading :-) -- Aj. From pmjones88 at gmail.com Thu Aug 14 14:13:24 2008 From: pmjones88 at gmail.com (Paul M Jones) Date: Thu, 14 Aug 2008 13:13:24 -0500 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: Message-ID: <31C36DA3-C9E6-446F-9847-562BCFBF28C8@gmail.com> On Aug 14, 2008, at 12:42 , Ajai Khattri wrote: > On Thu, 14 Aug 2008, Mark Armendariz wrote: > >> I've been hoping to find a branch, at least, for strict p5 support. >> It seems Cake 2.0 is headed in that direction. > > I should also point out that symfony has always been pure PHP5 from > day > one (symfony-project.com). Of course, there's always Solar. I don't hawk my own projects much, but you seem to be asking for one of the things it was designed for (PHP5 E_STRICT compliance.) Hope that helps. :-) -- Paul M. Jones http://paul-m-jones.com/ From rmarscher at beaffinitive.com Fri Aug 15 00:07:05 2008 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Fri, 15 Aug 2008 00:07:05 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48A441C1.8060208@bzcode.com> <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> Message-ID: On Aug 14, 2008, at 12:00 PM, Mark Armendariz wrote: > digitalUs - The installation had p5 strict issues (un-initialized vars > throwing notices, which could be easily caught with __get methods - > also some method signature differences. once fixed (and @'d), ran > fairly well). > > typo3 - only required 2 minor changes to kill strict warnings (was > running mysql_fetch methods on invalid result vars), But once it was > running, I couldn't get a new page added. Seems a minor but obviously > significant bug in the page adding form processor. Haven't had the > chance to dig in to find out why. Thanks for getting back on how these fared. Good to know. From hans at cyberxdesigns.com Fri Aug 15 08:57:13 2008 From: hans at cyberxdesigns.com (hans at cyberxdesigns.com) Date: Fri, 15 Aug 2008 08:57:13 -0400 (EDT) Subject: [nycphp-talk] Paging Mr. Chris Snyder Message-ID: <3347.75.181.143.175.1218805033.squirrel@host.cxdhosting.com> Chris, I can't find your email address, please email me. Hans K From ka at kacomputerconsulting.com Fri Aug 15 09:57:16 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Fri, 15 Aug 2008 06:57:16 -0700 Subject: [nycphp-talk] connecting external site to craigslist for auto posting? Message-ID: <1218808636.22592@coral.he.net> Has anyone ever seen this done or heard that it has been done with PHP? I have someone who wants this done, and don't want to get involved if it's not possible. Thanks! ------------------- Kristina From ajai at bitblit.net Fri Aug 15 10:08:21 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 15 Aug 2008 10:08:21 -0400 (EDT) Subject: [nycphp-talk] connecting external site to craigslist for auto posting? In-Reply-To: <1218808636.22592@coral.he.net> Message-ID: On Fri, 15 Aug 2008, Kristina Anderson wrote: > Has anyone ever seen this done or heard that it has been done with > PHP? I have someone who wants this done, and don't want to get > involved if it's not possible. IIRC, postings in Craigslist require a confirmation step for each posting, so its tricky to implement (you would have to parse emails and respond with HTTP requests). Its been awhile since Ive used Craigslist so I dont know if they have any new procedures (like CAPTCHA). -- Aj. From ka at kacomputerconsulting.com Fri Aug 15 10:12:06 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Fri, 15 Aug 2008 07:12:06 -0700 Subject: [nycphp-talk] connecting external site to craigslist for auto posting? Message-ID: <1218809526.27330@coral.he.net> Aj, They do have Captcha now...so I guess this may be something non- feasible. Thanks. Kristina > On Fri, 15 Aug 2008, Kristina Anderson wrote: > > > Has anyone ever seen this done or heard that it has been done with > > PHP? I have someone who wants this done, and don't want to get > > involved if it's not possible. > > IIRC, postings in Craigslist require a confirmation step for each posting, > so its tricky to implement (you would have to parse emails and respond > with HTTP requests). > > Its been awhile since Ive used Craigslist so I dont know if they have any > new procedures (like CAPTCHA). > > > -- > Aj. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From jmcgraw1 at gmail.com Fri Aug 15 10:13:12 2008 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 15 Aug 2008 10:13:12 -0400 Subject: [nycphp-talk] connecting external site to craigslist for auto posting? In-Reply-To: References: <1218808636.22592@coral.he.net> Message-ID: >From craigslist TOS: You agree not to post, email, or otherwise make available Content: ... y) use any form of automated device or computer program that enables the submission of postings on craigslist without each posting being manually entered by the author thereof (an "automated posting device"), including without limitation, the use of any such automated posting device to submit postings in bulk, or for automatic submission of postings at regular intervals. ... So no go on the SPAM bots. - jake On Fri, Aug 15, 2008 at 10:08 AM, Ajai Khattri wrote: > On Fri, 15 Aug 2008, Kristina Anderson wrote: > > > Has anyone ever seen this done or heard that it has been done with > > PHP? I have someone who wants this done, and don't want to get > > involved if it's not possible. > > IIRC, postings in Craigslist require a confirmation step for each posting, > so its tricky to implement (you would have to parse emails and respond > with HTTP requests). > > Its been awhile since Ive used Craigslist so I dont know if they have any > new procedures (like CAPTCHA). > > > -- > Aj. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Fri Aug 15 10:15:58 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 15 Aug 2008 10:15:58 -0400 (EDT) Subject: [nycphp-talk] connecting external site to craigslist for auto posting? In-Reply-To: Message-ID: On Fri, 15 Aug 2008, Jake McGraw wrote: > y) use any form of automated device or computer program that enables the > submission of postings on craigslist without each posting being manually > entered by the author thereof (an "automated posting device"), including > without limitation, the use of any such automated posting device to submit > postings in bulk, or for automatic submission of postings at regular intervals. I had the feeling it was something like this - otherwise it would have been done by someone by now. -- Aj. From consult at covenantedesign.com Fri Aug 15 10:24:21 2008 From: consult at covenantedesign.com (Edward JS Prevost II) Date: Fri, 15 Aug 2008 10:24:21 -0400 Subject: [nycphp-talk] connecting external site to craigslist for auto posting? In-Reply-To: <1218808636.22592@coral.he.net> References: <1218808636.22592@coral.he.net> Message-ID: <48A59195.9040202@covenantedesign.com> It can be done... but I don't think it's legal actually. I'd check the terms of service on the main craigslist page. Kristina Anderson wrote: > Has anyone ever seen this done or heard that it has been done with > PHP? I have someone who wants this done, and don't want to get > involved if it's not possible. > > Thanks! > ------------------- > Kristina > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From ben at projectskyline.com Fri Aug 15 11:04:46 2008 From: ben at projectskyline.com (Ben Sgro) Date: Fri, 15 Aug 2008 11:04:46 -0400 Subject: [nycphp-talk] connecting external site to craigslist for auto posting? In-Reply-To: <48A59195.9040202@covenantedesign.com> References: <1218808636.22592@coral.he.net> <48A59195.9040202@covenantedesign.com> Message-ID: <48A59B0E.20108@projectskyline.com> Hello, I wrote a script that searches craigslist (by category and/or location) for words defined within a reference set. If it finds enough words greater than some predetermined threshold, it will send an email to the poster. It keeps track of which posts it has seen and responded to. Its written in perl and I will give the source to those that can be responsible with it. It doesn't do what your asking, it does the opposite, but its cool non the less. Say your looking for a used bike, specialized, between 500 and 1000 $ any where in New York. You would define a reference set that's like, "specialized mountain bike => 4, mountain bike => 1, specialized => 2, etc" where the first value is the word, and the second is the weight. You then set it up via cron to run every hour and you create a generic email to send to people. Also have it copy yourself. This way, you don't have to spend anytime searching through craigslist for the item your looking for. - Ben Edward JS Prevost II wrote: > It can be done... but I don't think it's legal actually. I'd check the > terms of service on the main craigslist page. > > Kristina Anderson wrote: >> Has anyone ever seen this done or heard that it has been done with >> PHP? I have someone who wants this done, and don't want to get >> involved if it's not possible. >> >> Thanks! >> ------------------- >> Kristina >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From ioplex at gmail.com Sun Aug 17 16:49:02 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 17 Aug 2008 16:49:02 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? Message-ID: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> I seem to recall getting a warning trying to access array elements that did not exist but I can't seem to trigger that issue right now. The following code: 'b'); $result = $a['c']; var_dump($result); yields the following: $ php -f t.php NULL Is it ok to access non-existent array elements? Will accessing an array element using a key that does not exist always return NULL? Mike From ioplex at gmail.com Sun Aug 17 16:55:12 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 17 Aug 2008 16:55:12 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... Message-ID: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> Currently I'm using the following: error_reporting(E_ALL|E_STRICT); at the top of my bootstrap. Is there anything else I can do to increase warnings and error reporting? I use vim+Linux and stock PHP packages. Is there something that everyone uses or should use on the server side when writing PHP? I think I had xdebug enabled on my old machine but I did not notice much of a difference aside from the appearance of stack traces. Mike From justin at justinhileman.info Sun Aug 17 16:57:51 2008 From: justin at justinhileman.info (justin) Date: Sun, 17 Aug 2008 16:57:51 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> Message-ID: <1dc0e7e00808171357tc8c495aw75795efb88b78a1b@mail.gmail.com> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen wrote: > Is it ok to access non-existent array elements? > > Will accessing an array element using a key that does not exist always > return NULL? it depends on how you have warnings configured. you might be getting them in your log, for example... i believe the result of accessing a non-existent array element is undefined. if i were you, i'd prob'ly ask if it exists first: see: http://us2.php.net/function.isset http://us2.php.net/function.array-key-exists justin -- http://justinhileman.com From dsteplight at gmail.com Sun Aug 17 17:00:01 2008 From: dsteplight at gmail.com (Darryle Steplight) Date: Sun, 17 Aug 2008 17:00:01 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> Message-ID: <47f4c4570808171400g5eb615detd476f4033c79f16f@mail.gmail.com> Hi Michael, Unless you like seeing that error message it is not ok. If you do print "
";
print_r($a);
print"
"; ,you will get a very good detailed visual of your array content. You're array only has one key/value pair. Try $a = array('a' => 'b', 'b' => 'b2', 'c' => 'b3' ); followed by the rest of your code and you should be good to go. On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen wrote: > I seem to recall getting a warning trying to access array elements > that did not exist but I can't seem to trigger that issue right now. > > The following code: > > $a = array('a' => 'b'); > $result = $a['c']; > var_dump($result); > > yields the following: > > $ php -f t.php > NULL > > Is it ok to access non-existent array elements? > > Will accessing an array element using a key that does not exist always > return NULL? > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From ka at kacomputerconsulting.com Sun Aug 17 18:10:25 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sun, 17 Aug 2008 15:10:25 -0700 Subject: [nycphp-talk] Accessing non-existent array elements ok? Message-ID: <1219011025.17844@coral.he.net> Hi all. I have a question regarding the below syntax $result = isset($a['c']) ? $a['c'] : NULL; This is testing two conditions, first if $a['c'] is set, and then, if $a ['c'] is NULL...correct? What would $result be if $a['c'] is set but is not NULL? The same as if $a['c'] was not set? or...? I've seen similar syntax before, in some code Tedd & I were working with a couple of months back...and just want to make sure I fully understand what is actually happening with it. Thanks. -- Kristina > On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen wrote: > > Is it ok to access non-existent array elements? > > > > Will accessing an array element using a key that does not exist always > > return NULL? > > it depends on how you have warnings configured. you might be getting > them in your log, for example... i believe the result of accessing a > non-existent array element is undefined. > > if i were you, i'd prob'ly ask if it exists first: > > > $result = isset($a['c']) ? $a['c'] : NULL; > > /** OR **/ > > $result = array_key_exists('c', $a) ? $a['c'] : NULL; > > ?> > > see: > > http://us2.php.net/function.isset > http://us2.php.net/function.array-key-exists > > > justin > -- > http://justinhileman.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From dsteplight at gmail.com Sun Aug 17 18:20:53 2008 From: dsteplight at gmail.com (Darryle Steplight) Date: Sun, 17 Aug 2008 18:20:53 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1219011025.17844@coral.he.net> References: <1219011025.17844@coral.he.net> Message-ID: <47f4c4570808171520i2911929do2f214c77be71b908@mail.gmail.com> Kristina, That code is not testing two conditions. It's testing one condition and assigning one value to $result if $a['c'] is set or another value to $result if $a['c'] is not set. It is the shorthand equivalent to writing if (isset($a['c']) { $result = $a['c] ; } else { $result = NULL; } . Both do the same thing, but one is a lot faster to write. So you can either write all that out or just $result = isset($a['c']) ? $a['c'] : NULL;. I hope that clarifies things. On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson wrote: > Hi all. I have a question regarding the below syntax > > $result = isset($a['c']) ? $a['c'] : NULL; > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > ['c'] is NULL...correct? > > What would $result be if $a['c'] is set but is not NULL? The same as > if $a['c'] was not set? or...? > > I've seen similar syntax before, in some code Tedd & I were working > with a couple of months back...and just want to make sure I fully > understand what is actually happening with it. > > Thanks. > > -- Kristina > >> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen > wrote: >> > Is it ok to access non-existent array elements? >> > >> > Will accessing an array element using a key that does not exist > always >> > return NULL? >> >> it depends on how you have warnings configured. you might be getting >> them in your log, for example... i believe the result of accessing a >> non-existent array element is undefined. >> >> if i were you, i'd prob'ly ask if it exists first: >> >> > >> $result = isset($a['c']) ? $a['c'] : NULL; >> >> /** OR **/ >> >> $result = array_key_exists('c', $a) ? $a['c'] : NULL; >> >> ?> >> >> see: >> >> http://us2.php.net/function.isset >> http://us2.php.net/function.array-key-exists >> >> >> justin >> -- >> http://justinhileman.com >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From justin at justinhileman.info Sun Aug 17 18:25:37 2008 From: justin at justinhileman.info (justin) Date: Sun, 17 Aug 2008 18:25:37 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1219011025.17844@coral.he.net> References: <1219011025.17844@coral.he.net> Message-ID: <1dc0e7e00808171525t5c88432an43fe92a784c4c369@mail.gmail.com> On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson wrote: > Hi all. I have a question regarding the below syntax > > $result = isset($a['c']) ? $a['c'] : NULL; > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > ['c'] is NULL...correct? > > What would $result be if $a['c'] is set but is not NULL? The same as > if $a['c'] was not set? or...? > > I've seen similar syntax before, in some code Tedd & I were working > with a couple of months back...and just want to make sure I fully > understand what is actually happening with it. > Kristina, Sorry, I probably should have used a standard if/then block... That shorthand is called a ternary operator, or a ternary comparison. See: http://us.php.net/operators/comparison#language.operators.comparison.ternary justin -- http://justinhileman.com From justin at justinhileman.info Sun Aug 17 18:29:54 2008 From: justin at justinhileman.info (justin) Date: Sun, 17 Aug 2008 18:29:54 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1dc0e7e00808171357tc8c495aw75795efb88b78a1b@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <1dc0e7e00808171357tc8c495aw75795efb88b78a1b@mail.gmail.com> Message-ID: <1dc0e7e00808171529l14e8b477mf1e64919a24f9089@mail.gmail.com> On Sun, Aug 17, 2008 at 4:57 PM, justin wrote: > > if i were you, i'd prob'ly ask if it exists first: > > > $result = isset($a['c']) ? $a['c'] : NULL; > > /** OR **/ > > $result = array_key_exists('c', $a) ? $a['c'] : NULL; > > ?> > Note that the key difference between isset() and array_key_exists() is the result when $a['c'] *exists* but has a *value* of NULL... Since we're assigning $result to NULL in either case, we would use isset(), as it is much faster. justin -- http://justinhileman.com From ka at kacomputerconsulting.com Sun Aug 17 18:30:16 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sun, 17 Aug 2008 15:30:16 -0700 Subject: [nycphp-talk] Accessing non-existent array elements ok? Message-ID: <1219012216.23187@coral.he.net> Ah... OK. so the end result of this is that $result will be either the value of $a['c'] -- if $a['c'] is set, or NULL -- if $a['c'] is NOT set. But in either case, it does not change the value of $a['c'], only sets the value of $result. I feel like going back and taking another look at that code with new eyes, now. Thanks. -- Kristina > Kristina, > > That code is not testing two conditions. It's testing one condition > and assigning one value to $result if $a['c'] is set or another value > to $result if $a['c'] is not set. It is the shorthand equivalent to > writing > > > if (isset($a['c']) > { > $result = $a['c] ; > } > else > { > $result = NULL; > } > > . Both do the same thing, but one is a lot faster to write. So you can > either write all that out or just > $result = isset($a['c']) ? $a['c'] : NULL;. > > I hope that clarifies things. > > On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson > wrote: > > Hi all. I have a question regarding the below syntax > > > > $result = isset($a['c']) ? $a['c'] : NULL; > > > > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > > ['c'] is NULL...correct? > > > > What would $result be if $a['c'] is set but is not NULL? The same as > > if $a['c'] was not set? or...? > > > > I've seen similar syntax before, in some code Tedd & I were working > > with a couple of months back...and just want to make sure I fully > > understand what is actually happening with it. > > > > Thanks. > > > > -- Kristina > > > >> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen > > wrote: > >> > Is it ok to access non-existent array elements? > >> > > >> > Will accessing an array element using a key that does not exist > > always > >> > return NULL? > >> > >> it depends on how you have warnings configured. you might be getting > >> them in your log, for example... i believe the result of accessing a > >> non-existent array element is undefined. > >> > >> if i were you, i'd prob'ly ask if it exists first: > >> > >> >> > >> $result = isset($a['c']) ? $a['c'] : NULL; > >> > >> /** OR **/ > >> > >> $result = array_key_exists('c', $a) ? $a['c'] : NULL; > >> > >> ?> > >> > >> see: > >> > >> http://us2.php.net/function.isset > >> http://us2.php.net/function.array-key-exists > >> > >> > >> justin > >> -- > >> http://justinhileman.com > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > >> > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ka at kacomputerconsulting.com Sun Aug 17 18:32:24 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sun, 17 Aug 2008 15:32:24 -0700 Subject: [nycphp-talk] Accessing non-existent array elements ok? Message-ID: <1219012344.23845@coral.he.net> Justin -- if you'd used a standard if/else block -- I wouldn't have learned something very important just now. So I'm happy I asked. Thanks fo the link! -- Kristina > On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson > wrote: > > Hi all. I have a question regarding the below syntax > > > > $result = isset($a['c']) ? $a['c'] : NULL; > > > > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > > ['c'] is NULL...correct? > > > > What would $result be if $a['c'] is set but is not NULL? The same as > > if $a['c'] was not set? or...? > > > > I've seen similar syntax before, in some code Tedd & I were working > > with a couple of months back...and just want to make sure I fully > > understand what is actually happening with it. > > > > Kristina, > > Sorry, I probably should have used a standard if/then block... That > shorthand is called a ternary operator, or a ternary comparison. See: > > http://us.php.net/operators/comparison#language.operators.comparison.ter nary > > justin > -- > http://justinhileman.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ioplex at gmail.com Sun Aug 17 18:37:13 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 17 Aug 2008 18:37:13 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1219011025.17844@coral.he.net> References: <1219011025.17844@coral.he.net> Message-ID: <78c6bd860808171537q453b0333g74a570d054773ca9@mail.gmail.com> On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson wrote: > Hi all. I have a question regarding the below syntax > > $result = isset($a['c']) ? $a['c'] : NULL; > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > ['c'] is NULL...correct? No. The x ? a : b construct is called the "ternary operator". The following example: $x ? $a : $b could be read "If $x is true, the expression evaluates to $a. Otherwise, the expression evaluates to $b.". It's basically a shorthand expression for if / else. Mike > What would $result be if $a['c'] is set but is not NULL? The same as > if $a['c'] was not set? or...? > > I've seen similar syntax before, in some code Tedd & I were working > with a couple of months back...and just want to make sure I fully > understand what is actually happening with it. > > Thanks. > > -- Kristina > >> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen > wrote: >> > Is it ok to access non-existent array elements? >> > >> > Will accessing an array element using a key that does not exist > always >> > return NULL? >> >> it depends on how you have warnings configured. you might be getting >> them in your log, for example... i believe the result of accessing a >> non-existent array element is undefined. >> >> if i were you, i'd prob'ly ask if it exists first: >> >> > >> $result = isset($a['c']) ? $a['c'] : NULL; >> >> /** OR **/ >> >> $result = array_key_exists('c', $a) ? $a['c'] : NULL; >> >> ?> >> >> see: >> >> http://us2.php.net/function.isset >> http://us2.php.net/function.array-key-exists >> >> >> justin >> -- >> http://justinhileman.com >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ioplex at gmail.com Sun Aug 17 18:42:58 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 17 Aug 2008 18:42:58 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1dc0e7e00808171357tc8c495aw75795efb88b78a1b@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <1dc0e7e00808171357tc8c495aw75795efb88b78a1b@mail.gmail.com> Message-ID: <78c6bd860808171542x651382e3scb772abeb5c95240@mail.gmail.com> On Sun, Aug 17, 2008 at 4:57 PM, justin wrote: > On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen wrote: >> Is it ok to access non-existent array elements? >> >> Will accessing an array element using a key that does not exist always >> return NULL? > > it depends on how you have warnings configured. you might be getting > them in your log, for example... i believe the result of accessing a > non-existent array element is undefined. Ok. Bummer. I think I would prefer that it a non-existent index evaluate to NULL. Mike From dsteplight at gmail.com Sun Aug 17 18:43:28 2008 From: dsteplight at gmail.com (Darryle Steplight) Date: Sun, 17 Aug 2008 18:43:28 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171537q453b0333g74a570d054773ca9@mail.gmail.com> References: <1219011025.17844@coral.he.net> <78c6bd860808171537q453b0333g74a570d054773ca9@mail.gmail.com> Message-ID: <47f4c4570808171543n5f141955nd38ac0f351c51523@mail.gmail.com> Kristina, It sounds like you got it now. Once I learned how to use the short hand version I started to use it all the time. It's great for scenarios like the one provided but sucks if you have long lines of code. At the end of the day it's also good because it helps to keep your code DRY. On Sun, Aug 17, 2008 at 6:37 PM, Michael B Allen wrote: > On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson > wrote: >> Hi all. I have a question regarding the below syntax >> >> $result = isset($a['c']) ? $a['c'] : NULL; >> >> >> This is testing two conditions, first if $a['c'] is set, and then, if $a >> ['c'] is NULL...correct? > > No. > > The x ? a : b construct is called the "ternary operator". The following example: > > $x ? $a : $b > > could be read "If $x is true, the expression evaluates to $a. > Otherwise, the expression evaluates to $b.". > > It's basically a shorthand expression for if / else. > > Mike > >> What would $result be if $a['c'] is set but is not NULL? The same as >> if $a['c'] was not set? or...? >> >> I've seen similar syntax before, in some code Tedd & I were working >> with a couple of months back...and just want to make sure I fully >> understand what is actually happening with it. >> >> Thanks. >> >> -- Kristina >> >>> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen >> wrote: >>> > Is it ok to access non-existent array elements? >>> > >>> > Will accessing an array element using a key that does not exist >> always >>> > return NULL? >>> >>> it depends on how you have warnings configured. you might be getting >>> them in your log, for example... i believe the result of accessing a >>> non-existent array element is undefined. >>> >>> if i were you, i'd prob'ly ask if it exists first: >>> >>> >> >>> $result = isset($a['c']) ? $a['c'] : NULL; >>> >>> /** OR **/ >>> >>> $result = array_key_exists('c', $a) ? $a['c'] : NULL; >>> >>> ?> >>> >>> see: >>> >>> http://us2.php.net/function.isset >>> http://us2.php.net/function.array-key-exists >>> >>> >>> justin >>> -- >>> http://justinhileman.com >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >>> >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > > > -- > Michael B Allen > PHP Active Directory SPNEGO SSO > http://www.ioplex.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From dsteplight at gmail.com Sun Aug 17 18:50:11 2008 From: dsteplight at gmail.com (Darryle Steplight) Date: Sun, 17 Aug 2008 18:50:11 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> Message-ID: <47f4c4570808171550q49000e78k974c9c0f738dfd57@mail.gmail.com> Hi Mike, Including ini_set (display_errors,1) might help you out too. Handling your errors can get pretty deep, but you can implement come try/catch code around specific sections of your code and then throw Exceptions with a custom error message of your choice. By default the error messages will appear in your apache error log. Or you can use php's error_log() to make the errors appear in your own error log file. Check out php's set_error_handler() too.http://us2.php.net/manual/en/function.set-error-handler.php On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: > Currently I'm using the following: > > error_reporting(E_ALL|E_STRICT); > > at the top of my bootstrap. > > Is there anything else I can do to increase warnings and error reporting? > I use vim+Linux and stock PHP packages. Is there something that > everyone uses or should use on the server side when writing PHP? > > I think I had xdebug enabled on my old machine but I did not notice > much of a difference aside from the appearance of stack traces. > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From ka at kacomputerconsulting.com Sun Aug 17 18:51:13 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sun, 17 Aug 2008 15:51:13 -0700 Subject: [nycphp-talk] Accessing non-existent array elements ok? Message-ID: <1219013473.28456@coral.he.net> I'm feeling excited about the ternary operator. Anything that reduces the amount of lines of code (and curly brackets) needed to do something will improve my working life & productivity immensely. -- Kristina > On Sun, Aug 17, 2008 at 6:10 PM, Kristina Anderson > wrote: > > Hi all. I have a question regarding the below syntax > > > > $result = isset($a['c']) ? $a['c'] : NULL; > > > > > > This is testing two conditions, first if $a['c'] is set, and then, if $a > > ['c'] is NULL...correct? > > No. > > The x ? a : b construct is called the "ternary operator". The following example: > > $x ? $a : $b > > could be read "If $x is true, the expression evaluates to $a. > Otherwise, the expression evaluates to $b.". > > It's basically a shorthand expression for if / else. > > Mike > > > What would $result be if $a['c'] is set but is not NULL? The same as > > if $a['c'] was not set? or...? > > > > I've seen similar syntax before, in some code Tedd & I were working > > with a couple of months back...and just want to make sure I fully > > understand what is actually happening with it. > > > > Thanks. > > > > -- Kristina > > > >> On Sun, Aug 17, 2008 at 4:49 PM, Michael B Allen > > wrote: > >> > Is it ok to access non-existent array elements? > >> > > >> > Will accessing an array element using a key that does not exist > > always > >> > return NULL? > >> > >> it depends on how you have warnings configured. you might be getting > >> them in your log, for example... i believe the result of accessing a > >> non-existent array element is undefined. > >> > >> if i were you, i'd prob'ly ask if it exists first: > >> > >> >> > >> $result = isset($a['c']) ? $a['c'] : NULL; > >> > >> /** OR **/ > >> > >> $result = array_key_exists('c', $a) ? $a['c'] : NULL; > >> > >> ?> > >> > >> see: > >> > >> http://us2.php.net/function.isset > >> http://us2.php.net/function.array-key-exists > >> > >> > >> justin > >> -- > >> http://justinhileman.com > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > >> > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > > -- > Michael B Allen > PHP Active Directory SPNEGO SSO > http://www.ioplex.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ioplex at gmail.com Sun Aug 17 21:07:27 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 17 Aug 2008 21:07:27 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1219013473.28456@coral.he.net> References: <1219013473.28456@coral.he.net> Message-ID: <78c6bd860808171807i1b7f5919x421850b7ed2314c3@mail.gmail.com> On Sun, Aug 17, 2008 at 6:51 PM, Kristina Anderson wrote: > I'm feeling excited about the ternary operator. Just wait until you see the quaternary predicate. Mike From tedd at sperling.com Mon Aug 18 08:44:14 2008 From: tedd at sperling.com (tedd) Date: Mon, 18 Aug 2008 08:44:14 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <1219011025.17844@coral.he.net> References: <1219011025.17844@coral.he.net> Message-ID: At 3:10 PM -0700 8/17/08, Kristina Anderson wrote: >I've seen similar syntax before, in some code Tedd & I were working >with a couple of months back...and just want to make sure I fully >understand what is actually happening with it. -- Kristina: The Ternary Operator is the "?" -- it is simply shorthand way of writing "this else that". "? this : that" If used in an assignment var = if true ? this : that I use it primarily for this: $action = isset($_GET['action']) ? $_GET['action'] : null; $action = isset($_POST['action']) ? $_POST['action'] : null; $action = isset($_SESSION['action']) ? $_SESSION['action'] : null; You see, if you try to check for the existence of an index that is not there, then you'll generate an error. But by using the above, it assures: a) no error will be generated; b) and your var will be set to whatever you want the default to be. I don't like using the Ternary Operator elsewhere because you can generate some very strange looking code, such as: $var ? $a = a() : $a = b(); Note, the above works and is the same as: if($var) { $a = a(); } else { $a = b(); } But, which is easier to understand three months from now? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ken at secdat.com Mon Aug 18 08:51:29 2008 From: ken at secdat.com (Kenneth Downs) Date: Mon, 18 Aug 2008 08:51:29 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> Message-ID: <48A97051.7020708@secdat.com> Michael B Allen wrote: > I seem to recall getting a warning trying to access array elements > that did not exist but I can't seem to trigger that issue right now. > > The following code: > > $a = array('a' => 'b'); > $result = $a['c']; > var_dump($result); > > yields the following: > > $ php -f t.php > Michael, I found the following routine to be very useful dealing with arrays: function a(&$array, $key,$default='') { if (isset($array[$key])) return $array[$key]; else return $default; } This allows you to code up simpler unconditional routines with code like: $value = a($myArray,$key,'AccetableDefault'); > NULL > > Is it ok to access non-existent array elements? > > Will accessing an array element using a key that does not exist always > return NULL? > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 From artur at marnik.net Mon Aug 18 09:56:28 2008 From: artur at marnik.net (Artur Marnik) Date: Mon, 18 Aug 2008 09:56:28 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171807i1b7f5919x421850b7ed2314c3@mail.gmail.com> References: <1219013473.28456@coral.he.net> <78c6bd860808171807i1b7f5919x421850b7ed2314c3@mail.gmail.com> Message-ID: <48A97F8C.8060603@marnik.net> Hi Mike, and what is "quaternary predicate" ? I tried to google but couldn't find it the only thing I found was: "The &%Class of &%Predicates that require four arguments" but no examples Artur PS. This is my first post on this list - Welcome everybody :) Michael B Allen wrote: > On Sun, Aug 17, 2008 at 6:51 PM, Kristina Anderson > wrote: >> I'm feeling excited about the ternary operator. > > Just wait until you see the quaternary predicate. > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From mitch.pirtle at gmail.com Mon Aug 18 10:40:53 2008 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 18 Aug 2008 10:40:53 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> Message-ID: <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: > > I think I had xdebug enabled on my old machine but I did not notice > much of a difference aside from the appearance of stack traces. Xdebug really shines when you are using an IDE that is trapping those errors like eclipse or Zend. I had no idea what all the buzz was about regarding xdebug until I saw a coworker working in eclipse with PDT and xdebug setup. Pretty impressive. -- Mitch From ben at projectskyline.com Mon Aug 18 10:56:01 2008 From: ben at projectskyline.com (Ben Sgro) Date: Mon, 18 Aug 2008 10:56:01 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> Message-ID: <48A98D81.8050708@projectskyline.com> Right on - I use komodo IDE w/xdebug - I couldn't work without it. Especially developing "enterprise" level web applications. - Ben Mitch Pirtle wrote: > On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: > >> I think I had xdebug enabled on my old machine but I did not notice >> much of a difference aside from the appearance of stack traces. >> > > Xdebug really shines when you are using an IDE that is trapping those > errors like eclipse or Zend. I had no idea what all the buzz was about > regarding xdebug until I saw a coworker working in eclipse with PDT > and xdebug setup. Pretty impressive. > > -- Mitch > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ioplex at gmail.com Mon Aug 18 11:26:21 2008 From: ioplex at gmail.com (Michael B Allen) Date: Mon, 18 Aug 2008 11:26:21 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <48A97051.7020708@secdat.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> Message-ID: <78c6bd860808180826r174db406t26ea71ddca052328@mail.gmail.com> On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs wrote: > Michael B Allen wrote: >> >> I seem to recall getting a warning trying to access array elements >> that did not exist but I can't seem to trigger that issue right now. >> >> The following code: >> >> > $a = array('a' => 'b'); >> $result = $a['c']; >> var_dump($result); >> >> yields the following: >> >> $ php -f t.php >> > > Michael, I found the following routine to be very useful dealing with > arrays: > > function a(&$array, $key,$default='') { > if (isset($array[$key])) return $array[$key]; > else return $default; > } > > This allows you to code up simpler unconditional routines with code like: > > $value = a($myArray,$key,'AccetableDefault'); That's pretty much what I'm doing right now: function _array_val($a, $k, $d = null) { if (is_array($a) && array_key_exists($k, $a)) return $a[$k]; if (func_num_args() == 3) return $d; throw new Exception("No such array key: $k"); } I was just hoping to streamline things further. Thanks, Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ken at secdat.com Mon Aug 18 11:36:14 2008 From: ken at secdat.com (Kenneth Downs) Date: Mon, 18 Aug 2008 11:36:14 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808180826r174db406t26ea71ddca052328@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <78c6bd860808180826r174db406t26ea71ddca052328@mail.gmail.com> Message-ID: <48A996EE.1020306@secdat.com> Michael B Allen wrote: > On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs wrote: > >> Michael B Allen wrote: >> >>> I seem to recall getting a warning trying to access array elements >>> that did not exist but I can't seem to trigger that issue right now. >>> >>> The following code: >>> >>> >> $a = array('a' => 'b'); >>> $result = $a['c']; >>> var_dump($result); >>> >>> yields the following: >>> >>> $ php -f t.php >>> >>> >> Michael, I found the following routine to be very useful dealing with >> arrays: >> >> function a(&$array, $key,$default='') { >> if (isset($array[$key])) return $array[$key]; >> else return $default; >> } >> >> This allows you to code up simpler unconditional routines with code like: >> >> $value = a($myArray,$key,'AccetableDefault'); >> > > That's pretty much what I'm doing right now: > > function _array_val($a, $k, $d = null) { > if (is_array($a) && array_key_exists($k, $a)) > return $a[$k]; > if (func_num_args() == 3) > return $d; > throw new Exception("No such array key: $k"); > } > > I was just hoping to streamline things further. > Michael, there is a significant difference in our two routines, which probably reflects a different approach. My approach is to make sure that the array access always returns a usable value, even if the array element does not exist. This is why my routine does not throw an exception or return null. Using this routine presupposes a broader approach in which the calling routine "knows" an acceptable default that it passes to the array access. This default can be pulled from a configuration system in the best case, but many times it is perfectly acceptable to use defined constants to provide the default. > Thanks, > Mike > > -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Mon Aug 18 13:05:09 2008 From: david at davidmintz.org (David Mintz) Date: Mon, 18 Aug 2008 13:05:09 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <48A97051.7020708@secdat.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> Message-ID: <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs wrote: > > function a(&$array, $key,$default='') { > if (isset($array[$key])) return $array[$key]; > else return $default; > } > > This allows you to code up simpler unconditional routines with code like: > > $value = a($myArray,$key,'AccetableDefault'); Does using an array reference &$array buy you anything in this instance? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Mon Aug 18 13:09:18 2008 From: ken at secdat.com (Kenneth Downs) Date: Mon, 18 Aug 2008 13:09:18 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> Message-ID: <48A9ACBE.5070905@secdat.com> David Mintz wrote: > > > On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs > wrote: > > > function a(&$array, $key,$default='') { > if (isset($array[$key])) return $array[$key]; > else return $default; > } > > This allows you to code up simpler unconditional routines with > code like: > > $value = a($myArray,$key,'AccetableDefault'); > > > > Does using an array reference &$array buy you anything in this instance? The basic idea is you don't know how big the array is and you don't want to pass anything more than you want to. I first coded the routine in PHP 4.x, when you had to be pretty explicit about these things. I have not followed up in awhile so I can't tell you if you still need the explicit by-reference operator, but it can't hurt. > > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Aug 18 15:46:11 2008 From: ramons at gmx.net (David Krings) Date: Mon, 18 Aug 2008 15:46:11 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <48A98D81.8050708@projectskyline.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> <48A98D81.8050708@projectskyline.com> Message-ID: <48A9D183.2030406@gmx.net> Ben Sgro wrote: > Right on - I use komodo IDE w/xdebug - I couldn't work without it. > Especially developing "enterprise" level web applications. > > - Ben Same applies to the dbg debugger from NuSphere. Although not open-source it available for free use and many IDEs support it and some support both dbg and xdebug. I use PHPEd from NuSphere and having worked with professional IDEs and their debuggers before it really works exactly the same. Debuggers are really time savers. Even for hobbyists like myself since it reduces the amount of frustration quite a bit. David From ioplex at gmail.com Mon Aug 18 16:08:36 2008 From: ioplex at gmail.com (Michael B Allen) Date: Mon, 18 Aug 2008 16:08:36 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> Message-ID: <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> On Mon, Aug 18, 2008 at 10:40 AM, Mitch Pirtle wrote: > On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: >> >> I think I had xdebug enabled on my old machine but I did not notice >> much of a difference aside from the appearance of stack traces. > > Xdebug really shines when you are using an IDE that is trapping those > errors like eclipse or Zend. I had no idea what all the buzz was about > regarding xdebug until I saw a coworker working in eclipse with PDT > and xdebug setup. Pretty impressive. I use vim with all the bells and whistles turned off so it doesn't sound like xdebug is going to do much for me. But I'm curious - can you give me an example of exactly what is "impressive" about the said setup? I just want to know what I'm missing exactly. If it's really that great I suppose I could use vim for speedy typing and eclipse for everything else. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From bzcoder at bzcode.com Mon Aug 18 16:07:38 2008 From: bzcoder at bzcode.com (bzcoder) Date: Mon, 18 Aug 2008 16:07:38 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> Message-ID: <48A9D68A.1080200@bzcode.com> Michael B Allen wrote: > > I use vim with all the bells and whistles turned off so it doesn't > sound like xdebug is going to do much for me. Vim + xdebug http://2bits.com/articles/using-vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html From edwardpotter at gmail.com Mon Aug 18 16:21:50 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Mon, 18 Aug 2008 16:21:50 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> Message-ID: http://www.firephp.org/ :-) that should do it for you. On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: > Currently I'm using the following: > > error_reporting(E_ALL|E_STRICT); > > at the top of my bootstrap. > > Is there anything else I can do to increase warnings and error reporting? > > I use vim+Linux and stock PHP packages. Is there something that > everyone uses or should use on the server side when writing PHP? > > I think I had xdebug enabled on my old machine but I did not notice > much of a difference aside from the appearance of stack traces. > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 From ben at projectskyline.com Mon Aug 18 17:28:42 2008 From: ben at projectskyline.com (Ben Sgro) Date: Mon, 18 Aug 2008 17:28:42 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> Message-ID: <48A9E98A.9070205@projectskyline.com> I can't comment on vi + xdebug (im an emacs guys) but w/komodo & xdebug - what is so "impressive" is the ability for me to step through my code. Say I have a class that does a few SOAP requests - My client hits my service and all they get back is a 500. Great. How would I go about debugging this w/xdebug. Simple, I'd set a breakpoint at the start of said method / class / function and step through it. I can examine any and all variables at any point, step into or out of any function/method as well. As I'm stepping through the code, I might notice where it errors out. Maybe it error'ed out because a variable value it was depending on wasn't getting set, or was getting initialized improperly. I can then step through the code in the debugger again, focusing on where this variable gets assigned its value. I come from a c background, both on windows and linux, and the one thing I really liked was visual studios' IDE. I can't imagine trying to write *enterprise* level applications without an IDE. PHP or any language. Its truly one of my most powerful tools as a developer. Also, take this scenario - Imagine you're handed a new application to continue development on. Looking through the code is my first step, my second would be to fire up xdebug and step through the code. What better way to see the previous' developers intentions than by watching the code in real time. - Ben Michael B Allen wrote: > On Mon, Aug 18, 2008 at 10:40 AM, Mitch Pirtle wrote: > >> On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen wrote: >> >>> I think I had xdebug enabled on my old machine but I did not notice >>> much of a difference aside from the appearance of stack traces. >>> >> Xdebug really shines when you are using an IDE that is trapping those >> errors like eclipse or Zend. I had no idea what all the buzz was about >> regarding xdebug until I saw a coworker working in eclipse with PDT >> and xdebug setup. Pretty impressive. >> > > I use vim with all the bells and whistles turned off so it doesn't > sound like xdebug is going to do much for me. > > But I'm curious - can you give me an example of exactly what is > "impressive" about the said setup? > > I just want to know what I'm missing exactly. If it's really that > great I suppose I could use vim for speedy typing and eclipse for > everything else. > > Mike > > From ramons at gmx.net Mon Aug 18 20:45:45 2008 From: ramons at gmx.net (David Krings) Date: Mon, 18 Aug 2008 20:45:45 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <48A9E98A.9070205@projectskyline.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> <330532b60808180740m6887be64k2d901075fc559382@mail.gmail.com> <78c6bd860808181308k2a00b859u1d77102ecc263de@mail.gmail.com> <48A9E98A.9070205@projectskyline.com> Message-ID: <48AA17B9.3000509@gmx.net> Ben Sgro wrote: > I can't comment on vi + xdebug (im an emacs guys) but w/komodo & xdebug > - what is so "impressive" > is the ability for me to step through my code. Seems we are plugging our favourtite debuggers, but this and all the other pros mentioned in the original email also apply to DBG. If you are on a budget that is 0$ and develop for private use get in touch with the guys from WaterProof. They give away their PHP IDE and it includes the free version of DBG as well. It is the best Windows based PHP IDE one can get for free. Another good one is Luckasoft's EnginSite Editor for PHP. It is not for free unless you happen to know a language that is currently not listed and translate the string file and help. I did that for German and got a free license. Enginsite PHP Editor is really an awesome IDE, but the implementation of the debugger is a bit off since it requires to stop at the first line of code of each file. So if you design your projects into multiple files (one file for each logical task section) then this gets old really fast. Some plop everything into one file and build a overarching structure into it, in that case it won't be such a drag. And that was the only reason why I spend money and bought NuSphere's IDE (and recently the upgrade for 39$ so that I can use it on my 64bit XP box). The developer of DBG works for NuSphere and they include the commercial version of DBG that can do many more tricks. I did once take a stab at xdebug under Eclipse, but I couldn't get xdebug to work with Eclipse. While Eclipse is probably an awesome Java IDE I found it to be unsuitable for PHP and given all the hype around Eclipse I also found the whole package quite underwhelming. Maybe it is better now and doesn't come as a giant jigsaw puzzle with mismtached pieces that one has to glue together. Ah yes, and then there is the Zend IDE, which also has a debugger. I just found the Zend IDE to be counterintuitive. If I cannot figure even out how to create a new project after RTFMing and poking around for an hour I am either too dense for it or the application is misdesigned, in either case I found it to be no fit for me. I did try Komodo, it was among the IDEs I considered, but the pricing was out of my league. I just saw that there is now OpenKomodo. I guess it won't hurt to try it. As much as I like NuSphere's stuff, their licensing sucks. I bought version 5.0 and two months later they release 5.1. One would think that the license is good for the dot releases, but no, it is only good for the dotdot releases. One more reason to use FOSS, but then I'm back to something like Eclipse or some other editor that has PHP syntax highlighting bolted on and can pull stuff through a debugger when I stuff it into Apache myself. I guess I have to pay for convenience and the few bucks for a real PHP only IDE were well worth it, especially for the much better debugger implementation. I also tried Maguma and it wasn't horrible, but fell short in several places. And since their website is now a parked domain I assume it is no longer maintained. In the end, I fully agree what Ben wrote about debuggers regardless of which one we each favor. You really want a good one that works and at least lets you do step by step code execution, allows for setting breakpoints, and has a variable watch so that you can see what ishouldhavepickedabettername$ really contains, especially when it is an array. It makes testing and bug fixing much easier and quickly lets one find out which code is OK and which code is crap. One round of applause for PHP debuggers. :) David From mmwaldman at optonline.net Mon Aug 18 21:03:53 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Mon, 18 Aug 2008 21:03:53 -0400 Subject: [nycphp-talk] Javascript Forum Message-ID: <0K5T00LLPPPWS610@mta2.srv.hcvlny.cv.net> I've got a javascript - trigger execution - problem. Does anyone know of a good forum for javascript? Margaret Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From suzerain at suzerain.com Mon Aug 18 21:17:10 2008 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue, 19 Aug 2008 09:17:10 +0800 Subject: multilayered debugging (was Re: [nycphp-talk] FirePHP) In-Reply-To: <48A443E1.8010004@bzcode.com> References: <48A443E1.8010004@bzcode.com> Message-ID: <8567A191-9C79-465E-BAAC-97755205BDC4@suzerain.com> Just reading email now, five days later, and it kind of raises an interesting point for me. I don't really have much substantive to to address your questions; I had never heard of FirePHP until I saw it just now. However, it could be really beneficial for debugging situations like on a ridiculous thing I concocted to solve a particular problem, so I thank you for bringing it up. Basically, I had abstract PHP templates writing out JavaScript depending on database lookups, which JavaScript then created all the XHTML and then makes an Ajax call, connecting to a PHP proxy script on the local server that passes calls through cURL to a remote server that is running a separate PHP script. Once I got into this, basically I found out that it was completely impossible to debug as a singular whole, and the only real solution was to be incredibly disciplined in my coding, and run unit tests as much as I could on individual modules before assembling the pieces. Nevertheless, sometimes there would be unexpected input coming from the top that would cause a failure at some point down the five levels. It sounds ridiculous saying this out loud, but I literally had the scripts sending me emails with debug data in them, just to root out SQL issues, or whatnot. (Log files would work, too, but I found email to be a more convenient solution somehow, and the information wasn't terribly important from a security sense anyway.) Anyway, I am interested in people's debugging techniques when they have multilayered projects like this, FirePHP or otherwise. Cheers, Marc Le 14 ao?t 08 ? 22:40, bzcoder a ?crit : > I was wondering if anyone else has been using FirePHP? I find it > great for inherited websites where I need to troubleshoot problems > on live servers, as I can have all the debug/variable dump/etc crap > dump to the FirePHP console so it doesn't show up on the website > while I'm trying to track down a problem and the budget is not there > to make a dev copy of the system[they need an in and out fix, 4 > hours tops] > > Originally I felt it was somewhat of a waste, since you can use > debugging tools much more easily, but when I don't always have the > luxury of working with a server that gives me debug capabilities, it > seems a great solution for low end work. > > http://www.firephp.org/ > > I'm wondering if anyone has any other thoughts on low end debugging > tricks that might be easier/better or such - or any thoughts on > tricks to using firephp more robustly. From susan_shemin at yahoo.com Mon Aug 18 22:03:21 2008 From: susan_shemin at yahoo.com (Susan Shemin) Date: Mon, 18 Aug 2008 19:03:21 -0700 (PDT) Subject: [nycphp-talk] Javascript Forum Message-ID: <66589.35220.qm@web50212.mail.re2.yahoo.com> www.javascript.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Aug 18 23:27:34 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 18 Aug 2008 23:27:34 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <48A9ACBE.5070905@secdat.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> <48A9ACBE.5070905@secdat.com> Message-ID: <20080819032734.GA13042@panix.com> On Mon, Aug 18, 2008 at 01:09:18PM -0400, Kenneth Downs wrote: > David Mintz wrote: > >On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs >> wrote: > > > > function a(&$array, $key,$default='') { > > > >Does using an array reference &$array buy you anything in this instance? > > The basic idea is you don't know how big the array is and you don't want > to pass anything more than you want to. PHP functions always act on a pointer/reference of the input value UNTIL you write to it. So, in this case, making $array a reference buys you nothing. I don't know if it penalizes you, though. --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 danielc at analysisandsolutions.com Mon Aug 18 23:30:13 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 18 Aug 2008 23:30:13 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> Message-ID: <20080819033013.GB13042@panix.com> Hey Michael: On Sun, Aug 17, 2008 at 04:49:02PM -0400, Michael B Allen wrote: > > Is it ok to access non-existent array elements? It depends on how you define okay. :) You can do it. It will work reliably, but it produces notices (if you have errors displayed or logged). So, it's a bad practice. > Will accessing an array element using a key that does not exist always > return NULL? Yes. That's the case with accessing any non-existant variable in PHP. Enjoy, --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 danielc at analysisandsolutions.com Mon Aug 18 23:37:12 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 18 Aug 2008 23:37:12 -0400 Subject: [nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ... In-Reply-To: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> References: <78c6bd860808171355v43646258k98295c17986b1421@mail.gmail.com> Message-ID: <20080819033712.GC13042@panix.com> Hi Michael: On Sun, Aug 17, 2008 at 04:55:12PM -0400, Michael B Allen wrote: > Currently I'm using the following: > error_reporting(E_ALL|E_STRICT); > at the top of my bootstrap. You should take a look at your php.ini file. It's cleaner to handle stuff like that in there. Check error_reporting, display_errors and log_errors. --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 david at davidmintz.org Tue Aug 19 09:18:03 2008 From: david at davidmintz.org (David Mintz) Date: Tue, 19 Aug 2008 09:18:03 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <20080819032734.GA13042@panix.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> <48A9ACBE.5070905@secdat.com> <20080819032734.GA13042@panix.com> Message-ID: <721f1cc50808190618s7cc3ef84t2b29058f3d3faec7@mail.gmail.com> On Mon, Aug 18, 2008 at 11:27 PM, Daniel Convissor < danielc at analysisandsolutions.com> wrote: > > > > > > >Does using an array reference &$array buy you anything in this instance? > > > > The basic idea is you don't know how big the array is and you don't want > > to pass anything more than you want to. > > PHP functions always act on a pointer/reference of the input value UNTIL > you write to it. So, in this case, making $array a reference buys you > nothing. I don't know if it penalizes you, though. > > I heard somewhere that it does cost to reference/de-reference for no good reason, and that if youi're not going to write to it, pass it by value not reference. But I don't remember when or where, so don't ask me support that with things like facts or sources. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoeyD473 at nyc.rr.com Tue Aug 19 09:30:11 2008 From: JoeyD473 at nyc.rr.com (Joey Derrico) Date: Tue, 19 Aug 2008 09:30:11 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> Message-ID: <48AACAE3.5080702@nyc.rr.com> Sorry to bring up what has been a dead topic for about a week but I was going through old E-Mails and reread the thread and just had a thought. If there is no CMS that supports all the features of PHP (which basically seems to be the case) maybe we could work on one that fully supports ALL the features of PHP 5. Joey Derrico From ramons at gmx.net Tue Aug 19 09:59:21 2008 From: ramons at gmx.net (David Krings) Date: Tue, 19 Aug 2008 09:59:21 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <48AACAE3.5080702@nyc.rr.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48AACAE3.5080702@nyc.rr.com> Message-ID: <48AAD1B9.6030602@gmx.net> Joey Derrico wrote: > Sorry to bring up what has been a dead topic for about a week but I was > going through old E-Mails and reread the thread and just had a thought. > If there is no CMS that supports all the features of PHP (which > basically seems to be the case) maybe we could work on one that fully > supports ALL the features of PHP 5. I don't want to squash your enthusiasm, but I think it is better to work on a CMS that supports all the features that a CMS needs even if it then ends up using only half of the stuff that PHP 5 can do. Development of any application has to focus on the end-user, not the developer. David From rolan at omnistep.com Tue Aug 19 10:21:48 2008 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 19 Aug 2008 10:21:48 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <721f1cc50808190618s7cc3ef84t2b29058f3d3faec7@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> <48A9ACBE.5070905@secdat.com> <20080819032734.GA13042@panix.com> <721f1cc50808190618s7cc3ef84t2b29058f3d3faec7@mail.gmail.com> Message-ID: <48AAD6FC.80409@omnistep.com> David Mintz wrote: > > > I heard somewhere that it does cost to reference/de-reference for no > good reason, and that if youi're not going to write to it, pass it by > value not reference. But I don't remember when or where, so don't ask > me support that with things like facts or sources. > > -- > David Mintz > http://davidmintz.org/ > Wow, what a shocker. I just ran a quick test and passing by reference is SLOWER by a factor of 1000. I'm running the script below on a AMD Athlon XP 2200+ with 1GB RAM Redhat Fedora Core 5. (if the email is mangled, you can grab the source from http://omnistep.com/phpstuff/ ) You need to supply a reasonably large file and repoint the $filename variable to it before running. \n";} else {$newline="\n";} $start=microtime(TRUE); print "Pass by Reference{$newline}"; print "Start: $start{$newline}"; for ($x=0;$x<500;$x++) { $a=passByRef($blobofdata); // passes it by reference 500 times } $end=microtime(TRUE); print "End: $end{$newline}Total=".($end-$start).$newline.$newline; $start=$end; print "Pass by Value{$newline}"; print "Start: $start{$newline}"; for ($x=0;$x<500;$x++) { $a=passByValue($blobofdata); // passes it by value 500 times } $end=microtime(TRUE); print "End: $end{$newline}Total=".($end-$start).$newline; function passByRef(&$bla) { return $bla; } function passByValue($bla) { return $bla; } ?> From edwardpotter at gmail.com Tue Aug 19 10:25:25 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Tue, 19 Aug 2008 10:25:25 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> Message-ID: Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? Seems to do ANYTHING you want as a CMS system, and now has wiki roll back features, + 2000 plugins and extensions. thanks, ed :-) On Thu, Aug 14, 2008 at 10:11 AM, Mitch Pirtle wrote: > Or you could just build your own specifically to suit your needs and > workflow using CakePHP :-) > > -- Mitch > > On Wed, Aug 13, 2008 at 10:22 PM, N?stor wrote: >> Hi Mark et all, >> >> I am trying to use drupal 5 and I am reading the documentation and tutorails >> and I still not able to create a static web page. They tell you htat >> you have to download >> this module and that module. I was able to find out how to create a static page >> using postnuke. >> >> N?stor :-) >> >> On Wed, Aug 13, 2008 at 12:56 PM, Mark Armendariz wrote: >>> On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: >>>> On Wed, 13 Aug 2008, Mark Armendariz wrote: >>>> >>>>> Can anyone recommend an open source CMS (or possibly commercial if >>>>> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >>>>> (strict). >>>> >>>> Do you think that perhaps all of these CMSes might have some problems with >>>> all the strict requirements? >>>> >>>> After all, people use these packages every day without the problems you've >>>> experienced... >>>> >>>> >>> >>> I've just installed them all (not drupal) this morning and they all >>> have problems with strict. A few minutes with google confirms this >>> fact (including the link I provided to cake where the devs explicitly >>> state that they don't plan on updating for strict mode). It's not >>> that people don't have this problem, it's that they turn off E_STRICT >>> and go about their way. A similar configuration issue has come up in >>> the past with everyone turning on "register_globals" and going about >>> their way and don't we all just love register_globals. I personally >>> have a hard time saying ok to source code that throws warnings and >>> notices on a vanilla install, even if they are just strict warnings. >>> >>> I know people use them every day, but that doesn't make them reliable. >>> PHP Nuke and OSCommerce have been used by hundreds of thousands for >>> years and I wouldn't trust either for client work. >>> >>> I'll take a look at Drupal 6 per recommendations, but 5 scared me >>> plenty. I spent more time working around drupal 5 than I would have >>> writing my own solution. >>> >>> Any others out there? >>> >>> Thanks again. >>> >>> Mark >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 From tedd at sperling.com Tue Aug 19 10:45:43 2008 From: tedd at sperling.com (tedd) Date: Tue, 19 Aug 2008 10:45:43 -0400 Subject: [nycphp-talk] Accessing non-existent array elements ok? In-Reply-To: <721f1cc50808190618s7cc3ef84t2b29058f3d3faec7@mail.gmail.com> References: <78c6bd860808171349sb8bfaf3je2afcdb2c25eb707@mail.gmail.com> <48A97051.7020708@secdat.com> <721f1cc50808181005wbdb8e04ga5f8081745fc6111@mail.gmail.com> <48A9ACBE.5070905@secdat.com> <20080819032734.GA13042@panix.com> <721f1cc50808190618s7cc3ef84t2b29058f3d3faec7@mail.gmail.com> Message-ID: At 9:18 AM -0400 8/19/08, David Mintz wrote: >On Mon, Aug 18, 2008 at 11:27 PM, Daniel Convissor ><danielc at analysisandsolutions.com> >wrote: > > > >Does using an array reference &$array buy you anything in this instance? >> >> The basic idea is you don't know how big the array is and you don't want >> to pass anything more than you want to. > >PHP functions always act on a pointer/reference of the input value UNTIL >you write to it. So, in this case, making $array a reference buys you >nothing. I don't know if it penalizes you, though. > >I heard somewhere that it does cost to reference/de-reference for no >good reason, and that if youi're not going to write to it, pass it >by value not reference. But I don't remember when or where, so don't >ask me support that with things like facts or sources. > >-- >David Mintz David: A reference is an allocation of memory and a dereference is dropping a segment of memory. That takes cpu time and memory to do so -- so it should be for a good reason. Also, depending upon the type of memory manager used, referencing and dereferencing memory can fragment available memory and eventually cause a program to crash when the amount of memory required to continue is not available. Back in my old working with Macintosh days, we seldom asked for a pointer, but rather a handle (a pointer to a pointer) and that allowed the Macintosh Memory Manager to organize/optimize available memory, thus Macs had less crashes than the windoze world. Now, how php handles memory I am totally clueless -- anyone care to enlighten me? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From tedd at sperling.com Tue Aug 19 10:52:30 2008 From: tedd at sperling.com (tedd) Date: Tue, 19 Aug 2008 10:52:30 -0400 Subject: [nycphp-talk] Javascript Forum In-Reply-To: <0K5T00LLPPPWS610@mta2.srv.hcvlny.cv.net> References: <0K5T00LLPPPWS610@mta2.srv.hcvlny.cv.net> Message-ID: At 9:03 PM -0400 8/18/08, (Margaret) Michele Waldman wrote: >I've got a javascript - trigger execution - problem. Does anyone >know of a good forum for javascript? > >Margaret Michele Margaret: I know what you mean, I hate to see those cute things executed too! :-) You might try here: Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From chsnyder at gmail.com Tue Aug 19 11:19:54 2008 From: chsnyder at gmail.com (csnyder) Date: Tue, 19 Aug 2008 11:19:54 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48A441C1.8060208@bzcode.com> <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> Message-ID: On Thu, Aug 14, 2008 at 12:00 PM, Mark Armendariz wrote: > I've another project that came in disallowing me to take this project, > so I'll likely be moving on - but I'm still largely surprised by the > results. If I had the time to keep a blog, this would likely be a > very long demonstrative post about the issue, including some eventual > patches. Hopefully maybe I still can do that some time soon. Mark, did they rationalize the MYSQL_STRICT requirement? I did a little reading up on that (as I'd never heard of it before this thread) and it seems like an interesting decision to make, as it will break most INSERT statements where an auto-incrementing field is in play. By most, I mean any that uses the old standard INSERT INTO table VALUES ( value1, valuen ); syntax is used. You get protection from zero-dates (no more 0000-00-00 00:00:00 values), but is there any other real practical value to running MySQL in this mode? Chris Snyder http://chxor.chxo.com/ From lists at enobrev.com Tue Aug 19 12:05:47 2008 From: lists at enobrev.com (Mark Armendariz) Date: Tue, 19 Aug 2008 12:05:47 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48A441C1.8060208@bzcode.com> <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> Message-ID: <58f08dcf0808190905t44f562b6u1e788d519fdc758@mail.gmail.com> On Tue, Aug 19, 2008 at 11:19 AM, csnyder wrote: > On Thu, Aug 14, 2008 at 12:00 PM, Mark Armendariz wrote: > >> I've another project that came in disallowing me to take this project, >> so I'll likely be moving on - but I'm still largely surprised by the >> results. If I had the time to keep a blog, this would likely be a >> very long demonstrative post about the issue, including some eventual >> patches. Hopefully maybe I still can do that some time soon. > > Mark, did they rationalize the MYSQL_STRICT requirement? It was my own requirement. I've since panned the project, and moved on to a couple far more interesting ones so I haven't really taken this issue much further yet - though I do hope to summarize the whole issue at some point and publish it somewhere on the internets. > I did a > little reading up on that (as I'd never heard of it before this > thread) and it seems like an interesting decision to make, as it will > break most INSERT statements where an auto-incrementing field is in > play. > > By most, I mean any that uses the old standard INSERT INTO table > VALUES ( value1, valuen ); syntax is used. I haven't had much issue with it, personally. I've been using MYSQL_STRICT since late last year. It took me a couple weeks to get used to a few constraints. The most annoying is trying to skip over setting non-null fields on inserts and updates. Also, I prefer to name my columns on inserts. It makes the sql far more legible and easier to debug. > > You get protection from zero-dates (no more 0000-00-00 00:00:00 > values), but is there any other real practical value to running MySQL > in this mode? Overall, the requirement is strictly for development. "Protection", as you mentioned, is key. I find developing in strict mode (p5 and mysql) keeps me from making silly mistakes and hence saves time. Typos are caught (uninitialized vars), I know that my object properties are handled correctly - or even type checked when necessary, my method signatures are lined up, and my queries are tight. It's a red squiggly-lined spell-check for code that helps me make sure I don't make any stupid mistakes leaving me time to deal with my big and ugly ones. For a small project, strict mode generally isn't too big a deal - especially for a one-off script and I'm glad PHP allows strict mode to be shut off, but when a project grows and you find yourself calling methods and objects from hundreds of places throughout a system, it's nice to know these things are in place. An automated test suite might raise the bar for code a few feet. And a decent QA team / plan a few feet more. Strict mode doesn't necessarily make code any better, but it can raise the bar a half an inch or so. The thing that bothers me most here is writing towards strict-mode is pretty easy. Quality assurance can be pretty difficult. Testing correctly, managing bugs, features and project scope, writing decent specifications, more testing correctly, release schedules, database optimization, proper security, team and project management, source control, working with designers all to meet a short deadline and a budget... All these things take a lot of process and practice to get them to run smoothly, and they still won't. Relative to that, writing code to pass the "strict" test is a walk in the park. Forget the walk. It's a swig of good cold beer at a barbecue on a hot-but-not-humid summer day. Simple. Any time I get a code base that doesn't pass strict, it usually just takes me an hour or two to get 80% of the code to stop shouting warnings and notices. And once these habits are set, coding for strict mode is just easy - and the habits are, in my mind, worth the benefit. Of course, when in production, errors are off. Strict mode is off. The essentials are logged. But I know that once it's there, I don't have to worry about warnings and notices. I caught all of them early in the development phase, and likely with the help of my "compiler." That's what strict mode is there for. Sorry, I kinda dragged that rant out, didn't I. Mark From chsnyder at gmail.com Tue Aug 19 12:17:43 2008 From: chsnyder at gmail.com (csnyder) Date: Tue, 19 Aug 2008 12:17:43 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <58f08dcf0808190905t44f562b6u1e788d519fdc758@mail.gmail.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <48A441C1.8060208@bzcode.com> <58f08dcf0808140900w2a450dd2q52e085e883c8e2e@mail.gmail.com> <58f08dcf0808190905t44f562b6u1e788d519fdc758@mail.gmail.com> Message-ID: On Tue, Aug 19, 2008 at 12:05 PM, Mark Armendariz wrote: > Sorry, I kinda dragged that rant out, didn't I. No, it's good. It IS easy to write to strict mode, and usually not hard to upgrade code written otherwise. I think the main problem is foresight: you need to have strict modes turned on from the beginning, and enforce that requirement for all developers on the project. Otherwise you get to a point three years down the line where some joker wants strict mode and you can't even begin to imagine how you're going to make your code and developers conform to such an odd request. ;-) Anyway, for all the CMS and framework devs who lurk on this list, it seems that both PHP5 and strict mode support are key selling points, and worth devoting some resources to supporting in a near-future release, providing you can get buy-in from your devs. From bzcoder at bzcode.com Tue Aug 19 12:28:51 2008 From: bzcoder at bzcode.com (bzcoder) Date: Tue, 19 Aug 2008 12:28:51 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> Message-ID: <48AAF4C3.6010706@bzcode.com> Edward Potter wrote: > Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? I was assuming he meant a strict Content Management System, ie save content, set publishing dates, publish/unpublish it all under strict PHP5 rules. Not the rest of the framework that a decent CMS needs or wants[user managements, users and acl's, add ons and extenstion management, templates/skins, etc] Something one could drop into an existing site without having to migrate all the existing users, synch the systems, and hack authorization levels between them. From lists at enobrev.com Tue Aug 19 12:48:25 2008 From: lists at enobrev.com (Mark Armendariz) Date: Tue, 19 Aug 2008 12:48:25 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <48AAF4C3.6010706@bzcode.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> <48AAF4C3.6010706@bzcode.com> Message-ID: <58f08dcf0808190948ib87fa64q5cd05a505fbc7087@mail.gmail.com> On Tue, Aug 19, 2008 at 12:28 PM, bzcoder wrote: > Edward Potter wrote: >> >> Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? Although I'm a big fan of Wordpress as well, there's no p5 strict version of WP either. > > I was assuming he meant a strict Content Management System, ie save content, > set publishing dates, publish/unpublish it all under strict PHP5 rules. > > Not the rest of the framework that a decent CMS needs or wants[user > managements, users and acl's, add ons and extenstion management, > templates/skins, etc] > > Something one could drop into an existing site without having to migrate all > the existing users, synch the systems, and hack authorization levels between > them. Exactly right. I was planning to start with an already available open source CMS - likely with plenty of generalized bells and whistles already available - and the idea was that I'd likely modify some things, but I wanted to keep modifications as minimal as possible. This is what twisted my shorts with Drupal 5 is the amount of modifications I had to get my last project to meet spec (all without my beloved p5 strict and if I recall without even being able to rely on warnings and notices either - yuck!!). Otherwise, I would have been out looking for an open source framework, which is something I'm actually in the process of now for another project which has the requirement of an Open Source framework - this research interests me quite a bit more than the CMS search. Fortunately, it seems I've some decent options in the framework arena. Looking forward to playing with Solar (thanks for the suggestion, Mr Jones), Symphony and Code Igniter. I was looking forward to some Cake, but... well, you know. Mark From david at davidmintz.org Tue Aug 19 17:34:09 2008 From: david at davidmintz.org (David Mintz) Date: Tue, 19 Aug 2008 17:34:09 -0400 Subject: [nycphp-talk] Javascript Forum In-Reply-To: References: <0K5T00LLPPPWS610@mta2.srv.hcvlny.cv.net> Message-ID: <721f1cc50808191434m4b086018wb0841c9d945db93f@mail.gmail.com> On Tue, Aug 19, 2008 at 10:52 AM, tedd wrote: > At 9:03 PM -0400 8/18/08, (Margaret) Michele Waldman wrote: > >> I've got a javascript - trigger execution - problem. Does anyone know of >> a good forum for javascript? >> >> Margaret Michele >> > > Margaret: > > I know what you mean, I hate to see those cute things executed too! :-) > > You might try here: > > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > > What!? Nothing surpasses http://lists.nyphp.org/mailman/listinfo/front-end ! -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From y2rob at aol.com Wed Aug 20 13:15:05 2008 From: y2rob at aol.com (y2rob at aol.com) Date: Wed, 20 Aug 2008 13:15:05 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <48AAF4C3.6010706@bzcode.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> <48AAF4C3.6010706@bzcode.com> Message-ID: <8CAD0FF6C7AE3A3-65C-1BE3@WEBMAIL-DC20.sysops.aol.com> has anyone checked out expression engine.? there is a base free version and if you want modules, there's a small licensing fee; it seems pretty cool though. ~rob -----Original Message----- From: bzcoder To: NYPHP Talk Sent: Tue, 19 Aug 2008 12:28 pm Subject: Re: [nycphp-talk] Open Source CMS for PHP5 Edward Potter wrote:? > Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? ? I was assuming he meant a strict Content Management System, ie save content, set publishing dates, publish/unpublish it all under strict PHP5 rules.? ? Not the rest of the framework that a decent CMS needs or wants[user managements, users and acl's, add ons and extenstion management, templates/skins, etc]? ? Something one could drop into an existing site without having to migrate all the existing users, synch the systems, and hack authorization levels between them.? _______________________________________________? New York PHP Community Talk Mailing List? http://lists.nyphp.org/mailman/listinfo/talk? ? NYPHPCon 2006 Presentations Online? http://www.nyphpcon.com? ? Show Your Participation in New York PHP? http://www.nyphp.org/show_participation.php? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzcoder at bzcode.com Wed Aug 20 14:35:37 2008 From: bzcoder at bzcode.com (bzcoder) Date: Wed, 20 Aug 2008 14:35:37 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <8CAD0FF6C7AE3A3-65C-1BE3@WEBMAIL-DC20.sysops.aol.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> <48AAF4C3.6010706@bzcode.com> <8CAD0FF6C7AE3A3-65C-1BE3@WEBMAIL-DC20.sysops.aol.com> Message-ID: <48AC63F9.6090202@bzcode.com> y2rob at aol.com wrote: > has anyone checked out expression engine. there is a base free > version and if you want modules, there's a small licensing fee; it > seems pretty cool though. > Just to clarify: There is a free version that allows you to develop for/play with the system, but not use it in any meaningful[ie commercial] way. For a commercial license you have to pay $250. Than you can also buy additional modules for the system. My experience with systems marketed like this is that there is a low level of community help, with most developers refraining from offering advice unless paid to do so. It's odd, but I find in the pure open source and pure commercial markets there is more openness and give and take than in pseodo open source ones. From ka at kacomputerconsulting.com Wed Aug 20 15:24:07 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 12:24:07 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219260247.16068@coral.he.net> Hi all -- When visitors initially arrive on the site, a randomized session id is generated to track items they add to their cart. The only problem is that when/if they return to/refresh the homepage during their visit, the session id changes and this will obviously result in unwanted issues. How can I prevent this from happening? Is index.php the proper place to instantiate the session id? ------------------- Kristina From ioplex at gmail.com Wed Aug 20 15:43:41 2008 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 20 Aug 2008 15:43:41 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219260247.16068@coral.he.net> References: <1219260247.16068@coral.he.net> Message-ID: <78c6bd860808201243l137f33eaw366ea71bd5955ba7@mail.gmail.com> On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson wrote: > Hi all -- > > When visitors initially arrive on the site, a randomized session id is > generated to track items they add to their cart. The only problem is > that when/if they return to/refresh the homepage during their visit, > the session id changes and this will obviously result in unwanted > issues. > > How can I prevent this from happening? Is index.php the proper place > to instantiate the session id? Use session_id() as the key for your cart. That should not change for the duration of their visit. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ka at kacomputerconsulting.com Wed Aug 20 15:56:19 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 12:56:19 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219262179.28008@coral.he.net> That's what I want to do, but I need to prevent the value of session id from changing if for some reason they revisit or refresh the index.php page...as that is where the value is created. I've seen discussions on here about populating a hidden field and then testing that to see if it's not empty as a way to handle this, I think. > On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson > wrote: > > Hi all -- > > > > When visitors initially arrive on the site, a randomized session id is > > generated to track items they add to their cart. The only problem is > > that when/if they return to/refresh the homepage during their visit, > > the session id changes and this will obviously result in unwanted > > issues. > > > > How can I prevent this from happening? Is index.php the proper place > > to instantiate the session id? > > Use session_id() as the key for your cart. That should not change for > the duration of their visit. > > Mike > > -- > Michael B Allen > PHP Active Directory SPNEGO SSO > http://www.ioplex.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From bmartin at mac.com Wed Aug 20 16:10:20 2008 From: bmartin at mac.com (Bruce Martin) Date: Wed, 20 Aug 2008 16:10:20 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219262179.28008@coral.he.net> References: <1219262179.28008@coral.he.net> Message-ID: I think you could do that as well as set a cookie and check that as well. That way if the user has cookies turned off you still can track the session. Bruce Martin The Martin Solution bruce at martinsolution.com http://www.martinsolution.com http://externals.martinsolution.com On Aug 20, 2008, at 3:56 PM, Kristina Anderson wrote: > That's what I want to do, but I need to prevent the value of session > id > from changing if for some reason they revisit or refresh the index.php > page...as that is where the value is created. > > I've seen discussions on here about populating a hidden field and then > testing that to see if it's not empty as a way to handle this, I > think. > >> On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson >> wrote: >>> Hi all -- >>> >>> When visitors initially arrive on the site, a randomized session id > is >>> generated to track items they add to their cart. The only problem > is >>> that when/if they return to/refresh the homepage during their visit, >>> the session id changes and this will obviously result in unwanted >>> issues. >>> >>> How can I prevent this from happening? Is index.php the proper > place >>> to instantiate the session id? >> >> Use session_id() as the key for your cart. That should not change for >> the duration of their visit. >> >> Mike >> >> -- >> Michael B Allen >> PHP Active Directory SPNEGO SSO >> http://www.ioplex.com/ >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzcoder at bzcode.com Wed Aug 20 16:23:36 2008 From: bzcoder at bzcode.com (bzcoder) Date: Wed, 20 Aug 2008 16:23:36 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219262179.28008@coral.he.net> References: <1219262179.28008@coral.he.net> Message-ID: <48AC7D48.6070209@bzcode.com> Kristina Anderson wrote: > That's what I want to do, but I need to prevent the value of session id > from changing if for some reason they revisit or refresh the index.php > page...as that is where the value is created. > > I've seen discussions on here about populating a hidden field and then > testing that to see if it's not empty as a way to handle this, I think. > > Well, first off you can take a minimal step towards avoiding session fixation[someone sending someone to your website with a made up session id in the url, thus they now know what the session is] by using: session_start(); if (!isset($_SESSION['initiated'])) { session_regenerate_id(); $_SESSION['initiated'] = true; } from http://phpsec.org/projects/guide/4.html This doesn't prevent all session fixation attacks, as the attacker can still initialize a legitimate session and then send the user to your site, but it does stop the easy ones - while at the same time solving your problem[when you create a session id on index.php you set a session variable. Than on subsequent loads of the index page, if that variable is set they will keep the same id they had]. You can also go further and whenever the person does something on the site that is meaningful[for example, adds something to the shopping cart] you can regenerate the session id, giving them a new one that now no attacker knows. Since your putting some work into handling sessions, check out the rest of the page for how to deal with minimizing session hijacking as well. From ioplex at gmail.com Wed Aug 20 17:18:47 2008 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 20 Aug 2008 17:18:47 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219262179.28008@coral.he.net> References: <1219262179.28008@coral.he.net> Message-ID: <78c6bd860808201418j75445c9ck41fe122f890409b0@mail.gmail.com> On Wed, Aug 20, 2008 at 3:56 PM, Kristina Anderson wrote: > That's what I want to do, but I need to prevent the value of session id > from changing if for some reason they revisit or refresh the index.php > page...as that is where the value is created. The session id should not change for the duration of the client's visit. In your index.php you should do session_start() and that's it (unless the user "logs out" in which case you might do session_regenerate_id() to effectively destroy any session state). What are you doing that is causing the session_id() to return a different value when the user refreshes the page? Mike From jcampbell1 at gmail.com Wed Aug 20 17:27:04 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 20 Aug 2008 17:27:04 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219260247.16068@coral.he.net> References: <1219260247.16068@coral.he.net> Message-ID: <8f0676b40808201427v76cf7f57hfaa77cbee9f06adc@mail.gmail.com> On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson wrote: > When visitors initially arrive on the site, a randomized session id is > generated to track items they add to their cart. The only problem is > that when/if they return to/refresh the homepage during their visit, > the session id changes and this will obviously result in unwanted > issues. You are trying to re-implement the concept of a session, poorly. Just use plain 'ol php sessions. There is no reason to generate your own session id. Forcing users to a homepage to generate a session_id is a really bad idea. Run session_start() on all pages, and just store the cart (or a key reference to the cart) in $_SESSION. -John C. From ka at kacomputerconsulting.com Wed Aug 20 17:36:12 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 14:36:12 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219268172.31447@coral.he.net> Mike -- $rand=rand(1,9); $session_id=$rand.substr(md5($REMOTE_ADDR), 0, 11+$rand); $session_id.=substr(md5(rand(1,1000000)), rand(1,32-$rand), 21-$rand); session_id($session_id); session_start(); $_SESSION['sessionid'] = $session_id; --- What I need is some simple way to prevent this from being called more than once until they leave the site. I'm considering the hidden field thing but wonder if that is more complex than needed. --- Kristina > On Wed, Aug 20, 2008 at 3:56 PM, Kristina Anderson > wrote: > > That's what I want to do, but I need to prevent the value of session id > > from changing if for some reason they revisit or refresh the index.php > > page...as that is where the value is created. > > The session id should not change for the duration of the client's > visit. In your index.php you should do session_start() and that's it > (unless the user "logs out" in which case you might do > session_regenerate_id() to effectively destroy any session state). > What are you doing that is causing the session_id() to return a > different value when the user refreshes the page? > > Mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ka at kacomputerconsulting.com Wed Aug 20 17:38:31 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 14:38:31 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219268311.32216@coral.he.net> John -- store the cart items in the $_SESSION array and only write to the database when they check out? I am using PHP session but this variable is being passed in, as a unique identifier for that session/cart. > On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson > wrote: > > > When visitors initially arrive on the site, a randomized session id is > > generated to track items they add to their cart. The only problem is > > that when/if they return to/refresh the homepage during their visit, > > the session id changes and this will obviously result in unwanted > > issues. > > You are trying to re-implement the concept of a session, poorly. Just > use plain 'ol php sessions. There is no reason to generate your own > session id. Forcing users to a homepage to generate a session_id is a > really bad idea. Run session_start() on all pages, and just store the > cart (or a key reference to the cart) in $_SESSION. > > -John C. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From jcampbell1 at gmail.com Wed Aug 20 18:01:21 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 20 Aug 2008 18:01:21 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219268311.32216@coral.he.net> References: <1219268311.32216@coral.he.net> Message-ID: <8f0676b40808201501m24898350vfc1ef481363c3f4f@mail.gmail.com> On Wed, Aug 20, 2008 at 5:38 PM, Kristina Anderson wrote: > John -- store the cart items in the $_SESSION array and only write to > the database when they check out? Or store the cart in the database, and just store a key in the session such as $_SESSION['cart_id'] > I am using PHP session but this variable is being passed in, as a > unique identifier for that session/cart. As a GET variable? Why would you do this? Cookies/sessions were invented to making shopping carts work. Your code to generate a session_id is pointless... ditch the session_id code and just call session_start() on every page. What do you think is wrong with the default session_id generation? -John C. From ajai at bitblit.net Wed Aug 20 18:14:24 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 20 Aug 2008 18:14:24 -0400 (EDT) Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219268311.32216@coral.he.net> Message-ID: On Wed, 20 Aug 2008, Kristina Anderson wrote: > John -- store the cart items in the $_SESSION array and only write to > the database when they check out? Sure, that would work. Or store using a database table temporary session data (some PHP frameworks have support for that and have the added advantage of working across a cluster of servers). You dont need to reinvent the wheel. -- Aj. From ka at kacomputerconsulting.com Wed Aug 20 18:58:10 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 15:58:10 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219273090.26769@coral.he.net> Yes, but if I do $_SESSION['cart_id'], it is effectively the same thing, I'm using this random string as an identifier for the unique cart. This is effectively the same as $_SESSION['session_id'] -- only the name is different. the unique identifier is generated when index.php loads, and is passed as a querystring throughout the user's shopping and each product they view/order is tagged with their unique identifier. The problem is that if they refresh/reload index.php...that value will change and their cart will be nuked. Which will be bad. One thing that I just thought of a couple minutes ago would be to just use index.php to generate that...then include a new page and exit index.php so they won't ever be going back to that page during the session. As for why I do things the way I do...I am using $_SESSION and not just $_GET which may not have been clear from what I posted. > On Wed, Aug 20, 2008 at 5:38 PM, Kristina Anderson > wrote: > > John -- store the cart items in the $_SESSION array and only write to > > the database when they check out? > > Or store the cart in the database, and just store a key in the session > such as $_SESSION['cart_id'] > > > I am using PHP session but this variable is being passed in, as a > > unique identifier for that session/cart. > > As a GET variable? Why would you do this? Cookies/sessions were > invented to making shopping carts work. > > Your code to generate a session_id is pointless... ditch the > session_id code and just call session_start() on every page. What do > you think is wrong with the default session_id generation? > > -John C. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ka at kacomputerconsulting.com Wed Aug 20 19:18:04 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 20 Aug 2008 16:18:04 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219274284.32683@coral.he.net> Ajai-- this part I'm fine on....it's just the matter, really, of after instantiating that session variable, locking it in. I think I've decided to do the include file thing so that index.php is not accessible after the first view....that way they can't restart the session unless they retype in the domain address, which is highly unlikely...if so, they will have to start over. I've got everything going into the database in a table whose structure is prodID, sessionID fields in each row, so they can add an unlimited amount of stuff. I just have to guard against that sessionID changing because it will wipe out their cart. If that explains it better. > On Wed, 20 Aug 2008, Kristina Anderson wrote: > > > John -- store the cart items in the $_SESSION array and only write to > > the database when they check out? > > Sure, that would work. > > Or store using a database table temporary session data (some PHP > frameworks have support for that and have the added advantage of working > across a cluster of servers). > > You dont need to reinvent the wheel. > > > -- > Aj. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ben at projectskyline.com Wed Aug 20 21:11:09 2008 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 20 Aug 2008 21:11:09 -0400 Subject: [nycphp-talk] Release: DoubleCheck - PHP Debug Script Message-ID: <48ACC0AD.8000503@projectskyline.com> Hello All, So, after porting some C code to PHP for a research project, I had a spelling mistake ($complexCamelCaseVar, heh) that caused a bug that took me a long time to find out. I thought, wouldn't it be great to get a list of all my variables, in alphabetical order, with a count associated with each one? So, I whipped up a quick script to do just that. It hasn't been tested extensively, but it worked well for me on a few scripts. Feel free to use it, change it, hate it. http://www.mr-sk.com/txt/doubleCheck.txt - Ben From ramons at gmx.net Wed Aug 20 21:13:40 2008 From: ramons at gmx.net (David Krings) Date: Wed, 20 Aug 2008 21:13:40 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219273090.26769@coral.he.net> References: <1219273090.26769@coral.he.net> Message-ID: <48ACC144.6060909@gmx.net> Kristina Anderson wrote: > Yes, but if I do $_SESSION['cart_id'], it is effectively the same > thing, I'm using this random string as an identifier for the unique > cart. This is effectively the same as $_SESSION['session_id'] -- only > the name is different. And there is no reason to name it differently. I have a script using sessions extensively and create a temporary folder using the session string. I have code in place that checks if the directory already exists, but session IDs generated by PHP are so unique that I yet have to see that code getting executed - and that after I don't know how many ten thousand times. I agree with John that there is absolutely no reason to generate your own ID. > the unique identifier is generated when index.php loads, and is passed > as a querystring throughout the user's shopping and each product they > view/order is tagged with their unique identifier. Which isn't necessary if you run session_start() at the top of each page before executing any other code and sending anything to the browser. > The problem is that if they refresh/reload index.php...that value will > change and their cart will be nuked. Which will be bad. Not if you use session_start() as John rightfully mentioned already. As far as I know session_start() checks if the requesting browser connection ever started a PHP session and if yes, it uses the same session ID again, otherwise it generates a new one. And that is exactly that you want. You have an entry point such as a login or a "Shop 'til you drop now" button or in your case the index.php. When the browser requests that resource for the first time session_start() will not find any session ID for that requesting browser session. So it creates a new one that can be retrieved via session_id(). And that ID does not change when each consecutive script calls session_start() before executing any other code and before sending anything to the browser. So when you have session_start() as the first line after the opening tag in the index.php two things can happen: a) the current browser connection never had a session ID and a new one is generated b) the current browser connection has already a session ID established and uses that one Especially case b) allows for a browser to call index.php as many times as desired and any consecutive request will cause that PHP / the web server always end up with exactly the same session ID. And what is even better, PHP takes care of getting this to work even when the requesting browser does not accept cookies. I think PHP's session handling is absolutely awesome and makes things so much easier. I key everything off the session ID, even the name of temporary tables in MySQL (you just need to add a _ in front of the ID to prevent illegal table names to occur). And the big master key for everything is always in place when you just make sure that the first thing to do in a script is call session_start(). I have the bad habit to start writing all kinds of things into the session array because it gets conveniently carried around for me, but I guess in a serious application that involves money you want to keep things on the server. > One thing that I just thought of a couple minutes ago would be to just > use index.php to generate that...then include a new page and exit > index.php so they won't ever be going back to that page during the > session. Well, but they DID get to the initial index.php in the first place, so they can get back there again, just by using the back button of their browser. Using session_start() will even take care of that. > > As for why I do things the way I do...I am using $_SESSION and not just > $_GET which may not have been clear from what I posted. > I found only one case where GET saved the day in all the years I deal with PHP (well, on your schedule it ends up to be maybe only a few months). POST or keeping things on the server side and keying off a session ID is better. What you could do is add code to the index.php to fire some housecleaning script that takes care of stale carts. In my projects I store the session ID with the user ID and the date / time of login in a table. Each time the main page gets loaded I run a quick check against the date / time field and see if there are any stale logins. Anything older than a day is considered stale and I ditch any temporary directories, tables, and eventually the login entry itself. That works reasonably well for my purposes and cleans up the crud for all those cases where the user did not log out, which I assume will happen often. I doubt that my approach scales well as I hit the database once for typically nothing and potentially end up cleaning up a lot of stuff. For example on one day I end up with 50000 stale sessions and two days later the next user comes along and now I start this big cleanup and let that poor bastard wait until I'm done. What might be better is to write the login info into a flat file so that a cron / scheduled job can run during slow times and kick off a script that does the house cleaning then. There may also be better solutions. Basically, I can only nod in agreement with what John wrote, you do want to use session_start(). David From avidenie at gmail.com Thu Aug 21 04:00:44 2008 From: avidenie at gmail.com (Adrian Videnie) Date: Thu, 21 Aug 2008 11:00:44 +0300 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219268172.31447@coral.he.net> References: <1219268172.31447@coral.he.net> Message-ID: <48AD20AC.6050009@gmail.com> Kristina Anderson wrote: > $rand=rand(1,9); > $session_id=$rand.substr(md5($REMOTE_ADDR), 0, 11+$rand); > $session_id.=substr(md5(rand(1,1000000)), rand(1,32-$rand), 21-$rand); > session_id($session_id); > session_start(); > > $_SESSION['sessionid'] = $session_id; > OH my God! http://www.php.net/session http://www.php.net/session_regenerate_id Adrian From ajai at bitblit.net Thu Aug 21 09:07:52 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 21 Aug 2008 09:07:52 -0400 (EDT) Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219274284.32683@coral.he.net> Message-ID: On Wed, 20 Aug 2008, Kristina Anderson wrote: > I've got everything going into the database in a table whose structure > is prodID, sessionID fields in each row, so they can add an unlimited > amount of stuff. I just have to guard against that sessionID changing > because it will wipe out their cart. If that explains it better. Sure, but most people reading this are shaking their heads because the PHP session functions handle sessions IDs for you, no need to generate this yourself. The session ID should be stored in a cookie and the cookie needs to be checked for in every page. PHP's session functions do that for you. http://us3.php.net/manual/en/book.session.php -- Aj. From y2rob at aol.com Thu Aug 21 09:34:12 2008 From: y2rob at aol.com (y2rob at aol.com) Date: Thu, 21 Aug 2008 09:34:12 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> Message-ID: <8CAD1A9BB240AEA-F9C-2996@WEBMAIL-DC20.sysops.aol.com> i've been playing around with wordpress a bit because the now mrs. needed a quick website, and this seemed quickest and fastest solution.? yes, i like it and love the community behind it, but i'm not sure if there is a serious bug within wordpress, but i've notice that some processes get hung up and there's been a post on it that dates back for 10 months or so. anyone else experience this issue? http://wordpress.org/support/topic/136385 ~rob -----Original Message----- From: Edward Potter To: NYPHP Talk Sent: Tue, 19 Aug 2008 10:25 am Subject: Re: [nycphp-talk] Open Source CMS for PHP5 Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? Seems to do ANYTHING you want as a CMS system, and now has wiki roll back features, + 2000 plugins and extensions. thanks, ed :-) On Thu, Aug 14, 2008 at 10:11 AM, Mitch Pirtle wrote: > Or you could just build your own specifically to suit your needs and > workflow using CakePHP :-) > > -- Mitch > > On Wed, Aug 13, 2008 at 10:22 PM, N?stor wrote: >> Hi Mark et all, >> >> I am trying to use drupal 5 and I am reading the documentation and tutorails >> and I still not able to create a static web page. They tell you htat >> you have to download >> this module and that module. I was able to find out how to create a static page >> using postnuke. >> >> N?stor :-) >> >> On We d, Aug 13, 2008 at 12:56 PM, Mark Armendariz wrote: >>> On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: >>>> On Wed, 13 Aug 2008, Mark Armendariz wrote: >>>> >>>>> Can anyone recommend an open source CMS (or possibly commercial if >>>>> worthwhile) that works natively on php5 (e_strict)and MySQL 5 >>>>> (strict). >>>> >>>> Do you think that perhaps all of these CMSes might have some problems with >>>> all the strict requirements? >>>> >>>> After all, people use these packages every day without the problems you've >>>> experienced... >>>> >>>> >>> >>> I've just installed them all (not drupal) this morning and they all >>> have problems with strict. A few minutes with google confirms this >>> fact (including the link I provided to cake where the devs explicitly >>> state that they don't plan on updating for strict mode). It's not >>> that people don't have this problem, it's that they turn off E_STRICT >>> and go about their way. A similar configuration issue has come up in >>> the past with everyone turning on "register_globals" and going about >>> their way and don't we all just love register_globals. I personally >>> have a hard time saying ok to source code that throws warnings and >>> notices on a vanilla install, even if they are just strict warnings. >>> >>> I know people use them every day, but that doesn't make them reliable. >>> PHP Nuke and OSCommerce have been used by hundreds of thousands for >>> years and I wouldn't trust either f or client work. >>> >>> I'll take a look at Drupal 6 per recommendations, but 5 scared me >>> plenty. I spent more time working around drupal 5 than I would have >>> writing my own solution. >>> >>> Any others out there? >>> >>> Thanks again. >>> >>> Mark >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzcoder at bzcode.com Thu Aug 21 09:38:37 2008 From: bzcoder at bzcode.com (bzcoder) Date: Thu, 21 Aug 2008 09:38:37 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <1219273090.26769@coral.he.net> References: <1219273090.26769@coral.he.net> Message-ID: <48AD6FDD.3050603@bzcode.com> Kristina Anderson wrote: > Yes, but if I do $_SESSION['cart_id'], it is effectively the same > thing, I'm using this random string as an identifier for the unique > cart. This is effectively the same as $_SESSION['session_id'] -- only > the name is different. No, it is not effectively the same. First off, by doing $_SESSION['cart_id'] instead of manually generating your own session id, you get the power of PHP working for you in that it has already done all the things are are attempting to code manually built right into that session_start() command. In your examples, you could use the following on every page: ----- session_start(); if (!isset($_SESSION['cart_id'])) { session_regenerate_id(); $rand=rand(1,9); $cartid=$rand.substr(md5($REMOTE_ADDR), 0, 11+$rand); $cart_id.=substr(md5(rand(1,1000000)), rand(1,32-$rand), 21-$rand); $_SESSION['cart_id'] = $cart_id; } ---- This will generate a new id for every person coming into your site, and give them a cart id. Secondly, you can regenerate that session id anytime you want and not lose the cart. So if your collecting a credit card at some point in your process, someone can't do something like: Buy this cool book at http://www.yoursite.com/displayitem.php?itemid=xyz&PHPSESSID=abc Thus forcing the session id to be set to abc, and then monitoring the verification page of the checkout process to grab that persons personal details once they are entered. Instead, when someone enters the checkout process place the following bit of code at the top: ---- session_start(); session_regenerate_id(); ---- This means that even if someone did manage to fixate the session for that person, as soon as you begin the checkout process you generate a new session id for them. And the cool part is $_SESSION['cart_id'] will be copied along from the old session id to the new session id without you having to do anything at all. All of the above code suggestions are merely a band aid to fix your original stated goal with minimum amount of code. This requires making a few lines of change to the top of most of your PHP scripts, and changing any refferences to the session id to the cart id. This should not be taken as an endorsement that this is the best way to program the overall goals, just that it solves this itty bitty problem. From ben at projectskyline.com Thu Aug 21 09:51:40 2008 From: ben at projectskyline.com (Ben Sgro) Date: Thu, 21 Aug 2008 09:51:40 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: <48ACC144.6060909@gmx.net> References: <1219273090.26769@coral.he.net> <48ACC144.6060909@gmx.net> Message-ID: <48AD72EC.5010802@projectskyline.com> Hello Kristina, David summed this up pretty darn well. I don't see why you are reluctant to use session_id and the other functions. It solves all the problems I can see that you are mentioning. Maybe you could create a test script to play with session_id to get a better feel for how it works, and remove and doubts you have as well. Good luck, - Ben David Krings wrote: > Kristina Anderson wrote: >> Yes, but if I do $_SESSION['cart_id'], it is effectively the same >> thing, I'm using this random string as an identifier for the unique >> cart. This is effectively the same as $_SESSION['session_id'] -- >> only the name is different. > > And there is no reason to name it differently. I have a script using > sessions extensively and create a temporary folder using the session > string. I have code in place that checks if the directory already > exists, but session IDs generated by PHP are so unique that I yet have > to see that code getting executed - and that after I don't know how > many ten thousand times. I agree with John that there is absolutely no > reason to generate your own ID. > >> the unique identifier is generated when index.php loads, and is >> passed as a querystring throughout the user's shopping and each >> product they view/order is tagged with their unique identifier. > > Which isn't necessary if you run session_start() at the top of each > page before executing any other code and sending anything to the browser. > > >> The problem is that if they refresh/reload index.php...that value >> will change and their cart will be nuked. Which will be bad. > > Not if you use session_start() as John rightfully mentioned already. > As far as I know session_start() checks if the requesting browser > connection ever started a PHP session and if yes, it uses the same > session ID again, otherwise it generates a new one. And that is > exactly that you want. You have an entry point such as a login or a > "Shop 'til you drop now" button or in your case the index.php. When > the browser requests that resource for the first time session_start() > will not find any session ID for that requesting browser session. So > it creates a new one that can be retrieved via session_id(). And that > ID does not change when each consecutive script calls session_start() > before executing any other code and before sending anything to the > browser. So when you have session_start() as the first line after the > opening tag in the index.php two things can happen: > a) the current browser connection never had a session ID and a new one > is generated > b) the current browser connection has already a session ID established > and uses that one > > Especially case b) allows for a browser to call index.php as many > times as desired and any consecutive request will cause that PHP / the > web server always end up with exactly the same session ID. And what is > even better, PHP takes care of getting this to work even when the > requesting browser does not accept cookies. I think PHP's session > handling is absolutely awesome and makes things so much easier. I key > everything off the session ID, even the name of temporary tables in > MySQL (you just need to add a _ in front of the ID to prevent illegal > table names to occur). And the big master key for everything is always > in place when you just make sure that the first thing to do in a > script is call session_start(). > I have the bad habit to start writing all kinds of things into the > session array because it gets conveniently carried around for me, but > I guess in a serious application that involves money you want to keep > things on the server. > >> One thing that I just thought of a couple minutes ago would be to >> just use index.php to generate that...then include a new page and >> exit index.php so they won't ever be going back to that page during >> the session. > > Well, but they DID get to the initial index.php in the first place, so > they can get back there again, just by using the back button of their > browser. Using session_start() will even take care of that. > > >> >> As for why I do things the way I do...I am using $_SESSION and not >> just $_GET which may not have been clear from what I posted. >> > > I found only one case where GET saved the day in all the years I deal > with PHP (well, on your schedule it ends up to be maybe only a few > months). POST or keeping things on the server side and keying off a > session ID is better. > > > What you could do is add code to the index.php to fire some > housecleaning script that takes care of stale carts. In my projects I > store the session ID with the user ID and the date / time of login in > a table. Each time the main page gets loaded I run a quick check > against the date / time field and see if there are any stale logins. > Anything older than a day is considered stale and I ditch any > temporary directories, tables, and eventually the login entry itself. > That works reasonably well for my purposes and cleans up the crud for > all those cases where the user did not log out, which I assume will > happen often. I doubt that my approach scales well as I hit the > database once for typically nothing and potentially end up cleaning up > a lot of stuff. For example on one day I end up with 50000 stale > sessions and two days later the next user comes along and now I start > this big cleanup and let that poor bastard wait until I'm done. What > might be better is to write the login info into a flat file so that a > cron / scheduled job can run during slow times and kick off a script > that does the house cleaning then. There may also be better solutions. > > Basically, I can only nod in agreement with what John wrote, you do > want to use session_start(). > > > David > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From consult at covenantedesign.com Thu Aug 21 10:48:11 2008 From: consult at covenantedesign.com (Edward JS Prevost II) Date: Thu, 21 Aug 2008 10:48:11 -0400 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed In-Reply-To: References: Message-ID: <48AD802B.9030801@covenantedesign.com> Ajai Khattri wrote: > > Sure, but most people reading this are shaking their heads because the PHP > session functions handle sessions IDs for you, no need to generate this > yourself. The session ID should be stored in a cookie and the cookie needs > to be checked for in every page. PHP's session functions do that for you. > > http://us3.php.net/manual/en/book.session.php And most of that head shaking is do to security concerns... One of the best things you can do for yourself is buff-up on some basic security concepts when dealing with sessions and persistence. http://us3.php.net/session Just cause I appreciate Harry's thoughts... http://www.sitepoint.com/blogs/2004/03/03/notes-on-php-session-security/ http://phpsec.org/projects/guide/4.html Chris, has much changed in your thinking here? http://talks.php.net/show/phpworks2004-php-session-security and segfault... http://segfaultlabs.com/files/pdf/php-session-security.pdf -Ed From ka at kacomputerconsulting.com Thu Aug 21 11:55:07 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 21 Aug 2008 08:55:07 -0700 Subject: [nycphp-talk] preventing randomized session variable from changing when page is refreshed Message-ID: <1219334107.24942@coral.he.net> Thanks everyone for your feedback on this. And I will implement said suggestions, and read up on the session_id(). I'd just like to make everyone aware that this application isn't passing any sensitive data or concerned with credit card processing...it merely needs to put items in the cart and persist that until the person leaves the site...a human will then contact them after they submit the cart to discuss the products interested in. A lot of what I'm doing seems rather rudimentary to a lot of you, I know, and I do appreciate your time in educating me. I've spoken in the past about the evils of not having enough time to do things properly, and won't bore again on that. I'm also sorry for top posting on whatever I top posted on, and annoying people with "childish" posts. I'll try to keep my postings here from now on to an absolute minimum. -- Kristina From edwardpotter at gmail.com Thu Aug 21 15:58:20 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Thu, 21 Aug 2008 15:58:20 -0400 Subject: [nycphp-talk] Open Source CMS for PHP5 In-Reply-To: <8CAD1A9BB240AEA-F9C-2996@WEBMAIL-DC20.sysops.aol.com> References: <58f08dcf0808131026s21d7f8dr654b011d78aefcd3@mail.gmail.com> <58f08dcf0808131256o5622d89kde469b7a746abc23@mail.gmail.com> <330532b60808140711i2622347w9fac6ceae507e57d@mail.gmail.com> <8CAD1A9BB240AEA-F9C-2996@WEBMAIL-DC20.sysops.aol.com> Message-ID: 2+ million users, I'm sure the Mrs. can get it fixed, and embed a C++ mod for you on that one. :-) ed On Thu, Aug 21, 2008 at 9:34 AM, wrote: > i've been playing around with wordpress a bit because the now mrs. needed a > quick website, and this seemed quickest and fastest solution. yes, i like > it and love the community behind it, but i'm not sure if there is a serious > bug within wordpress, but i've notice that some processes get hung up and > there's been a post on it that dates back for 10 months or so. > > anyone else experience this issue? > > http://wordpress.org/support/topic/136385 > > ~rob > > > -----Original Message----- > From: Edward Potter > To: NYPHP Talk > Sent: Tue, 19 Aug 2008 10:25 am > Subject: Re: [nycphp-talk] Open Source CMS for PHP5 > > Ummm, can some one tell me what I CAN'T do with Wordpress 2.6? Seems > > to do ANYTHING you want as a CMS system, and now has wiki roll back > > features, + 2000 plugins and extensions. > > > > thanks, ed :-) > > > > > > On Thu, Aug 14, 2008 at 10:11 AM, Mitch Pirtle > wrote: > >> Or you could just build your own specifically to suit your needs and > >> workflow using CakePHP :-) > >> > >> -- Mitch > >> > >> On Wed, Aug2013, 2008 at 10:22 PM, N?stor wrote: > >>> Hi Mark et all, > >>> > >>> I am trying to use drupal 5 and I am reading the documentation and >>> tutorails > >>> and I still not able to create a static web page. They tell you htat > >>> you have to download > >>> this module and that module. I was able to find out how to create a >>> static > > page > >>> using postnuke. > >>> > >>> N?stor :-) > >>> > >>> On Wed, Aug 13, 2008 at 12:56 PM, Mark Armendariz >>> wrote: > >>>> On Wed, Aug 13, 2008 at 3:01 PM, Ajai Khattri wrote: > >>>>> On Wed, 13 Aug 2008, Mark Armendariz wrote: > >>>>> > >>>>>> Can anyone recommend an open source CMS (or possibly commercial if > >>>>>> worthwhile) that works natively on php5 (e_strict)and MySQL 5 > >>>>>> (strict). > >>>>> > >>>>> Do you think that perhaps all of these CMSes might have some problems >>>>> with > >>>>> all the strict requirements? > >>>>> > >>>>> After all, people use these packages every day without the problems >>>>> you've > >>>>> experienced... > >>>>> > >>>>> > >>>> > >>>> I've just installed them all (not drupal) this morning and they all > >>>> have problems with strict. A few minutes with20google confirms this > >>>> fact (including the link I provided to cake where the devs explicitly > >>>> state that they don't plan on updating for strict mode). It's not > >>>> that people don't have this problem, it's that they turn off E_STRICT > >>>> and go about their way. A similar configuration issue has come up in > >>>> the past with everyone turning on "register_globals" and going about > >>>> their way and don't we all just love register_globals. I personally > >>>> have a hard time saying ok to source code that throws warnings and > >>>> notices on a vanilla install, even if they are just strict warnings. > >>>> > >>>> I know people use them every day, but that doesn't make them reliable. > >>>> PHP Nuke and OSCommerce have been used by hundreds of thousands for > >>>> years and I wouldn't trust either for client work. > >>>> > >>>> I'll take a look at Drupal 6 per recommendations, but 5 scared me > >>>> plenty. I spent more time working around drupal 5 than I would have > >>>> writing my own solution. > >>>> > >>>> Any others out there? > >>>> > >>>> Thanks again. > >>>> > >>>> Mark > >>>> _______________________________________________ > >>>> New York PHP Community Talk Mailing List > >>>> http://lists.nyphp.org/mailman/listinfo/talk > >>>> > > >>>> NYPHPCon 2006 Presentations Online > >>>> http://www.nyphpcon.com > >>>> > >>>> Show Your Participation in New York PHP > >>>> http://www.nyphp.org/show_participation.php > >>>> > >>> _______________________________________________ > >>> New York PHP Community Talk Mailing List > >>> http://lists.nyphp.org/mailman/listinfo/talk > >>> > >>> NYPHPCon 2006 Presentations Online > >>> http://www.nyphpcon.com > >>> > >>> Show Your Participation in New York PHP > >>> http://www.nyphp.org/show_participation.php > >>> > >> > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > > > > > > > > -- > > IM/iChat: ejpusa > > Links: http://del.icio.us/ejpusa > > Blog: http://www.preceptres > s.com > > Follow me: http://www.twitter.com/ejpusa > > Karma: http://www.coderswithconscience.com > > Projects: http://flickr.com/photos/86842405 at N00/ > > Store: http://astore.amazon.com/httpwwwutopic-20 > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > ________________________________ > Get the MapQuest Toolbar. Directions, Traffic, Gas Prices & More! > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 From snirgal at optonline.net Sun Aug 24 05:47:36 2008 From: snirgal at optonline.net (snir gal) Date: Sun, 24 Aug 2008 05:47:36 -0400 Subject: [nycphp-talk] preventing randomized session variable from changingwhen page is refreshed In-Reply-To: <1219334107.24942@coral.he.net> References: <1219334107.24942@coral.he.net> Message-ID: <73F353C0984B463692B3BDBCA2F6AB87@pcxps> ----- Original Message ----- From: "Kristina Anderson" To: Sent: Thursday, August 21, 2008 11:55 AM Subject: Re: [nycphp-talk] preventing randomized session variable from changingwhen page is refreshed > Thanks everyone for your feedback on this. And I will implement said > suggestions, and read up on the session_id(). > > I'd just like to make everyone aware that this application isn't > passing any sensitive data or concerned with credit card > processing...it merely needs to put items in the cart and persist that > until the person leaves the site...a human will then contact them after > they submit the cart to discuss the products interested in. > > A lot of what I'm doing seems rather rudimentary to a lot of you, I > know, and I do appreciate your time in educating me. I've spoken in > the past about the evils of not having enough time to do things > properly, and won't bore again on that. > > I'm also sorry for top posting on whatever I top posted on, and > annoying people with "childish" posts. I'll try to keep my postings > here from now on to an absolute minimum. > hi kristina, make sure no header sent before that code! keep posting your childish post, i like it ^_^ > -- Kristina > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From sukritd at sevenacross.com Sun Aug 24 23:01:14 2008 From: sukritd at sevenacross.com (Sukrit D) Date: Mon, 25 Aug 2008 08:31:14 +0530 Subject: [nycphp-talk] looking for newbie PHP resources Message-ID: <10FD2BD6-FB78-4F21-AE50-810ED1DAFC58@sevenacross.com> Was wondering if someone could guide me to the following: 1. Books guides for a PHP newbie 2. Interesting projects to try out while learning PHP 3. IRC channels and other forums for newbies to interact with other members of the PHP community Thanks, SD. From susan_shemin at ymail.com Sun Aug 24 23:33:14 2008 From: susan_shemin at ymail.com (Susan Shemin) Date: Sun, 24 Aug 2008 20:33:14 -0700 (PDT) Subject: [nycphp-talk] looking for newbie PHP resources Message-ID: <100425.13809.qm@web59510.mail.ac4.yahoo.com> I learned my php/mysql from the Sitepoint php book.? www.sitepoint.com? Quite basic with an example site that has given me a framework to work from years later. I always suggest for a newbie to subscribe to Safari Books on www.devx.com, premier club, where you can read 10 books for $14.99/month (there's other plans).? Start out with basic books and then as your skills advance, you can begin to read more advanced php/mysql books. Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: From nayefae at gmail.com Mon Aug 25 02:04:05 2008 From: nayefae at gmail.com (Nayef Abu Ebaid) Date: Mon, 25 Aug 2008 09:04:05 +0300 Subject: [nycphp-talk] looking for newbie PHP resources In-Reply-To: <100425.13809.qm@web59510.mail.ac4.yahoo.com> References: <100425.13809.qm@web59510.mail.ac4.yahoo.com> Message-ID: <48B24B55.6060405@gmail.com> There is a very good book and it is free http://www.informit.com/content/images/013147149X/downloads/013147149X_book.pdf Nayef Susan Shemin wrote: > > I learned my php/mysql from the Sitepoint php book. www.sitepoint.com > Quite basic with an example site that has > given me a framework to work from years later. > > > > I always suggest for a newbie to subscribe to Safari Books on > www.devx.com , premier club, where you can read > 10 books for $14.99/month (there's other plans). Start out with basic > books and then as your skills advance, you can begin to read more > advanced php/mysql books. > > > > Susan > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From mikesz at qualityadvantages.com Mon Aug 25 23:45:05 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 26 Aug 2008 11:45:05 +0800 Subject: [nycphp-talk] Module Organization ideas... Message-ID: <322675432.20080826114505@qualityadvantages.com> Hello talk, I have a script that I added to an existing CMS as an include module. It contains a few functions that do database look ups and tests user input for specific conditions to see if the data matches a set of known (to me) footprints. I am using a preg_match on some of the conditions and on others I have a known value for which I am testing. I have two database log feature when I find a match and it sends me an email when a match occurs. The first one logs the event and the second one logs the IP address and email address contained in $_REQUEST. The way I organized this module, I have two functions, the first one does the IP lookup in my database and quits if it finds a match. The second function drops through the list of conditionals and manages events accordingly. I have about five conditionals that all analyze the data contained in $_REQUEST (about twenty fields). I have noticed that one or both of the conditionals that write the IP and email address will occasionally write a blank record to the database but when I check the email report I send to myself, it contains both records? I am thinking that maybe I need to break up the second function into a more specific set of functions so that some of the conditionals, like the posting to the database can be explicitly called when required. From what I have read about object coding, this seems like it might be a candidate for a class structure but I don't know object coding that well to sort it out. I feel like what I have now is an "orderly mess" and would like to restructure the module to make it easier to debug and more efficient to execute. Given the ideas presented, I would appreciate any feedback. Given that I have not provided any coding examples, I am only looking for ideas on how to reorganize this module. BTW, if you haven't guessed it, this is a bad guy trap code so posting the code has a risk that the bad guy will see the code and adjust his robot code to circumvent my code which has a 100% success rate currently even with the annoying database write bug that I am chasing. TIA -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From lists at nopersonal.info Tue Aug 26 02:11:11 2008 From: lists at nopersonal.info (BAS) Date: Tue, 26 Aug 2008 02:11:11 -0400 Subject: [nycphp-talk] looking for newbie PHP resources In-Reply-To: <10FD2BD6-FB78-4F21-AE50-810ED1DAFC58@sevenacross.com> References: <10FD2BD6-FB78-4F21-AE50-810ED1DAFC58@sevenacross.com> Message-ID: <48B39E7F.1000308@nopersonal.info> Sukrit D wrote: > Was wondering if someone could guide me to the following: > > 1. Books guides for a PHP newbie I liked "PHP Solutions: Dynamic Web Design Made Easy" by David Powers. He has some other excellent beginner level books on PHP. I found "MySQL Crash Course" and "Teach Yourself Regular Expressions in 10 Minutes", both by Ben Forta, to be useful companion books. http://regexlib.com/ is also a good resource. > 2. Interesting projects to try out while learning PHP Form validation is always useful, maybe a simple user authentication/login system. > 3. IRC channels and other forums for newbies to interact with other > members of the PHP community I don't know of a better forum than this one. Much of what is discussed here is still wayyyy over my head, but the folks here always seem to be more than willing to lend a hand provided that one asks sensible questions. Bev From tom at supertom.com Tue Aug 26 11:05:46 2008 From: tom at supertom.com (Tom Melendez) Date: Tue, 26 Aug 2008 08:05:46 -0700 Subject: [nycphp-talk] Module Organization ideas... In-Reply-To: <322675432.20080826114505@qualityadvantages.com> References: <322675432.20080826114505@qualityadvantages.com> Message-ID: <117286890808260805y4d5847ebl821f685b829acd9@mail.gmail.com> Hi Mike, > I have noticed that one or both of the conditionals that write the IP > and email address will occasionally write a blank record to the > database but when I check the email report I send to myself, it contains > both records? Can you log the actual query that is sent to the database? Is is valid, meaning, if you run it by hand does it populate those fields correctly? Are they really blank or are there spaces or non-printable characters in the query? > From what I have read about object coding, this seems like it might be > a candidate for a class structure but I don't know object coding that > well to sort it out. I feel like what I have now is an "orderly mess" > and would like to restructure the module to make it easier to debug > and more efficient to execute. It does sound like you could reorg this into one or more classes, but neither is a guarantee of "easier debugging" or "efficient execution". On the contrary, I would bet you'll end up refactoring quite a bit of it to achieve that. However, with those goals in mind at the start you will ultimately get what you want. Don't forget the reuse aspect as well. > > Given the ideas presented, I would appreciate any feedback. Given that > I have not provided any coding examples, I am only looking for ideas > on how to reorganize this module. BTW, if you haven't guessed it, this > is a bad guy trap code so posting the code has a risk that the bad guy > will see the code and adjust his robot code to circumvent my code > which has a 100% success rate currently even with the annoying > database write bug that I am chasing. Well, congrats on your success rate, but, what you describe is "security through obscurity", my friend. When moving towards your OO version of this, you may want to reconsider your algorithm/checks so it depends less on "I know something you don't" and more on "I know you are doing something bad because...". Tom http://www.liphp.org From mikesz at qualityadvantages.com Tue Aug 26 11:28:54 2008 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Tue, 26 Aug 2008 23:28:54 +0800 Subject: [nycphp-talk] Module Organization ideas... In-Reply-To: <117286890808260805y4d5847ebl821f685b829acd9@mail.gmail.com> References: <322675432.20080826114505@qualityadvantages.com> <117286890808260805y4d5847ebl821f685b829acd9@mail.gmail.com> Message-ID: <395324073.20080826232854@qualityadvantages.com> Hello Tom, Tuesday, August 26, 2008, 11:05:46 PM, you wrote: Thanks for the reply. Yes, I can send data manually its an IP address and an Email Address. The weird thing is that its random, sometimes it logs correctly sometimes not but I ALWAYS get the data in the email message it send me. > Can you log the actual query that is sent to the database? Is is > valid, meaning, if you run it by hand does it populate those fields > correctly? Are they really blank or are there spaces or non-printable > characters in the query? I will check for characters and, no, they are never blank, as I said above, I do get the data in the email report it sends me. >Well, congrats on your success rate, but, what you describe is >"security through obscurity", my friend. When moving towards your OO >version of this, you may want to reconsider your algorithm/checks so >it depends less on "I know something you don't" and more on "I know >you are doing something bad because...". Actually, I am doing both to cover instances that I don't know for sure and the hidden field catches the brainless bots that I might because it has a footprint I haven't seen before, for example. All of my conditionals are in the "I know you are doing something bad" category. Thanks again for the reply. -- Best regards, mikesz mailto:mikesz at qualityadvantages.com From ps at sun-code.com Wed Aug 27 06:12:40 2008 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 27 Aug 2008 06:12:40 -0400 Subject: [nycphp-talk] [OT] Voting Message-ID: <000101c9082d$70db2390$52916ab0$@com> What is it? How come we can financially, socially and medically network the entire world including gadgets and games and calendars that instantly recall and matrix all your comments and whatever, everything you and all your dispersed friends care to catalog. But we cannot, just cannot for some reason create a single working accurate voting tabulation system. Just what (What?) is that issue? Warmest regards, ? Peter Sawczynec Technology Dir. Sun-code Interactive Sun-code.com 646.316.3678 ps at sun-code.com From rolan at omnistep.com Wed Aug 27 06:35:48 2008 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 27 Aug 2008 06:35:48 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <000101c9082d$70db2390$52916ab0$@com> References: <000101c9082d$70db2390$52916ab0$@com> Message-ID: <48B52E04.1010000@omnistep.com> Peter Sawczynec wrote: > What is it? How come we can financially, socially and medically network > the entire world including gadgets and games and calendars that > instantly recall and matrix all your comments and whatever, everything > you and all your dispersed friends care to catalog. But we cannot, just > cannot for some reason create a single working accurate voting > tabulation system. Just what (What?) is that issue? > > Warmest regards, > > Peter Sawczynec > Technology Dir. > Sun-code Interactive > Sun-code.com > 646.316.3678 > ps at sun-code.com > > > Here is your answer: http://www.public.asu.edu/~kadams/PoliticalGraffiti_files/image002.jpg From zippy1981 at gmail.com Wed Aug 27 08:03:29 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 27 Aug 2008 08:03:29 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <000101c9082d$70db2390$52916ab0$@com> References: <000101c9082d$70db2390$52916ab0$@com> Message-ID: <5458db3c0808270503r2a7dc97g36f346a42d7c65a5@mail.gmail.com> I think we should keep politics off this list. But basically, I trust paper for voting because its harder to fake a paper ballot system. On Wed, Aug 27, 2008 at 6:12 AM, Peter Sawczynec wrote: > What is it? How come we can financially, socially and medically network > the entire world including gadgets and games and calendars that > instantly recall and matrix all your comments and whatever, everything > you and all your dispersed friends care to catalog. But we cannot, just > cannot for some reason create a single working accurate voting > tabulation system. Just what (What?) is that issue? > > Warmest regards, > > Peter Sawczynec > Technology Dir. > Sun-code Interactive > Sun-code.com > 646.316.3678 > ps at sun-code.com > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From bzcoder at bzcode.com Wed Aug 27 08:09:25 2008 From: bzcoder at bzcode.com (bzcoder) Date: Wed, 27 Aug 2008 08:09:25 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <000101c9082d$70db2390$52916ab0$@com> References: <000101c9082d$70db2390$52916ab0$@com> Message-ID: <48B543F5.4090308@bzcode.com> Peter Sawczynec wrote: > But we cannot, just > cannot for some reason create a single working accurate voting > tabulation system. Just what (What?) is that issue? > > Voting systems have to be at a level that volunteers can monitor and help out people who are voting. Computer geeks are slow to volunteer to help out on election day, therefore systems have to be simplified so people who predate computers can use them while at the same time cannot be prone to tampering by a few geeks who do volunteer. Than the few computer geeks who are interested go off and create an open source project that is geared to stuff their philosophy of computing down everyone else's throat, while still not being simple and intuitive for my grandma to use. From ka at kacomputerconsulting.com Wed Aug 27 08:32:36 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 27 Aug 2008 05:32:36 -0700 Subject: [nycphp-talk] [OT] Voting Message-ID: <1219840356.15732@coral.he.net> I recently saw a film at the Quad Cinema called "Stealing America: Vote by Vote" which did a really excellent job of explaining how the voting machines "work" (or don't work, depending on how you look at it), and even interviewed some of the guys who were involved in the programming of the voting machines. They got as technical as they could for a sophisticated general audience. I'm not sure if it's still playing anywhere but if it is, I highly recommend that anyone interested in this issue see the film. -- Kristina > What is it? How come we can financially, socially and medically network > the entire world including gadgets and games and calendars that > instantly recall and matrix all your comments and whatever, everything > you and all your dispersed friends care to catalog. But we cannot, just > cannot for some reason create a single working accurate voting > tabulation system. Just what (What?) is that issue? > > Warmest regards, > ? > Peter Sawczynec > Technology Dir. > Sun-code Interactive > Sun-code.com > 646.316.3678 > ps at sun-code.com > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ajai at bitblit.net Wed Aug 27 11:11:03 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 27 Aug 2008 11:11:03 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: <1219840356.15732@coral.he.net> Message-ID: On Wed, 27 Aug 2008, Kristina Anderson wrote: > I recently saw a film at the Quad Cinema called "Stealing America: Vote > by Vote" which did a really excellent job of explaining how the voting > machines "work" (or don't work, depending on how you look at it), and > even interviewed some of the guys who were involved in the programming > of the voting machines. They got as technical as they could for a > sophisticated general audience. I think I saw that a year or two ago. IIRC, the voting database was M$ Access (!). You should also see IOUSA (also playing at the Quad) for a real eye-opener. -- Aj. From ajai at bitblit.net Wed Aug 27 11:13:18 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 27 Aug 2008 11:13:18 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B543F5.4090308@bzcode.com> Message-ID: On Wed, 27 Aug 2008, bzcoder wrote: > Voting systems have to be at a level that volunteers can monitor and > help out people who are voting. > > Computer geeks are slow to volunteer to help out on election day, > therefore systems have to be simplified so people who predate computers > can use them while at the same time cannot be prone to tampering by a > few geeks who do volunteer. > > Than the few computer geeks who are interested go off and create an > open source project that is geared to stuff their philosophy of > computing down everyone else's throat, while still not being simple and > intuitive for my grandma to use. I think a lot of prominent geeks already said the machines were not secure without some kind of hardcopy audit trail. But this government has a habit of ignoring experts in anything (e.g. can you say "DMCA"? ). -- Aj. From tedd at sperling.com Wed Aug 27 12:17:47 2008 From: tedd at sperling.com (tedd) Date: Wed, 27 Aug 2008 12:17:47 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <000101c9082d$70db2390$52916ab0$@com> References: <000101c9082d$70db2390$52916ab0$@com> Message-ID: At 6:12 AM -0400 8/27/08, Peter Sawczynec wrote: >What is it? How come we can financially, socially and medically network >the entire world including gadgets and games and calendars that >instantly recall and matrix all your comments and whatever, everything >you and all your dispersed friends care to catalog. But we cannot, just >cannot for some reason create a single working accurate voting >tabulation system. Just what (What?) is that issue? > >Warmest regards, > >Peter Sawczynec Peter: There are all sorts of problems with this and some you would not believe -- for example it is against the law to claim that a voting scheme did not work (past tense). I had an associate who ran for a public office, lost, but was not allowed to publicly claim that the process was flawed, or how it was flawed. The law has something about undermining the election process. The public can't lose faith in te system. Another problem is that half the people are below average intelligence. So whatever scheme you develop, it has to be idiot proof -- and as we all know, we are developing a better idiot every day -- just look at Congress. Another problem is one of suspicion -- neither party wants the possibility that the other part may have somehow out smarted them and rigged the election. And more importantly, neither party wants the possibility that a third party may actually prevail. So it's best to keep the graft obvious to both sides so that they can maintain control collectively. Remember, by presenting us with two choices gives the illusion that we have a choice. You can have any flavor you want provided it's chocolate or vanilla (no implication re the current presidential race). Another problem is that there are companies who have all governments (local, state and federal) in their pocket via lobbying and the "good-old-boy" clubs -- they do not want to lose the business, regardless of IF they can fix the problem or not. Unfortunately, most of these companies are better at lobbying and landing contracts than actually getting things to work. Another problem is that the people in charge (I've seen this locally) actually believe that they are knowledgeable re the details of the problem. And in using their divine insight they have full control and understanding over all the buzzwords provided to them via lobbyist. The people in charge are simply talking heads operated by the invested interest behind the curtains. So all in all, the voting problem is not hard to solve -- it's easy! It's the system behind the scenes that's really the problem. Now, do I sound cynical, or do I just understand the problem more than most? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From smanes at magpie.com Wed Aug 27 12:21:14 2008 From: smanes at magpie.com (Steve Manes) Date: Wed, 27 Aug 2008 12:21:14 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: Message-ID: <48B57EFA.6060306@magpie.com> Ajai Khattri wrote: > I think a lot of prominent geeks already said the machines were not secure > without some kind of hardcopy audit trail. But this government has a habit > of ignoring experts in anything (e.g. can you say "DMCA"? ). I'm on a political list with a bunch of technogeeks. After the 2004 election, we developed an idea for a hybrid compromise of computer + paper trail. Your vote is recorded electronically with a UUID on a paper punched receipt. The voter can see who he just voted for. He then passes 1-n read-only stations on his way out where his vote is read, recorded and archived redundantly by each of the political parties and by any watchdog groups like LOWV. Each station would be built by a different manufacturer. It displays the vote to the voter where he confirms it. If all detectors agree on the vote, it's locked in. If the vote is invalidated by any of them then the voter casts a standard paper ballot for hand counting. Otherwise, he drops his receipt in a box on the way out. At the end of the day, the data from all machines is read and compared for accuracy. If there are any discrepancies, the ID-encoded receipt is retrieved for manual counting. Or something like that. From sbeam at onsetcorps.net Wed Aug 27 12:21:05 2008 From: sbeam at onsetcorps.net (sbeam) Date: Wed, 27 Aug 2008 12:21:05 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B543F5.4090308@bzcode.com> References: <000101c9082d$70db2390$52916ab0$@com> <48B543F5.4090308@bzcode.com> Message-ID: <200808271221.05170.sbeam@onsetcorps.net> On Wednesday 27 August 2008 08:09, bzcoder wrote: > Peter Sawczynec wrote: > > But we cannot, just > > cannot for some reason create a single working accurate voting > > tabulation system. Just what (What?) is that issue? > > > > ? > > Voting systems have to be at a level that volunteers can monitor and > help out people who are voting. > > Computer geeks are slow to volunteer to help out on election day, > therefore systems have to be simplified so people who predate computers > can use them while at the same time cannot be prone to tampering by a > few geeks who do volunteer. > > Than the few computer geeks who are interested go off and create ?an > open source project that is geared to stuff their philosophy of > computing down everyone else's throat, while still not being simple and > intuitive for my grandma to use. Actually the main problem with the Diebold system wasn't bad usability, it was their completely closed, black-box nature, where you are forced to trust this for-profit entity that has some extremely interesting ties with other major government contractors that have not been squeaky-clean in the past. So we don't know A) that the machines tally what they say they tally or B) that the people who do know what code lies deep under the security system are really on the up-and-up and C) that the company is even competent to create such a system (Diebold is not). Paranoia? maybe, but not if they are really out to get you. An open-source system which is completely available to inspection by activists, academics, concerned informed citizenry, etc. would actually be a better solution. I'm sure a system could be designed that grandma and the volunteers could use, without having to learning Perl or emacs or anything. But - good luck getting the mainstream government and software industry to pass on a chance to make a multi billion$ profit. And good luck getting a bunch of geeks to agree on anything. So you won't see a FOSS balloting system rollout in this lifetime - but what else would possibly allow trust of the system? Personally I am not qualified to inspect and vet such a system, but maybe if "they" say it's OK then it is. Maybe. The fact is, a hardcopy paper audit trail is a lot simpler and you don't need a PhD in cryptology to understand it. And it might even be cheaper than a digital solution. So that is what we have, hanging chads and all. I think we have bigger problems. From chsnyder at gmail.com Wed Aug 27 18:43:47 2008 From: chsnyder at gmail.com (csnyder) Date: Wed, 27 Aug 2008 18:43:47 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808271221.05170.sbeam@onsetcorps.net> References: <000101c9082d$70db2390$52916ab0$@com> <48B543F5.4090308@bzcode.com> <200808271221.05170.sbeam@onsetcorps.net> Message-ID: On Wed, Aug 27, 2008 at 12:21 PM, sbeam wrote: > The fact is, a hardcopy paper audit trail is a lot simpler and you don't need > a PhD in cryptology to understand it. And it might even be cheaper than a > digital solution. The real-world physicality of paper is what makes it safe. To forge votes, or to destroy votes, requires the manipulation of physical objects. It's easy to do for a handful, but extremely difficult to do on a massive scale. Thus, the more power is at stake, the harder it is to rig the vote. With digital-only systems, a single flaw or backdoor can allow vote rigging on a massive scale, at very little expense. We barely trust digital systems to conduct routine economic transactions; to trust them with assigning political power is an incredibly bad idea. Even if everything was open source and done exactly right, I would still want a paper trail thanks very much. And by the way, the voting machines we use here in NYC are rumored to be corruptible... something about inserting a toothpick between the teeth of the gears of candidates that shouldn't win? We really have no idea what's happening when we pull that big lever. chris. From ramons at gmx.net Wed Aug 27 21:32:29 2008 From: ramons at gmx.net (David Krings) Date: Wed, 27 Aug 2008 21:32:29 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: <000101c9082d$70db2390$52916ab0$@com> <48B543F5.4090308@bzcode.com> <200808271221.05170.sbeam@onsetcorps.net> Message-ID: <48B6002D.4050304@gmx.net> csnyder wrote: > And by the way, the voting machines we use here in NYC are rumored to > be corruptible... something about inserting a toothpick between the > teeth of the gears of candidates that shouldn't win? We really have no > idea what's happening when we pull that big lever. What amazes me as traditional paper and pen voter is that each street corner in the US does elections their way. There are one armed bandits (apparently to make voting easier for those that go to casinos often), chads, the levers, the optical only scan, the touch screen, touch screen with paper receipt (to make voting easier for those who work in retail), and the pen and paper ballots. I am sure I missed a few more, somewhere in the fly over states is probably coin tossing, stick drawing, and bull riding the offical form of voting. And in presidential elections all that to elect 100 people that nobody ever knows about and who are not bound by the will of the people. And then in some states voting is only done by absentee ballot. Sure, there is a paper ballot involved, but that is held for weeks and months in some 'secure' space. That gives plenty of time to falsify those votes or just add a few thousand extra. Absentee ballots are for those that are absent on election day, not for everyone. But then again, which moron came up with the idea to have elections on a work day in November? No wonder why the turnout is always dismal. Other democracies cringe when less than 70% show up for elections, here in the US that would be considered record turnout. And then there are states where dogs, cats, and dead people supposedly cast their votes. Or where mindless judges stop the counting. And then there are only two parties and maybe a few independent candidates. OK, there is the write in vote, but I wonder how one writes someone in using a lever machine. I don't say other places are better, although I am very much in favour of voting only by pen and paper on a Sunday when the weather is likely to be good (means early or late summer). Other democracies also let legal residents vote in local and regional elections (several municipalities in Germany have turkish mayors), others have at least five or six major parties, and in general the way of casting a vote is the same across the nation. The way it is done here really makes me scratch my head and be surprised that people even get upset that stuff goes wrong. Of course it will go wrong, because most voting systems are designed to fail, such as the 80 year old lever machines that didn't get maintained for the past 40 years. Or the electronic voting that constantly is shown to be easy to fudge or even unreliable just on its own. But why bother even with this, the rules aren't made in the parliaments, but they are made by the courts. US laws are often that broad and vague that it all comes down to how a particular judge interprets the law. And once done, precedence cases are often used more as a guidance than the law itself. I'm not saying other places are handling things better, it is just so different and without any rhyme or reason. In that sense: Spongebob Squarepants for President!!!! Krabby Patties for everyone!!!! David From ajai at bitblit.net Thu Aug 28 10:25:50 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 28 Aug 2008 10:25:50 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B6002D.4050304@gmx.net> Message-ID: On Wed, 27 Aug 2008, David Krings wrote: > And in > presidential elections all that to elect 100 people that nobody ever knows > about and who are not bound by the will of the people. The electoral college and delegates are the fatal flaw in the system, allowing for the will of the people to be subverted... -- Aj. From ps at sun-code.com Thu Aug 28 10:28:14 2008 From: ps at sun-code.com (ps at sun-code.com) Date: Thu, 28 Aug 2008 10:28:14 -0400 Subject: [nycphp-talk] Peter Sawczynec Has a New Cell Phone Number in FL Message-ID: <200808281428.m7SESENh021202@lnh-www1a.bluehalo.myregisteredsite.com> Dear Talk: My new cell phone number is (941)893-0396. This new number is already in effect now. NOTE: As early as Sat. Aug. 30th 2008, my old cell phone number service will expire and be turned off. I'd like to take this moment to say thank you for your friendship over the years. Warmest regards, Peter Sawczynec ps at sun-code.com 941.893.0396 From tedd at sperling.com Thu Aug 28 11:18:46 2008 From: tedd at sperling.com (tedd) Date: Thu, 28 Aug 2008 11:18:46 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: Message-ID: At 10:25 AM -0400 8/28/08, Ajai Khattri wrote: > >The electoral college and delegates are the fatal flaw in the system, >allowing for the will of the people to be subverted... As Ted Kenney's daughter (who is/was an electorate) said in an interview: "The electoral college stops tyranny by the masses." That's both a pretty good quote and insight into how the political system thinks. You see, we really shouldn't be given the right to vote because we're not that smart. After all, half of us are below average intelligence (by definition). Do you really want to leave your future up to people who's main source of information comes from sound bites? Besides, even the ones of us who are above average intelligence have no objective source of information but rather must rely on their best guess as to who (the talking heads at CNN and FOX news) is telling the truth AND if what's being reported is actually factual or something feed to them by someone else -- remember Ted Turner was married to Hanoi Jane at one time -- you don't think she had his ear? The bottom line is we don't know zip about anything other than our quality of life. And, if you're not happy with *your* quality of life, then remember there are two parties who are responsible -- not one. We elected people (both right and left) to improve things, not fight among themselves, blame the other side, and not get anything done, other than pick up their paychecks, have us pay for the heath insurance and secure their outrageous retirements -- side note: Did you know they don't even pay into our Social Security System? That's like the Pentagon talking our tax money and buying overseas fuel tankers. Where do we get these bozo's? And why do they think they can get away with such actions? So when you see politicians pointing at everyone else for blame, then fire all of them and don't get caught up in the blame-game because it's designed to keep both parties in power regardless of how ineffective they are. A quote I saw hanging on the wall of a double-wide said "Fire the bastards!" -- it makes sense to me. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From sbeam at onsetcorps.net Thu Aug 28 11:33:38 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 28 Aug 2008 11:33:38 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: Message-ID: <200808281133.38634.sbeam@onsetcorps.net> OK this is pure politics, not even computer related much less PHP. But... there seems to be a lot of anti-federalist viewpoints on this list, I can't keep my mouth shut :) There are some good arguments for the EC. It was not designed to keep us from having "too much democracy" as some claim. Quite the opposite. http://www.npr.org/templates/story/story.php?storyId=4127863 http://uselectionatlas.org/INFORMATION/INFORMATION/electcollege_procon.php http://www.boston.com/bostonglobe/editorial_opinion/oped/articles/2008/07/16/the_brilliance_of_the_electoral_college/ basically, without it no candidate would ever visit any state except NY, FL and CA. It ensures small rural areas have a meaningful role. It helps save us from "tyranny of the majority" which is where "2 wolves and a sheep vote on what to have for dinner" So a lot of people don't understand it, and 3 times out of 54 a popular vote loser has become president - but elections are not supposed to just be a mere popularity contest anyway. I'll go back to my libertarian message boards now :) Sam On Thursday 28 August 2008 10:25, you wrote: > On Wed, 27 Aug 2008, David Krings wrote: > > And in > > presidential elections all that to elect 100 people that nobody ever > > knows about and who are not bound by the will of the people. > > The electoral college and delegates are the fatal flaw in the system, > allowing for the will of the people to be subverted... From ramons at gmx.net Thu Aug 28 12:50:48 2008 From: ramons at gmx.net (David Krings) Date: Thu, 28 Aug 2008 12:50:48 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808281133.38634.sbeam@onsetcorps.net> References: <200808281133.38634.sbeam@onsetcorps.net> Message-ID: <48B6D768.8080307@gmx.net> sbeam wrote: > So a lot of people don't understand it, and 3 times out of 54 a popular vote > loser has become president - but elections are not supposed to just be a mere > popularity contest anyway. But that is what an election in a democracy is supposed to be. The majority vote determines the winner, which means the popular vote and not the constellation of some electrocal college. Especially not since the rules for allocating the popular vote to the constellation of the members of the EC varies by state. Some have a winner takes it all approach while others follow more closely the will of the people. I understand the benefits of it alright, but I am disturbed by calling this then a democratic process, because it is not. It skews the results and gives some rural vote more weight. That doesn't follow the one person one vote idea, which doesn't even apply with the EC in the middle. There is nothing that mandates that the EC members of one state have to follow the majority decision of the voters. So if 80% in state A vote for candidate 1 the EC members of that state can all vote for candidate 2. How is this a fair and democratic process? It is like me hiring you to do my work, but not givinh you any of my salary - or commonly known as scam. I agree that the cases where the EC member(s) voted differently than expected are not that many, but just having this possibility designed into the system is a major flaw. And that is why many people who do well understand the process don't understand why a country like the USA still employ such a process that may have made sense 200 years ago. I guess it is kept in place as it is much easier to bribe only a bunch of people than the whole population. David From randalrust at gmail.com Thu Aug 28 13:01:52 2008 From: randalrust at gmail.com (Randal Rust) Date: Thu, 28 Aug 2008 13:01:52 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B6D768.8080307@gmx.net> References: <200808281133.38634.sbeam@onsetcorps.net> <48B6D768.8080307@gmx.net> Message-ID: On Thu, Aug 28, 2008 at 12:50 PM, David Krings wrote: > But that is what an election in a democracy is supposed to be. I wouldn't have jumped in on this, except that I am nearly finished with reading McCullough's "John Adams" and that simply is not the case. The U.S. government is not a democracy [1], never has been. It's a republic [2]. This is spelled out in Article IV, Section 4 of the Constitution. The Founding Fathers were not only concerned about *mob rule* but also having the will of a monarch imposed. They tried to find a balance and they used previous and existing governmental models as the basis for the Constitution. They also didn't want the rich to rule the poor, or the poor to rule the rich. The system is meant to counter-balance things, and sometimes one faction gains the upper hand and in other matters they lose out. It is not a *what is good for the few is good for the many* system of government, nor the other way around. Whether or not the act of voting is *democratic* or not, I don't know. Never really thought about it. But the U.S. is a republic, not a democracy. I'll go back to coding now:) [1] http://www.constitution.org/constit_.htm [2] http://en.wikipedia.org/wiki/Republic -- Randal Rust R.Squared Communications www.r2communications.com From smanes at magpie.com Thu Aug 28 13:21:36 2008 From: smanes at magpie.com (Steve Manes) Date: Thu, 28 Aug 2008 13:21:36 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808281133.38634.sbeam@onsetcorps.net> References: <200808281133.38634.sbeam@onsetcorps.net> Message-ID: <48B6DEA0.8070609@magpie.com> sbeam wrote: > basically, without it no candidate would ever visit any state except NY, FL > and CA. It ensures small rural areas have a meaningful role. It helps save us > from "tyranny of the majority" which is where "2 wolves and a sheep vote on > what to have for dinner" Except that in the reverse scenario the wolf dies of starvation. The two problems with the electoral college are (1) the "winner take all" format that every state except Maine and Nebraska have adopted and (2) the districting that makes the voters of Brooklyn, NY worth less than half that of the voters of Wyoming. The latter has broader implications than just the EC though. The 10 smallest states collectively have 32 electoral votes, or 6% of the EC total, even though their total populations have one million less people than that of NYC. Is it any wonder why NYC gets shafted on federal revenue sharing and why we can't get the federal money to replace the decrepit Gowanus Expy with a badly needed tunnel while Alaska gets hundreds of millions to build a new bridge to nowhere? From sbeam at onsetcorps.net Thu Aug 28 13:25:37 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 28 Aug 2008 13:25:37 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B6D768.8080307@gmx.net> References: <200808281133.38634.sbeam@onsetcorps.net> <48B6D768.8080307@gmx.net> Message-ID: <200808281325.37653.sbeam@onsetcorps.net> On Thursday 28 August 2008 12:50, David Krings wrote: > But that is what an election in a democracy is supposed to be. Not quite that simple in practice. > The majority > vote determines the winner, which means the popular vote and not the > constellation of some electrocal college. Here is the thing. We do not have *a* presidential election in this country every 4 years. We have *50* simultaneous presidential elections every four years, each weighted according to population. The winner of the most of those contests wins. Imagine a hypothetical World Series. GAME 1 2 3 4 5 TEAM A 1 1 1 12 1 TEAM B 2 2 3 0 2 Team A got 16 total runs in the series. Team B only had 9. So which team wins the series? Which is the "better" team? It's about electing the candidate with the most broad-based support across party lines, rural/urban, poor/rich, coastal/heartland, etc. etc etc. Not mere popularity. Because that is fine for the wolves, but why would a sheep decide to join such a union? Why would anyone whose interests aligned with less than 51%? They wouldn't, therefore democracy by simple majority will not last, it will end in violence. The framers understood this. "It was also peculiarly desirable to afford as little opportunity as possible to tumult and disorder. This evil was not least to be dreaded in the election of a magistrate, who was to have so important an agency in the administration of the government as the President of the United States. But the precautions which have been so happily concerted in the system under consideration, promise an effectual security against this mischief. The choice of several, to form an intermediate body of electors, will be much less apt to convulse the community with any extraordinary or violent movements, than the choice of one who was himself to be the final object of the public wishes." http://federali.st/68 > Especially not since the rules > for allocating the popular vote to the constellation of the members of the > EC varies by state. Some have a winner takes it all approach while others > follow more closely the will of the people. I think you are thinking of party primaries. The EC is implemented by the the 12th amendment, so it is the same for all states. This debate has been going on for over 221 years, I don't want to beat the horse any more. I suggest a thorough reading of this page and all comments: http://www.deanesmay.com/archives/005634.html# As well as the Federalist Papers and the US Constitution itself. From ka at kacomputerconsulting.com Thu Aug 28 13:31:13 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 28 Aug 2008 10:31:13 -0700 Subject: [nycphp-talk] [OT] Voting Message-ID: <1219944673.26784@coral.he.net> As originally conceived, the United States of America was not a "democracy" but a "Constitutional republic". School kids today are taught that these two things are the same, but in fact, they are not. In a Constitutional Republic, the popular vote, or any executive of any governmental branch alone, cannot supersede the Constitution and the rights granted therein. Only an Amendment to the Constitution can have this power, and that was never something that was meant to be "voted on" in a "general democratic election" where 51% of people could exercise a "tyranny of the majority" over the other hapless 49%. [I, personally, would not feel at all comfortable living in a true "democracy" where at least 80% of the population were, by any standards, borderline illiterate and completely uninformed about reality. The governmental form we now have, which is essentially an oligarchy where the "globalists" dictate policy and we have this farce of a "two party system" we can "vote for", at least has the benefit of being completely unaffected by the "popular vote".] I belong to a hereditary historical/patriotic society and we are asked to swear to uphold the Constitution of the United States of America -- NOT the "elected government" of the United States of America, who themselves, in the present day, are not upholding the Constitution and the rights granted therein, and in fact from a strictly Constitutional standpoint are probably illegitimate. -- Kristina > sbeam wrote: > > So a lot of people don't understand it, and 3 times out of 54 a popular vote > > loser has become president - but elections are not supposed to just be a mere > > popularity contest anyway. > > But that is what an election in a democracy is supposed to be. The majority > vote determines the winner, which means the popular vote and not the > constellation of some electrocal college. Especially not since the rules for > allocating the popular vote to the constellation of the members of the EC > varies by state. Some have a winner takes it all approach while others follow > more closely the will of the people. > > I understand the benefits of it alright, but I am disturbed by calling this > then a democratic process, because it is not. It skews the results and gives > some rural vote more weight. That doesn't follow the one person one vote idea, > which doesn't even apply with the EC in the middle. There is nothing that > mandates that the EC members of one state have to follow the majority decision > of the voters. So if 80% in state A vote for candidate 1 the EC members of > that state can all vote for candidate 2. How is this a fair and democratic > process? It is like me hiring you to do my work, but not givinh you any of my > salary - or commonly known as scam. > I agree that the cases where the EC member(s) voted differently than expected > are not that many, but just having this possibility designed into the system > is a major flaw. And that is why many people who do well understand the > process don't understand why a country like the USA still employ such a > process that may have made sense 200 years ago. I guess it is kept in place as > it is much easier to bribe only a bunch of people than the whole population. > > David > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From sbeam at onsetcorps.net Thu Aug 28 14:44:49 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 28 Aug 2008 14:44:49 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808281325.37653.sbeam@onsetcorps.net> References: <48B6D768.8080307@gmx.net> <200808281325.37653.sbeam@onsetcorps.net> Message-ID: <200808281444.49913.sbeam@onsetcorps.net> On Thursday 28 August 2008 13:25, sbeam wrote: > > Especially not since the rules > > for allocating the popular vote to the constellation of the members of > > the EC varies by state. Some have a winner takes it all approach while > > others follow more closely the will of the people. > > I think you are thinking of party primaries. The EC is implemented by the > the 12th amendment, so it is the same for all states. Sorry - on second reading, you are right - the states do determine how to allocate electors, but the process afterwards is uniform. And to be clear, the EC is definitely anachronistic in design and could be much improved and streamlined. My only point is that it doesn't necessarily "subvert the will of the people" as someone said. But in any case it's a moot point, it won't be changed. By all means put your support into National Popular Vote compact if you disagree with it. But it's not the evil it is made out to be. http://www.nationalpopularvote.com/pages/misc/888wordcompact.php From ramons at gmx.net Thu Aug 28 17:17:56 2008 From: ramons at gmx.net (David Krings) Date: Thu, 28 Aug 2008 17:17:56 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <1219944673.26784@coral.he.net> References: <1219944673.26784@coral.he.net> Message-ID: <48B71604.7030601@gmx.net> Kristina Anderson wrote: > As originally conceived, the United States of America was not > a "democracy" but a "Constitutional republic". School kids today are > taught that these two things are the same, but in fact, they are not. Not only that, figures of the public always tout the USA as "the biggest democracy in the world" and ongoing foreign policy is to spread democracy to the world. How can that be when the USA is not even a democracy itself?? Besides that, nations like France, Germany and many others are republics, but also are democracies defined by their constitutions. I think that "republic" is a state form, whereas "democracy" is the form of government. Look at Great Britain, Australia, or Canada, they have the state form of monarchy, but are also democracies. That said, I don't think that a democarcy cannot be a republic, or better to say just because the USA is a republic it is not a democracy. Furthermore, the USA is more a federation of states, which makes a difference as the states here have way more autonomy and independence than for example the states of Germany or the regions and departments in France. > In a Constitutional Republic, the popular vote, or any executive of > any governmental branch alone, cannot supersede the Constitution and > the rights granted therein. Only an Amendment to the Constitution can > have this power, and that was never something that was meant to > be "voted on" in a "general democratic election" where 51% of people > could exercise a "tyranny of the majority" over the other hapless > 49%. That is a convention, but not a mandate. The majority of people can still produce a change to the constitution by electing the members of parliament. And directly voting over any law is not what defines a democracy, although I cannot think of any place other than the USA and its states where popular vote is often used for deciding what becomes law or not. Just look at the many ballot measures that are added in local, regional, and state elections. Everyone votes about gay and women rights, a yes or no about offshore drilling, and many other measures and laws. In regards to the tryranny, I rather have a tyranny of a majority than a tyranny of select few. Besides that, the vast majority of elections in the USA are popular votes. I think there is no EC process for any public office other than that of the president. > [I, personally, would not feel at all comfortable living in a > true "democracy" where at least 80% of the population were, by any > standards, borderline illiterate and completely uninformed about > reality. The governmental form we now have, which is essentially an > oligarchy where the "globalists" dictate policy and we have this farce > of a "two party system" we can "vote for", at least has the benefit of > being completely unaffected by the "popular vote".] I agree with the facts put forward, but draw different conclusions. The poeple are held dumb intentionally, because dumb people rather watch football or wrestling than to ask critical questions. IMHO the right conclusion would be to smarten up people not to dumb down the form of government that enables illiterate criminals to hold public office. I think the two party system is a distinct weakness. Although there are the various fractions and wings within each party, if it comes down to it there is no "option C". It all gets reduced to a "with us or against us", which just doesn't work. Things are way too complex than to scale them down always to yes and no questions. Life is not binary. > I belong to a hereditary historical/patriotic society and we are asked > to swear to uphold the Constitution of the United States of America -- > NOT the "elected government" of the United States of America, who > themselves, in the present day, are not upholding the Constitution and > the rights granted therein, and in fact from a strictly Constitutional > standpoint are probably illegitimate. So, now I need to ask the question that makes me wonder for years. Why the heck did that government then get re-elected? From mitch.pirtle at gmail.com Thu Aug 28 17:19:45 2008 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 28 Aug 2008 17:19:45 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B71604.7030601@gmx.net> References: <1219944673.26784@coral.he.net> <48B71604.7030601@gmx.net> Message-ID: <330532b60808281419y3812b24es5eaeaa9aac4cbe23@mail.gmail.com> Would you guys cut it out? I'm all worked up and can't get any decent coding done! hehe -- Mitch, all worked up and spewing garbage in PDT From ajai at bitblit.net Thu Aug 28 22:36:21 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 28 Aug 2008 22:36:21 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: Message-ID: On Thu, 28 Aug 2008, tedd wrote: > You see, we really shouldn't be given the right to vote because we're > not that smart. After all, half of us are below average intelligence > (by definition). Do you really want to leave your future up to people > who's main source of information comes from sound bites? Then dont talk about the will of the people. Dont mention one man one vote. People just stop talking how 'great' this democracy is. > Besides, even the ones of us who are above average intelligence have > no objective source of information but rather must rely on their best > guess as to who (the talking heads at CNN and FOX news) is telling > the truth AND if what's being reported is actually factual or > something feed to them by someone else -- remember Ted Turner was > married to Hanoi Jane at one time -- you don't think she had his ear? I get my news from overseas. The Internet makes this pretty easy. > The bottom line is we don't know zip about anything other than our > quality of life. And, if you're not happy with *your* quality of > life, then remember there are two parties who are responsible -- not > one. We elected people (both right and left) to improve things, not > fight among themselves, blame the other side, and not get anything > done, other than pick up their paychecks, have us pay for the heath > insurance and secure their outrageous retirements We all have our differences but the abyssmal past 8 years everyone can agree on regardless of your politics. -- Aj. From ajai at bitblit.net Thu Aug 28 22:46:02 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 28 Aug 2008 22:46:02 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808281444.49913.sbeam@onsetcorps.net> Message-ID: On Thu, 28 Aug 2008, sbeam wrote: > But in any case it's a moot point, it won't be changed. By all means put your > support into National Popular Vote compact if you disagree with it. But it's > not the evil it is made out to be. Actually, if you remove the whole concept of states from the voting process, and have an absolute national count, you dont need the EC. State results are too coarse-grained to represent people... -- Aj. From ajai at bitblit.net Thu Aug 28 23:01:07 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 28 Aug 2008 23:01:07 -0400 (EDT) Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B71604.7030601@gmx.net> Message-ID: On Thu, 28 Aug 2008, David Krings wrote: > And directly voting over any law is not what defines a democracy, although I > cannot think of any place other than the USA and its states where popular vote > is often used for deciding what becomes law or not. Huh? Most parliamentary systems involve voting on legislation, for example, just like here, laws have to pass through two houses inthe UK before they become law. In some ways its worse here because for example, you dont have national referendums on important national issues. So one could say that people have less say in the decision making process in this country than many others. Parliamentary debate means having to stand up and face your critics and opponents. You just dont have that in this country - King Bush doesn't have to answer to anyone. Did I say king? Oops... I guess it feels more like a monarchy to me. -- Aj. From randalrust at gmail.com Fri Aug 29 00:09:12 2008 From: randalrust at gmail.com (Randal Rust) Date: Fri, 29 Aug 2008 00:09:12 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: <48B71604.7030601@gmx.net> Message-ID: On Thu, Aug 28, 2008 at 11:01 PM, Ajai Khattri wrote: > Parliamentary debate means having to stand up and face your critics and > opponents. You just dont have that in this country - King Bush OK, can someone put a stop to this? This has gone well beyond OT, and way off of the original topic, which I believe was something to the effect of why can't we develop a reliable voting system. -- Randal Rust R.Squared Communications www.r2communications.com From bzcoder at bzcode.com Fri Aug 29 10:09:39 2008 From: bzcoder at bzcode.com (bzcoder) Date: Fri, 29 Aug 2008 10:09:39 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: References: <48B71604.7030601@gmx.net> Message-ID: <48B80323.8030001@bzcode.com> Randal Rust wrote: > On Thu, Aug 28, 2008 at 11:01 PM, Ajai Khattri wrote: > > >> Parliamentary debate means having to stand up and face your critics and >> opponents. You just dont have that in this country - King Bush >> > > OK, can someone put a stop to this? This has gone well beyond OT, and > way off of the original topic, which I believe was something to the > effect of why can't we develop a reliable voting system. > > But this thread was a perfect example. Someone asked why and it derailed into 50 thousand conversations, none of which have anything to do with PHP. So, to bring it back to PHP, what is your preferred method for counting votes on the internet when you allow non registered/anonymous users to vote? 1 IP 1 Vote? 1 Vote = 1 Cookie so you can't vote again? Collect and confirm email address to vote? Create a browser/ip/cookie thumbprint of the voter and assign metrics to determine "same person" to avoid duplicate votes? From chsnyder at gmail.com Fri Aug 29 10:39:15 2008 From: chsnyder at gmail.com (csnyder) Date: Fri, 29 Aug 2008 10:39:15 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B80323.8030001@bzcode.com> References: <48B71604.7030601@gmx.net> <48B80323.8030001@bzcode.com> Message-ID: On Fri, Aug 29, 2008 at 10:09 AM, bzcoder wrote: > Randal Rust wrote: > > So, to bring it back to PHP, what is your preferred method for counting > votes on the internet when you allow non registered/anonymous users to vote? > > 1 IP 1 Vote? > 1 Vote = 1 Cookie so you can't vote again? > Collect and confirm email address to vote? > Create a browser/ip/cookie thumbprint of the voter and assign metrics to > determine "same person" to avoid duplicate votes? Write an XSS script that gives all votes to Rasmus Lerdorf. ... Profit! From sbeam at onsetcorps.net Fri Aug 29 10:49:48 2008 From: sbeam at onsetcorps.net (sbeam) Date: Fri, 29 Aug 2008 10:49:48 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <48B80323.8030001@bzcode.com> References: <48B71604.7030601@gmx.net> <48B80323.8030001@bzcode.com> Message-ID: <200808291049.48921.sbeam@onsetcorps.net> On Friday 29 August 2008 10:09, bzcoder wrote: > 1 IP 1 Vote? > 1 Vote = 1 Cookie so you can't vote again? > Collect and confirm email address to vote? > Create a browser/ip/cookie thumbprint of the voter and assign metrics to > determine "same person" to avoid duplicate votes? I use an animated GIF and javascript to read certain electromagnetic fluctuation patterns off the monitor screen, effectively creating a retinal scan of each voter which is then embedded steganographically in the request headers. We can also measure pupil diameter and blood flow in the scleral capillaries to determine the emotional state of the user. Really helps reduce shopping cart abandonment since you can tell when they are really ready to buy big. Oh and I make sure DHS gets a copy of all the data, per our little "agreement". I found all the code on PHPClasses, just look for user "Cheney" From david at davidmintz.org Fri Aug 29 12:09:07 2008 From: david at davidmintz.org (David Mintz) Date: Fri, 29 Aug 2008 12:09:07 -0400 Subject: [nycphp-talk] [OT] Voting In-Reply-To: <200808291049.48921.sbeam@onsetcorps.net> References: <48B71604.7030601@gmx.net> <48B80323.8030001@bzcode.com> <200808291049.48921.sbeam@onsetcorps.net> Message-ID: <721f1cc50808290909m5c4bbe00l1741f160f4a68543@mail.gmail.com> On Fri, Aug 29, 2008 at 10:49 AM, sbeam wrote: > On Friday 29 August 2008 10:09, bzcoder wrote: > > 1 IP 1 Vote? > > 1 Vote = 1 Cookie so you can't vote again? > > Collect and confirm email address to vote? > > Create a browser/ip/cookie thumbprint of the voter and assign metrics to > > determine "same person" to avoid duplicate votes? > > I use an animated GIF and javascript to read certain electromagnetic > fluctuation patterns off the monitor screen, effectively creating a retinal > scan of each voter which is then embedded steganographically in the request > headers. > > We can also measure pupil diameter and blood flow in the scleral > capillaries > to determine the emotional state of the user. Really helps reduce shopping > cart abandonment since you can tell when they are really ready to buy big. > > Oh and I make sure DHS gets a copy of all the data, per our > little "agreement". > > I found all the code on PHPClasses, just look for user "Cheney" > and PRESTO! We're not OT anymore. Well done, ladies and gents! -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From willie at pdfsystems.com Fri Aug 29 13:58:27 2008 From: willie at pdfsystems.com (willie klein) Date: Fri, 29 Aug 2008 13:58:27 -0400 Subject: [nycphp-talk] FDF support Message-ID: Hi; Has anyone been successful compiling php 5.2.x with FDF support for PDF documents on linux? I have version 6 of the FDF Toolkit for Unix from Adobe and I've tried -with-tkfdf={path to toolkit}. I have also followed the manual's advice and copied the header and library to /usr/local/lib and /usr/local/include and use -withtkfdf=/usr/local This fails with the message: Checking for FDFOpen in -lFdftk... no Configure: error: no usable fdf library found I'd like to try a different version of the toolkit but can't find any. I've been searching but haven't found anything similar out there. Thanks. William Klein PDF Systems, Inc. 212-967-1870 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Sat Aug 30 09:29:32 2008 From: ken at secdat.com (Kenneth Downs) Date: Sat, 30 Aug 2008 09:29:32 -0400 Subject: [nycphp-talk] FDF support In-Reply-To: References: Message-ID: <48B94B3C.4020701@secdat.com> willie klein wrote: > > Hi; > > > > Has anyone been successful compiling php 5.2.x with FDF support for > PDF documents on linux? > > I have version 6 of the FDF Toolkit for Unix from Adobe and I've tried > --with-tkfdf={path to toolkit}. I have also followed the manual's > advice and copied the header and library to /usr/local/lib and > /usr/local/include and use --withtkfdf=/usr/local This fails with the > message: > > Checking for FDFOpen in --lFdftk... no > > Configure: error: no usable fdf library found > > > > I'd like to try a different version of the toolkit but can't find any. > Willie, for what it's worth I've been using FPDF, http://www.fpdf.org since I began with PHP and have never had any complaints. Its function list does not appear to be quite as extensive as fdf, but it is rock-solid and reliable and well-documented, so in productivity terms I love it. > > > I've been searching but haven't found anything similar out there. > > > > Thanks. > > > > > > William Klein > > PDF Systems, Inc. > > 212-967-1870 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd at sperling.com Sat Aug 30 10:45:55 2008 From: tedd at sperling.com (tedd) Date: Sat, 30 Aug 2008 10:45:55 -0400 Subject: [nycphp-talk] FDF support In-Reply-To: <48B94B3C.4020701@secdat.com> References: <48B94B3C.4020701@secdat.com> Message-ID: At 9:29 AM -0400 8/30/08, Kenneth Downs wrote: >> >Willie, for what it's worth I've been using FPDF, >http://www.fpdf.org since I began with PHP and >have never had any complaints. Its function list does not appear to >be quite as extensive as fdf, but it is rock-solid and reliable and >well-documented, so in productivity terms I love it. I second that recommendation -- it works great for me -- here's an example: http://webbytedd.com/bb/pdf/ Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com