From consult at covenantedesign.com Thu May 1 09:02:05 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 09:02:05 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <721f1cc50804251212n3dff64ffg355e4f75f89d736@mail.gmail.com> References: <721f1cc50804250707h347dc48ct27afd74982530cf0@mail.gmail.com> <48121C5A.5050409@covenantedesign.com> <721f1cc50804251212n3dff64ffg355e4f75f89d736@mail.gmail.com> Message-ID: <4819BF4D.9090907@covenantedesign.com> David, I'm sorry I had only given you an enterprise resource (although you can run BlueDragon with localhost access only for free). Here is a fantastic community resource, that will allow you to really stress test that CF app: http://www.railo-technologies.com/en/index.cfm?treeID=149 Some Javaheads like me think that this is even better than BlueDragon. Although I'm still a huge fan of CF8, as it has introduced inherent PHP and Ruby support: http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_PHP -Ed David Mintz wrote: > How about the non-free closed-sourcedness, or is it? I prefer > something I can download and run on my own pc if I please -- IOW I'd > like to be able to run a replica of the live CF site without paying > anyone any money. The article on wikipedia said you could > "theoretically" run your CF app with an app server like Tomcat. With > something like MySQL/PHP you can way more than "theoretically" run a > copy of your production site on your own box, both technically and > legally. > > On Fri, Apr 25, 2008 at 2:00 PM, Webmaster > > wrote: > > > Dave, > > I work with Coldfusion day-in and day-out. It is a fantastic > language that can get a lot of things done quickly. It's powerful, > versatile and has an easy-enough learning curve. Don't listen to > anyone who just says 'PHP is better', or, 'If you're starting from > scratch, start with PHP', any evaluation to that degree is coming > from someone who has little to no experience with C vs. Java. (Yes > originally CF was written in C, but in much wisdom they moved to > Java). > > I am very well versed in CF and would be more than happy to answer > any of your questions off list David. > > -Ed > Me at EdwardPrevost.info > > > > Flame me for starting this, I know it might get religious. > But: an organization of which I am a member is evaluating > proposals to rebuild its website. One of those proposals is > from some folks who apparently are partial to ColdFusion. All > I know about CF is what I just picked up from skimming > http://en.wikipedia.org/wiki/ColdFusion. Recognizing my bias > towards languages that I speak, I try to keep an open mind. I > am interested in hearing what you guys think about CF. I know > I can expect a PHPish bias in this forum but I also know there > are a lot of independent-minded, non-dogmatic, clear-headed, > breath-takingly wise and knowledgeable... have I flattered you > enough yet? > > -- > David Mintz > http://davidmintz.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 > > > > > -- > 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 From david at davidmintz.org Thu May 1 10:31:06 2008 From: david at davidmintz.org (David Mintz) Date: Thu, 1 May 2008 10:31:06 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <4819BF4D.9090907@covenantedesign.com> References: <721f1cc50804250707h347dc48ct27afd74982530cf0@mail.gmail.com> <48121C5A.5050409@covenantedesign.com> <721f1cc50804251212n3dff64ffg355e4f75f89d736@mail.gmail.com> <4819BF4D.9090907@covenantedesign.com> Message-ID: <721f1cc50805010731q557d0c1ai22722b01726402cc@mail.gmail.com> On Thu, May 1, 2008 at 9:02 AM, Webmaster wrote: > > Although I'm still a huge fan of CF8, as it has introduced inherent PHP > and Ruby support: > http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_PHP Fascinating. You thought tag soup was fun, now you can have multi-lingual tag soup! -- 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 ka at kacomputerconsulting.com Thu May 1 11:31:26 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 08:31:26 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209655886.26359@coral.he.net> Pardon me for saying this, but there must be a reason why PHP has so much more of a "market share", when it comes to picking a platform/language for web development, than does Cold Fusion? ... Not sure what the exact percentages are or why PHP is so much more widely used, but the situation is what it is. -- Kristina > David, > > I'm sorry I had only given you an enterprise resource (although you can > run BlueDragon with localhost access only for free). Here is a fantastic > community resource, that will allow you to really stress test that CF > app: http://www.railo-technologies.com/en/index.cfm?treeID=149 > Some Javaheads like me think that this is even better than BlueDragon. > > Although I'm still a huge fan of CF8, as it has introduced inherent PHP > and Ruby support: > http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_runn ing_PHP > > -Ed > > > David Mintz wrote: > > How about the non-free closed-sourcedness, or is it? I prefer > > something I can download and run on my own pc if I please -- IOW I'd > > like to be able to run a replica of the live CF site without paying > > anyone any money. The article on wikipedia said you could > > "theoretically" run your CF app with an app server like Tomcat. With > > something like MySQL/PHP you can way more than "theoretically" run a > > copy of your production site on your own box, both technically and > > legally. > > > > On Fri, Apr 25, 2008 at 2:00 PM, Webmaster > > > wrote: > > > > > > Dave, > > > > I work with Coldfusion day-in and day-out. It is a fantastic > > language that can get a lot of things done quickly. It's powerful, > > versatile and has an easy-enough learning curve. Don't listen to > > anyone who just says 'PHP is better', or, 'If you're starting from > > scratch, start with PHP', any evaluation to that degree is coming > > from someone who has little to no experience with C vs. Java. (Yes > > originally CF was written in C, but in much wisdom they moved to > > Java). > > > > I am very well versed in CF and would be more than happy to answer > > any of your questions off list David. > > > > -Ed > > Me at EdwardPrevost.info > > > > > > > > Flame me for starting this, I know it might get religious. > > But: an organization of which I am a member is evaluating > > proposals to rebuild its website. One of those proposals is > > from some folks who apparently are partial to ColdFusion. All > > I know about CF is what I just picked up from skimming > > http://en.wikipedia.org/wiki/ColdFusion. Recognizing my bias > > towards languages that I speak, I try to keep an open mind. I > > am interested in hearing what you guys think about CF. I know > > I can expect a PHPish bias in this forum but I also know there > > are a lot of independent-minded, non-dogmatic, clear-headed, > > breath-takingly wise and knowledgeable... have I flattered you > > enough yet? > > > > -- > > David Mintz > > http://davidmintz.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 > > > > > > > > > > -- > > 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 > > _______________________________________________ > 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 Thu May 1 11:57:50 2008 From: ioplex at gmail.com (Michael B Allen) Date: Thu, 1 May 2008 11:57:50 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <721f1cc50804250707h347dc48ct27afd74982530cf0@mail.gmail.com> References: <721f1cc50804250707h347dc48ct27afd74982530cf0@mail.gmail.com> Message-ID: <78c6bd860805010857q761daffci99c5eb83948c2748@mail.gmail.com> On Fri, Apr 25, 2008 at 10:07 AM, David Mintz wrote: > Flame me for starting this, I know it might get religious. But: an > organization of which I am a member is evaluating proposals to rebuild its > website. One of those proposals is from some folks who apparently are > partial to ColdFusion. All I know about CF is what I just picked up from > skimming http://en.wikipedia.org/wiki/ColdFusion. Recognizing my bias > towards languages that I speak, I try to keep an open mind. I am interested > in hearing what you guys think about CF. I know I can expect a PHPish bias > in this forum but I also know there are a lot of independent-minded, > non-dogmatic, clear-headed, breath-takingly wise and knowledgeable... have I > flattered you enough yet? I don't know anything about CF but I know it's still considered to be a good product. So if there's no overwhelming technical reason to choose one language over the other, I'm partial to the idea that you should use what your personnel are good at. So if you think one team has better cred and skills, I would go with them. Just make sure you ask some technical questions and don't get duped if their skills are going to be the tie breaker. There area lot of smooth talkers out there. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From nynj.tech at hotmail.com Thu May 1 11:59:28 2008 From: nynj.tech at hotmail.com (chad qian) Date: Thu, 1 May 2008 11:59:28 -0400 Subject: [nycphp-talk] A question about run php variable in javascript Message-ID: I need to run php to get street from mysql database.Then test the street variable in javascriptif street is emty,javascript will pop up alert window Here are my thoughts: Can I run st= in javascript?I'm not sure here. Thanks! chad _________________________________________________________________ In a rush? Get real-time answers with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From consult at covenantedesign.com Thu May 1 12:08:21 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 12:08:21 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <1209655886.26359@coral.he.net> References: <1209655886.26359@coral.he.net> Message-ID: <4819EAF5.4040706@covenantedesign.com> Kristina, If you're not sure what the market share is, why even comment; again, I'm concerned by your lack of scholarship; but you're pardoned. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://lui.arbingersys.com/index.html Keep in mind that the TIOBE index is based on several assumptions, which i think are erroneous: http://blog.timbunce.org/2008/04/12/tiobe-or-not-tiobe-lies-damned-lies-and-statistics/ Keep in mind that Coldfusion is JAVA, and results from the above indexes could very well be overlapping. Whatever-the-case, there is no real measure of current 'market share' done in a formalized (going to each shop, in a standard way, and asking what they use) and complete (not leaving-out Government and Healthcare facilities) fashion. Although it seems there is more 'content' and information revolving around the string 'PHP' (and/or 'PHP Programming') It's most likely due to the fact that PHP is OpenSource. So the 'market share' you may be personally perceiving is most likely rooted to an abundance of documentation/information, and not actual lines of code/real-world usage; hence not an actual measure of true market share. -Ed Kristina Anderson wrote: > Pardon me for saying this, but there must be a reason why PHP has so > much more of a "market share", when it comes to picking a > platform/language for web development, than does Cold Fusion? ... > > Not sure what the exact percentages are or why PHP is so much more > widely used, but the situation is what it is. > > -- Kristina > > >> David, >> >> I'm sorry I had only given you an enterprise resource (although you >> > can > >> run BlueDragon with localhost access only for free). Here is a >> > fantastic > >> community resource, that will allow you to really stress test that CF >> app: http://www.railo-technologies.com/en/index.cfm?treeID=149 >> Some Javaheads like me think that this is even better than BlueDragon. >> >> Although I'm still a huge fan of CF8, as it has introduced inherent >> > PHP > >> and Ruby support: >> >> > http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_runn > ing_PHP > >> -Ed >> >> >> David Mintz wrote: >> >>> How about the non-free closed-sourcedness, or is it? I prefer >>> something I can download and run on my own pc if I please -- IOW >>> > I'd > >>> like to be able to run a replica of the live CF site without paying >>> anyone any money. The article on wikipedia said you could >>> "theoretically" run your CF app with an app server like Tomcat. >>> > With > >>> something like MySQL/PHP you can way more than "theoretically" run >>> > a > >>> copy of your production site on your own box, both technically and >>> legally. >>> >>> On Fri, Apr 25, 2008 at 2:00 PM, Webmaster >>> > >>> > wrote: > >>> Dave, >>> >>> I work with Coldfusion day-in and day-out. It is a fantastic >>> language that can get a lot of things done quickly. It's >>> > powerful, > >>> versatile and has an easy-enough learning curve. Don't listen to >>> anyone who just says 'PHP is better', or, 'If you're starting >>> > from > >>> scratch, start with PHP', any evaluation to that degree is >>> > coming > >>> from someone who has little to no experience with C vs. Java. >>> > (Yes > >>> originally CF was written in C, but in much wisdom they moved to >>> Java). >>> >>> I am very well versed in CF and would be more than happy to >>> > answer > >>> any of your questions off list David. >>> >>> -Ed >>> Me at EdwardPrevost.info >>> >>> >>> >>> Flame me for starting this, I know it might get religious. >>> But: an organization of which I am a member is evaluating >>> proposals to rebuild its website. One of those proposals is >>> from some folks who apparently are partial to ColdFusion. >>> > All > >>> I know about CF is what I just picked up from skimming >>> http://en.wikipedia.org/wiki/ColdFusion. Recognizing my bias >>> towards languages that I speak, I try to keep an open mind. >>> > I > >>> am interested in hearing what you guys think about CF. I >>> > know > >>> I can expect a PHPish bias in this forum but I also know >>> > there > >>> are a lot of independent-minded, non-dogmatic, clear-headed, >>> breath-takingly wise and knowledgeable... have I flattered >>> > you > >>> enough yet? >>> >>> -- >>> David Mintz >>> http://davidmintz.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 >>> >>> >>> >>> >>> -- >>> 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 >>> >> _______________________________________________ >> 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 tomsartain at gmail.com Thu May 1 12:16:17 2008 From: tomsartain at gmail.com (Tom Sartain) Date: Thu, 1 May 2008 12:16:17 -0400 Subject: [nycphp-talk] rounding time values to the nearest hour In-Reply-To: <48189F5E.80703@polymerdb.org> References: <481761B5.20504@polymerdb.org> <8f0676b40804291115qeea1c2cq3371138cf7c2b029@mail.gmail.com> <48189F5E.80703@polymerdb.org> Message-ID: <20190d950805010916ha4bcb98w206579dcb5d20cd7@mail.gmail.com> If you're grouping results from MySQL, you should definitely look into using the built in MySQL date/time functions first. The database will pretty much always be better at grouping, filtering and organizing your data than code would be. The date function page is here: http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html But since you're not grouping by hours on the hour, but hours on the half hour, I'd suggest writing a MySQL function to do that grouping for you, then call that in your query. More info on functions: http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html You might actually be able to search out some functions that others have written that do similar things, since it doesn't seem like you're trying to do something that nobody else has ever done. -Tom On Wed, Apr 30, 2008 at 12:33 PM, Allen Shaw wrote: > John Campbell wrote: > > > round(seconds / 3600) > > e.g. > > > > ROUND(TIME_TO_SEC('00:39:38')/3600) ; > > > Should have thought of converting to seconds... doh! Thanks John and > Brent. > - A. > > -- > Allen Shaw > slidePresenter (http://slides.sourceforge.net) > > _______________________________________________ > 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 jcampbell1 at gmail.com Thu May 1 12:18:20 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Thu, 1 May 2008 12:18:20 -0400 Subject: [nycphp-talk] A question about run php variable in javascript In-Reply-To: References: Message-ID: <8f0676b40805010918o3f55b5e7nc886fa0c7800a594@mail.gmail.com> On Thu, May 1, 2008 at 11:59 AM, chad qian wrote: > > I need to run php to get street from mysql database. > Then test the street variable in javascript > if street is emty,javascript will pop up alert window > > Here are my thoughts: > > //connection to server,database > > $q = "select street from apt where username = '$user'"; > $result = mysql_query($q) or die(mysql_error()); > while($row = mysql_fetch_array($result)){ > $street=$row['street']; > } > ?> > > > Can I run st= in javascript?I'm not sure here. Almost... that will produce the following: st=123 abcd ave; what you want is var st = '123 abcd ave'; if(st === '') alert("miss street"); You also need to take care of escaping issues: what if the street name is O'henry st? then you would have var st = '123 O'henry st'; // invalid javascript. I always use JSON to send data to javascript because it automatically handles escaping and is much more flexible. If you are not familiar with JSON, it'll be worth your while to do a bit of reading. Regards, John Campbell From ka at kacomputerconsulting.com Thu May 1 13:29:16 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 10:29:16 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209662956.30403@coral.he.net> Ed -- My comment was solely intended to offer the theory that there is a reason why PHP has so much more of a market share overall than does Cold Fusion -- whatever that reason might be, and to solicit comments therein from the other people who post to this list as to what that reason may be. My impression on the much larger market share is primarily based on the fact that there are a lot more people looking to hire PHP programmers than there people looking to hire Cold Fusion programmers. Therefore, more companies must be using PHP. [Not only do I have 12 years as a consultant (with the concommitant huge volume of time perusing job postings and answering RFPs), but I have 3 years as a recruiter/account manager in the tech field and an abundant knowledge of the job market in tech, and who is looking for what, what companies are using what platforms, and etc. -- is this data not "relevant" or "scholarly" enough for your taste?] With all due respect, Kristina > Kristina, > > If you're not sure what the market share is, why even comment; again, > I'm concerned by your lack of scholarship; but you're pardoned. > > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html > > http://lui.arbingersys.com/index.html > > Keep in mind that the TIOBE index is based on several assumptions, which > i think are erroneous: > http://blog.timbunce.org/2008/04/12/tiobe-or-not-tiobe-lies-damned- lies-and-statistics/ > > Keep in mind that Coldfusion is JAVA, and results from the above indexes > could very well be overlapping. Whatever-the-case, there is no real > measure of current 'market share' done in a formalized (going to each > shop, in a standard way, and asking what they use) and complete (not > leaving-out Government and Healthcare facilities) fashion. > > Although it seems there is more 'content' and information revolving > around the string 'PHP' (and/or 'PHP Programming') > It's most likely due to the fact that PHP is OpenSource. So the 'market > share' you may be personally perceiving is most likely rooted to an > abundance of documentation/information, and not actual lines of > code/real-world usage; hence not an actual measure of true market share. > > -Ed > > Kristina Anderson wrote: > > Pardon me for saying this, but there must be a reason why PHP has so > > much more of a "market share", when it comes to picking a > > platform/language for web development, than does Cold Fusion? ... > > > > Not sure what the exact percentages are or why PHP is so much more > > widely used, but the situation is what it is. > > > > -- Kristina > > > > > >> David, > >> > >> I'm sorry I had only given you an enterprise resource (although you > >> > > can > > > >> run BlueDragon with localhost access only for free). Here is a > >> > > fantastic > > > >> community resource, that will allow you to really stress test that CF > >> app: http://www.railo-technologies.com/en/index.cfm?treeID=149 > >> Some Javaheads like me think that this is even better than BlueDragon. > >> > >> Although I'm still a huge fan of CF8, as it has introduced inherent > >> > > PHP > > > >> and Ruby support: > >> > >> > > http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_runn > > ing_PHP > > > >> -Ed > >> > >> > >> David Mintz wrote: > >> > >>> How about the non-free closed-sourcedness, or is it? I prefer > >>> something I can download and run on my own pc if I please -- IOW > >>> > > I'd > > > >>> like to be able to run a replica of the live CF site without paying > >>> anyone any money. The article on wikipedia said you could > >>> "theoretically" run your CF app with an app server like Tomcat. > >>> > > With > > > >>> something like MySQL/PHP you can way more than "theoretically" run > >>> > > a > > > >>> copy of your production site on your own box, both technically and > >>> legally. > >>> > >>> On Fri, Apr 25, 2008 at 2:00 PM, Webmaster > >>> > > >>> > > wrote: > > > >>> Dave, > >>> > >>> I work with Coldfusion day-in and day-out. It is a fantastic > >>> language that can get a lot of things done quickly. It's > >>> > > powerful, > > > >>> versatile and has an easy-enough learning curve. Don't listen to > >>> anyone who just says 'PHP is better', or, 'If you're starting > >>> > > from > > > >>> scratch, start with PHP', any evaluation to that degree is > >>> > > coming > > > >>> from someone who has little to no experience with C vs. Java. > >>> > > (Yes > > > >>> originally CF was written in C, but in much wisdom they moved to > >>> Java). > >>> > >>> I am very well versed in CF and would be more than happy to > >>> > > answer > > > >>> any of your questions off list David. > >>> > >>> -Ed > >>> Me at EdwardPrevost.info > >>> > >>> > >>> > >>> Flame me for starting this, I know it might get religious. > >>> But: an organization of which I am a member is evaluating > >>> proposals to rebuild its website. One of those proposals is > >>> from some folks who apparently are partial to ColdFusion. > >>> > > All > > > >>> I know about CF is what I just picked up from skimming > >>> http://en.wikipedia.org/wiki/ColdFusion. Recognizing my bias > >>> towards languages that I speak, I try to keep an open mind. > >>> > > I > > > >>> am interested in hearing what you guys think about CF. I > >>> > > know > > > >>> I can expect a PHPish bias in this forum but I also know > >>> > > there > > > >>> are a lot of independent-minded, non-dogmatic, clear- headed, > >>> breath-takingly wise and knowledgeable... have I flattered > >>> > > you > > > >>> enough yet? > >>> > >>> -- > >>> David Mintz > >>> http://davidmintz.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 > >>> > >>> > >>> > >>> > >>> -- > >>> 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 > >>> > >> _______________________________________________ > >> 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 consult at covenantedesign.com Thu May 1 14:02:35 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 14:02:35 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <1209662956.30403@coral.he.net> References: <1209662956.30403@coral.he.net> Message-ID: <481A05BB.5080203@covenantedesign.com> Kristina Anderson wrote: > Ed -- > > My comment was solely intended to offer the theory that there is a > reason why PHP has so much more of a market share overall than does > Cold Fusion -- whatever that reason might be, and to solicit comments > therein from the other people who post to this list as to what that > reason may be. > > But you are assuming your conclusion in your premise Kristina. "PHP has so much more of a market share overall than does Cold Fusion" You need to prove that before anyone, including members of this list, can even begin to look for 'the reason'. In other words you can't ask: "Why does PHP have a larger market share than Coldfusion?" Unless you can demonstrate that it does. You may 'feel' that is true, or even 'think' that it is, but that is poor (and emotional) scholarship. Show us some links. Give us some data. Prove that PHP "has so much more of a market share overall", don't just declare it. > My impression on the much larger market share is primarily based on the > fact that there are a lot more people looking to hire PHP programmers > than there people looking to hire Cold Fusion programmers. Therefore, > more companies must be using PHP. > Now that's getting better, but what is your 'impression' based on. It's my impression that I see as many Coldfusion offers floating around as I do PHP. I believe that is most likely because I subscribe to both a PHP and a Coldfusion jobs-list.however, I wouldn't say that I can deduce from that information which language is being used more, and actually holding more of the market. How do you know "there are a lot more people looking to hire PHP programmers"? And what if "a lot more people looking to hire PHP programmers", are doing so because they are migrating FROM it, or translating it? > [Not only do I have 12 years as a consultant (with the concommitant > huge volume of time perusing job postings and answering RFPs), but I > have 3 years as a recruiter/account manager in the tech field and an > abundant knowledge of the job market in tech, and who is looking for > what, what companies are using what platforms, and etc. -- is this data > not "relevant" or "scholarly" enough for your taste?] > Nope. I'm a geek, give me numbers, graphs charts and information, not your opinion alone. > With all due respect, > > Kristina > (My tone is challenging, but I mean no offense Kristina, just looking to spurn you unto defending your assumption. =D) -Ed From anthony at thrillist.com Thu May 1 14:26:00 2008 From: anthony at thrillist.com (anthony wlodarski) Date: Thu, 01 May 2008 14:26:00 -0400 Subject: [nycphp-talk] A question about run php variable in javascript In-Reply-To: References: Message-ID: <481A0B38.8070907@thrillist.com> As long as the PHP occurs before the script it should be just fine. Just got doing a tie in of PHP and Javascript for Google Maps that way. -Anthony -- Anthony Wlodarski PHP/MySQL Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 From bmartin at mac.com Thu May 1 14:40:40 2008 From: bmartin at mac.com (Bruce Martin) Date: Thu, 1 May 2008 14:40:40 -0400 Subject: [nycphp-talk] A question about run php variable in javascript In-Reply-To: References: Message-ID: <8A54CEF4-855E-42F7-A19F-DB8DC1798EAD@mac.com> I ran into this issue too, what I ended up doing was using the XMLHttpRequest in JavaScript to call my PHP script, which after getting the data from the database, it caches the data in an array. so on subsequent call, used in a mouseOver(), it grabs the info from the array. So First my JavaScript runs on mouseOver. It checks the array, if defined then it uses that value, if not then I hit the php code. After that it sets the value of the array to the data I just got and then it's local until they user goes to another page anyway. Bruce Martin The Martin Solution bruce at martinsolution.com On May 1, 2008, at 11:59 AM, chad qian wrote: > I need to run php to get street from mysql database. > Then test the street variable in javascript > if street is emty,javascript will pop up alert window > > Here are my thoughts: > > //connection to server,database > > $q = "select street from apt where username = '$user'"; > $result = mysql_query($q) or die(mysql_error()); > while($row = mysql_fetch_array($result)){ > $street=$row['street']; > } > ?> > > > Can I run st= in javascript?I'm not sure here. > > Thanks! > > chad > > In a rush? Get real-time answers with Windows Live Messenger. > _______________________________________________ > 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 ka at kacomputerconsulting.com Thu May 1 14:46:22 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 11:46:22 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209667582.28451@coral.he.net> Ed, I agree, it would be great if we could find some methodology that could prove beyond a shadow of a doubt on an empirical basis that PHP is a more popular platform than Cold Fusion. I can't adequately defend my contention to your exacting standards at the present moment, because you're right, I don't have the data. But I believe that the data is gatherable and that my theory is valid. So anyone have any ideas how to do that, links, information, empirical studies, etc. etc & etc ... bring 'em on. We could do an empirical analysis of job postings on 10 or so general tech job boards over a time period of a year...? PS Ed, your own link to the TIOBE website showed that they listed Cold Fusion at the bottom of the popularity grid...and PHP was in the top half. But you're saying that you have "problems with their methodology", OK. But you can have problems with any methodology or means of proof, and that in and of itself is an emotional response...based on your beliefs and temperament...and btw there's nothing wrong with that! :=] I mean let's face it, people have "proved beyond doubt" all sorts of things which flat out ain't so, right? -- Kristina > > Kristina Anderson wrote: > > Ed -- > > > > My comment was solely intended to offer the theory that there is a > > reason why PHP has so much more of a market share overall than does > > Cold Fusion -- whatever that reason might be, and to solicit comments > > therein from the other people who post to this list as to what that > > reason may be. > > > > > But you are assuming your conclusion in your premise Kristina. > > "PHP has so much more of a market share overall than does Cold Fusion" > > You need to prove that before anyone, including members of this list, > can even begin to look for 'the reason'. > In other words you can't ask: > "Why does PHP have a larger market share than Coldfusion?" > Unless you can demonstrate that it does. > You may 'feel' that is true, or even 'think' that it is, but that is > poor (and emotional) scholarship. > Show us some links. Give us some data. Prove that PHP "has so much more > of a market share overall", don't just declare it. > > My impression on the much larger market share is primarily based on the > > fact that there are a lot more people looking to hire PHP programmers > > than there people looking to hire Cold Fusion programmers. Therefore, > > more companies must be using PHP. > > > Now that's getting better, but what is your 'impression' based on. > It's my impression that I see as many Coldfusion offers floating around > as I do PHP. > I believe that is most likely because I subscribe to both a PHP and a > Coldfusion jobs-list.however, I wouldn't say that I can deduce from that > information which language is being used more, and actually holding more > of the market. > How do you know "there are a lot more people looking to hire PHP > programmers"? > And what if "a lot more people looking to hire PHP programmers", are > doing so because they are migrating FROM it, or translating it? > > [Not only do I have 12 years as a consultant (with the concommitant > > huge volume of time perusing job postings and answering RFPs), but I > > have 3 years as a recruiter/account manager in the tech field and an > > abundant knowledge of the job market in tech, and who is looking for > > what, what companies are using what platforms, and etc. -- is this data > > not "relevant" or "scholarly" enough for your taste?] > > > Nope. I'm a geek, give me numbers, graphs charts and information, not > your opinion alone. > > With all due respect, > > > > Kristina > > > (My tone is challenging, but I mean no offense Kristina, just looking to > spurn you unto defending your assumption. =D) > -Ed > _______________________________________________ > 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 jostevison at mac.com Thu May 1 14:52:48 2008 From: jostevison at mac.com (jostevison at mac.com) Date: Thu, 1 May 2008 12:52:48 -0600 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <481A05BB.5080203@covenantedesign.com> References: <1209662956.30403@coral.he.net> <481A05BB.5080203@covenantedesign.com> Message-ID: <13A33366-74C4-44F5-BCB0-F54D2A5B6086@mac.com> On May 1, 2008, at 12:02 PM, Webmaster wrote: > Unless you can demonstrate that it does. > You may 'feel' that is true, or even 'think' that it is, but that is > poor (and emotional) scholarship. > Show us some links. Give us some data. Prove that PHP "has so much > more of a market share overall", don't just declare it. Not sure how much you can trust this chart but here it is anyway: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html From consult at covenantedesign.com Thu May 1 16:11:50 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 16:11:50 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <1209667582.28451@coral.he.net> References: <1209667582.28451@coral.he.net> Message-ID: <481A2406.9000801@covenantedesign.com> Kristina Anderson wrote: > Ed, I agree, it would be great if we could find some methodology that > could prove beyond a shadow of a doubt on an empirical basis that PHP > is a more popular platform than Cold Fusion. I can't adequately defend > my contention to your exacting standards at the present moment, because > you're right, I don't have the data. But I believe that the data is > gatherable and that my theory is valid. I do too. But I would like it quantified as well. > So anyone have any ideas how to do that, links, information, empirical > studies, etc. etc & etc ... bring 'em on. > > We could do an empirical analysis of job postings on 10 or so general > tech job boards over a time period of a year...? > That sounds interesting. > PS Ed, your own link to the TIOBE website showed that they listed Cold > Fusion at the bottom of the popularity grid...and PHP was in the top > half. But you're saying that you have "problems with their > methodology", OK. But you can have problems with any methodology or > means of proof, and that in and of itself is an emotional > response...based on your beliefs and temperament...and btw there's > nothing wrong with that! :=] > > I believe this to be a straw man. I never said I had "problems with their methodology". I said "which i think are erroneous", and logically so. I posted a link to the 2 illogical assumptions that support the TIOBE indexes as being fallacious. I will clearly list them here, as it seems you didn't follow that link (poor scholarship): # that the number of search engine hits for the phrase ?/foo/ programming? is proportional to the ?popularity? of that language. # that the proportionality /is the same for different languages/. It is therefore logically unsound to deduce that the TIOBE indexes are correct in a truly accurate esteem. All they are graphing reduces to search engine results, and nothing more. > I mean let's face it, people have "proved beyond doubt" all sorts of > things which flat out ain't so, right? > > -- Kristina > I'm not sure what you are looking to express with that (perhaps rhetorical?) question. Out of curiosity What would be an example of something "proved beyond doubt" that "flat out ain't so"? (Please refrain from listing some historic event of ignorance, such as meat becoming maggots or the Earth being flat. We are discussing a comparison of actual market holding betwixt two modern programming languages. Feel free to respond off list.) In fact, there is not a clearly quantified amount of conclusive information to accurately deduce that PHP (or any other language) holds this or that particular portion of the 'market'. Therefore, to propose we find a 'reason' for PHP holding the majority of the 'market share', is pure nonsense, as we do not know that PHP holds such a portion. We may as well propose to find a reason for which Coldfusion holds the largest share of the market, or Python, or Flex, or Java, or COBOL... Perhaps this thread may be a catalyst to develop a better means of accurately surveying language utilization in a granular fashion. -Ed From anthony at thrillist.com Thu May 1 16:20:49 2008 From: anthony at thrillist.com (anthony wlodarski) Date: Thu, 01 May 2008 16:20:49 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <481A2406.9000801@covenantedesign.com> References: <1209667582.28451@coral.he.net> <481A2406.9000801@covenantedesign.com> Message-ID: <481A2621.60206@thrillist.com> Would this work for quantifying PHP usage: http://www.php.net/usage.php Now find that CF usage link and compare the two. -Anthony Webmaster wrote: > Kristina Anderson wrote: >> Ed, I agree, it would be great if we could find some methodology that >> could prove beyond a shadow of a doubt on an empirical basis that PHP >> is a more popular platform than Cold Fusion. I can't adequately >> defend my contention to your exacting standards at the present moment, >> because you're right, I don't have the data. But I believe that the >> data is gatherable and that my theory is valid. > I do too. But I would like it quantified as well. >> So anyone have any ideas how to do that, links, information, empirical >> studies, etc. etc & etc ... bring 'em on. >> >> We could do an empirical analysis of job postings on 10 or so general >> tech job boards over a time period of a year...? >> > That sounds interesting. >> PS Ed, your own link to the TIOBE website showed that they listed Cold >> Fusion at the bottom of the popularity grid...and PHP was in the top >> half. But you're saying that you have "problems with their >> methodology", OK. But you can have problems with any methodology or >> means of proof, and that in and of itself is an emotional >> response...based on your beliefs and temperament...and btw there's >> nothing wrong with that! :=] >> >> > I believe this to be a straw man. > I never said I had "problems with their methodology". I said "which i > think are erroneous", and logically so. > I posted a link to the 2 illogical assumptions that support the TIOBE > indexes as being fallacious. > I will clearly list them here, as it seems you didn't follow that link > (poor scholarship): > # that the number of search engine hits for the phrase ?/foo/ > programming? is proportional to the ?popularity? of that language. > # that the proportionality /is the same for different languages/. > It is therefore logically unsound to deduce that the TIOBE indexes are > correct in a truly accurate esteem. > All they are graphing reduces to search engine results, and nothing more. > >> I mean let's face it, people have "proved beyond doubt" all sorts of >> things which flat out ain't so, right? >> >> -- Kristina >> > I'm not sure what you are looking to express with that (perhaps > rhetorical?) question. > > Out of curiosity > > What would be an example of something "proved beyond doubt" that "flat > out ain't so"? > (Please refrain from listing some historic event of ignorance, such as > meat becoming maggots or the Earth being flat. We are discussing a > comparison of actual market holding betwixt two modern programming > languages. Feel free to respond off list.) > > > In fact, there is not a clearly quantified amount of conclusive > information to accurately deduce that PHP (or any other language) holds > this or that particular portion of the 'market'. Therefore, to propose > we find a 'reason' for PHP holding the majority of the 'market share', > is pure nonsense, as we do not know that PHP holds such a portion. We > may as well propose to find a reason for which Coldfusion holds the > largest share of the market, or Python, or Flex, or Java, or COBOL... > > Perhaps this thread may be a catalyst to develop a better means of > accurately surveying language utilization in a granular fashion. > > -Ed > _______________________________________________ > 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 > -- Anthony Wlodarski PHP/MySQL Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 From ka at kacomputerconsulting.com Thu May 1 16:54:22 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 13:54:22 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209675262.32479@coral.he.net> Ed, Hi again. Let me try to clarify what I was trying to say. I'm enjoying this stimulating discussion on a lovely spring day when, let's face it, it's hard to keep focused on work. By saying that things can be proven that "ain't so" ... I was referring not specifically to CS/IT related things but to so many cases of "research" that are designed to support a contention that may not be true but that certain people have an interest in "proving"...which may not be relevant to what we are discussing, granted. (As an example, many studies that "proved" during the 40s and 50s that smoking and radiation were not bad for your health!) By which I meant to point out that the methodology used to "prove" something is what is important, that that methodology needs to be correct and accurate, or we haven't "proven" anything -- GIGO in other words. And I completely 100% agree that "search engine results" are not an accurate measurement of language/platform popularity (and agree that the TIOBE indexes, if based on that alone, are not accurate). It seems to me that the only way to measure this is to get some kind of adequately sized sampling of what companies are actually using for their development. --Kristina > Kristina Anderson wrote: > > Ed, I agree, it would be great if we could find some methodology that > > could prove beyond a shadow of a doubt on an empirical basis that PHP > > is a more popular platform than Cold Fusion. I can't adequately defend > > my contention to your exacting standards at the present moment, because > > you're right, I don't have the data. But I believe that the data is > > gatherable and that my theory is valid. > I do too. But I would like it quantified as well. > > So anyone have any ideas how to do that, links, information, empirical > > studies, etc. etc & etc ... bring 'em on. > > > > We could do an empirical analysis of job postings on 10 or so general > > tech job boards over a time period of a year...? > > > That sounds interesting. > > PS Ed, your own link to the TIOBE website showed that they listed Cold > > Fusion at the bottom of the popularity grid...and PHP was in the top > > half. But you're saying that you have "problems with their > > methodology", OK. But you can have problems with any methodology or > > means of proof, and that in and of itself is an emotional > > response...based on your beliefs and temperament...and btw there's > > nothing wrong with that! :=] > > > > > I believe this to be a straw man. > I never said I had "problems with their methodology". I said "which i > think are erroneous", and logically so. > I posted a link to the 2 illogical assumptions that support the TIOBE > indexes as being fallacious. > I will clearly list them here, as it seems you didn't follow that link > (poor scholarship): > # that the number of search engine hits for the phrase ?/foo/ programming? > is proportional to the ?popularity? of that language. > # that the proportionality /is the same for different languages/. > It is therefore logically unsound to deduce that the TIOBE indexes are > correct in a truly accurate esteem. > All they are graphing reduces to search engine results, and nothing more. > > > I mean let's face it, people have "proved beyond doubt" all sorts of > > things which flat out ain't so, right? > > > > -- Kristina > > > I'm not sure what you are looking to express with that (perhaps > rhetorical?) question. > > Out of curiosity > > What would be an example of something "proved beyond doubt" that "flat > out ain't so"? > (Please refrain from listing some historic event of ignorance, such as > meat becoming maggots or the Earth being flat. We are discussing a > comparison of actual market holding betwixt two modern programming > languages. Feel free to respond off list.) > > > In fact, there is not a clearly quantified amount of conclusive > information to accurately deduce that PHP (or any other language) holds > this or that particular portion of the 'market'. Therefore, to propose > we find a 'reason' for PHP holding the majority of the 'market share', > is pure nonsense, as we do not know that PHP holds such a portion. We > may as well propose to find a reason for which Coldfusion holds the > largest share of the market, or Python, or Flex, or Java, or COBOL... > > Perhaps this thread may be a catalyst to develop a better means of > accurately surveying language utilization in a granular fashion. > > -Ed > _______________________________________________ > 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 Thu May 1 17:02:22 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Thu, 1 May 2008 17:02:22 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <481A2406.9000801@covenantedesign.com> References: <1209667582.28451@coral.he.net> <481A2406.9000801@covenantedesign.com> Message-ID: <8f0676b40805011402k1b95ad97o85b5ebb88c771ef8@mail.gmail.com> On Thu, May 1, 2008 at 4:11 PM, Webmaster wrote: > I do too. But I would like it quantified as well. > > I believe this to be a straw man. > > I will clearly list them here, as it seems you didn't follow that link > (poor scholarship): > # that the number of search engine hits for the phrase "/foo/ programming" > is proportional to the "popularity" of that language. > # that the proportionality /is the same for different languages/. > It is therefore logically unsound to deduce that the TIOBE indexes are > correct in a truly accurate esteem. Ed, I think you are being a bit harsh. Kristina's initial comment was along the lines of "PHP is more popular than cold fusion, and that should count for something in weighing the decision". You then replied to a casual comment with a grating and largely ad hominem response. It appears you have a lot to add to this discussion, but I would prefer to read it minus the remarks on others' "scholarship". -John C. From ka at kacomputerconsulting.com Thu May 1 17:07:50 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 14:07:50 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209676070.10512@coral.he.net> This looks really interesting, but they say that "In the April 2008 survey we received responses from 165,719,150 sites. Most of this month's growth of 3.1 million sites is seen in the US, with Google's Blogger service alone adding 1.1 million extra sites." But the graph below says that total active sites (red line) number slightly more than 66,400,000 ...? Are they including inactive sites in their number of +/- 20 million sites using PHP? If so how would that affect the accuracy of this survey? (i.e. if someone goes out and buys a domain, then replies to this survey saying "we are going to use PHP" but never actually does so...?) --Kristina > Would this work for quantifying PHP usage: > > http://www.php.net/usage.php > > Now find that CF usage link and compare the two. > > -Anthony > > Webmaster wrote: > > Kristina Anderson wrote: > >> Ed, I agree, it would be great if we could find some methodology that > >> could prove beyond a shadow of a doubt on an empirical basis that PHP > >> is a more popular platform than Cold Fusion. I can't adequately > >> defend my contention to your exacting standards at the present moment, > >> because you're right, I don't have the data. But I believe that the > >> data is gatherable and that my theory is valid. > > I do too. But I would like it quantified as well. > >> So anyone have any ideas how to do that, links, information, empirical > >> studies, etc. etc & etc ... bring 'em on. > >> > >> We could do an empirical analysis of job postings on 10 or so general > >> tech job boards over a time period of a year...? > >> > > That sounds interesting. > >> PS Ed, your own link to the TIOBE website showed that they listed Cold > >> Fusion at the bottom of the popularity grid...and PHP was in the top > >> half. But you're saying that you have "problems with their > >> methodology", OK. But you can have problems with any methodology or > >> means of proof, and that in and of itself is an emotional > >> response...based on your beliefs and temperament...and btw there's > >> nothing wrong with that! :=] > >> > >> > > I believe this to be a straw man. > > I never said I had "problems with their methodology". I said "which i > > think are erroneous", and logically so. > > I posted a link to the 2 illogical assumptions that support the TIOBE > > indexes as being fallacious. > > I will clearly list them here, as it seems you didn't follow that link > > (poor scholarship): > > # that the number of search engine hits for the phrase ?/foo/ > > programming? is proportional to the ?popularity? of that language. > > # that the proportionality /is the same for different languages/. > > It is therefore logically unsound to deduce that the TIOBE indexes are > > correct in a truly accurate esteem. > > All they are graphing reduces to search engine results, and nothing more. > > > >> I mean let's face it, people have "proved beyond doubt" all sorts of > >> things which flat out ain't so, right? > >> > >> -- Kristina > >> > > I'm not sure what you are looking to express with that (perhaps > > rhetorical?) question. > > > > Out of curiosity > > > > What would be an example of something "proved beyond doubt" that "flat > > out ain't so"? > > (Please refrain from listing some historic event of ignorance, such as > > meat becoming maggots or the Earth being flat. We are discussing a > > comparison of actual market holding betwixt two modern programming > > languages. Feel free to respond off list.) > > > > > > In fact, there is not a clearly quantified amount of conclusive > > information to accurately deduce that PHP (or any other language) holds > > this or that particular portion of the 'market'. Therefore, to propose > > we find a 'reason' for PHP holding the majority of the 'market share', > > is pure nonsense, as we do not know that PHP holds such a portion. We > > may as well propose to find a reason for which Coldfusion holds the > > largest share of the market, or Python, or Flex, or Java, or COBOL... > > > > Perhaps this thread may be a catalyst to develop a better means of > > accurately surveying language utilization in a granular fashion. > > > > -Ed > > _______________________________________________ > > 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 > > > > -- > Anthony Wlodarski > PHP/MySQL Developer > www.thrillist.com > 560 Broadway, Suite 308 > New York, NY 10012 > p 646.274.2435 > f 646.557.0803 > > _______________________________________________ > 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 May 1 17:17:06 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 17:17:06 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <8f0676b40805011402k1b95ad97o85b5ebb88c771ef8@mail.gmail.com> References: <1209667582.28451@coral.he.net> <481A2406.9000801@covenantedesign.com> <8f0676b40805011402k1b95ad97o85b5ebb88c771ef8@mail.gmail.com> Message-ID: <481A3352.4090001@covenantedesign.com> I'm sorry, but you are somehow reading me uncharitably John. I replied off list. John Campbell wrote: > On Thu, May 1, 2008 at 4:11 PM, Webmaster wrote: > >> I do too. But I would like it quantified as well. >> >> I believe this to be a straw man. >> >> I will clearly list them here, as it seems you didn't follow that link >> (poor scholarship): >> # that the number of search engine hits for the phrase "/foo/ programming" >> is proportional to the "popularity" of that language. >> # that the proportionality /is the same for different languages/. >> It is therefore logically unsound to deduce that the TIOBE indexes are >> correct in a truly accurate esteem. >> > > Ed, > > I think you are being a bit harsh. Kristina's initial comment was > along the lines of "PHP is more popular than cold fusion, and that > should count for something in weighing the decision". You then > replied to a casual comment with a grating and largely ad hominem > response. > > It appears you have a lot to add to this discussion, but I would > prefer to read it minus the remarks on others' "scholarship". > > -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 Thu May 1 17:21:40 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 1 May 2008 14:21:40 -0700 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) Message-ID: <1209676900.22285@coral.he.net> John -- I do believe that the popularity of PHP should be a factor in a decision making process. Not to say that someone should choose a language or platform just because everyone else is...but if everyone is choosing it, there might be a really good reason or two why. What I wanted to do was get a discussion going on why it's so popular...i.e. it's free, it has a great developer community, it's got powerful features for developing web applications, it's well documented and flexible, it's FREE...and etc. That way someone looking into using it can see the benefits, and make up their own mind. Yours in empirical correctness, Kristina :) > On Thu, May 1, 2008 at 4:11 PM, Webmaster wrote: > > I do too. But I would like it quantified as well. > > > > I believe this to be a straw man. > > > > I will clearly list them here, as it seems you didn't follow that link > > (poor scholarship): > > # that the number of search engine hits for the phrase "/foo/ programming" > > is proportional to the "popularity" of that language. > > # that the proportionality /is the same for different languages/. > > It is therefore logically unsound to deduce that the TIOBE indexes are > > correct in a truly accurate esteem. > > Ed, > > I think you are being a bit harsh. Kristina's initial comment was > along the lines of "PHP is more popular than cold fusion, and that > should count for something in weighing the decision". You then > replied to a casual comment with a grating and largely ad hominem > response. > > It appears you have a lot to add to this discussion, but I would > prefer to read it minus the remarks on others' "scholarship". > > -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 consult at covenantedesign.com Thu May 1 17:34:17 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 01 May 2008 17:34:17 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <1209676070.10512@coral.he.net> References: <1209676070.10512@coral.he.net> Message-ID: <481A3759.7060406@covenantedesign.com> I can't seem to locate enough detailed information on the basis for that PHP usage graph to comment. But I would think it silly, were there to be a Graph showing PHP declining steadily, on the PHP site. =D -Ed Kristina Anderson wrote: > This looks really interesting, but they say that > > "In the April 2008 survey we received responses from 165,719,150 sites. > Most of this month's growth of 3.1 million sites is seen in the US, > with Google's Blogger service alone adding 1.1 million extra sites." > > But the graph below says that total active sites (red line) number > slightly more than 66,400,000 ...? > > Are they including inactive sites in their number of +/- 20 million > sites using PHP? If so how would that affect the accuracy of this > survey? (i.e. if someone goes out and buys a domain, then replies to > this survey saying "we are going to use PHP" but never actually does > so...?) > > --Kristina > > > >> Would this work for quantifying PHP usage: >> >> http://www.php.net/usage.php >> >> Now find that CF usage link and compare the two. >> >> -Anthony >> >> Webmaster wrote: >> >>> Kristina Anderson wrote: >>> >>>> Ed, I agree, it would be great if we could find some methodology >>>> > that > >>>> could prove beyond a shadow of a doubt on an empirical basis that >>>> > PHP > >>>> is a more popular platform than Cold Fusion. I can't adequately >>>> defend my contention to your exacting standards at the present >>>> > moment, > >>>> because you're right, I don't have the data. But I believe that >>>> > the > >>>> data is gatherable and that my theory is valid. >>>> >>> I do too. But I would like it quantified as well. >>> >>>> So anyone have any ideas how to do that, links, information, >>>> > empirical > >>>> studies, etc. etc & etc ... bring 'em on. >>>> >>>> We could do an empirical analysis of job postings on 10 or so >>>> > general > >>>> tech job boards over a time period of a year...? >>>> >>>> >>> That sounds interesting. >>> >>>> PS Ed, your own link to the TIOBE website showed that they listed >>>> > Cold > >>>> Fusion at the bottom of the popularity grid...and PHP was in the >>>> > top > >>>> half. But you're saying that you have "problems with their >>>> methodology", OK. But you can have problems with any methodology >>>> > or > >>>> means of proof, and that in and of itself is an emotional >>>> response...based on your beliefs and temperament...and btw there's >>>> nothing wrong with that! :=] >>>> >>>> >>>> >>> I believe this to be a straw man. >>> I never said I had "problems with their methodology". I said "which >>> > i > >>> think are erroneous", and logically so. >>> I posted a link to the 2 illogical assumptions that support the >>> > TIOBE > >>> indexes as being fallacious. >>> I will clearly list them here, as it seems you didn't follow that >>> > link > >>> (poor scholarship): >>> # that the number of search engine hits for the phrase ?/foo/ >>> programming? is proportional to the ?popularity? of that language. >>> # that the proportionality /is the same for different languages/. >>> It is therefore logically unsound to deduce that the TIOBE indexes >>> > are > >>> correct in a truly accurate esteem. >>> All they are graphing reduces to search engine results, and nothing >>> > more. > >>>> I mean let's face it, people have "proved beyond doubt" all sorts >>>> > of > >>>> things which flat out ain't so, right? >>>> >>>> -- Kristina >>>> >>>> >>> I'm not sure what you are looking to express with that (perhaps >>> rhetorical?) question. >>> >>> Out of curiosity >>> >>> What would be an example of something "proved beyond doubt" >>> > that "flat > >>> out ain't so"? >>> (Please refrain from listing some historic event of ignorance, such >>> > as > >>> meat becoming maggots or the Earth being flat. We are discussing a >>> comparison of actual market holding betwixt two modern programming >>> languages. Feel free to respond off list.) >>> >>> >>> In fact, there is not a clearly quantified amount of conclusive >>> information to accurately deduce that PHP (or any other language) >>> > holds > >>> this or that particular portion of the 'market'. Therefore, to >>> > propose > >>> we find a 'reason' for PHP holding the majority of the 'market >>> > share', > >>> is pure nonsense, as we do not know that PHP holds such a portion. >>> > We > >>> may as well propose to find a reason for which Coldfusion holds the >>> largest share of the market, or Python, or Flex, or Java, or >>> > COBOL... > >>> Perhaps this thread may be a catalyst to develop a better means of >>> accurately surveying language utilization in a granular fashion. >>> >>> -Ed >>> _______________________________________________ >>> 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 >>> >>> >> -- >> Anthony Wlodarski >> PHP/MySQL Developer >> www.thrillist.com >> 560 Broadway, Suite 308 >> New York, NY 10012 >> p 646.274.2435 >> f 646.557.0803 >> >> _______________________________________________ >> 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 anthony at thrillist.com Thu May 1 17:58:16 2008 From: anthony at thrillist.com (anthony wlodarski) Date: Thu, 01 May 2008 17:58:16 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <481A3759.7060406@covenantedesign.com> References: <1209676070.10512@coral.he.net> <481A3759.7060406@covenantedesign.com> Message-ID: <481A3CF8.50707@thrillist.com> That would be a good laugh in itself right there. Woe, look at our demise with this lovely drawn graph! -Anthony Webmaster wrote: > I can't seem to locate enough detailed information on the basis for that > PHP usage graph to comment. > But I would think it silly, were there to be a Graph showing PHP > declining steadily, on the PHP site. =D > > -Ed > > Kristina Anderson wrote: >> This looks really interesting, but they say that >> >> "In the April 2008 survey we received responses from 165,719,150 >> sites. Most of this month's growth of 3.1 million sites is seen in the >> US, with Google's Blogger service alone adding 1.1 million extra sites." >> >> But the graph below says that total active sites (red line) number >> slightly more than 66,400,000 ...? >> >> Are they including inactive sites in their number of +/- 20 million >> sites using PHP? If so how would that affect the accuracy of this >> survey? (i.e. if someone goes out and buys a domain, then replies to >> this survey saying "we are going to use PHP" but never actually does >> so...?) >> >> --Kristina >> >> >> >>> Would this work for quantifying PHP usage: >>> >>> http://www.php.net/usage.php >>> >>> Now find that CF usage link and compare the two. >>> >>> -Anthony >>> >>> Webmaster wrote: >>> >>>> Kristina Anderson wrote: >>>> >>>>> Ed, I agree, it would be great if we could find some methodology >>>>> >> that >>>>> could prove beyond a shadow of a doubt on an empirical basis that >>>>> >> PHP >>>>> is a more popular platform than Cold Fusion. I can't adequately >>>>> defend my contention to your exacting standards at the present >> moment, >>>>> because you're right, I don't have the data. But I believe that >>>>> >> the >>>>> data is gatherable and that my theory is valid. >>>> I do too. But I would like it quantified as well. >>>> >>>>> So anyone have any ideas how to do that, links, information, >> empirical >>>>> studies, etc. etc & etc ... bring 'em on. >>>>> >>>>> We could do an empirical analysis of job postings on 10 or so >> general >>>>> tech job boards over a time period of a year...? >>>>> >>>> That sounds interesting. >>>> >>>>> PS Ed, your own link to the TIOBE website showed that they listed >>>>> >> Cold >>>>> Fusion at the bottom of the popularity grid...and PHP was in the >>>>> >> top >>>>> half. But you're saying that you have "problems with their >>>>> methodology", OK. But you can have problems with any methodology >>>>> >> or >>>>> means of proof, and that in and of itself is an emotional >>>>> response...based on your beliefs and temperament...and btw there's >>>>> nothing wrong with that! :=] >>>>> >>>>> >>>> I believe this to be a straw man. >>>> I never said I had "problems with their methodology". I said "which >>>> >> i >>>> think are erroneous", and logically so. >>>> I posted a link to the 2 illogical assumptions that support the >> TIOBE >>>> indexes as being fallacious. >>>> I will clearly list them here, as it seems you didn't follow that >> link >>>> (poor scholarship): >>>> # that the number of search engine hits for the phrase ?/foo/ >>>> programming? is proportional to the ?popularity? of that language. >>>> # that the proportionality /is the same for different languages/. >>>> It is therefore logically unsound to deduce that the TIOBE indexes >>>> >> are >>>> correct in a truly accurate esteem. >>>> All they are graphing reduces to search engine results, and nothing >>>> >> more. >> >>>>> I mean let's face it, people have "proved beyond doubt" all sorts >>>>> >> of >>>>> things which flat out ain't so, right? >>>>> >>>>> -- Kristina >>>>> >>>> I'm not sure what you are looking to express with that (perhaps >>>> rhetorical?) question. >>>> >>>> Out of curiosity >>>> >>>> What would be an example of something "proved beyond doubt" >> that "flat >>>> out ain't so"? >>>> (Please refrain from listing some historic event of ignorance, such >>>> >> as >>>> meat becoming maggots or the Earth being flat. We are discussing a >>>> comparison of actual market holding betwixt two modern programming >>>> languages. Feel free to respond off list.) >>>> >>>> >>>> In fact, there is not a clearly quantified amount of conclusive >>>> information to accurately deduce that PHP (or any other language) >> holds >>>> this or that particular portion of the 'market'. Therefore, to >> propose >>>> we find a 'reason' for PHP holding the majority of the 'market >> share', >>>> is pure nonsense, as we do not know that PHP holds such a portion. >>>> >> We >>>> may as well propose to find a reason for which Coldfusion holds the >>>> largest share of the market, or Python, or Flex, or Java, or >> COBOL... >> >>>> Perhaps this thread may be a catalyst to develop a better means of >>>> accurately surveying language utilization in a granular fashion. >>>> >>>> -Ed >>>> _______________________________________________ >>>> 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 >>>> >>>> >>> -- >>> Anthony Wlodarski >>> PHP/MySQL Developer >>> www.thrillist.com >>> 560 Broadway, Suite 308 >>> New York, NY 10012 >>> p 646.274.2435 >>> f 646.557.0803 >>> >>> _______________________________________________ >>> 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 > -- Anthony Wlodarski PHP/MySQL Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 From tedd at sperling.com Thu May 1 18:05:25 2008 From: tedd at sperling.com (tedd) Date: Thu, 1 May 2008 18:05:25 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <4819EAF5.4040706@covenantedesign.com> References: <1209655886.26359@coral.he.net> <4819EAF5.4040706@covenantedesign.com> Message-ID: At 12:08 PM -0400 5/1/08, Webmaster wrote: >Kristina, > >If you're not sure what the market share is, why even comment; >again, I'm concerned by your lack of scholarship; but you're >pardoned. Well, that's very big of you -- Webmaster. She at least admitted that she didn't know. What did you do other than to cite references you don't agree with, provide no answer to the question, and insult another programmer? If I cared, I would be concerned by your lack of professionalism. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From consult at covenantedesign.com Fri May 2 09:00:56 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 02 May 2008 09:00:56 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: References: <1209655886.26359@coral.he.net> <4819EAF5.4040706@covenantedesign.com> Message-ID: <481B1088.3000705@covenantedesign.com> Tedd, If you don't care, then why even give your two cents? I think you're baiting me into some sort of pointless "I'm more professional than you" argument, and I'm not going to bite. Maybe you should ask Kristina if she feels insulted, instead of chauvinistically projecting your perception unto her. -Ed tedd wrote: > At 12:08 PM -0400 5/1/08, Webmaster wrote: >> Kristina, >> >> If you're not sure what the market share is, why even comment; again, >> I'm concerned by your lack of scholarship; but you're pardoned. > > Well, that's very big of you -- Webmaster. > > She at least admitted that she didn't know. What did you do other than > to cite references you don't agree with, provide no answer to the > question, and insult another programmer? > > If I cared, I would be concerned by your lack of professionalism. > > Cheers, > > tedd > From lists at zaunere.com Fri May 2 09:49:19 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 2 May 2008 09:49:19 -0400 Subject: [nycphp-talk] Twitter Abandons RoR Message-ID: <008301c8ac5b$5214dec0$f63e9c40$@com> Great topic for the May meeting: http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-r ails/ H From consult at covenantedesign.com Fri May 2 09:58:11 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 02 May 2008 09:58:11 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <008301c8ac5b$5214dec0$f63e9c40$@com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> Message-ID: <481B1DF3.3050305@covenantedesign.com> wow... I wonder if they will move to Zend? Or maybe Coldbox!? =P j/k Hans Zaunere wrote: > Great topic for the May meeting: > > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-r > ails/ > > 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 lists at zaunere.com Fri May 2 09:58:38 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 2 May 2008 09:58:38 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <481B1DF3.3050305@covenantedesign.com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <481B1DF3.3050305@covenantedesign.com> Message-ID: <008d01c8ac5c$9ef1e200$dcd5a600$@com> > wow... I wonder if they will move to Zend? Or maybe Coldbox!? =P j/k Uhh, move to Zend? What's that... but I hear PHP is pretty good :) H From consult at covenantedesign.com Fri May 2 10:14:19 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 02 May 2008 10:14:19 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <008d01c8ac5c$9ef1e200$dcd5a600$@com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <481B1DF3.3050305@covenantedesign.com> <008d01c8ac5c$9ef1e200$dcd5a600$@com> Message-ID: <481B21BB.7070102@covenantedesign.com> The framework silly. The Zend framework :P Now give me a plush Elephant! Hans Zaunere wrote: >> wow... I wonder if they will move to Zend? Or maybe Coldbox!? =P j/k >> > > Uhh, move to Zend? What's that... but I hear PHP is pretty good :) > > 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 tedd at sperling.com Fri May 2 10:53:24 2008 From: tedd at sperling.com (tedd) Date: Fri, 2 May 2008 10:53:24 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: <481B1088.3000705@covenantedesign.com> References: <1209655886.26359@coral.he.net> <4819EAF5.4040706@covenantedesign.com> <481B1088.3000705@covenantedesign.com> Message-ID: At 9:00 AM -0400 5/2/08, Webmaster wrote: >If you don't care, then why even give your two cents? To try to show that there are better ways of expressing yourself besides insulting someone. There was no need nor purpose in your manner. >I think you're baiting me into some sort of pointless "I'm more >professional than you" argument, and I'm not going to bite. You may "bite" or not, I don't care. But I do care about how we (professional programmers) treat each other. Take my comments to heart, or don't. Typically, people who help others do so with grace. Those who don't usually have issues of their own to deal with. You project the persona you want. >Maybe you should ask Kristina if she feels insulted, instead of >chauvinistically projecting your perception unto her. I did and then I responded to you -- so your assumption otherwise is as wrong as the rest of the comments you've made. Look, I'm not trying to start anything -- I'm just saying insults accomplish nothing and are certainly not professional. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From consult at covenantedesign.com Fri May 2 12:31:40 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 02 May 2008 12:31:40 -0400 Subject: [nycphp-talk] ColdFusion vs PHP (Ruby, Perl....) In-Reply-To: References: <1209655886.26359@coral.he.net> <4819EAF5.4040706@covenantedesign.com> <481B1088.3000705@covenantedesign.com> Message-ID: <481B41EC.40009@covenantedesign.com> I think you've misread my exchange. I'll reply off list. tedd wrote: > At 9:00 AM -0400 5/2/08, Webmaster wrote: >> If you don't care, then why even give your two cents? > > To try to show that there are better ways of expressing yourself > besides insulting someone. There was no need nor purpose in your manner. > >> I think you're baiting me into some sort of pointless "I'm more >> professional than you" argument, and I'm not going to bite. > > You may "bite" or not, I don't care. But I do care about how we > (professional programmers) treat each other. Take my comments to > heart, or don't. Typically, people who help others do so with grace. > Those who don't usually have issues of their own to deal with. You > project the persona you want. > >> Maybe you should ask Kristina if she feels insulted, instead of >> chauvinistically projecting your perception unto her. > > I did and then I responded to you -- so your assumption otherwise is > as wrong as the rest of the comments you've made. > > Look, I'm not trying to start anything -- I'm just saying insults > accomplish nothing and are certainly not professional. > > Cheers, > > tedd > From chsnyder at gmail.com Fri May 2 12:42:35 2008 From: chsnyder at gmail.com (csnyder) Date: Fri, 2 May 2008 12:42:35 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <008301c8ac5b$5214dec0$f63e9c40$@com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> Message-ID: On Fri, May 2, 2008 at 9:49 AM, Hans Zaunere wrote: > Great topic for the May meeting: > > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-r > ails/ > > H What's the topic, Hans? How to build your own Twitter or how to blame your embarrassing outages on a framework? Either one would be interesting and of potential use to our members. -- Chris Snyder http://chxo.com/ From hans at cyberxdesigns.com Fri May 2 11:51:02 2008 From: hans at cyberxdesigns.com (=?utf-8?B?SGFucyBDLiBLYXNwZXJzZXR6?=) Date: Fri, 2 May 2008 15:51:02 +0000 Subject: [nycphp-talk] Twitter Abandons RoR Message-ID: <1564931958-1209747218-cardhu_decombobulator_blackberry.rim.net-1181333892-@bxe111.bisx.prod.on.blackberry> I vote for how to blame. Framework. Definitely the most useful for my customers. Hans K -- Hans C. Kaspersetz Cyber X Designs Mobile: 201-681-4156 Office: 201-558-7929 hans at cyberxdesigns.com http://www.cyberxdesigns.com From lists at zaunere.com Fri May 2 12:54:39 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 2 May 2008 12:54:39 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: References: <008301c8ac5b$5214dec0$f63e9c40$@com> Message-ID: <01e801c8ac75$3628e520$a27aaf60$@com> > > Great topic for the May meeting: > > > > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ > > > > H > > What's the topic, Hans? How to build your own Twitter or how to blame > your embarrassing outages on a framework? > > Either one would be interesting and of potential use to our members. Or how RoR is a fad? *duck* :) Apparently, this might actually all be a rumor: http://twitter.com/ev/statuses/801530348 Although in either case, there is apparently some confusion over at twitter as to what technology they'd like to use. H From brian at realm3.com Fri May 2 15:51:45 2008 From: brian at realm3.com (Brian D.) Date: Fri, 2 May 2008 15:51:45 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <01e801c8ac75$3628e520$a27aaf60$@com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <01e801c8ac75$3628e520$a27aaf60$@com> Message-ID: I think it's been confirmed as a rumor at this point. Still, was interesting to talk about. I was at Jelly NYC (a co-working group) this morning and the news item was inspiring a little discussion. Rails is definitely popular here in NYC with the startup crowd, but I still believe it's something of a fad. On Fri, May 2, 2008 at 12:54 PM, Hans Zaunere wrote: > > > Great topic for the May meeting: > > > > > > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ > > > > > > H > > > > What's the topic, Hans? How to build your own Twitter or how to blame > > your embarrassing outages on a framework? > > > > Either one would be interesting and of potential use to our members. > > Or how RoR is a fad? *duck* :) > > Apparently, this might actually all be a rumor: > > http://twitter.com/ev/statuses/801530348 > > Although in either case, there is apparently some confusion over at twitter as to what technology they'd like to use. > > > > 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 > -- realm3 web applications [realm3.com] freelance consulting, application development (917) 512-3594 From ben at projectskyline.com Fri May 2 15:53:35 2008 From: ben at projectskyline.com (Ben Sgro) Date: Fri, 02 May 2008 15:53:35 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: References: <008301c8ac5b$5214dec0$f63e9c40$@com> <01e801c8ac75$3628e520$a27aaf60$@com> Message-ID: <481B713F.20005@projectskyline.com> +1 but I still believe it's something of a fad. Brian D. wrote: > I think it's been confirmed as a rumor at this point. > > Still, was interesting to talk about. I was at Jelly NYC (a co-working > group) this morning and the news item was inspiring a little > discussion. Rails is definitely popular here in NYC with the startup > crowd, but I still believe it's something of a fad. > > On Fri, May 2, 2008 at 12:54 PM, Hans Zaunere wrote: > >>>> Great topic for the May meeting: >>>> >> > > >> > > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ >> > > >> > > H >> > >> > What's the topic, Hans? How to build your own Twitter or how to blame >> > your embarrassing outages on a framework? >> > >> > Either one would be interesting and of potential use to our members. >> >> Or how RoR is a fad? *duck* :) >> >> Apparently, this might actually all be a rumor: >> >> http://twitter.com/ev/statuses/801530348 >> >> Although in either case, there is apparently some confusion over at twitter as to what technology they'd like to use. >> >> >> >> 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 ken at secdat.com Fri May 2 15:58:44 2008 From: ken at secdat.com (Kenneth Downs) Date: Fri, 02 May 2008 15:58:44 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <481B713F.20005@projectskyline.com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <01e801c8ac75$3628e520$a27aaf60$@com> <481B713F.20005@projectskyline.com> Message-ID: <481B7274.9010305@secdat.com> I have serious doubts that the ActiveRecord idea can ever be made to scale or perform. Ben Sgro wrote: > +1 > > but I still believe it's something of a fad. > > > Brian D. wrote: >> I think it's been confirmed as a rumor at this point. >> >> Still, was interesting to talk about. I was at Jelly NYC (a co-working >> group) this morning and the news item was inspiring a little >> discussion. Rails is definitely popular here in NYC with the startup >> crowd, but I still believe it's something of a fad. >> >> On Fri, May 2, 2008 at 12:54 PM, Hans Zaunere wrote: >> >>>>> Great topic for the May meeting: >>>>> >>> > > >>> > > >>> http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ >>> >>> > > >>> > > H >>> > >>> > What's the topic, Hans? How to build your own Twitter or how to >>> blame >>> > your embarrassing outages on a framework? >>> > >>> > Either one would be interesting and of potential use to our members. >>> >>> Or how RoR is a fad? *duck* :) >>> >>> Apparently, this might actually all be a rumor: >>> >>> http://twitter.com/ev/statuses/801530348 >>> >>> Although in either case, there is apparently some confusion over at >>> twitter as to what technology they'd like to use. >>> >>> >>> >>> 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 >>> >>> >> >> >> >> > _______________________________________________ > 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 matt at atopia.net Fri May 2 16:57:34 2008 From: matt at atopia.net (Matt Juszczak) Date: Fri, 2 May 2008 16:57:34 -0400 (EDT) Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <481B7274.9010305@secdat.com> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <01e801c8ac75$3628e520$a27aaf60$@com> <481B713F.20005@projectskyline.com> <481B7274.9010305@secdat.com> Message-ID: <20080502165702.H82690@mercury.atopia.net> ActiveRecord? As in selecting all fields and updating all fields no matter what you need/what has changed? On Fri, 2 May 2008, Kenneth Downs wrote: > I have serious doubts that the ActiveRecord idea can ever be made to scale or > perform. > Ben Sgro wrote: >> +1 >> >> but I still believe it's something of a fad. >> >> >> Brian D. wrote: >>> I think it's been confirmed as a rumor at this point. >>> >>> Still, was interesting to talk about. I was at Jelly NYC (a co-working >>> group) this morning and the news item was inspiring a little >>> discussion. Rails is definitely popular here in NYC with the startup >>> crowd, but I still believe it's something of a fad. >>> >>> On Fri, May 2, 2008 at 12:54 PM, Hans Zaunere wrote: >>> >>>>>> Great topic for the May meeting: >>>>>> >>>> > > >>>> > > >>>> http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ >>>> > > >>>> > > H >>>> > >>>> > What's the topic, Hans? How to build your own Twitter or how to blame >>>> > your embarrassing outages on a framework? >>>> > >>>> > Either one would be interesting and of potential use to our members. >>>> >>>> Or how RoR is a fad? *duck* :) >>>> >>>> Apparently, this might actually all be a rumor: >>>> >>>> http://twitter.com/ev/statuses/801530348 >>>> >>>> Although in either case, there is apparently some confusion over at >>>> twitter as to what technology they'd like to use. >>>> >>>> >>>> >>>> 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 >>>> >>>> >>> >>> >>> >>> >> _______________________________________________ >> 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 > > > !DSPAM:481b725d795751342191123! > From ken at secdat.com Fri May 2 17:55:15 2008 From: ken at secdat.com (Ken Downs) Date: Fri, 02 May 2008 17:55:15 -0400 Subject: [nycphp-talk] Twitter Abandons RoR In-Reply-To: <20080502165702.H82690@mercury.atopia.net> References: <008301c8ac5b$5214dec0$f63e9c40$@com> <01e801c8ac75$3628e520$a27aaf60$@com> <481B713F.20005@projectskyline.com> <481B7274.9010305@secdat.com> <20080502165702.H82690@mercury.atopia.net> Message-ID: Matt Juszczak <matt at atopia.net> wrote: > ActiveRecord? > > As in selecting all fields and updating all fields no matter what you > need/what has changed?I'm willing to stand corrected, but as I understand ActiveRecord, it is heavily centered on row-based operations .  You can't scale if you can't easily do set-based operations as well.  But as I said, I am going by what other people say about it, I saw enough to know I wasn't interested.Also in the second-hand info category, I've heard it said that Rails is heavily into putting logic into Ruby layer.  This leads to far more round trips to the server than are necessary, and if it is true it be my first path of investigation if I worked at "Rails Inc" (if you know what I mean) and were asked to speed it up.Finally, the ActiveRecord concept is suspicious overall because it attempts to view the database as objects, and a database plain and simple is not objects, it is organized as sets.  You can only make optimal use of a database if you work with in it its own terms. > > > On Fri, 2 May 2008, Kenneth Downs wrote: > > > I have serious doubts that the ActiveRecord idea can ever be made to scale or > > > perform. > > Ben Sgro wrote: > >> +1 > >> > >> but I still believe it's something of a fad. > >> > >> > >> Brian D. wrote: > >>> I think it's been confirmed as a rumor at this point. > >>> > >>> Still, was interesting to talk about. I was at Jelly NYC (a co-working > >>> group) this morning and the news item was inspiring a little > >>> discussion. Rails is definitely popular here in NYC with the startup > >>> crowd, but I still believe it's something of a fad. > >>> > >>> On Fri, May 2, 2008 at 12:54 PM, Hans Zaunere <lists at zaunere.com> wrote: > >>> > >>>>>> Great topic for the May meeting: > >>>>>> > >>>> > > > >>>> > > > >>>> > http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/ > >>>> > > > >>>> > > H > >>>> > > >>>> > What's the topic, Hans? How to build your own Twitter or how to blame > >>>> > your embarrassing outages on a framework? > >>>> > > >>>> > Either one would be interesting and of potential use to our members. > >>>> > >>>> Or how RoR is a fad? *duck* :) > >>>> > >>>> Apparently, this might actually all be a rumor: > >>>> > >>>> http://twitter.com/ev/statuses/801530348 > >>>> > >>>> Although in either case, there is apparently some confusion over at > >>>> twitter as to what technology they'd like to use. > >>>> > >>>> > >>>> > >>>> 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 > >>>> > >>>> > >>> > >>> > >>> > >>> > >> _______________________________________________ > >> 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 > > > > > > !DSPAM:481b725d795751342191123! > > > _______________________________________________ > 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 > _________________________________________________________ This mail sent using V-webmail - http://www.v-webmail.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Sat May 3 21:57:06 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sat, 3 May 2008 21:57:06 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components Message-ID: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> Hi, I'm exploring the idea of using some PHP classes to emitting reusable HTML UI elements like postal addresses, login forms, linked images and in turn more sophisticated elements such as invoices, forum posts, etc. Because these elements are supposed to be reusable I do not want to force style information on the user and yet I need to maximize the ease with which the user can apply their own style to each element. For example, let's say one of these classes emits some HTML like the following:

Account Information

Username:abaker
Email Address:abaker at example.com
Full Name:abaker
Now let's say I want to change the style of h3 and the field labels but within this table only. This is basically impossible through CSS alone. One possibility would be to allow the user to supply a class name that will be strategically set on some elements like:
Then the user can supply their own CSS like: div.myapp h3 { color: #000080; border-bottom: 2px #808080 solid; margin-bottom: 0px; } div.myapp td.fieldlabel { text-align: right; white-space: nowrap; } This seems a little clumsy to me but it's the best I can come up with. If you were given some HTML to be styled with CSS, how would you prefer the elements be organized? Secondarily, would you expect a professional library of this type to use tableless forms? Personally I have never been able to create tableless forms and have things line up into columns. So for now I'm going to use tables but I would be very interested in hearing someone make a case for tableless forms. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From lists at enobrev.com Sat May 3 22:57:48 2008 From: lists at enobrev.com (Mark Armendariz) Date: Sat, 03 May 2008 22:57:48 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> Message-ID: <481D262C.2090702@enobrev.com> Michael B Allen wrote: > Secondarily, would you expect a professional library of this type to use > tableless forms? Personally I have never been able to create tableless > forms and have things line up into columns. So for now I'm going to use > tables but I would be very interested in hearing someone make a case > for tableless forms. > > Mike > > Tableless forms are all about the fieldsets and labels. Form
Account Information
Favorite Color:
One sidebar - make sure your id's and field names are different as IE tends to confuse the two and reacts strangely. Google for "css forms" (sans quotes) and you'll find quite a few helpful examples. As for making a case for css forms, I think the above example speaks for itself. Very easy to see what's going on here without even testing in a browser. Even though I'd coded in tables for years (around 1997 - 2001), trying to read around table tags these days makes me feel completely illiterate when it comes to figuring out what a page is supposed to look like. Good Luck! Mark From ioplex at gmail.com Sat May 3 23:23:25 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sat, 3 May 2008 23:23:25 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <481D262C.2090702@enobrev.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <481D262C.2090702@enobrev.com> Message-ID: <78c6bd860805032023j4f0c2a4bl31e0450a834dd533@mail.gmail.com> On Sat, May 3, 2008 at 10:57 PM, Mark Armendariz wrote: > Michael B Allen wrote: > > > > Secondarily, would you expect a professional library of this type to use > > tableless forms? Personally I have never been able to create tableless > > forms and have things line up into columns. So for now I'm going to use > > tables but I would be very interested in hearing someone make a case > > for tableless forms. > .myapp label { > float:left; > width: 70px; > clear: left; > As for making a case for css forms, I think the above example speaks for > itself. As in good or bad? Your label width is fixed at 70px. If I lengthen the text of one of those labels the form element is displayed right over the top of it. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From lists at enobrev.com Sat May 3 23:32:05 2008 From: lists at enobrev.com (Mark Armendariz) Date: Sat, 03 May 2008 23:32:05 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805032023j4f0c2a4bl31e0450a834dd533@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <481D262C.2090702@enobrev.com> <78c6bd860805032023j4f0c2a4bl31e0450a834dd533@mail.gmail.com> Message-ID: <481D2E35.40909@enobrev.com> Michael B Allen wrote: > On Sat, May 3, 2008 at 10:57 PM, Mark Armendariz wrote: > >> Michael B Allen wrote: >> >> >> >>> Secondarily, would you expect a professional library of this type to use >>> tableless forms? Personally I have never been able to create tableless >>> forms and have things line up into columns. So for now I'm going to use >>> tables but I would be very interested in hearing someone make a case >>> for tableless forms. >>> > > >> .myapp label { >> float:left; >> width: 70px; >> clear: left; >> > > >> As for making a case for css forms, I think the above example speaks for >> itself. >> > > As in good or bad? Your label width is fixed at 70px. If I lengthen > the text of one of those labels the form element is displayed right > over the top of it. > > Mike > Well, the caveat is that the labels won't auto-fit for the whole 'column', but it's simple to fix by increasing the label width. I think the benefit of cleaner code trumps the auto-resizing the labels. Otherwise, you could write a js function that checks the label text and resizes them accordingly. In the end it's a matter of personal style / choice, but I'd much rather maintain a tableless layout by adjusting a single css file than try to dance around table tags - even if they are auto-generated - especially if they're auto-generated since that means you have less html to maintain within your php code that generates the html. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Sun May 4 10:28:20 2008 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 4 May 2008 10:28:20 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> Message-ID: <20080504142819.GA1220@panix.com> Hi Mike: On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote: > >
>

Account Information

Username:abaker
> > > > This seems a little clumsy to me but it's the best I can come up with. This isn't clumsy. It's exactly what CSS is for. I'd put the class inside the table element, but that's me. --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 tedd at sperling.com Sun May 4 11:05:26 2008 From: tedd at sperling.com (tedd) Date: Sun, 4 May 2008 11:05:26 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> Message-ID: At 9:57 PM -0400 5/3/08, Michael B Allen wrote: >One possibility would be to allow the user to supply a class name that >will be strategically set on some elements like: > >
>

Account Information

Username:abaker
> > > >Then the user can supply their own CSS like: > > div.myapp h3 { > color: #000080; > border-bottom: 2px #808080 solid; > margin-bottom: 0px; > } > div.myapp td.fieldlabel { > text-align: right; > white-space: nowrap; > } > >This seems a little clumsy to me but it's the best I can come up with. > >If you were given some HTML to be styled with CSS, how would you prefer >the elements be organized? Michael: It's not clumsy to identify a table -- that part of separating content from presentation. It's just another variable to use. However, if I were creating tables for different things, I might be more semantic and use ID's, such as id = "logInForm" rather than class="myapp" (whatever that means). Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ioplex at gmail.com Sun May 4 11:10:29 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 4 May 2008 11:10:29 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <20080504142819.GA1220@panix.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <20080504142819.GA1220@panix.com> Message-ID: <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor wrote: > Hi Mike: > > > On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote: > > > >
> >

Account Information

Username:abaker
> > > > > > > > > This seems a little clumsy to me but it's the best I can come up with. > > This isn't clumsy. It's exactly what CSS is for. I'd put the class > inside the table element, but that's me. At this point of uncertainty I've been in the habit of applying style through divs because they can quietly affect groups of any type of element without changing the css (e.g. in the above example, the div applies style to h3 regardless of whether or not it's in a table). If that style info turns out to be specific to tables of that type then yes, I agree that it should be on the table. In fact it is very likely that I will need table classes since tables are frequently used for a wide range of purposes including page layout, form structure and data display of different types. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From tedd at sperling.com Sun May 4 11:27:40 2008 From: tedd at sperling.com (tedd) Date: Sun, 4 May 2008 11:27:40 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <20080504142819.GA1220@panix.com> <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> Message-ID: At 11:10 AM -0400 5/4/08, Michael B Allen wrote: >On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor > > On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote: >> > >> >
>> >

Account Information

Username:abaker
>> > >> > > > > > > > This seems a little clumsy to me but it's the best I can come up with. >> >> This isn't clumsy. It's exactly what CSS is for. I'd put the class >> inside the table element, but that's me. > >At this point of uncertainty I've been in the habit of applying style >through divs because they can quietly affect groups of any type of >element without changing the css (e.g. in the above example, the div >applies style to h3 regardless of whether or not it's in a table). If >that style info turns out to be specific to tables of that type then >yes, I agree that it should be on the table. In fact it is very likely >that I will need table classes since tables are frequently used for a >wide range of purposes including page layout, form structure and data >display of different types. > >Mike Mike: Tables should not be used for anything except column data. Using tables for layouts is just bad practice and demonstrates a disregard for, or ignorance of, accessibility issues. To style a h3 within a table without a class or id is easy enough by simply using table h3 {style} Or, don't use h3 at all and use the

Account Information

Username:abaker
tag -- after all, it's a heading, right? And, it's easy enough to style via th [style] Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ioplex at gmail.com Sun May 4 12:10:32 2008 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 4 May 2008 12:10:32 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <20080504142819.GA1220@panix.com> <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> Message-ID: <78c6bd860805040910x5518ea35lffacb4575c3b0055@mail.gmail.com> On Sun, May 4, 2008 at 11:27 AM, tedd wrote: > At 11:10 AM -0400 5/4/08, Michael B Allen wrote: > > > > > On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor > > > > > On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote: > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > > > This seems a little clumsy to me but it's the best I can come up > with. > > > > > > > > This isn't clumsy. It's exactly what CSS is for. I'd put the class > > > inside the table element, but that's me. > > > > > > > At this point of uncertainty I've been in the habit of applying style > > through divs because they can quietly affect groups of any type of > > element without changing the css (e.g. in the above example, the div > > applies style to h3 regardless of whether or not it's in a table). If > > that style info turns out to be specific to tables of that type then > > yes, I agree that it should be on the table. In fact it is very likely > > that I will need table classes since tables are frequently used for a > > wide range of purposes including page layout, form structure and data > > display of different types. > > > > Mike > > > > > Mike: > > Tables should not be used for anything except column data. Using tables for > layouts is just bad practice and demonstrates a disregard for, or ignorance > of, accessibility issues. I see. So how does one do layouts without tables? Do you have a simple example on the web somewhere? Is there a good tutorial I can look at? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From tgales at tgaconnect.com Sun May 4 13:31:32 2008 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 04 May 2008 13:31:32 -0400 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <78c6bd860805040910x5518ea35lffacb4575c3b0055@mail.gmail.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <20080504142819.GA1220@panix.com> <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> <78c6bd860805040910x5518ea35lffacb4575c3b0055@mail.gmail.com> Message-ID: <481DF2F4.3040109@tgaconnect.com> Michael B Allen wrote: > I see. So how does one do layouts without tables? Do you have a simple > example on the web somewhere? Is there a good tutorial I can look at? > > http://www.google.com/search?hl=en&q=tableless+layout -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From 1j0lkq002 at sneakemail.com Tue May 6 01:37:03 2008 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 05 May 2008 22:37:03 -0700 Subject: [nycphp-talk] Abstracting CSS: Reusable HTML UI Components In-Reply-To: <481DF2F4.3040109@tgaconnect.com> References: <78c6bd860805031857l4f7452f9k67bad7024633dc5a@mail.gmail.com> <20080504142819.GA1220@panix.com> <78c6bd860805040810k3a388067g51a4bf58ffc46134@mail.gmail.com> <78c6bd860805040910x5518ea35lffacb4575c3b0055@mail.gmail.com> <481DF2F4.3040109@tgaconnect.com> Message-ID: <20323-98157@sneakemail.com> Tim Gales tgales-at-tgaconnect.com |nyphp dev/internal group use| wrote: > Michael B Allen wrote: > >> I see. So how does one do layouts without tables? Do you have a simple >> example on the web somewhere? Is there a good tutorial I can look at? >> > > >> http://www.google.com/search?hl=en&q=tableless+layout > or perhaps more adventurous with http://www.google.com/search?hl=en&q=table+less+layout+grid ? From ka at kacomputerconsulting.com Tue May 6 17:59:50 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Tue, 6 May 2008 14:59:50 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210111190.5069@coral.he.net> Hi everyone -- I'm trying to build out a validation routine for my input forms and found something that I like/find easy to extend. I added it as an external script to my test page. I tested to make sure all the subfunctions were being called by inserting alert boxes and they are being called. Unfortunately, the routine is not picking up my empty/non valid fields and instead appears to be just returning "true" and submitting the form. It's hard for me to trap the errors because of the fact the function is called on submit. Anyone have any tips or tricks to help me figure out why this isn't working? I'm ashamed to admit it's been awhile since I've really done anything serious with JavaScript, and seem to be a bit rusty here. Also just wanted to let everyone know that our migration to Linux server was successful and we have finally gotten the mail() function working reliably -- apparently this hosting co has some special requirements for syntax which they finally shared with us. --Kristina From jcampbell1 at gmail.com Tue May 6 18:19:14 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Tue, 6 May 2008 18:19:14 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210111190.5069@coral.he.net> References: <1210111190.5069@coral.he.net> Message-ID: <8f0676b40805061519u2a7afcf1m40c9d041f41233e5@mail.gmail.com> On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson wrote: > > Hi everyone -- > > I'm trying to build out a validation routine for my input forms and > found something that I like/find easy to extend. I added it as an > external script to my test page. I tested to make sure all the > subfunctions were being called by inserting alert boxes and they are > being called. Unfortunately, the routine is not picking up my > empty/non valid fields and instead appears to be just returning "true" > and submitting the form. > My guess is that your javascript has errors which prevents the submit handler from returning false. This makes it really hard for debugging... Try the following when developing:
instead of This way when "validate" errors out, the submission will still be trapped and you can see the errors in the console. HTH, -john c. From ka at kacomputerconsulting.com Tue May 6 18:25:21 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Tue, 6 May 2008 15:25:21 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210112721.12577@coral.he.net> thanks!! will do. > On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson > wrote: > > > > Hi everyone -- > > > > I'm trying to build out a validation routine for my input forms and > > found something that I like/find easy to extend. I added it as an > > external script to my test page. I tested to make sure all the > > subfunctions were being called by inserting alert boxes and they are > > being called. Unfortunately, the routine is not picking up my > > empty/non valid fields and instead appears to be just returning "true" > > and submitting the form. > > > > My guess is that your javascript has errors which prevents the submit > handler from returning false. This makes it really hard for > debugging... > > Try the following when developing: > > instead of > > > This way when "validate" errors out, the submission will still be > trapped and you can see the errors in the console. > > HTH, > > -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 tim_lists at o2group.com Tue May 6 18:49:25 2008 From: tim_lists at o2group.com (Tim Lieberman) Date: Tue, 6 May 2008 16:49:25 -0600 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210112721.12577@coral.he.net> References: <1210112721.12577@coral.he.net> Message-ID: <43FCC77C-96F1-4D0A-9EAC-5EB20DD33D58@o2group.com> Also: Firebug is your friend. Just set a breakpoint on the first line of your function, and step through. -Tim On May 6, 2008, at 4:25 PM, Kristina Anderson wrote: > thanks!! will do. > > > >> On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson >> wrote: >>> >>> Hi everyone -- >>> >>> I'm trying to build out a validation routine for my input forms and >>> found something that I like/find easy to extend. I added it as an >>> external script to my test page. I tested to make sure all the >>> subfunctions were being called by inserting alert boxes and they > are >>> being called. Unfortunately, the routine is not picking up my >>> empty/non valid fields and instead appears to be just > returning "true" >>> and submitting the form. >>> >> >> My guess is that your javascript has errors which prevents the submit >> handler from returning false. This makes it really hard for >> debugging... >> >> Try the following when developing: >> >> instead of >> >> >> This way when "validate" errors out, the submission will still be >> trapped and you can see the errors in the console. >> >> HTH, >> >> -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 rolan at omnistep.com Tue May 6 21:36:53 2008 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 06 May 2008 21:36:53 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210111190.5069@coral.he.net> References: <1210111190.5069@coral.he.net> Message-ID: <482107B5.4060603@omnistep.com> which one are you using? FormChek.js is easy and hasn't let me down yet. ~Rolan From ka at kacomputerconsulting.com Tue May 6 21:52:48 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Tue, 6 May 2008 18:52:48 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210125168.9235@coral.he.net> Rolan, I found this one that looked very easy to expand at http://www.webcheatsheet.com/javascript/form_validation.php However it is not picking up the blank fields... I can try yours if you point me to it! I need something that is extensible to handle the various types of input like emails, phone numbers, etc. -- Kristina > which one are you using? FormChek.js is easy and hasn't let me down yet. > > ~Rolan > _______________________________________________ > 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 Tue May 6 21:56:41 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Tue, 6 May 2008 18:56:41 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210125401.10287@coral.he.net> if (fld.value.length == 0) { is that even right? I thought it used to be fld.length or fld.text.length...?? Kristina > Rolan, > > I found this one that looked very easy to expand at > > http://www.webcheatsheet.com/javascript/form_validation.php > > However it is not picking up the blank fields... > > I can try yours if you point me to it! > > I need something that is extensible to handle the various types of > input like emails, phone numbers, etc. > > -- Kristina > > > > which one are you using? FormChek.js is easy and hasn't let me down > yet. > > > > ~Rolan > > _______________________________________________ > > 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 consult at covenantedesign.com Wed May 7 08:57:30 2008 From: consult at covenantedesign.com (Webmaster) Date: Wed, 07 May 2008 08:57:30 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210125401.10287@coral.he.net> References: <1210125401.10287@coral.he.net> Message-ID: <4821A73A.5010804@covenantedesign.com> That's correct Javascript, assuming that fld = document.getElementById('the element you are referencing') Kristina Anderson wrote: > if (fld.value.length == 0) { > > > is that even right? > > I thought it used to be fld.length or fld.text.length...?? > > > Kristina > > > >> Rolan, >> >> I found this one that looked very easy to expand at >> >> http://www.webcheatsheet.com/javascript/form_validation.php >> >> However it is not picking up the blank fields... >> >> I can try yours if you point me to it! >> >> I need something that is extensible to handle the various types of >> input like emails, phone numbers, etc. >> >> -- Kristina >> >> >> >>> which one are you using? FormChek.js is easy and hasn't let me down >>> >> yet. >> >>> ~Rolan >>> _______________________________________________ >>> 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 Wed May 7 09:27:46 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 7 May 2008 06:27:46 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210166866.16143@coral.he.net> it's implicitly referenced, i.e. the name of the element is being passed in as an enumerated value assigned to the type of validation subroutine I want to call for that element. But by "by id" i guess that there needs to be an id="sameasname" in each form element...?? That could be the issue? --Kristina > That's correct Javascript, assuming that fld = > document.getElementById('the element you are referencing') > > Kristina Anderson wrote: > > if (fld.value.length == 0) { > > > > > > is that even right? > > > > I thought it used to be fld.length or fld.text.length...?? > > > > > > Kristina > > > > > > > >> Rolan, > >> > >> I found this one that looked very easy to expand at > >> > >> http://www.webcheatsheet.com/javascript/form_validation.php > >> > >> However it is not picking up the blank fields... > >> > >> I can try yours if you point me to it! > >> > >> I need something that is extensible to handle the various types of > >> input like emails, phone numbers, etc. > >> > >> -- Kristina > >> > >> > >> > >>> which one are you using? FormChek.js is easy and hasn't let me down > >>> > >> yet. > >> > >>> ~Rolan > >>> _______________________________________________ > >>> 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 > > > > > > > > _______________________________________________ > 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 Wed May 7 09:41:48 2008 From: tedd at sperling.com (tedd) Date: Wed, 7 May 2008 09:41:48 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210125168.9235@coral.he.net> References: <1210125168.9235@coral.he.net> Message-ID: At 6:52 PM -0700 5/6/08, Kristina Anderson wrote: >Rolan, > >I found this one that looked very easy to expand at > >http://www.webcheatsheet.com/javascript/form_validation.php > >However it is not picking up the blank fields... > blank fields ? I must not be understanding this -- doesn't validateEmpty() do that? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From consult at covenantedesign.com Wed May 7 10:18:04 2008 From: consult at covenantedesign.com (Webmaster) Date: Wed, 07 May 2008 10:18:04 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210166866.16143@coral.he.net> References: <1210166866.16143@coral.he.net> Message-ID: <4821BA1C.2080909@covenantedesign.com> Well that's different... if the Javascript is 'looping' over the form array as so: And there isn't a check for the type, then the 'blanks' you're seeing are buttons. Kristina Anderson wrote: > it's implicitly referenced, i.e. the name of the element is being > passed in as an enumerated value assigned to the type of validation > subroutine I want to call for that element. > > But by "by id" i guess that there needs to be an id="sameasname" in > each form element...?? That could be the issue? > > --Kristina > > >> That's correct Javascript, assuming that fld = >> document.getElementById('the element you are referencing') >> >> Kristina Anderson wrote: >> >>> if (fld.value.length == 0) { >>> >>> >>> is that even right? >>> >>> I thought it used to be fld.length or fld.text.length...?? >>> >>> >>> Kristina >>> >>> >>> >>> >>>> Rolan, >>>> >>>> I found this one that looked very easy to expand at >>>> >>>> http://www.webcheatsheet.com/javascript/form_validation.php >>>> >>>> However it is not picking up the blank fields... >>>> >>>> I can try yours if you point me to it! >>>> >>>> I need something that is extensible to handle the various types of >>>> input like emails, phone numbers, etc. >>>> >>>> -- Kristina >>>> >>>> >>>> >>>> >>>>> which one are you using? FormChek.js is easy and hasn't let me >>>>> > down > >>>>> >>>>> >>>> yet. >>>> >>>> >>>>> ~Rolan >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> >>> >> _______________________________________________ >> 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 Wed May 7 10:20:56 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 7 May 2008 07:20:56 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210170056.32016@coral.he.net> ed, it calls the subfunctions like so: reason += validateUsername(theForm.user_name); reason += validatePassword(theForm.pwd); reason += validateEmail(theForm.email1); reason += validatePhone(theForm.phone1); reason += validateEmpty(theForm.first_name); which appears to be OK > Well that's different... if the Javascript is 'looping' over the form > array as so: > > > > And there isn't a check for the type, then the 'blanks' you're seeing > are buttons. > > > Kristina Anderson wrote: > > it's implicitly referenced, i.e. the name of the element is being > > passed in as an enumerated value assigned to the type of validation > > subroutine I want to call for that element. > > > > But by "by id" i guess that there needs to be an id="sameasname" in > > each form element...?? That could be the issue? > > > > --Kristina > > > > > >> That's correct Javascript, assuming that fld = > >> document.getElementById('the element you are referencing') > >> > >> Kristina Anderson wrote: > >> > >>> if (fld.value.length == 0) { > >>> > >>> > >>> is that even right? > >>> > >>> I thought it used to be fld.length or fld.text.length...?? > >>> > >>> > >>> Kristina > >>> > >>> > >>> > >>> > >>>> Rolan, > >>>> > >>>> I found this one that looked very easy to expand at > >>>> > >>>> http://www.webcheatsheet.com/javascript/form_validation.php > >>>> > >>>> However it is not picking up the blank fields... > >>>> > >>>> I can try yours if you point me to it! > >>>> > >>>> I need something that is extensible to handle the various types of > >>>> input like emails, phone numbers, etc. > >>>> > >>>> -- Kristina > >>>> > >>>> > >>>> > >>>> > >>>>> which one are you using? FormChek.js is easy and hasn't let me > >>>>> > > down > > > >>>>> > >>>>> > >>>> yet. > >>>> > >>>> > >>>>> ~Rolan > >>>>> _______________________________________________ > >>>>> 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 > >>> > >>> > >>> > >>> > >> _______________________________________________ > >> 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 Wed May 7 11:16:28 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 7 May 2008 08:16:28 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210173388.20415@coral.he.net> Hi everyone -- thanks again for help and just wanted to let you know what the issue ended up being. If a label tag with for= is not used, then name= & id= must both be used inside the tag, as Javascript uses id & PHP uses name. -- Kristina > ed, > > it calls the subfunctions like so: > reason += validateUsername(theForm.user_name); > reason += validatePassword(theForm.pwd); > reason += validateEmail(theForm.email1); > reason += validatePhone(theForm.phone1); > reason += validateEmpty(theForm.first_name); > > which appears to be OK > > > Well that's different... if the Javascript is 'looping' over the form > > array as so: > > > > > > > > And there isn't a check for the type, then the 'blanks' you're seeing > > are buttons. > > > > > > Kristina Anderson wrote: > > > it's implicitly referenced, i.e. the name of the element is being > > > passed in as an enumerated value assigned to the type of validation > > > subroutine I want to call for that element. > > > > > > But by "by id" i guess that there needs to be an id="sameasname" in > > > each form element...?? That could be the issue? > > > > > > --Kristina > > > > > > > > >> That's correct Javascript, assuming that fld = > > >> document.getElementById('the element you are referencing') > > >> > > >> Kristina Anderson wrote: > > >> > > >>> if (fld.value.length == 0) { > > >>> > > >>> > > >>> is that even right? > > >>> > > >>> I thought it used to be fld.length or fld.text.length...?? > > >>> > > >>> > > >>> Kristina > > >>> > > >>> > > >>> > > >>> > > >>>> Rolan, > > >>>> > > >>>> I found this one that looked very easy to expand at > > >>>> > > >>>> http://www.webcheatsheet.com/javascript/form_validation.php > > >>>> > > >>>> However it is not picking up the blank fields... > > >>>> > > >>>> I can try yours if you point me to it! > > >>>> > > >>>> I need something that is extensible to handle the various types > of > > >>>> input like emails, phone numbers, etc. > > >>>> > > >>>> -- Kristina > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>> which one are you using? FormChek.js is easy and hasn't let me > > >>>>> > > > down > > > > > >>>>> > > >>>>> > > >>>> yet. > > >>>> > > >>>> > > >>>>> ~Rolan > > >>>>> _______________________________________________ > > >>>>> 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 > > >>> > > >>> > > >>> > > >>> > > >> _______________________________________________ > > >> 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 > > > > > > _______________________________________________ > 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 May 7 11:25:46 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 7 May 2008 08:25:46 -0700 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit Message-ID: <1210173946.23588@coral.he.net> PS special thanks to Tedd for testing the script for me. Also, I've forwarded this thread to the person who designed the HTML forms for this project. Is there any reason to prefer label tags over using id, or is either one fine going forward? --Kristina > Hi everyone -- thanks again for help and just wanted to let you know > what the issue ended up being. > > If a label tag with for= is not used, then name= & id= must both be > used inside the tag, as Javascript uses id & PHP uses name. > > > > -- Kristina > > > ed, > > > > it calls the subfunctions like so: > > reason += validateUsername(theForm.user_name); > > reason += validatePassword(theForm.pwd); > > reason += validateEmail(theForm.email1); > > reason += validatePhone(theForm.phone1); > > reason += validateEmpty(theForm.first_name); > > > > which appears to be OK > > > > > Well that's different... if the Javascript is 'looping' over the > form > > > array as so: > > > > > > > > > > > > And there isn't a check for the type, then the 'blanks' you're > seeing > > > are buttons. > > > > > > > > > Kristina Anderson wrote: > > > > it's implicitly referenced, i.e. the name of the element is being > > > > passed in as an enumerated value assigned to the type of > validation > > > > subroutine I want to call for that element. > > > > > > > > But by "by id" i guess that there needs to be an id="sameasname" > in > > > > each form element...?? That could be the issue? > > > > > > > > --Kristina > > > > > > > > > > > >> That's correct Javascript, assuming that fld = > > > >> document.getElementById('the element you are referencing') > > > >> > > > >> Kristina Anderson wrote: > > > >> > > > >>> if (fld.value.length == 0) { > > > >>> > > > >>> > > > >>> is that even right? > > > >>> > > > >>> I thought it used to be fld.length or fld.text.length...?? > > > >>> > > > >>> > > > >>> Kristina > > > >>> > > > >>> > > > >>> > > > >>> > > > >>>> Rolan, > > > >>>> > > > >>>> I found this one that looked very easy to expand at > > > >>>> > > > >>>> http://www.webcheatsheet.com/javascript/form_validation.php > > > >>>> > > > >>>> However it is not picking up the blank fields... > > > >>>> > > > >>>> I can try yours if you point me to it! > > > >>>> > > > >>>> I need something that is extensible to handle the various > types > > of > > > >>>> input like emails, phone numbers, etc. > > > >>>> > > > >>>> -- Kristina > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>> which one are you using? FormChek.js is easy and hasn't let > me > > > >>>>> > > > > down > > > > > > > >>>>> > > > >>>>> > > > >>>> yet. > > > >>>> > > > >>>> > > > >>>>> ~Rolan > > > >>>>> _______________________________________________ > > > >>>>> 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 > > > >>> > > > >>> > > > >>> > > > >>> > > > >> _______________________________________________ > > > >> 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 > > > > > > > > > > _______________________________________________ > > 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 tedd at sperling.com Wed May 7 16:21:50 2008 From: tedd at sperling.com (tedd) Date: Wed, 7 May 2008 16:21:50 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <1210173946.23588@coral.he.net> References: <1210173946.23588@coral.he.net> Message-ID: At 8:25 AM -0700 5/7/08, Kristina Anderson wrote: >PS special thanks to Tedd for testing the script for me. > >Also, I've forwarded this thread to the person who designed the HTML >forms for this project. > >Is there any reason to prefer label tags over using id, or is either >one fine going forward? Kristina: Labels are good for accessibility. Also, please review: http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels and if you will note, the W3C uses both label and id in their example. Can't go too wrong following their lead. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From david at davidmintz.org Thu May 8 12:29:23 2008 From: david at davidmintz.org (David Mintz) Date: Thu, 8 May 2008 12:29:23 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <43FCC77C-96F1-4D0A-9EAC-5EB20DD33D58@o2group.com> References: <1210112721.12577@coral.he.net> <43FCC77C-96F1-4D0A-9EAC-5EB20DD33D58@o2group.com> Message-ID: <721f1cc50805080929kdd07ea2k16d2a96fdcfd869f@mail.gmail.com> Amen to that -- Firebug is an immense help. Indispensable, even, if you are doing Ajax and need to inspect the stuff coming back at you. Too bad FF 2.x is such a prolifigate hog and waster of memory -- it's really killing me here on Fedora 7. On Tue, May 6, 2008 at 6:49 PM, Tim Lieberman wrote: > Also: Firebug is your friend. Just set a breakpoint on the first line of > your function, and step through. > > -Tim > > > On May 6, 2008, at 4:25 PM, Kristina Anderson wrote: > > thanks!! will do. >> >> >> >> On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson >>> wrote: >>> >>>> >>>> Hi everyone -- >>>> >>>> I'm trying to build out a validation routine for my input forms and >>>> found something that I like/find easy to extend. I added it as an >>>> external script to my test page. I tested to make sure all the >>>> subfunctions were being called by inserting alert boxes and they >>>> >>> are >> >>> being called. Unfortunately, the routine is not picking up my >>>> empty/non valid fields and instead appears to be just >>>> >>> returning "true" >> >>> and submitting the form. >>>> >>>> >>> My guess is that your javascript has errors which prevents the submit >>> handler from returning false. This makes it really hard for >>> debugging... >>> >>> Try the following when developing: >>> >>> instead of >>> >>> >>> This way when "validate" errors out, the submission will still be >>> trapped and you can see the errors in the console. >>> >>> HTH, >>> >>> -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 >> > > _______________________________________________ > 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 > -- 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 Thu May 8 12:33:37 2008 From: y2rob at aol.com (y2rob at aol.com) Date: Thu, 08 May 2008 12:33:37 -0400 Subject: [nycphp-talk] Trapping JS errors in function called onSubmit In-Reply-To: <721f1cc50805080929kdd07ea2k16d2a96fdcfd869f@mail.gmail.com> References: <1210112721.12577@coral.he.net> <43FCC77C-96F1-4D0A-9EAC-5EB20DD33D58@o2group.com> <721f1cc50805080929kdd07ea2k16d2a96fdcfd869f@mail.gmail.com> Message-ID: <8CA7F4066A6B7E2-D48-1E96@webmail-da06.sysops.aol.com> yeah YAY TO FIREBUG!!!? I hear though that FF 3 is way better; it's what i hear :) so don't quote me on that. ~rob -----Original Message----- From: David Mintz To: NYPHP Talk Sent: Thu, 8 May 2008 12:29 pm Subject: Re: [nycphp-talk] Trapping JS errors in function called onSubmit Amen to that -- Firebug is an immense help. Indispensable, even, if you are doing Ajax and need to inspect the stuff coming back at you. Too bad FF 2.x is such a prolifigate hog and waster of memory -- it's really killing me here on Fedora 7. On Tue, May 6, 2008 at 6:49 PM, Tim Lieberman wrote: Also: Firebug is your friend. ?Just set a breakpoint on the first line of your function, and step through. -Tim On May 6, 2008, at 4:25 PM, Kristina Anderson wrote: thanks!! ?will do. On Tue, May 6, 2008 at 5:59 PM, Kristina Anderson wrote: ?Hi everyone -- ?I'm trying to build out a validation routine for my input forms and ?found something that I like/find easy to extend. ?I added it as an ?external script to my test page. ?I tested to make sure all the ?subfunctions were being called by inserting alert boxes and they are ?being called. ?Unfortunately, the routine is not picking up my ?empty/non valid fields and instead appears to be just returning "true" ?and submitting the form. My guess is that your javascript has errors which prevents the submit handler from returning false. ?This makes it really hard for debugging... Try the following when developing: instead of This way when "validate" errors out, the submission will still be trapped and you can see the errors in the console. HTH, -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 _______________________________________________ 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 -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri May 9 16:37:33 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 9 May 2008 16:37:33 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite Message-ID: <032801c8b214$82790b40$876b21c0$@com> Hello, The ever fashionable mod_rewrite is throwing me for a loop. Here's the scenario: http://something.domain.com -> rewrite -> http://www.domain.com/something Any pointers/examples on how to do this with mod_rewrite? Thanks much, H From jmcgraw1 at gmail.com Fri May 9 16:42:48 2008 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 9 May 2008 16:42:48 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <032801c8b214$82790b40$876b21c0$@com> References: <032801c8b214$82790b40$876b21c0$@com> Message-ID: > http://something.domain.com -> rewrite -> http://www.domain.com/something Wouldn't you need to set this up in your virtual hosts file? Something like this: http://httpd.apache.org/docs/2.0/vhosts/mass.html - jake On Fri, May 9, 2008 at 4:37 PM, Hans Zaunere wrote: > Hello, > > The ever fashionable mod_rewrite is throwing me for a loop. Here's the > scenario: > > http://something.domain.com -> rewrite -> http://www.domain.com/something > > Any pointers/examples on how to do this with mod_rewrite? > > Thanks much, > > 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 Fri May 9 16:47:54 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 09 May 2008 16:47:54 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <032801c8b214$82790b40$876b21c0$@com> References: <032801c8b214$82790b40$876b21c0$@com> Message-ID: <4824B87A.6060002@covenantedesign.com> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(something\.)?domain.com/.*$ [NC] RewriteRule \.$ http://www.domain.com/something [R,L] Hans Zaunere wrote: > Hello, > > The ever fashionable mod_rewrite is throwing me for a loop. Here's the > scenario: > > http://something.domain.com -> rewrite -> http://www.domain.com/something > > Any pointers/examples on how to do this with mod_rewrite? > > Thanks much, > > 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 Fri May 9 16:55:12 2008 From: consult at covenantedesign.com (Webmaster) Date: Fri, 09 May 2008 16:55:12 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <4824B87A.6060002@covenantedesign.com> References: <032801c8b214$82790b40$876b21c0$@com> <4824B87A.6060002@covenantedesign.com> Message-ID: <4824BA30.7030408@covenantedesign.com> I should actually read what you write eh Hans? lol Try replacing HTTP_REFERER with: HTTP_HOST or SERVER_ADDRESS Webmaster wrote: > RewriteEngine on > RewriteCond %{HTTP_REFERER} !^$ > RewriteCond %{HTTP_REFERER} ^http://(something\.)?domain.com/.*$ [NC] > RewriteRule \.$ http://www.domain.com/something [R,L] > > > > > Hans Zaunere wrote: >> Hello, >> >> The ever fashionable mod_rewrite is throwing me for a loop. Here's the >> scenario: >> >> http://something.domain.com -> rewrite -> >> http://www.domain.com/something >> >> Any pointers/examples on how to do this with mod_rewrite? >> >> Thanks much, >> >> 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 >> >> >> >> > > > _______________________________________________ > 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 Fri May 9 16:56:04 2008 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 09 May 2008 16:56:04 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <032801c8b214$82790b40$876b21c0$@com> References: <032801c8b214$82790b40$876b21c0$@com> Message-ID: <4824BA64.6080109@phpwerx.net> Hans Zaunere wrote: > The ever fashionable mod_rewrite is throwing me for a loop. Here's the > scenario: > > http://something.domain.com -> rewrite -> http://www.domain.com/something > > Any pointers/examples on how to do this with mod_rewrite? You may want to try something like: RewriteCond %{SERVER_NAME} ^(something)\.domain\.com RewriteRule ^/(.*) http://www.domain.com/%1/$1 [R] Dan From jcampbell1 at gmail.com Fri May 9 17:01:07 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Fri, 9 May 2008 17:01:07 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <4824BA64.6080109@phpwerx.net> References: <032801c8b214$82790b40$876b21c0$@com> <4824BA64.6080109@phpwerx.net> Message-ID: <8f0676b40805091401y310a12dds905e08bb29e8b6db@mail.gmail.com> You will also want [R=301] instead of [R] ...assuming you care about search engines and want the reputation of the "something" subdomain to transfer to the "www" domain. -John C. From lists at zaunere.com Fri May 9 17:22:15 2008 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 9 May 2008 17:22:15 -0400 Subject: [nycphp-talk] Subdomain mod_rewrite In-Reply-To: <8f0676b40805091401y310a12dds905e08bb29e8b6db@mail.gmail.com> References: <032801c8b214$82790b40$876b21c0$@com> <4824BA64.6080109@phpwerx.net> <8f0676b40805091401y310a12dds905e08bb29e8b6db@mail.gmail.com> Message-ID: <033c01c8b21a$c0d3f7f0$427be7d0$@com> > You will also want I think these suggestions will do it - love you all, and to all a good night. H From zippy1981 at gmail.com Sat May 10 00:26:03 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Sat, 10 May 2008 00:26:03 -0400 Subject: [nycphp-talk] Off Topic: Postgres user group Message-ID: <5458db3c0805092126y2b1e6cb8n31a306bc92960759@mail.gmail.com> Hello, My name is Justin Dearing and I am new to this list. I was told that there was some interest in forming a NYC Postgresql group. That would be something I would be interested in participating in. If there is a more appropriate forum for discussing this feel free to contact me either on or off list. Regards, Justin Dearing http://www.ohloh.net/accounts/1193 From anthony at thrillist.com Mon May 12 14:36:36 2008 From: anthony at thrillist.com (anthony wlodarski) Date: Mon, 12 May 2008 14:36:36 -0400 Subject: [nycphp-talk] Off Topic: Postgres user group In-Reply-To: <5458db3c0805092126y2b1e6cb8n31a306bc92960759@mail.gmail.com> References: <5458db3c0805092126y2b1e6cb8n31a306bc92960759@mail.gmail.com> Message-ID: <9DC4F53A-D0AB-4707-9533-5F4ABC3649CA@thrillist.com> We have decided to use PgSQL as our main database for our Drupal environment. This group might be of use to me and others on here. I haven't done any research to see what NYC PgSQL groups there are but I would cross reference your search with meetup.com. -Anthony On May 10, 2008, at 12:26 AM, Justin Dearing wrote: > Hello, > > My name is Justin Dearing and I am new to this list. > > I was told that there was some interest in forming a NYC Postgresql > group. That would be something I would be interested in participating > in. If there is a more appropriate forum for discussing this feel free > to contact me either on or off list. > > Regards, > > Justin Dearing > http://www.ohloh.net/accounts/1193 > _______________________________________________ > 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 > Anthony Wlodarski PHP/MySQL Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Mon May 12 19:13:40 2008 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 12 May 2008 19:13:40 -0400 Subject: [nycphp-talk] Off Topic: Postgres user group In-Reply-To: <5458db3c0805092126y2b1e6cb8n31a306bc92960759@mail.gmail.com> References: <5458db3c0805092126y2b1e6cb8n31a306bc92960759@mail.gmail.com> Message-ID: <003201c8b485$d2930680$77b91380$@com> > My name is Justin Dearing and I am new to this list. Hi Justin. > I was told that there was some interest in forming a NYC Postgresql > group. That would be something I would be interested in participating > in. If there is a more appropriate forum for discussing this feel free > to contact me either on or off list. I've created a mailing list for PostgreSQL. We've got one for MySQL, so it actually only seems fair :) http://lists.nyphp.org/mailman/listinfo/pgsql If anyone spots any issues, please let me know. As for meetings, I could help setup some space, however I wouldn't have time to organize it. If anyone is interested, though, step up to the plate. This is how our other SIGs, like Joomla!, has really taken off. --- Hans Zaunere / President / New York PHP www.nyphp.org / ?www.nyphp.com > > Regards, > > Justin Dearing > http://www.ohloh.net/accounts/1193 > _______________________________________________ > 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 Tue May 13 10:38:53 2008 From: ben at projectskyline.com (Ben Sgro) Date: Tue, 13 May 2008 10:38:53 -0400 Subject: [nycphp-talk] Schema Validation Message-ID: <4829A7FD.4020207@projectskyline.com> Hello, I'm having a lot of trouble getting the dom object schema validation to work. After looking on google, it seems there isn't a straight forward way to handle complex schemas. Take the following code: if (is_file($schemaFile)) { $domObj->load($requestXml); if (!$domObj->schemaValidate($schemaFile)) { load() is throwing a warning: Warning: DOMDocument::load() [function.DOMDocument-load]: I/O warning : failed to load external entity And so is the call to schemaValidate() Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: The document has no document element. My XML struct: My schema struct: - Ben From ben at projectskyline.com Tue May 13 11:04:05 2008 From: ben at projectskyline.com (Ben Sgro) Date: Tue, 13 May 2008 11:04:05 -0400 Subject: [nycphp-talk] Schema Validation [Solved] In-Reply-To: <4829A7FD.4020207@projectskyline.com> References: <4829A7FD.4020207@projectskyline.com> Message-ID: <4829ADE5.3010908@projectskyline.com> Hello, The first problem is that the .xsd was not up to date. The second is that you cannot call load() on an xml string, you have to call loadXML(). load() is for a file. - Ben Ben Sgro wrote: > Hello, > > I'm having a lot of trouble getting the dom object schema validation > to work. After looking on google, it seems there isn't a straight > forward way to handle > complex schemas. > > Take the following code: > > if (is_file($schemaFile)) > { > $domObj->load($requestXml); > if (!$domObj->schemaValidate($schemaFile)) > { > > > load() is throwing a warning: > Warning: DOMDocument::load() [ href='function.DOMDocument-load'>function.DOMDocument-load]: I/O > warning : failed to load external entity > > And so is the call to schemaValidate() > Warning: DOMDocument::schemaValidate() [ href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate]: > The document has no document element. > > My XML struct: > > > > My schema struct: > > > > > > > > > > type="SimpleNameValuePairType" minOccurs="0" > maxOccurs="unbounded"/> > > > > > > > > maxOccurs="3"> > > > minOccurs="0" maxOccurs="1"> > > > name="SubjectTypeRef" minOccurs="1" maxOccurs="unbounded"> > > > > > > > > > > name="DataPointGroups" minOccurs="0" maxOccurs="1"> > > > name="DataPointGroup"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > minOccurs="0" maxOccurs="1"> > > > name="Transformation"/> > > name="enabled" type="xs:boolean"/> > name="filename"/> > > > > > > base="NonEmptyString"> > value="development|testing|published"> > > > > use="optional" type="xs:integer"/> > > > > > > > > > > > > > > > processContents="lax"/> > > > > > > > > > > > > > > > > > minOccurs="0" > maxOccurs="unbounded"/> > > > > > > > > > > > > > > > > > > > > - Ben > _______________________________________________ > 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 jonathanw at amoeba.co.za Tue May 13 11:23:53 2008 From: jonathanw at amoeba.co.za (Jonathan Wagener) Date: Tue, 13 May 2008 17:23:53 +0200 Subject: [nycphp-talk] Installing postgresql on windows xp In-Reply-To: References: Message-ID: Hi guys, how would I be able to install postgresql on my pc - im running windows xp pro (also running wampserver). Jonathan Wagener Web Developer / Architect Amoeba Business Solutions Cell: +27 72 928 0513 Office: +27 21 785 1424 Web: www.amoeba.co.za Blog: www.espresso-online.info -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of talk-request at lists.nyphp.org Sent: 13 May 2008 17:16 To: talk at lists.nyphp.org Subject: talk Digest, Vol 19, Issue 16 Send talk mailing list submissions to talk at lists.nyphp.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.nyphp.org/mailman/listinfo/talk or, via email, send a message with subject or body 'help' to talk-request at lists.nyphp.org You can reach the person managing the list at talk-owner at lists.nyphp.org When replying, please edit your Subject line so it is more specific than "Re: Contents of talk digest..." Today's Topics: 1. Re: Off Topic: Postgres user group (anthony wlodarski) 2. RE: Off Topic: Postgres user group (Hans Zaunere) 3. Schema Validation (Ben Sgro) 4. Re: Schema Validation [Solved] (Ben Sgro) ---------------------------------------------------------------------- Message: 1 Date: Mon, 12 May 2008 14:36:36 -0400 From: anthony wlodarski Subject: Re: [nycphp-talk] Off Topic: Postgres user group To: NYPHP Talk Message-ID: <9DC4F53A-D0AB-4707-9533-5F4ABC3649CA at thrillist.com> Content-Type: text/plain; charset="us-ascii" We have decided to use PgSQL as our main database for our Drupal environment. This group might be of use to me and others on here. I haven't done any research to see what NYC PgSQL groups there are but I would cross reference your search with meetup.com. -Anthony On May 10, 2008, at 12:26 AM, Justin Dearing wrote: > Hello, > > My name is Justin Dearing and I am new to this list. > > I was told that there was some interest in forming a NYC Postgresql > group. That would be something I would be interested in participating > in. If there is a more appropriate forum for discussing this feel free > to contact me either on or off list. > > Regards, > > Justin Dearing > http://www.ohloh.net/accounts/1193 > _______________________________________________ > 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 > Anthony Wlodarski PHP/MySQL Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/talk/attachments/20080512/68fdea36/attachment-0001.html ------------------------------ Message: 2 Date: Mon, 12 May 2008 19:13:40 -0400 From: "Hans Zaunere" Subject: RE: [nycphp-talk] Off Topic: Postgres user group To: "'NYPHP Talk'" Cc: pgsql at lists.nyphp.org Message-ID: <003201c8b485$d2930680$77b91380$@com> Content-Type: text/plain; charset="iso-8859-1" > My name is Justin Dearing and I am new to this list. Hi Justin. > I was told that there was some interest in forming a NYC Postgresql > group. That would be something I would be interested in participating > in. If there is a more appropriate forum for discussing this feel free > to contact me either on or off list. I've created a mailing list for PostgreSQL. We've got one for MySQL, so it actually only seems fair :) http://lists.nyphp.org/mailman/listinfo/pgsql If anyone spots any issues, please let me know. As for meetings, I could help setup some space, however I wouldn't have time to organize it. If anyone is interested, though, step up to the plate. This is how our other SIGs, like Joomla!, has really taken off. --- Hans Zaunere / President / New York PHP www.nyphp.org / ?www.nyphp.com > > Regards, > > Justin Dearing > http://www.ohloh.net/accounts/1193 > _______________________________________________ > 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 ------------------------------ Message: 3 Date: Tue, 13 May 2008 10:38:53 -0400 From: Ben Sgro Subject: [nycphp-talk] Schema Validation To: NYPHP Talk Message-ID: <4829A7FD.4020207 at projectskyline.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hello, I'm having a lot of trouble getting the dom object schema validation to work. After looking on google, it seems there isn't a straight forward way to handle complex schemas. Take the following code: if (is_file($schemaFile)) { $domObj->load($requestXml); if (!$domObj->schemaValidate($schemaFile)) { load() is throwing a warning: Warning: DOMDocument::load() [function.DOMDocument-load]: I/O warning : failed to load external entity And so is the call to schemaValidate() Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: The document has no document element. My XML struct: My schema struct: - Ben ------------------------------ Message: 4 Date: Tue, 13 May 2008 11:04:05 -0400 From: Ben Sgro Subject: Re: [nycphp-talk] Schema Validation [Solved] To: NYPHP Talk Message-ID: <4829ADE5.3010908 at projectskyline.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hello, The first problem is that the .xsd was not up to date. The second is that you cannot call load() on an xml string, you have to call loadXML(). load() is for a file. - Ben Ben Sgro wrote: > Hello, > > I'm having a lot of trouble getting the dom object schema validation > to work. After looking on google, it seems there isn't a straight > forward way to handle complex schemas. > > Take the following code: > > if (is_file($schemaFile)) > { > $domObj->load($requestXml); > if (!$domObj->schemaValidate($schemaFile)) > { > > > load() is throwing a warning: > Warning: DOMDocument::load() [ href='function.DOMDocument-load'>function.DOMDocument-load]: I/O > warning : failed to load external entity > > And so is the call to schemaValidate() > Warning: DOMDocument::schemaValidate() [ href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate]: > The document has no document element. > > My XML struct: > > > > My schema struct: > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > > > > type="SimpleNameValuePairType" minOccurs="0" > maxOccurs="unbounded"/> > > > > > > > > maxOccurs="3"> > > > minOccurs="0" maxOccurs="1"> > > > name="SubjectTypeRef" minOccurs="1" maxOccurs="unbounded"> > > > > > > > > > > > name="DataPointGroups" minOccurs="0" maxOccurs="1"> > > > name="DataPointGroup"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > minOccurs="0" maxOccurs="1"> > > > name="Transformation"/> > > name="enabled" type="xs:boolean"/> > name="filename"/> > > > > > > base="NonEmptyString"> > value="development|testing|published"> > > > > use="optional" type="xs:integer"/> > > > > > > > > > > > > > > > processContents="lax"/> > > > > > > > > > > > > > > > > > minOccurs="0" > maxOccurs="unbounded"/> > > > > > > > > > > > > > > > > > > > > - Ben > _______________________________________________ > 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 > ------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk End of talk Digest, Vol 19, Issue 16 ************************************ No virus found in this incoming message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.16/1430 - Release Date: 13/05/2008 07:31 No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.16/1430 - Release Date: 13/05/2008 07:31 From lists at zaunere.com Tue May 13 11:23:02 2008 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 13 May 2008 11:23:02 -0400 Subject: [nycphp-talk] Installing postgresql on windows xp In-Reply-To: References: Message-ID: <015f01c8b50d$3c101b70$b4305250$@com> Jonathan, et al, When posting a message, please do not reply to the digest email you receive. For everyone's benefit, take the time to compose a new email message. To address your question, you may find this link useful: http://www.google.com/search?q=postgresql+windows+xp And you're encouraged to see the new PostgreSQL Mailing list, as mentioned in this digest that you replied to. --- 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 Jonathan Wagener > Sent: Tuesday, May 13, 2008 11:24 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] Installing postgresql on windows xp > Importance: High > > Hi guys, how would I be able to install postgresql on my pc - im > running windows xp pro (also running wampserver). > > > Jonathan Wagener > Web Developer / Architect > Amoeba Business Solutions > Cell: +27 72 928 0513 > Office: +27 21 785 1424 > Web: www.amoeba.co.za > Blog: www.espresso-online.info > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] On Behalf Of talk-request at lists.nyphp.org > Sent: 13 May 2008 17:16 > To: talk at lists.nyphp.org > Subject: talk Digest, Vol 19, Issue 16 > > Send talk mailing list submissions to > talk at lists.nyphp.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.nyphp.org/mailman/listinfo/talk > or, via email, send a message with subject or body 'help' to > talk-request at lists.nyphp.org > > You can reach the person managing the list at > talk-owner at lists.nyphp.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of talk digest..." > > > Today's Topics: > > 1. Re: Off Topic: Postgres user group (anthony wlodarski) > 2. RE: Off Topic: Postgres user group (Hans Zaunere) > 3. Schema Validation (Ben Sgro) > 4. Re: Schema Validation [Solved] (Ben Sgro) From tgales at tgaconnect.com Tue May 13 11:28:39 2008 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 13 May 2008 11:28:39 -0400 Subject: [nycphp-talk] Schema Validation In-Reply-To: <4829A7FD.4020207@projectskyline.com> References: <4829A7FD.4020207@projectskyline.com> Message-ID: <4829B3A7.4070104@tgaconnect.com> Ben Sgro wrote: > Hello, > > I'm having a lot of trouble getting the dom object schema validation > to work. After looking on google, it seems there isn't a straight > forward way to handle > complex schemas. > > Take the following code: > > if (is_file($schemaFile)) > { > $domObj->load($requestXml); > if (!$domObj->schemaValidate($schemaFile)) > { > > > load() is throwing a warning: > Warning: DOMDocument::load() [ href='function.DOMDocument-load'>function.DOMDocument-load]: I/O > warning : failed to load external entity This looks to me like its not getting a stream going, or if its local acccess it might be a file permission problem. > > And so is the call to schemaValidate() > Warning: DOMDocument::schemaValidate() [ href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate]: > The document has no document element. You may not not only not have a document element -- you may not have any document at all. -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From phil at bearingasset.com Tue May 13 11:57:06 2008 From: phil at bearingasset.com (Phil Duffy) Date: Tue, 13 May 2008 11:57:06 -0400 Subject: [nycphp-talk] Potential Setting Problem In-Reply-To: Message-ID: Please inform me if this query is mis-directed. After a year of being away from PHP development I am trying to re-establish an environment which combines Apache 2.2, Zend Studio 5.5 (including PHP 5) and the upgraded version of Seagull framework on Windows XP. I know the Apache 2.2 layer is working, but something is wrong at the PHP level. It appears to be independent of Seagull, because it also affects phpMyAdmin in the same way (both applications are subs under C:\Program Files\Apache Software Foundation\Apache2.2\htdocs). I also know that it is browser independent having tried it in both Firefox and IE. An address of localhost/seagull/www brings up the Index of seagull/www which includes index.php. However, localhost/seagull/www/index.php does not execute and display the Seagull entry screen. The behavior is identical if I attempt to address phpMyAdmin. It seems to me that I have a basic setting that is incorrect. Can anyone point me toward that? Phil From jcampbell1 at gmail.com Tue May 13 13:30:58 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Tue, 13 May 2008 13:30:58 -0400 Subject: [nycphp-talk] Potential Setting Problem In-Reply-To: <4829ba5a.0e36640a.1e07.04fdSMTPIN_ADDED@mx.google.com> References: <4829ba5a.0e36640a.1e07.04fdSMTPIN_ADDED@mx.google.com> Message-ID: <8f0676b40805131030w5b4c1f94s9c2ebfa00b11d73e@mail.gmail.com> On Tue, May 13, 2008 at 11:57 AM, Phil Duffy wrote: > An address of localhost/seagull/www brings up the Index of seagull/www which > includes index.php. However, localhost/seagull/www/index.php does not > execute and display the Seagull entry screen. The behavior is identical if > I attempt to address phpMyAdmin. > > It seems to me that I have a basic setting that is incorrect. Can anyone > point me toward that? > Sounds like mod_php isn't installed / configured. You need to install and configure the apache php module. I am not familiar with windows, but you should be able to figure it out with some googling. I suspect it involves moving something like "mod_php5.dll" into an apache modules folder, editing the apache .conf file to load the module, then restarting apache. -John C. From michael.southwell at nyphp.com Tue May 13 13:43:19 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Tue, 13 May 2008 13:43:19 -0400 Subject: [nycphp-talk] Potential Setting Problem In-Reply-To: <8f0676b40805131030w5b4c1f94s9c2ebfa00b11d73e@mail.gmail.com> References: <4829ba5a.0e36640a.1e07.04fdSMTPIN_ADDED@mx.google.com> <8f0676b40805131030w5b4c1f94s9c2ebfa00b11d73e@mail.gmail.com> Message-ID: <4829D337.9010504@nyphp.com> John Campbell wrote: > On Tue, May 13, 2008 at 11:57 AM, Phil Duffy wrote: >> An address of localhost/seagull/www brings up the Index of seagull/www which >> includes index.php. However, localhost/seagull/www/index.php does not >> execute and display the Seagull entry screen. The behavior is identical if >> I attempt to address phpMyAdmin. >> >> It seems to me that I have a basic setting that is incorrect. Can anyone >> point me toward that? also make sure that index.php is included in the list of files to serve under the DirectoryIndex heading in httpd.conf >> > > Sounds like mod_php isn't installed / configured. You need to install > and configure the apache php module. I am not familiar with windows, > but you should be able to figure it out with some googling. I suspect > it involves moving something like "mod_php5.dll" into an apache > modules folder, editing the apache .conf file to load the module, then > restarting apache. > > -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 > -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From ps at sun-code.com Tue May 13 14:16:47 2008 From: ps at sun-code.com (Peter Sawczynec) Date: Tue, 13 May 2008 14:16:47 -0400 Subject: [nycphp-talk] Potential Setting Problem In-Reply-To: <200805131556.m4DFuoNO001099@inbound-mx30.atl.registeredsite.com> References: <200805131556.m4DFuoNO001099@inbound-mx30.atl.registeredsite.com> Message-ID: <000001c8b525$8246baf0$86d430d0$@com> The Apache error log, Windows system and application error logs and when PHP is running the PHP error log are very helpful in getting a clue on this type of issue. P -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Duffy Sent: Tuesday, May 13, 2008 11:57 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Potential Setting Problem Please inform me if this query is mis-directed. After a year of being away from PHP development I am trying to re-establish an environment which combines Apache 2.2, Zend Studio 5.5 (including PHP 5) and the upgraded version of Seagull framework on Windows XP. I know the Apache 2.2 layer is working, but something is wrong at the PHP level. It appears to be independent of Seagull, because it also affects phpMyAdmin in the same way (both applications are subs under C:\Program Files\Apache Software Foundation\Apache2.2\htdocs). I also know that it is browser independent having tried it in both Firefox and IE. An address of localhost/seagull/www brings up the Index of seagull/www which includes index.php. However, localhost/seagull/www/index.php does not execute and display the Seagull entry screen. The behavior is identical if I attempt to address phpMyAdmin. It seems to me that I have a basic setting that is incorrect. Can anyone point me toward that? Phil _______________________________________________ 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 tonmere at gmail.com Wed May 14 12:44:02 2008 From: tonmere at gmail.com (A A) Date: Wed, 14 May 2008 12:44:02 -0400 Subject: [nycphp-talk] Off subject; sorry, but... Message-ID: <212cb60f0805140944j4e44fd53n5c35520bd41c03f6@mail.gmail.com> HI everyone, i know this isn't PHP related, but I've been searching everywhere: I'm in dire need of a flash based image recognition software/app ASAP. This company (nameless) is NOT pulling through and we're at a function right now. I don't care if we need to buy it. It's really embarrassing that this company has left us looking like this. Does anyone know of a chat room, email or someone's ph# who wouldn't mind me ringing, that knows about this? Or someone who is a champ flash developer? Thanks so much, so desperate. Joanne -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcampbell1 at gmail.com Wed May 14 13:04:04 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 14 May 2008 13:04:04 -0400 Subject: [nycphp-talk] Off subject; sorry, but... In-Reply-To: <212cb60f0805140944j4e44fd53n5c35520bd41c03f6@mail.gmail.com> References: <212cb60f0805140944j4e44fd53n5c35520bd41c03f6@mail.gmail.com> Message-ID: <8f0676b40805141004p57d6e720reacb66f17161c0ca@mail.gmail.com> On Wed, May 14, 2008 at 12:44 PM, A A wrote: > I'm in dire need of a flash based image recognition software/app ASAP. What does that mean? That sounds a bit like "I am in dire need of a rocket ship to travel to mars, and it needs to be made with legos." The current crop of production ready image recognition software is pretty much limited to recognizing faces, OCR, and a few other trivial things. -John C. From zippy1981 at gmail.com Wed May 14 13:10:29 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 14 May 2008 13:10:29 -0400 Subject: [nycphp-talk] Off subject; sorry, but... In-Reply-To: <8f0676b40805141004p57d6e720reacb66f17161c0ca@mail.gmail.com> References: <212cb60f0805140944j4e44fd53n5c35520bd41c03f6@mail.gmail.com> <8f0676b40805141004p57d6e720reacb66f17161c0ca@mail.gmail.com> Message-ID: <5458db3c0805141010p650a0c17x7cfa08e678463521@mail.gmail.com> Yes and for this analogy legos == flash. Now assuming you need your image recognition software to travel to do something like recognize faces, and you need to be able to display results through a flash applet, I'm sure you can fiund something written in C++ or maybe .NET that has a API that you can expose via a web service. You can then write a flash applet to interface with it. If you can write the code fast enough you might be able to save face, and you also have a story that matches Turbo Pascal being written in a weekend in a motel room. On Wed, May 14, 2008 at 1:04 PM, John Campbell wrote: > On Wed, May 14, 2008 at 12:44 PM, A A wrote: >> I'm in dire need of a flash based image recognition software/app ASAP. > > What does that mean? That sounds a bit like "I am in dire need of a > rocket ship to travel to mars, and it needs to be made with legos." > The current crop of production ready image recognition software is > pretty much limited to recognizing faces, OCR, and a few other trivial > things. > > -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 compustretch at gmail.com Thu May 15 13:50:06 2008 From: compustretch at gmail.com (forest mars) Date: Thu, 15 May 2008 13:50:06 -0400 Subject: [nycphp-talk] PHP Performance talk at UNIGROUP Thursday 22-MAY: "Serving High Performance Web Sites" Message-ID: The May meeting of Unigroup (next Thursday May 22) will be a presentation on web performance, at least one-third of which will be spent on speeing up PHP in Apache and faster lighter web servers. This should be a great meeting, and hoping to see many NYPHP'ers there! ForestM ================================================================ UNIGROUP OF NEW YORK - UNIX USERS GROUP - MAY 2008 ANNOUNCEMENTS ================================================================ ---------------------------------- 1. UNIGROUP'S MAY 2008 MEETING NOTICE ---------------------------------- When: THURSDAY, May 22, 2008 (** SPECIAL 4th Thursday **) Where: Alliance for Downtown NY Conference Facility Downtown Center 104 Washington Street South West Corner of Wall Street Area Downtown, New York City ** Please RSVP (not mandatory) ** Time: 6:15 PM - 6:25 PM Registration 6:25 PM - 6:45 PM Ask the Wizard, Questions, Answers and Current Events 6:45 PM - 7:00 PM Unigroup Business and Announcements 7:00 PM - 9:30 PM Main Presentation ------------------------------------------------------- Topic: Serving High Performance Web Sites - Where Apache Fails ------------------------------------------------------- Speaker: Anthony Ferrara, Bigtrue INC. ------------------------------------------------------------------- INTRODUCTION: ------------- This month's presentation should be very interesting... a technical talk on High Performance Web Servers and alternatives. We are also planning our next BSD meeting, with another presentation from George Neville-Neil of the The FreeBSD Project Team... tentatively something along the lines of: The FreeBSD Networking Stack (including recent work on supporting very high speed Ethernet standards, and security/packet filtering). We are also planning a Launch Meeting for the newly released OpenSolaris (Project Indiana) Distribution. ------------------------------------------------------------------- SPECIAL INSTRUCTIONS: --------------------- To REGISTER for this event, please RSVP by using the Unigroup Registration Page: http://www.unigroup.org/unigroup-rsvp.html This will allow us to automate the registration process. (Registration will also add you to our mailing list.) Please avoid emailed RSVPs. Please continue to check the Unigroup web site and meeting page, for any last minute updates concerning this meeting. If you registered for this meeting, please check your email for any last minute announcements as the meeting approaches. Also make sure any anti-spam white-lists are updated to _ALLOW_ Unigroup traffic! If you block Unigroup Emails, your address will be dropped from our mailing list. Please RSVP as soon as possible. Note: RSVP is not mandatory for this location, but it does help us to properly plan the meeting (food, drinks, handouts, seating, etc.). ------------------------------------------------------------------- MAIN PRESENTATION ----------------- Topic: Serving High Performance Web Sites - Where Apache Fails For nearly a decade, Apache has been seen as the only practical choice for serving static and dynamic content. To this day, it powers the majority of all web sites. However, Apache has several limitations and forthcomings (especially in the area of performance). Nearly a decade of experience has many people believing that these limitations are inherent in serving content (An entire industry has even been created to deal with these limitations). In reality, none of these limitations exist. We'll look into some of these shortcomings, and alternative technologies which exist that do not suffer from them. This talk will focus on technical and theoretical limitations inherent to the design of Apache. There will be at least a few benchmark results shown and explained. A big part of the talk will focus on why mod_php fails, and why FastCGI is superior. The following alternative web servers will be discussed: - FastCGI over mod_{php,perl,ruby,etc} - Lighttpd Web Server - Nginx (if there is time to finish the benchmarks) - TUX webserver (discussed briefly, including some system layouts possible with it) Web Resources: -------------- Apache Web Server http://httpd.apache.org/ Lighttpd Web Server http://www.lighttpd.net/ Nginx http://nginx.net/ Apache Modules: FastCGI over mod_{php,perl,ruby} http://modules.apache.org/search?id=73 http://modules.apache.org/search?id=80 TUX Web Server http://www.stllinux.org/meeting_notes/2001/0719/tux/index.html Joomla CMS http://joomla.org ------------------------------------------------------------------- Speaker Biography: ------------------ Anthony Ferrara is the team lead of the Joomla! Bug Squad, a member of the Joomla! Developer work group, owner and operator of JoomlaPerformance.com, and has released open source several caching programs to increase website speed. He has quite varied background ranging from Mathematics to Emergency Medicine (and quite a bit in between). ------------------------------------------------------------------- Company Biography: ------------------ Anthony's company, Bigtrue INC, specializes in consulting and development focusing on performance (specializing in the Joomla CMS). ------------------------------------------------------------------- Giveaways: ---------- Addison-Wesley Professional/Prentice Hall PTR has been kind enough to provide us with some of their books, which we will continue to raffle off as giveaways at our meetings. O'Reilly has been kind enough to provide us with some of their books, which we will continue to raffle off as giveaways at our meetings. Unigroup would like to thank both companies for the support provided by their User Group programs. Note: The chances tend to be about 1 in 5, that any attendee of our meeting will walk away with a fairly valuable giveaway (ie. most books are valued between $30 and $60)! ** Thanks to our friends at Sun Microsystems, Unigroup also has some Solaris 10 DVDs to raffle off. As always, all of the books will be available for review at the start of the meeting. ------------------------------------------------------------------- Fee Schedule: Yearly Membership (includes all meetings): $ 50.00 Non-Member Single Meeting: $ 20.00 Student Yearly Membership (with ID): $ 20.00 Non-Member Student Single Meeting (with ID): $ 5.00 Payment Methods: Cash, Check, American Express. ------------------------------------------------------------------- Complimentary Food and Refreshments will be served. This includes "wraps" such as turkey, roast beef, chicken, tuna and grilled vegetables as well as assorted salads (potato, tossed, pasta, etc), cookies, brownies, bottled water and assorted beverages. ------------------------------------------------------------------- Directions: Alliance for Downtown NY Conference Facility Downtown Center 104 Washington Street Wall Street Area Downtown, New York City This building is located on the West side of the street, the second building north of Rector Street. Cross Streets: Between Rector (South) and Carlisle (North) Streets. Our meeting location is in the Lower West Corner of Downtown, North of the Battery Tunnel, South of the Downtown Hotel, East of West Street, and West of Greenwich Street. Walking West on Rector Street from Broadway, you pass Church, Greenwich then Washington Streets. There are multiple blocks of parking lots right there, between Washington and Greenwich Streets, starting at the Battery Tunnel and extending North for a number of blocks. Nearest mass transit stations, in order, are the '1/9' (Rector Street), 'R/W' (Rector Street) and the '4/5' (Wall Street). ----- Please mark this meeting on your calendar and join us! Please tell your friends about Unigroup! ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------- 2. LOCAL NYC EVENTS ---------------- a) IASA IT Architect NYC Regional Conference - May 22-23 2008 ========================================================== The IT Architect Regional Conference is the largest event in NYC which addresses the needs of IT architects today. This event is sponsored by the NYC IASA Chapter. For information and paid registration visit: http://www.iasahome.org/web/itarc/nyc For information about the local IASA NYC Chapter visit: http://www.iasahome.org/web/newyork b) SIFMA (formerly SIA) Technology Management Conference 2008 ========================================================== Date: Tue, June 10 12:00pm - 6:00pm Wed, June 11, 9:00am - 6:00pm Thu, June 12, 9:00am - 12:00pm Where: Hilton New York 1335 6th Avenue NYC For information and online registration visit: http://events.sifma.org/2008/107/event.aspx?id=526 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ----------------- 3. UPCOMING MEETINGS ----------------- We have a series of meetings in the works: - FreeBSD 7 Launch Meeting, Part 2 - OpenSolaris Launch Meeting - Planning: IPsec and IPv6 and VPNs (possibly 3 meetings) - Planning: Unix/Linux/BSD Distribution Round Table Discussions - Planning: Asterix / Bayonne / OpenPBX-CallWeaver / VoIP - Planning: NO SPAM! - Crypto / PKI / GPG-PGP - The latest on *BSD (NetBSD/OpenBSD) - Patching and Updating Unix/Linux/BSD (rpm. yum, yast, etc.) - Building Custom Kernels Unix/Linux/BSD - Are there too many Linux Distributions? - Unix/Linux/BSD Clusters and Clustered Databases - Linux Clustering Part 3: Beowulf version 2 - Building a Firewall using FreeBSD and Linux - LAMP Part 2 - PHP - Field Trip to HP - Unix 35th Birthday Celebration (Sun has offered to host this!) - Samba - DNS - High Performance Internet Servers / Web Acceleration - Unix Office Tools: Word Processors, Spreadsheets, Accounting Packages. - GNU Development Environments - iSCSI, Serial ATA, and other new peripheral technologies - Java and/or JavaScript Programming ** Unigroup Needs Speakers!! Please let us know about any other meeting topics that you may be interested in. Potential speakers on Unix/Linux/BSD related technology topics should please contact the Unigroup Board. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------- 4. PRIOR MEETINGS -------------- ** Formal Thank You's to our previous speakers will appear in an upcoming announcement. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------- 5. UNIGROUP INFORMATION -------------------- Unigroup is one of the oldest and largest Unix User's Groups serving the Greater New York City Regional Area since the early 1980s. Unigroup is a not-for-profit, vendor-neutral and member funded volunteer organization. Unigroup holds regular and special event meetings throughout the year on technical topics relating to Unix and the Unix User Community. Unigroup is/was also the Greater NYC Regional Area Affiliate of UniForum - an International Unix Users Group. Unigroup holds regular meetings planned for (at a minimum) the Third THURSDAY of Odd Months. We generally try to hold Field Trip or Vendor Specific Meetings on the Even Months, although we do have the ability to hold monthly meetings at our new downtown meeting location. Planned regular meeting dates are (usually 3rd Thursdays): 5/22/2008, 7/17/2008, 9/18/2008, 11/20/2008, 1/15/2009... Watch for our Special Event meetings at the various trade shows in NYC as well as "Field Trips" to the facilities of local hardware and software vendors. ========================================================================= = For Unigroup Information, Events and Meeting Announcements be sure to = = visit our World Wide Web Home Page: = = http://www.unigroup.org = ========================================================================= For further information or to get on the Unigroup Electronic Mail Mailing List send an EMail message to: unilist (-a_t-) unigroup.org To contact the Board of Directors of Unigroup, send an EMail message to: uniboard (-a_t-) unigroup.org If you have recently attended a meeting and you are not receiving Email announcements, please send us an Email and we will make corrections to our lists. Please Email the Board with any suggestions, especially potential meeting topics and speakers. Unigroup welcomes contributions and content suggestions for our newsletter. Unigroup is a volunteer organization and we need your assistance! Please let us know if you can help! ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -Rob Weiner Unigroup Executive Director unilist (-a_t-) unigroup.org http://www.unigroup.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From mohmmad_abdurhman_ at hotmail.com Thu May 15 13:52:05 2008 From: mohmmad_abdurhman_ at hotmail.com (mohmmad_abdurhman_ at hotmail.com) Date: Thu, 15 May 2008 10:52:05 -0700 Subject: [nycphp-talk] =?iso-8859-6?b?0c8g2ebPIMfk2urHyCDZ5iDH5OXjysg=?= In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From ramons at gmx.net Sat May 17 09:39:56 2008 From: ramons at gmx.net (David Krings) Date: Sat, 17 May 2008 09:39:56 -0400 Subject: [nycphp-talk] mbstring.dll not found Message-ID: <482EE02C.1070405@gmx.net> Hi! After building a dedicated development system I now managed to get all the applications and such installed, including my PHP IDE (NuSphere). I modified the php.ini to load the desired dlls and that appears to work fine for all dlls except for php_mbstring.dll. I checked many times and the line in the php.ini is uncommented and the dll is in the designated extension directory. I also verified that the file names in the extension directory and the php.ini match. It still will not load php_mbstring.dll. Uhm, anyone has an idea what else to do? David From michael.southwell at nyphp.com Sat May 17 09:59:51 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Sat, 17 May 2008 09:59:51 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482EE02C.1070405@gmx.net> References: <482EE02C.1070405@gmx.net> Message-ID: <482EE4D7.4050609@nyphp.com> David Krings wrote: > Hi! > > After building a dedicated development system I now managed to get all > the applications and such installed, including my PHP IDE (NuSphere). I > modified the php.ini to load the desired dlls and that appears to work > fine for all dlls except for php_mbstring.dll. I checked many times and > the line in the php.ini is uncommented and the dll is in the designated > extension directory. I also verified that the file names in the > extension directory and the php.ini match. It still will not load > php_mbstring.dll. > Uhm, anyone has an idea what else to do? try putting another copy of it in the same directory as php.ini and php.exe. And you're sure that php is using the php.ini you're modifying, right? -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From ramons at gmx.net Sat May 17 10:53:08 2008 From: ramons at gmx.net (David Krings) Date: Sat, 17 May 2008 10:53:08 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482EE4D7.4050609@nyphp.com> References: <482EE02C.1070405@gmx.net> <482EE4D7.4050609@nyphp.com> Message-ID: <482EF154.4080404@gmx.net> Michael Southwell wrote: >> the extension directory and the php.ini match. It still will not load >> php_mbstring.dll. >> Uhm, anyone has an idea what else to do? > > try putting another copy of it in the same directory as php.ini and > php.exe. And you're sure that php is using the php.ini you're modifying, > right? Yes, I know it is the right php.ini. I copied the php_mbstring.dll into the folder that contains the .exe and .ini and the problem is solved. Thank you very much for the help. Any idea why that works and having it in the specified extension directory doesn't? Again, thank you so very much! David From tgales at tgaconnect.com Sat May 17 12:42:29 2008 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 17 May 2008 12:42:29 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482EF154.4080404@gmx.net> References: <482EE02C.1070405@gmx.net> <482EE4D7.4050609@nyphp.com> <482EF154.4080404@gmx.net> Message-ID: <482F0AF5.9050203@tgaconnect.com> David Krings wrote: > Michael Southwell wrote: >>> the extension directory and the php.ini match. It still will not >>> load php_mbstring.dll. >>> Uhm, anyone has an idea what else to do? >> >> try putting another copy of it in the same directory as php.ini and >> php.exe. And you're sure that php is using the php.ini you're >> modifying, right? > > Yes, I know it is the right php.ini. I copied the php_mbstring.dll > into the folder that contains the .exe and .ini and the problem is > solved. Thank you very much for the help. Any idea why that works and > having it in the specified extension directory doesn't? > It has to do with the 'dll search order' Windows uses. Typically the order is: 1) the same directory as the executable. 2) the system directory 3) directories found in the 'path' environment variable see http://msdn.microsoft.com/en-us/library/ms682586.aspx for the complete 'run down' on 'start up' order (in Windows you click 'Start' to say you're finished and want to shut down) -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From ramons at gmx.net Sat May 17 15:18:04 2008 From: ramons at gmx.net (David Krings) Date: Sat, 17 May 2008 15:18:04 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482F0AF5.9050203@tgaconnect.com> References: <482EE02C.1070405@gmx.net> <482EE4D7.4050609@nyphp.com> <482EF154.4080404@gmx.net> <482F0AF5.9050203@tgaconnect.com> Message-ID: <482F2F6C.9050104@gmx.net> Tim Gales wrote: >> solved. Thank you very much for the help. Any idea why that works and >> having it in the specified extension directory doesn't? >> > It has to do with the 'dll search order' Windows uses. > Typically the order is: > 1) the same directory as the executable. > 2) the system directory > 3) directories found in the 'path' environment variable > > see http://msdn.microsoft.com/en-us/library/ms682586.aspx > for the complete 'run down' on 'start up' order > (in Windows you click 'Start' to say you're finished and want to shut down) But why then do I need to specify an extension directory in php.ini if it is not used by php.exe as the primary source for extensions? Just asking, maybe I shouldn't worry so much about problems that are already solved. Especially since new problems come about, such as that the php-cgi.exe crashes often. Anyone knows if running PHP on 64bit Windows is not a good idea? David From tgales at tgaconnect.com Sat May 17 16:39:31 2008 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 17 May 2008 16:39:31 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482F2F6C.9050104@gmx.net> References: <482EE02C.1070405@gmx.net> <482EE4D7.4050609@nyphp.com> <482EF154.4080404@gmx.net> <482F0AF5.9050203@tgaconnect.com> <482F2F6C.9050104@gmx.net> Message-ID: <482F4283.7060001@tgaconnect.com> David Krings wrote: > Tim Gales wrote: >>> solved. Thank you very much for the help. Any idea why that works >>> and having it in the specified extension directory doesn't? >>> >> It has to do with the 'dll search order' Windows uses. >> Typically the order is: >> 1) the same directory as the executable. >> 2) the system directory >> 3) directories found in the 'path' environment variable >> >> see http://msdn.microsoft.com/en-us/library/ms682586.aspx >> for the complete 'run down' on 'start up' order >> (in Windows you click 'Start' to say you're finished and want to shut >> down) > > But why then do I need to specify an extension directory in php.ini if > it is not used by php.exe as the primary source for extensions? Just > asking, maybe I shouldn't worry so much about problems that are > already solved. try reading: http://bugs.php.net/bug.php?id=39316 I would suggest that you add your extension directory to your path and move any dll's that start with 'php_' to the extension directory. (at least don't put php_*.dll's in the system directory to solve a dll search order problem) > > Especially since new problems come about, such as that the php-cgi.exe > crashes often. Anyone knows if running PHP on 64bit Windows is not a > good idea? > You might want to download 'Dependency Walker' from http://www.dependencywalker.com/ Open up php-cgi.exe with 'Dependency Walker' and look for unresolved symbols. (trying to run anything with unresolved symbols is 'not a good idea') Happy hunting... -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From ramons at gmx.net Sat May 17 19:28:53 2008 From: ramons at gmx.net (David Krings) Date: Sat, 17 May 2008 19:28:53 -0400 Subject: [nycphp-talk] mbstring.dll not found In-Reply-To: <482F4283.7060001@tgaconnect.com> References: <482EE02C.1070405@gmx.net> <482EE4D7.4050609@nyphp.com> <482EF154.4080404@gmx.net> <482F0AF5.9050203@tgaconnect.com> <482F2F6C.9050104@gmx.net> <482F4283.7060001@tgaconnect.com> Message-ID: <482F6A35.9010604@gmx.net> Tim Gales wrote: > David Krings wrote: >> Tim Gales wrote: > I would suggest that you add your extension directory to your path > and move any dll's that start with 'php_' to the extension directory. > (at least don't put php_*.dll's in the system directory to solve a > dll search order problem) Done! > >> >> Especially since new problems come about, such as that the php-cgi.exe >> crashes often. Anyone knows if running PHP on 64bit Windows is not a >> good idea? >> > You might want to download 'Dependency Walker' from > http://www.dependencywalker.com/ > > Open up php-cgi.exe with 'Dependency Walker' and look for unresolved > symbols. > (trying to run anything with unresolved symbols is 'not a good idea') > > Happy hunting... Found a suspect. After fixing the most obvious DLL issues I came across the dwmapi.dll not existing on non-Vista systems. Since that is related to IE7 I switched browsers for development (forgot to do that anyway), but even after firefoxerizing the whole thing php-cgi.exe still crashes and blames it on php5ts.dll, which apparently doesn't work right on x86_64 systems. Since there is no fix for this yet as it seems using PHP on 64 bit Windows systems is a no go. Very disappointing! I will check if that is really 64 bit related by running a 32 bit version in a VM, but that doesn't really help since I run 64bit Windows on my "production" server, which may also be the reason why the system is so flaky. Maybe that is a reason to switch to Linux, but at the moment there is not a single distro that I think is fit for general consumption. Also disappointing. I'll post my findings when available. So far, thanks for all the help. David From jeff at comprehensivity.com Tue May 20 17:58:12 2008 From: jeff at comprehensivity.com (Jeff Knight) Date: Tue, 20 May 2008 16:58:12 -0500 Subject: [nycphp-talk] Zend_Form fed by Zend_Config = Zend_Hair_Pull Message-ID: So I'm trying to build a form using Zend_Form and building it with a config file as in: http://framework.zend.com/manual/en/zend.form.elements.html#zend.form.elements.config I'm trying to use custom validator class by adding the prefix path as I would with $element->addPrefixPath('My_Validator', 'My/Validator/', 'validate'); My translation of how that should be is something like this: elements.myField.prefixPaths.validator.prefix = "My_Validate" elements.myField.prefixPaths.validator.path = "My/Validate/" elements.myField.prefixPaths.validator.type = "validate" elements.myField.options.validators.Example.validator = "Example" but it throws a "Plugin by name Example was not found in the registry" error. "My/Validate/Example.php" does exist in the path, and works when built as a class. Is anyone familiar enough with this crap to point out the error in my config syntax? From hans at cyberxdesigns.com Wed May 21 00:28:18 2008 From: hans at cyberxdesigns.com (Hans Kaspersetz) Date: Tue, 20 May 2008 23:28:18 -0500 Subject: [nycphp-talk] Zend_Form fed by Zend_Config = Zend_Hair_Pull In-Reply-To: References: Message-ID: <4833A4E2.8080408@cyberxdesigns.com> > My translation of how that should be is something like this: > > elements.myField.prefixPaths.validator.prefix = "My_Validate" > elements.myField.prefixPaths.validator.path = "My/Validate/" > elements.myField.prefixPaths.validator.type = "validate" > > elements.myField.options.validators.Example.validator = "Example" > > but it throws a "Plugin by name Example was not found in the registry" > error. "My/Validate/Example.php" does exist in the path, and works > when built as a class. > > > El Jeffe, Try this: ;Validator must be added before any elements to be used with all elements. I put mine right after the action and method. action = "Foo" method="post" elementPrefixPath.validate.prefix = "My_Validate" elementPrefixPath.validate.path = "My/Validate/" ; Stuff for the element elements.MyField.options.validators.validatoralias.validator = "ExampleValidator" elements.MyField.options.validators.validatoralias.options.ExtraArugemnentsPassedToValidator = "foobar" Have fun with this stuff! Ug! Hans Kaspersetz Cyber X Designs http://www.cyberxdesigns.com X-Cart, Joomla, MODx, Zend Framework, and Custom PHP Programming we can do it all. Visit our website to learn more. From jeff at comprehensivity.com Wed May 21 09:14:54 2008 From: jeff at comprehensivity.com (Jeff Knight) Date: Wed, 21 May 2008 08:14:54 -0500 Subject: [nycphp-talk] Zend_Form fed by Zend_Config = Zend_Hair_Pull In-Reply-To: <4833A4E2.8080408@cyberxdesigns.com> References: <4833A4E2.8080408@cyberxdesigns.com> Message-ID: That did the trick, thanks. I was a troubled by applying what seemed more global to individual elements, but every example I found did it that way. I certainly never would've stumbled on "elementPrefixPath" myself. On Tue, May 20, 2008 at 11:28 PM, Hans Kaspersetz wrote: > >> My translation of how that should be is something like this: >> >> elements.myField.prefixPaths.validator.prefix = "My_Validate" >> elements.myField.prefixPaths.validator.path = "My/Validate/" >> elements.myField.prefixPaths.validator.type = "validate" >> >> elements.myField.options.validators.Example.validator = "Example" >> >> but it throws a "Plugin by name Example was not found in the registry" >> error. "My/Validate/Example.php" does exist in the path, and works >> when built as a class. >> >> >> > > El Jeffe, > > Try this: > > ;Validator must be added before any elements to be used with all elements. > I put mine right after the action and method. > action = "Foo" > method="post" > elementPrefixPath.validate.prefix = "My_Validate" > elementPrefixPath.validate.path = "My/Validate/" > > ; Stuff for the element > elements.MyField.options.validators.validatoralias.validator = > "ExampleValidator" > elements.MyField.options.validators.validatoralias.options.ExtraArugemnentsPassedToValidator > = "foobar" > > Have fun with this stuff! Ug! > > Hans Kaspersetz > Cyber X Designs > http://www.cyberxdesigns.com > X-Cart, Joomla, MODx, Zend Framework, and Custom PHP Programming we can do > it all. Visit our website to learn 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 > From michael.southwell at nyphp.com Wed May 21 20:55:36 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 21 May 2008 20:55:36 -0400 Subject: [nycphp-talk] need help with simple ajax demo project Message-ID: <4834C488.9070501@nyphp.com> My brain is fried; I need help with a simple AJAX demo. The intent is to show the color of some wines upon mousing over their names. This correctly creates table rows with a name in the first cell and the second cell blank with an id of "color1", "color2", etc. where the color will (theoretically) be shown. ============ ..... $tableCounter = 1; foreach ( $wines as $name ) { echo '
'; $tableCounter ++; } ...... ================ This JS has two problems: 1. onMouseOver returns the correct value (according to Firebug) but doesn't load the inner html, whether I use a hardcoded or variable getElementById 2. onMouseOut does load the inner html if I hardcode the id, but throws an error "has no properties" if I try to use a variable So actually the behavior is (apparently) inconsistent between them. ============ function showColor ( i ) { // create variable identifying current id var where = 'color' + i if ( i == false ) { // hardcoding works for testing document.getElementById( 'color2' ).innerHTML = 'xxx' // variable throws error: has no properties // document.getElementById( where ).innerHTML = 'xxx' return } xmlHttp = getXmlHttpObject() var uri = 'getColor.php?where=' + where uri = uri + '&sid=' + Math.random() xmlHttp.onreadystatechange = stateChanged( where ) xmlHttp.open( 'GET', uri, true ) xmlHttp.send( null ) } function stateChanged( where ) { if ( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) { // these both get the correct response but neither loads the innerHTML document.getElementById( 'color1' ).innerHTML = xmlHttp.responseText // document.getElementById( where ).innerHTML = xmlHttp.responseText } } =========== What is wrong here? -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From edwardpotter at gmail.com Wed May 21 21:19:43 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Wed, 21 May 2008 21:19:43 -0400 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834C488.9070501@nyphp.com> References: <4834C488.9070501@nyphp.com> Message-ID: I would highly recommend you take a look at jQuery. The problem with Ajax is one quote out of place and you're dead in the water - you can spend way too much time debugging. Ajax kind of operates in stealth mode, making it tricky to follow what's really going on behind the scenes. http://jquery.com/ On Wed, May 21, 2008 at 8:55 PM, Michael Southwell wrote: > My brain is fried; I need help with a simple AJAX demo. The intent is to > show the color of some wines upon mousing over their names. > > This correctly creates table rows with a name in the first cell and > the second cell blank with an id of "color1", "color2", etc. where the > color will (theoretically) be shown. > ============ > ..... > $tableCounter = 1; > foreach ( $wines as $name ) { > echo ' > > > '; > $tableCounter ++; > } > ...... > ================ > > This JS has two problems: > 1. onMouseOver returns the correct value (according to Firebug) but > doesn't load the inner html, whether I use a hardcoded or variable > getElementById > 2. onMouseOut does load the inner html if I hardcode the id, but > throws an error "has no properties" if I try to use a variable > So actually the behavior is (apparently) inconsistent between them. > ============ > function showColor ( i ) { > // create variable identifying current id > var where = 'color' + i > if ( i == false ) { > // hardcoding works for testing > document.getElementById( 'color2' ).innerHTML = 'xxx' > // variable throws error: has no properties > // document.getElementById( where ).innerHTML = 'xxx' > return > } > xmlHttp = getXmlHttpObject() > var uri = 'getColor.php?where=' + where > uri = uri + '&sid=' + Math.random() > xmlHttp.onreadystatechange = stateChanged( where ) > xmlHttp.open( 'GET', uri, true ) > xmlHttp.send( null ) > } > > function stateChanged( where ) { > if ( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) { > // these both get the correct response but neither loads the innerHTML > document.getElementById( 'color1' ).innerHTML = xmlHttp.responseText > // document.getElementById( where ).innerHTML = xmlHttp.responseText > } > } > =========== > > What is wrong here? > > -- > ================= > Michael Southwell > Vice President, Education > NYPHP TRAINING: http://nyphp.com/Training/Indepth > _______________________________________________ > 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 michael.southwell at nyphp.com Wed May 21 21:24:38 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 21 May 2008 21:24:38 -0400 Subject: [nycphp-talk] need ajax help REVISED Message-ID: <4834CB56.5070506@nyphp.com> Well, one more example of "asking for help reveals the answer", in this case partially. This revised code shows that the blanking out upon mouseout, where I am using a variable id, works, but I'm still not getting the color upon mouseover, whether I use a hardcoded id or a variable ======= .... .... function showColor ( i ) { var where = 'color' + i xmlHttp = getXmlHttpObject() var uri = 'getColor.php?where=' + where uri = uri + '&sid=' + Math.random() xmlHttp.onreadystatechange = stateChanged( where ) xmlHttp.open( 'GET', uri, true ) xmlHttp.send( null ) } function blankOut ( i ) { var where = 'color' + i // this works (using a testing value instead of '' for visibility) document.getElementById( where ).innerHTML = 'x' } function stateChanged( where ) { if ( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) { // these both get the correct response // but neither loads the innerHTML document.getElementById( 'color1' ).innerHTML = xmlHttp.responseText // document.getElementById( where ).innerHTML = xmlHttp.responseText } } -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From edwardpotter at gmail.com Wed May 21 21:39:16 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Wed, 21 May 2008 21:39:16 -0400 Subject: [nycphp-talk] need ajax help REVISED In-Reply-To: References: <4834CB56.5070506@nyphp.com> Message-ID: hmmm, i guess it's optional. Never mind! :-) On Wed, May 21, 2008 at 9:38 PM, Edward Potter wrote: > this may have no relevance at all, but don't u need the semi-colon for > the inline style declaration? > > style="border:thin solid;" vs style="border:thin solid" > > On Wed, May 21, 2008 at 9:24 PM, Michael Southwell > wrote: >> Well, one more example of "asking for help reveals the answer", >> in this case partially. >> >> This revised code shows that the blanking out upon mouseout, where >> I am using a variable id, works, but I'm still not getting the color >> upon mouseover, whether I use a hardcoded id or a variable >> ======= >> .... >> >> .... >> >> function showColor ( i ) { >> var where = 'color' + i >> xmlHttp = getXmlHttpObject() >> var uri = 'getColor.php?where=' + where >> uri = uri + '&sid=' + Math.random() >> xmlHttp.onreadystatechange = stateChanged( where ) >> xmlHttp.open( 'GET', uri, true ) >> xmlHttp.send( null ) >> } >> >> function blankOut ( i ) { >> var where = 'color' + i >> // this works (using a testing value instead of '' for visibility) >> document.getElementById( where ).innerHTML = 'x' >> } >> >> function stateChanged( where ) { >> if ( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) { >> // these both get the correct response >> // but neither loads the innerHTML >> document.getElementById( 'color1' ).innerHTML = xmlHttp.responseText >> // document.getElementById( where ).innerHTML = xmlHttp.responseText >> } >> } >> >> >> -- >> ================= >> Michael Southwell >> Vice President, Education >> NYPHP TRAINING: http://nyphp.com/Training/Indepth >> _______________________________________________ >> 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 > -- 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 edwardpotter at gmail.com Wed May 21 21:38:04 2008 From: edwardpotter at gmail.com (Edward Potter) Date: Wed, 21 May 2008 21:38:04 -0400 Subject: [nycphp-talk] need ajax help REVISED In-Reply-To: <4834CB56.5070506@nyphp.com> References: <4834CB56.5070506@nyphp.com> Message-ID: this may have no relevance at all, but don't u need the semi-colon for the inline style declaration? style="border:thin solid;" vs style="border:thin solid" On Wed, May 21, 2008 at 9:24 PM, Michael Southwell wrote: > Well, one more example of "asking for help reveals the answer", > in this case partially. > > This revised code shows that the blanking out upon mouseout, where > I am using a variable id, works, but I'm still not getting the color > upon mouseover, whether I use a hardcoded id or a variable > ======= > .... > > .... > > function showColor ( i ) { > var where = 'color' + i > xmlHttp = getXmlHttpObject() > var uri = 'getColor.php?where=' + where > uri = uri + '&sid=' + Math.random() > xmlHttp.onreadystatechange = stateChanged( where ) > xmlHttp.open( 'GET', uri, true ) > xmlHttp.send( null ) > } > > function blankOut ( i ) { > var where = 'color' + i > // this works (using a testing value instead of '' for visibility) > document.getElementById( where ).innerHTML = 'x' > } > > function stateChanged( where ) { > if ( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) { > // these both get the correct response > // but neither loads the innerHTML > document.getElementById( 'color1' ).innerHTML = xmlHttp.responseText > // document.getElementById( where ).innerHTML = xmlHttp.responseText > } > } > > > -- > ================= > Michael Southwell > Vice President, Education > NYPHP TRAINING: http://nyphp.com/Training/Indepth > _______________________________________________ > 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 rolan at omnistep.com Wed May 21 22:02:57 2008 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 21 May 2008 22:02:57 -0400 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834C488.9070501@nyphp.com> References: <4834C488.9070501@nyphp.com> Message-ID: <4834D451.2060201@omnistep.com> Michael Southwell wrote: > My brain is fried; I need help with a simple AJAX demo. The intent is > to show the color of some wines upon mousing over their names. > You could probably accomplish the same task without the use of AJAX, by embedding the answer in the same page and using a rollover javascript to swap out the image or text. Or you might even be able to avoid javascript by using :hover and :active in css. ~Rolan From michael.southwell at nyphp.com Wed May 21 22:47:04 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 21 May 2008 22:47:04 -0400 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834D451.2060201@omnistep.com> References: <4834C488.9070501@nyphp.com> <4834D451.2060201@omnistep.com> Message-ID: <4834DEA8.9000909@nyphp.com> Rolan Yang wrote: > You could probably accomplish the same task without the use of AJAX, by > embedding the answer in the same page and using a rollover javascript to > swap out the image or text. Or you might even be able to avoid > javascript by using :hover and :active in css. Sure; but this is an instructional exercise, the point of which is precisely to do it with AJAX (if I can ever figure out why this one doesn't work). -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From hans at cyberxdesigns.com Wed May 21 23:59:31 2008 From: hans at cyberxdesigns.com (Hans Kaspersetz) Date: Wed, 21 May 2008 22:59:31 -0500 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834DEA8.9000909@nyphp.com> References: <4834C488.9070501@nyphp.com> <4834D451.2060201@omnistep.com> <4834DEA8.9000909@nyphp.com> Message-ID: <4834EFA3.4070602@cyberxdesigns.com> Doesn't this entire discussion belong on the Front-End list? It would be nice if the PHP list actually had PHP based discussion. Hans K Michael Southwell wrote: > Rolan Yang wrote: >> You could probably accomplish the same task without the use of AJAX, >> by embedding the answer in the same page and using a rollover >> javascript to swap out the image or text. Or you might even be able >> to avoid javascript by using :hover and :active in css. > > Sure; but this is an instructional exercise, the point of which is > precisely to do it with AJAX (if I can ever figure out why this one > doesn't work). > > From nynj.tech at hotmail.com Thu May 22 00:08:42 2008 From: nynj.tech at hotmail.com (chad qian) Date: Thu, 22 May 2008 00:08:42 -0400 Subject: [nycphp-talk] auto logout without activity Message-ID: When user login after 10 minutes without any activity,he will automatically log out.How to PHP it?Can anyone give me idea? Thanks! chad _________________________________________________________________ E-mail for the greater good. Join the i?m Initiative from Microsoft. http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood -------------- next part -------------- An HTML attachment was scrubbed... URL: From rich at buggy.id.au Thu May 22 07:50:10 2008 From: rich at buggy.id.au (Rich Buggy) Date: Thu, 22 May 2008 21:50:10 +1000 Subject: [nycphp-talk] auto logout without activity In-Reply-To: References: Message-ID: <1211457010.6554.4.camel@rich-laptop> Chad You could store the time of the last request in the session (or a cookie) then check it during the next request. If you store it in a cookie you'll want some way to validate they actually sent back the correct value. Rich On Thu, 2008-05-22 at 00:08 -0400, chad qian wrote: > When user login after 10 minutes without any activity,he will > automatically log out. > How to PHP it?Can anyone give me idea? > > Thanks! > > chad > > > ______________________________________________________________________ > E-mail for the greater good. Join the i?m Initiative from Microsoft. > _______________________________________________ > 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 Thu May 22 08:19:11 2008 From: tedd at sperling.com (tedd) Date: Thu, 22 May 2008 08:19:11 -0400 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834C488.9070501@nyphp.com> References: <4834C488.9070501@nyphp.com> Message-ID: At 8:55 PM -0400 5/21/08, Michael Southwell wrote: >My brain is fried; I need help with a simple AJAX demo. The intent >is to show the color of some wines upon mousing over their names. > >-snip- > >What is wrong here? Now that you asked, you're using a complex solution to solve a very simple problem. Look at the Image Replacement techniques here: http://webbytedd.com/a.php They are all css and no javascript is needed. Why complicate a very simple process? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From michael.southwell at nyphp.com Thu May 22 08:34:47 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Thu, 22 May 2008 08:34:47 -0400 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <4834EFA3.4070602@cyberxdesigns.com> References: <4834C488.9070501@nyphp.com> <4834D451.2060201@omnistep.com> <4834DEA8.9000909@nyphp.com> <4834EFA3.4070602@cyberxdesigns.com> Message-ID: <48356867.6070607@nyphp.com> Hans Kaspersetz wrote: > Doesn't this entire discussion belong on the Front-End list? It would > be nice if the PHP list actually had PHP based discussion. good point - the end of this thread -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From anoland at indigente.net Thu May 22 09:38:38 2008 From: anoland at indigente.net (anoland at indigente.net) Date: Thu, 22 May 2008 06:38:38 -0700 (PDT) Subject: [nycphp-talk] auto logout without activity Message-ID: <3294293877.11947039@smtp.gmail.com> Use a META tag to refresh & redirect to logout page. That's the way my bank does it. -----Original Message----- From: chad qian Date: Thursday, May 22, 2008 12:08 am Subject: [nycphp-talk] auto logout without activity To: Reply-To: NYPHP Talk When user login after 10 minutes without any activity,he will automatically log out. >How to PHP it?Can anyone give me idea? > > Thanks! > > chad > >E-mail for the greater good. Join the i?m Initiative from Microsoft. From david at davidmintz.org Thu May 22 09:43:03 2008 From: david at davidmintz.org (David Mintz) Date: Thu, 22 May 2008 09:43:03 -0400 Subject: [nycphp-talk] auto logout without activity In-Reply-To: <3294293877.11947039@smtp.gmail.com> References: <3294293877.11947039@smtp.gmail.com> Message-ID: <721f1cc50805220643k3ca3d1afh601dfbb8b86d287e@mail.gmail.com> If you are doing Ajaxy stuff, though, could you not get auto-logged-out prematurely with this approach? That is, of course, unless you are relying on some client side stuff to reset the inactivity timer with each http request, ajax or otherwise. On Thu, May 22, 2008 at 9:38 AM, wrote: > Use a META tag to refresh & redirect to logout page. That's the way my bank > does it. > > -----Original Message----- > From: chad qian > Date: Thursday, May 22, 2008 12:08 am > Subject: [nycphp-talk] auto logout without activity > To: Reply-To: NYPHP Talk > > When user login after 10 minutes without any activity,he will > automatically log out. > >How to PHP it?Can anyone give me idea? > > > -- 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 bmartin at mac.com Thu May 22 09:48:59 2008 From: bmartin at mac.com (Bruce Martin) Date: Thu, 22 May 2008 09:48:59 -0400 Subject: [nycphp-talk] auto logout without activity In-Reply-To: <721f1cc50805220643k3ca3d1afh601dfbb8b86d287e@mail.gmail.com> References: <3294293877.11947039@smtp.gmail.com> <721f1cc50805220643k3ca3d1afh601dfbb8b86d287e@mail.gmail.com> Message-ID: <600044D0-D0E7-480D-A02E-CEE72E3AC60F@mac.com> Set a cookie every time your user interacts with the server/site. You could use PHP or Javascript for that. Just update the expire time but only after you check for the existence of that cookie. Bruce Martin The Martin Solution bruce at martinsolution.com On May 22, 2008, at 9:43 AM, David Mintz wrote: > If you are doing Ajaxy stuff, though, could you not get auto-logged- > out prematurely with this approach? That is, of course, unless you > are relying on some client side stuff to reset the inactivity timer > with each http request, ajax or otherwise. > > On Thu, May 22, 2008 at 9:38 AM, wrote: > Use a META tag to refresh & redirect to logout page. That's the way > my bank does it. > > -----Original Message----- > From: chad qian > Date: Thursday, May 22, 2008 12:08 am > Subject: [nycphp-talk] auto logout without activity > To: Reply-To: NYPHP Talk > > When user login after 10 minutes without any activity,he will > automatically log out. > >How to PHP it?Can anyone give me idea? > > > > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at nopersonal.info Thu May 22 10:16:37 2008 From: lists at nopersonal.info (BAS) Date: Thu, 22 May 2008 10:16:37 -0400 Subject: [nycphp-talk] OT: Need Referral for Web Site Marketing Message-ID: <48358045.2090007@nopersonal.info> Hi Everyone, My apologies in advance if I shouldn't be posting this here, but since it's not regarding a job opening in the traditional sense, I figured it didn't belong on the jobs list. We have a client that's looking to do an online marketing campaign for an upcoming e-commerce site, primarily via AdWords & such. They'd like to work with a company in the NYC area that has a proven track record with that type of thing. I don't have any contacts in the SEO/SEM industry, so if any of you can recommend someone I'd really appreciate it. Please feel free to email me off-list as I don't want to annoy the group with more OT posts. Thanks, Bev From ka at kacomputerconsulting.com Thu May 22 11:27:10 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 22 May 2008 08:27:10 -0700 Subject: [nycphp-talk] submitting two forms with one button - possible? Message-ID: <1211470030.8311@coral.he.net> I have a PHP page with two forms. One form posts the form data and inserts it into the database. The second form contains Paypal hidden variables and passes the transaction to the Paypal site. This has to happen seamlessly with one button and I can't combine the two forms as Paypal form has standard format for their form... How to do this? Can I call the second form submit programmatically at the end of the first form submit in PHP? Or with Javascript on the second form submit call the first form to be submitted? ------------------- Kristina From rolan at omnistep.com Thu May 22 11:33:43 2008 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 22 May 2008 11:33:43 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <1211470030.8311@coral.he.net> References: <1211470030.8311@coral.he.net> Message-ID: <48359257.6000005@omnistep.com> One way would be to do an ajax call to submit the form #1 data to your database, then upon acknowledgment of success, do a regular form submit to payal (I'm guessing the user is supposed to be redirected to paypal to complete the transaction). The other way would be to do a regular submit, pass all the info (paypal also) to a second php page, which processes the form #1 data then does a redirect to paypal. You could add the paypal info in the url (not so nice) or paste it into a form as hidden variables, then do a javascript so that the form is automatically submitted on page load. For maximum non-javascript compatibility, you should include a in the form. ~Rolan Kristina Anderson wrote: > I have a PHP page with two forms. One form posts the form data and > inserts it into the database. The second form contains Paypal hidden > variables and passes the transaction to the Paypal site. This has to > happen seamlessly with one button and I can't combine the two forms as > Paypal form has standard format for their form... > > How to do this? Can I call the second form submit programmatically at > the end of the first form submit in PHP? Or with Javascript on the > second form submit call the first form to be submitted? > ------------------- > 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 ka at kacomputerconsulting.com Thu May 22 11:40:56 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 22 May 2008 08:40:56 -0700 Subject: [nycphp-talk] submitting two forms with one button - possible? Message-ID: <1211470856.17345@coral.he.net> How hard is #1? I have two situations that I have to handle in this manner (one with two forms and one with two submits of the same form and then the second form, to check if user account exists). Can you point me to some examples? > One way would be to do an ajax call to submit the form #1 data to your > database, then upon acknowledgment of success, do a regular form submit > to payal (I'm guessing the user is supposed to be redirected to paypal > to complete the transaction). > > The other way would be to do a regular submit, pass all the info (paypal > also) to a second php page, which processes the form #1 data then does a > redirect to paypal. You could add the paypal info in the url (not so > nice) or paste it into a form as hidden variables, then do a javascript > so that the form is > automatically submitted on page load. For maximum non-javascript > compatibility, you should include a in the form. > > ~Rolan > > Kristina Anderson wrote: > > I have a PHP page with two forms. One form posts the form data and > > inserts it into the database. The second form contains Paypal hidden > > variables and passes the transaction to the Paypal site. This has to > > happen seamlessly with one button and I can't combine the two forms as > > Paypal form has standard format for their form... > > > > How to do this? Can I call the second form submit programmatically at > > the end of the first form submit in PHP? Or with Javascript on the > > second form submit call the first form to be submitted? > > ------------------- > > 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 > > ------------------- Kristina From david at davidmintz.org Thu May 22 11:42:02 2008 From: david at davidmintz.org (David Mintz) Date: Thu, 22 May 2008 11:42:02 -0400 Subject: [nycphp-talk] installing xdebug on Fedora 7: where is php5-dev? Message-ID: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> Greetings php5-dev seems to be prerequisite to installing xdebug via pecl. Anybody know what the magic words are to install the php5-dev package on Fedora 7? yum install php5-dev doesn't do it: "No package php5-dev available" I assume there's a repository or something that I have to enable in a config but for all my googling I haven't found the answer. Thanks, -- 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 rolan at omnistep.com Thu May 22 12:02:18 2008 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 22 May 2008 12:02:18 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <1211470856.17345@coral.he.net> References: <1211470856.17345@coral.he.net> Message-ID: <4835990A.6010406@omnistep.com> Kristina Anderson wrote: > How hard is #1? I have two situations that I have to handle in this > manner (one with two forms and one with two submits of the same form > and then the second form, to check if user account exists). Can you > point me to some examples? > > Not that hard. It's actually something I would use also. (I've resorted to option #2 in the past because I wanted payment related stuff to be bulletproof - operable without javascript). If I have time tomorrow, I'll hack up an example. If you discover something before then, post the link up here for us. ~Rolan From sbeam at onsetcorps.net Thu May 22 12:19:26 2008 From: sbeam at onsetcorps.net (sbeam) Date: Thu, 22 May 2008 12:19:26 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <1211470030.8311@coral.he.net> References: <1211470030.8311@coral.he.net> Message-ID: <200805221219.26742.sbeam@onsetcorps.net> On Thursday 22 May 2008 11:27, Kristina Anderson wrote: > How to do this? ?Can I call the second form submit programmatically at > the end of the first form submit in PHP? ?Or with Javascript on the > second form submit call the first form to be submitted? I would recommend the former, because that is the only way it will work if Javascript is disabled. Even if it is enabled, one should never "trust" the client browser to do the right thing (or to not be maliciously tampered with) - so in the JS scenario, could an attacker submit an order to your server without actually providing payment to Paypal? seems quite possible. Using PEAR HTTP_Request it is quite easy to submit a form from PHP. So you could pass along the data from the form to Paypal after you validate the order, and then make sure Paypal returns an OK before confirming the order. Paypal even has an API for this. From ashaw at polymerdb.org Thu May 22 13:37:13 2008 From: ashaw at polymerdb.org (Allen Shaw) Date: Thu, 22 May 2008 12:37:13 -0500 Subject: [nycphp-talk] need help with simple ajax demo project In-Reply-To: <48356867.6070607@nyphp.com> References: <4834C488.9070501@nyphp.com> <4834D451.2060201@omnistep.com> <4834DEA8.9000909@nyphp.com> <4834EFA3.4070602@cyberxdesigns.com> <48356867.6070607@nyphp.com> Message-ID: <4835AF49.7090206@polymerdb.org> Michael Southwell wrote: > Hans Kaspersetz wrote: >> Doesn't this entire discussion belong on the Front-End list? It >> would be nice if the PHP list actually had PHP based discussion. > good point - the end of this thread Michael, Are you subscribed to Front-End? A couple of people have responded to this thread over there. - Allen -- Allen Shaw slidePresenter (http://slides.sourceforge.net) From ka at kacomputerconsulting.com Thu May 22 15:14:17 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 22 May 2008 12:14:17 -0700 Subject: [nycphp-talk] submitting two forms with one button - possible? Message-ID: <1211483657.19822@coral.he.net> http://www.captain.at/howto-ajax-form-post-request.php This AJAX stuff is a little hairy, I'm going to play with it in the near future when I have time so that for future projects, I can do it like this. It's clearly a timesaver in the long run as it eliminates probably one of my LEAST favorite programming tasks, which is passing variables from page to page to page...... -- Kristina > Kristina Anderson wrote: > > How hard is #1? I have two situations that I have to handle in this > > manner (one with two forms and one with two submits of the same form > > and then the second form, to check if user account exists). Can you > > point me to some examples? > > > > > > Not that hard. It's actually something I would use also. (I've resorted > to option #2 in the past because I wanted payment related stuff to be > bulletproof - operable without javascript). > > If I have time tomorrow, I'll hack up an example. If you discover > something before then, post the link up here for us. > > ~Rolan > > _______________________________________________ > 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 Thu May 22 16:18:50 2008 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 22 May 2008 16:18:50 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <1211483657.19822@coral.he.net> References: <1211483657.19822@coral.he.net> Message-ID: <4835D52A.80502@omnistep.com> As an added protection, you should verify the Paypal payment with IPN (https://www.paypal.com/ipn) before sending off any products or authorizing memberships. ~Rolan Kristina Anderson wrote: > http://www.captain.at/howto-ajax-form-post-request.php > > This AJAX stuff is a little hairy, I'm going to play with it in the > near future when I have time so that for future projects, I can do it > like this. It's clearly a timesaver in the long run as it eliminates > probably one of my LEAST favorite programming tasks, which is passing > variables from page to page to page...... > > > -- Kristina > > > > >> Kristina Anderson wrote: >> >>> How hard is #1? I have two situations that I have to handle in >>> > this > >>> manner (one with two forms and one with two submits of the same >>> > form > >>> and then the second form, to check if user account exists). Can you >>> point me to some examples? >>> >>> >>> >> Not that hard. It's actually something I would use also. (I've >> > resorted > >> to option #2 in the past because I wanted payment related stuff to be >> bulletproof - operable without javascript). >> >> If I have time tomorrow, I'll hack up an example. If you discover >> something before then, post the link up here for us. >> >> ~Rolan >> >> _______________________________________________ >> 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 david at davidmintz.org Thu May 22 17:37:56 2008 From: david at davidmintz.org (David Mintz) Date: Thu, 22 May 2008 17:37:56 -0400 Subject: [nycphp-talk] Re: installing xdebug on Fedora 7: where is php5-dev? In-Reply-To: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> References: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> Message-ID: <721f1cc50805221437y16349fe2q3d38e5f850b9a698@mail.gmail.com> Just for the record: yum install php-devel On Thu, May 22, 2008 at 11:42 AM, David Mintz wrote: > Greetings > > php5-dev seems to be prerequisite to installing xdebug via pecl. Anybody > know what the magic words are to install the php5-dev package on Fedora 7? > yum install php5-dev doesn't do it: "No package php5-dev available" I assume > there's a repository or something that I have to enable in a config but for > all my googling I haven't found the answer. > -- 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 jeff.loiselle at gmail.com Fri May 23 08:06:28 2008 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Fri, 23 May 2008 08:06:28 -0400 Subject: [nycphp-talk] installing xdebug on Fedora 7: where is php5-dev? In-Reply-To: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> References: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> Message-ID: <4b1887110805230506x55994b27vdc79e8d93d95cc3b@mail.gmail.com> David, In the time it usually takes me to get upset about missing ports/packages and wonder where they have all gone or why I can't install my desired extensions, I could have usually finished compiling apache, php, mysql in that time. :-) Regards, jeff On Thu, May 22, 2008 at 11:42 AM, David Mintz wrote: > Greetings > > php5-dev seems to be prerequisite to installing xdebug via pecl. Anybody > know what the magic words are to install the php5-dev package on Fedora 7? > yum install php5-dev doesn't do it: "No package php5-dev available" I assume > there's a repository or something that I have to enable in a config but for > all my googling I haven't found the answer. > > Thanks, > > -- > 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 > From tedd at sperling.com Fri May 23 11:25:10 2008 From: tedd at sperling.com (tedd) Date: Fri, 23 May 2008 11:25:10 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <1211470030.8311@coral.he.net> References: <1211470030.8311@coral.he.net> Message-ID: At 8:27 AM -0700 5/22/08, Kristina Anderson wrote: >I have a PHP page with two forms. One form posts the form data and >inserts it into the database. The second form contains Paypal hidden >variables and passes the transaction to the Paypal site. This has to >happen seamlessly with one button and I can't combine the two forms as >Paypal form has standard format for their form... > >How to do this? Can I call the second form submit programmatically at >the end of the first form submit in PHP? Or with Javascript on the >second form submit call the first form to be submitted? >------------------- >Kristina Kristina: Another consideration is that PayPal provides a link back to your "Thank You page" -- so why not send your variables through PayPal via a GET, such as: thankyou.php? From there you can pick them up and put them in your database. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From rolan at omnistep.com Fri May 23 21:00:06 2008 From: rolan at omnistep.com (Rolan Yang) Date: Fri, 23 May 2008 21:00:06 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: References: <1211470030.8311@coral.he.net> Message-ID: <48376896.5080807@omnistep.com> tedd wrote: > At 8:27 AM -0700 5/22/08, Kristina Anderson wrote: > > Kristina: > > Another consideration is that PayPal provides a link back to your > "Thank You page" -- so why not send your variables through PayPal via > a GET, such as: > > thankyou.php? > > From there you can pick them up and put them in your database. Nice! The IPN api allows an "other" field which can pass up to 255 characters, but that is likely not enough for large forms. Your method looks like it could allow a lot more. Any idea of the limitations? ~Rolan From tedd at sperling.com Sat May 24 10:39:43 2008 From: tedd at sperling.com (tedd) Date: Sat, 24 May 2008 10:39:43 -0400 Subject: [nycphp-talk] submitting two forms with one button - possible? In-Reply-To: <48376896.5080807@omnistep.com> References: <1211470030.8311@coral.he.net> <48376896.5080807@omnistep.com> Message-ID: At 9:00 PM -0400 5/23/08, Rolan Yang wrote: >tedd wrote: >>Another consideration is that PayPal provides a link back to your >>"Thank You page" -- so why not send your variables through PayPal >>via a GET, such as: >> >>thankyou.php? >> >>From there you can pick them up and put them in your database. > >Nice! The IPN api allows an "other" field which can pass up to 255 >characters, but that is likely not enough for large forms. Your >method looks like it could allow a lot more. Any idea of the >limitations? > >~Rolan Rolan: As I answered to someone else privately: I use two different methods to handle PayPal purchases: [1.] One is to use their code and my product ID for simple transactions, as seen here: http://ancientstones.com/pic.php?pageNum=93 The item number and buyer specifics is provide back from PayPal so I know what was purchased and who purchased it. [2.] The other is where my code determines the amount; sends a request for authorization to PayPal with the users name, cc#, CIV, and amount; waits for an authorization back from PayPal; and when that happens, it records the purchase and the transaction authorization in the database. [1] is simple -- you use PayPal to collect all the sensitive data. [2] is involved -- you need a merchant account with PayPal and there are liabilities and responsibilities to consider. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From Veronika at dotcalm.ws Sun May 25 11:30:41 2008 From: Veronika at dotcalm.ws (Veronika) Date: Sun, 25 May 2008 11:30:41 -0400 Subject: [nycphp-talk] error message, trying to see test page, apache is running Message-ID: <002201c8be7c$4b4f00b0$65bca8c0@VeronikaXP> Hi, I'm very new at this and am following at TechnicalLead tutorial; have installed mysql, apache and php, have set up a data test folder, a my.ini file (for mysql), an htm test file... Can I assume if the apache server is running that I should not change the httpd.conf file? that there is something else wrong? Kind of frustrated that I'm following the tutorial and that the last 10 seconds of video one has stalled me with an error message: The webpage cannot be displayed Most likely cause: a.. Some content or files on this webpage require a program that you don't have installed. What you can try: Search online for a program you can use to view this web content. Retype the address. Go back to the previous page. Please help! Veronika -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: info_48.png Type: image/png Size: 6993 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bullet.png Type: image/png Size: 3169 bytes Desc: not available URL: From ramons at gmx.net Sun May 25 12:43:27 2008 From: ramons at gmx.net (David Krings) Date: Sun, 25 May 2008 12:43:27 -0400 Subject: [nycphp-talk] error message, trying to see test page, apache is running In-Reply-To: <002201c8be7c$4b4f00b0$65bca8c0@VeronikaXP> References: <002201c8be7c$4b4f00b0$65bca8c0@VeronikaXP> Message-ID: <4839972F.2020201@gmx.net> Veronika wrote: > Hi, > I'm very new at this and am following at TechnicalLead tutorial; have > installed mysql, apache and php, have set up a data test folder, a > my.ini file (for mysql), an htm test file... > Can I assume if the apache server is running that I should not change > the httpd.conf file? that there is something else wrong? > Kind of frustrated that I'm following the tutorial and that the last 10 > seconds of video one has stalled me with an error message: While it is laudable to dive in and start creating your ini files on your own and using the individual packages, it might just be a bit too tricky for the beginner. That depends on which skills you are focusing, if you want to get experienced in administrating Apache and MySQL then there is no way around what you are doing now. If - and I assume that to be the case - you want to learn about PHP I'd sidestep the nitty gritty configuration and setup of Apache and MySQL and go with one of the already configured packages. I can highly recommend the XAMPP from Apachefriends.org. It never failed me and I even used it for production servers (they say not to do that, but I never had any issues). And it just works. You install it, type localhost in the address field of a browser on your system and you will see the main page coming up. It comes with PHPMyAdmin installed and the demo pages show some nice stuff, butr I usually rename the htdocs folder and create a new htdocs folder, in which I put my own files. For MySQL I use the GUI tools from the mysql.com website. I find that they now work quite well and are a refreshingly helpful and fast set of tools after working during the week with garbage like MSSQL Management Studio. There are other and somewhat better MySQL administration clients, but the MySQL tools work fine and are easy to use. David From pyurt at yahoo.com Mon May 26 06:33:57 2008 From: pyurt at yahoo.com (pyurt) Date: Mon, 26 May 2008 06:33:57 -0400 Subject: [nycphp-talk] error message, trying to see test page, apache is running In-Reply-To: <002201c8be7c$4b4f00b0$65bca8c0@VeronikaXP> Message-ID: <006401c8bf1c$0bca0e80$d10ea8c0@Pres2103> What url are you typing to get this error page? This does not look like the default apache page. What OS are you operating? Is this a stand alone server/development system? Do you have another http server running? It's hard to help without knowing details. Paul Yurt www.mastermoz.com Make the Internet Work for You! MasterMOZ _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Veronika Sent: Sunday, May 25, 2008 11:31 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] error message, trying to see test page,apache is running Hi, I'm very new at this and am following at TechnicalLead tutorial; have installed mysql, apache and php, have set up a data test folder, a my.ini file (for mysql), an htm test file... Can I assume if the apache server is running that I should not change the httpd.conf file? that there is something else wrong? Kind of frustrated that I'm following the tutorial and that the last 10 seconds of video one has stalled me with an error message: Info icon The webpage cannot be displayed Most likely cause: * Some content or files on this webpage require a program that you don't have installed. What you can try: Search online for a program you can use to view this web content. Retype the address. Go back to the previous page. Please help! Veronika -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1714 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 523 bytes Desc: not available URL: From Veronika at dotcalm.ws Mon May 26 10:44:38 2008 From: Veronika at dotcalm.ws (Veronika) Date: Mon, 26 May 2008 10:44:38 -0400 Subject: [nycphp-talk] error message, trying to see test page, apache is running References: <006401c8bf1c$0bca0e80$d10ea8c0@Pres2103> Message-ID: <003a01c8bf3f$0711a1a0$65bca8c0@VeronikaXP> localhost:7070/test is what the demo says to type Windows 2003 Trying to run on my computer until I upload to site I don't think I have another server running... I'm sure more info is needed - just hard for a newbie to know what info you need until you ask the questions -- thanks! want to create a website that's database driven at www.WorshipMV.com (recently moved files so need to fix blips in code that are there, there is a sample page at http://www.worshipmv.com/site_flash/mzm.html - I have a list of over 200 houses of worship and the only thing that's stopping me from getting this running and selling ads and such is that I want to make it searchable so if someone wanted to find a spiritual home that has childcare specifically for autistic kids they could do a search and find it - or say a Methodist church within 25 miles of their home... that kind of thing - any assistance is greatly appreciated. V- ----- Original Message ----- From: pyurt To: 'NYPHP Talk' Sent: Monday, May 26, 2008 6:33 AM Subject: RE: [nycphp-talk] error message, trying to see test page,apache is running What url are you typing to get this error page? This does not look like the default apache page. What OS are you operating? Is this a stand alone server/development system? Do you have another http server running? It's hard to help without knowing details. Paul Yurt www.mastermoz.com Make the Internet Work for You! MasterMOZ ------------------------------------------------------------------------------ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Veronika Sent: Sunday, May 25, 2008 11:31 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] error message, trying to see test page,apache is running Hi, I'm very new at this and am following at TechnicalLead tutorial; have installed mysql, apache and php, have set up a data test folder, a my.ini file (for mysql), an htm test file... Can I assume if the apache server is running that I should not change the httpd.conf file? that there is something else wrong? Kind of frustrated that I'm following the tutorial and that the last 10 seconds of video one has stalled me with an error message: The webpage cannot be displayed Most likely cause: a.. Some content or files on this webpage require a program that you don't have installed. What you can try: Search online for a program you can use to view this web content. Retype the address. Go back to the previous page. Please help! Veronika ------------------------------------------------------------------------------ _______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1714 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 523 bytes Desc: not available URL: From david at davidmintz.org Tue May 27 12:03:07 2008 From: david at davidmintz.org (David Mintz) Date: Tue, 27 May 2008 12:03:07 -0400 Subject: [nycphp-talk] installing xdebug on Fedora 7: where is php5-dev? In-Reply-To: <4b1887110805230506x55994b27vdc79e8d93d95cc3b@mail.gmail.com> References: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> <4b1887110805230506x55994b27vdc79e8d93d95cc3b@mail.gmail.com> Message-ID: <721f1cc50805270903u4d2ab4f6y10f9a2c0cf0b547@mail.gmail.com> Good for you --- and I say that without irony. I used to do it that way too, and found it satisfying to build my own, until I got tired of dependency hell, obscure errors, long compile times, etc. If it's pre-baked with all the goodies I need and more, and can be installed in one command, I'll take it with gratitude and get back to work. On Fri, May 23, 2008 at 8:06 AM, Jeff Loiselle wrote: > David, > > In the time it usually takes me to get upset about missing > ports/packages and wonder where they have all gone or why I can't > install my desired extensions, I could have usually finished compiling > apache, php, mysql in that time. :-) > -- 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 jeff.loiselle at gmail.com Tue May 27 19:01:40 2008 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Tue, 27 May 2008 19:01:40 -0400 Subject: [nycphp-talk] installing xdebug on Fedora 7: where is php5-dev? In-Reply-To: <721f1cc50805270903u4d2ab4f6y10f9a2c0cf0b547@mail.gmail.com> References: <721f1cc50805220842u6c0efd5k9f7f30a08970e6@mail.gmail.com> <4b1887110805230506x55994b27vdc79e8d93d95cc3b@mail.gmail.com> <721f1cc50805270903u4d2ab4f6y10f9a2c0cf0b547@mail.gmail.com> Message-ID: <4b1887110805271601n14680a5ele88e224a711895c@mail.gmail.com> David, Ah yes. Well the PHP team made it easy for me to install that shit on my Mac. The hardest part for me recently was getting the new oracle instantclient compiled in. ;-) But everything else was a breeze. ;-) /jeff On Tue, May 27, 2008 at 12:03 PM, David Mintz wrote: > Good for you --- and I say that without irony. I used to do it that way too, > and found it satisfying to build my own, until I got tired of dependency > hell, obscure errors, long compile times, etc. If it's pre-baked with all > the goodies I need and more, and can be installed in one command, I'll take > it with gratitude and get back to work. > > On Fri, May 23, 2008 at 8:06 AM, Jeff Loiselle > wrote: >> >> David, >> >> In the time it usually takes me to get upset about missing >> ports/packages and wonder where they have all gone or why I can't >> install my desired extensions, I could have usually finished compiling >> apache, php, mysql in that time. :-) > > -- > 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 > From Veronika at dotcalm.ws Tue May 27 20:56:16 2008 From: Veronika at dotcalm.ws (Veronika) Date: Tue, 27 May 2008 20:56:16 -0400 Subject: [nycphp-talk] error message, trying to see test page, apache isrunning References: <002201c8be7c$4b4f00b0$65bca8c0@VeronikaXP> <4839972F.2020201@gmx.net> Message-ID: <000f01c8c05d$a3105ff0$65bca8c0@VeronikaXP> David, I installed xampp and it seems apache and MySql are running! I think perhaps I'm ready for stage two of the tutorial tomorrow! "You install it, type localhost in the address > field of a browser on your system and you will see the main page coming > up" YES! I'm starting to feel better now, I'm sure I'll have more questions but at least that is done... Thanks, Veronika ----- Original Message ----- From: "David Krings" To: "NYPHP Talk" Sent: Sunday, May 25, 2008 12:43 PM Subject: Re: [nycphp-talk] error message, trying to see test page, apache isrunning > Veronika wrote: >> Hi, >> I'm very new at this and am following at TechnicalLead tutorial; have >> installed mysql, apache and php, have set up a data test folder, a >> my.ini file (for mysql), an htm test file... >> Can I assume if the apache server is running that I should not change >> the httpd.conf file? that there is something else wrong? >> Kind of frustrated that I'm following the tutorial and that the last 10 >> seconds of video one has stalled me with an error message: > > While it is laudable to dive in and start creating your ini files on your > own > and using the individual packages, it might just be a bit too tricky for > the > beginner. That depends on which skills you are focusing, if you want to > get > experienced in administrating Apache and MySQL then there is no way around > what you are doing now. If - and I assume that to be the case - you want > to > learn about PHP I'd sidestep the nitty gritty configuration and setup of > Apache and MySQL and go with one of the already configured packages. I can > highly recommend the XAMPP from Apachefriends.org. It never failed me and > I > even used it for production servers (they say not to do that, but I never > had > any issues). And it just works. You install it, type localhost in the > address > field of a browser on your system and you will see the main page coming > up. It > comes with PHPMyAdmin installed and the demo pages show some nice stuff, > butr > I usually rename the htdocs folder and create a new htdocs folder, in > which I > put my own files. > For MySQL I use the GUI tools from the mysql.com website. I find that they > now > work quite well and are a refreshingly helpful and fast set of tools after > working during the week with garbage like MSSQL Management Studio. There > are > other and somewhat better MySQL administration clients, but the MySQL > tools > work fine and are easy to use. > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nynj.tech at hotmail.com Wed May 28 09:36:19 2008 From: nynj.tech at hotmail.com (chad qian) Date: Wed, 28 May 2008 09:36:19 -0400 Subject: [nycphp-talk] one special question Message-ID: I run into problem with the following in my project: Today,People select 20 thumbnail pictures and add them to the cart.From tomorrow,website will email one picture per day to the people's email automatically. How to php to email one picture per day? I have no idea here.Any help?thanks! chad _________________________________________________________________ E-mail for the greater good. Join the i?m Initiative from Microsoft. http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Wed May 28 09:38:10 2008 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 28 May 2008 09:38:10 -0400 Subject: [nycphp-talk] one special question In-Reply-To: References: Message-ID: <483D6042.10305@projectskyline.com> Chad, You could cron us a job email that sends picture daily via. That'd be my best guess. - Ben chad qian wrote: > I run into problem with the following in my project: > > Today,People select 20 thumbnail pictures and add them to the cart. > >From tomorrow,website will email one picture per day to the people's > email automatically. > > How to php to email one picture per day? > > I have no idea here.Any help?thanks! > > chad > > ------------------------------------------------------------------------ > E-mail for the greater good. Join the i?m Initiative from Microsoft. > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 michael.southwell at nyphp.com Wed May 28 09:44:08 2008 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 28 May 2008 09:44:08 -0400 Subject: [nycphp-talk] one special question In-Reply-To: References: Message-ID: <483D61A8.7090107@nyphp.com> chad qian wrote: > I run into problem with the following in my project: > > Today,People select 20 thumbnail pictures and add them to the cart. > >From tomorrow,website will email one picture per day to the people's > email automatically. > > How to php to email one picture per day? > > I have no idea here.Any help?thanks! This is not a question about PHP but rather a question about programming, that is, the logic of making things happen. It is therefore solvable not by syntax but rather by thought. I wonder whether such questions are appropriate for this list. Although I have an opinion on this issue, I refrain from expressing it here, in the interest of letting list members in general answer it either explicitly or implicitly, by either giving or not giving possible answers. -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From chsnyder at gmail.com Wed May 28 10:49:43 2008 From: chsnyder at gmail.com (csnyder) Date: Wed, 28 May 2008 10:49:43 -0400 Subject: [nycphp-talk] one special question In-Reply-To: <483D61A8.7090107@nyphp.com> References: <483D61A8.7090107@nyphp.com> Message-ID: On Wed, May 28, 2008 at 9:44 AM, Michael Southwell wrote: > > This is not a question about PHP but rather a question about programming, > that is, the logic of making things happen. It is therefore solvable not by > syntax but rather by thought. I wonder whether such questions are > appropriate for this list. Although I have an opinion on this issue, I > refrain from expressing it here, in the interest of letting list members in > general answer it either explicitly or implicitly, by either giving or not > giving possible answers. > I dunno, it seems overly general but not actually off topic. On a unix (Linux, BSD, Unix) system you would set up a cron job that executes a php script every night to that loops through each account and emails the next picture. I'm not sure how you would do this on Windows but there must be a way. It gets much more interesting if you have > 10,000 accounts or a limited time window in which to send the pictures, at which point you need to create a more sophisticated architecture with multiple processes each sending to their own segment of the user base. -- Chris Snyder http://chxo.com/ From zippy1981 at gmail.com Wed May 28 11:16:03 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 28 May 2008 11:16:03 -0400 Subject: [nycphp-talk] one special question In-Reply-To: References: <483D61A8.7090107@nyphp.com> Message-ID: <5458db3c0805280816r24f56735ia3019d279ad03820@mail.gmail.com> On Wed, May 28, 2008 at 10:49 AM, csnyder wrote: > On Wed, May 28, 2008 at 9:44 AM, Michael Southwell > wrote: >> >> This is not a question about PHP but rather a question about programming, >> > > I dunno, it seems overly general but not actually off topic. I gotta agree here. From my point of view its off topic, but only because I have sent emails in several languages and run scheduled tasks on windows and cron jobs on unix. Assuming this person never sent an email via a script or set a cron job on unix, he probably has no idea that the basic methodology. Pointing him in the direction of running a scriopt from a cron job, instead of through the web server might be what he needs to know. If he can't figure out cron, then he finds a unix mailing list. If he can't get his mail script to work he posts the source and error on this list. If he doesn't know enough to know that he didn't ask a PHP question, we should point him in that direction. There was a point where everyone on this list didn't know their was a mechanism for running jobs at a scheduled task on their operating system of choice. I happened to be well versed in cron before ever hearing of PHP. Others have opposite experiences. Regards, Justin Dearing From ka at kacomputerconsulting.com Wed May 28 11:25:21 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 08:25:21 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211988321.10102@coral.he.net> This might be off topic as well...but I have a PHP app that submits to Paypal and then on the "thank you" page, I provide a link to a PDF that they bought. The server is Unix based, and before submitting the sale, I collect various information about the user, and then when the transaction is complete, I get a unique transaction ID from Paypal. What's the easiest, quickest way to provide some level of complexity to the downloads so that people can't just go back into the directory and download every PDF without paying? It doesn't have to be 100% secure but should be secure enough to keep out "most" people. I've been looking into .htaccess but wondering if that's overkill and there isn't some way to authenticate against my DB information before allowing the download? -- Kristina From ben at projectskyline.com Wed May 28 11:28:52 2008 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 28 May 2008 11:28:52 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211988321.10102@coral.he.net> References: <1211988321.10102@coral.he.net> Message-ID: <483D7A34.8040105@projectskyline.com> Hello Kristina, First off, don't have the PDF's "serveable" from Apache. Have them OUT of the web root. Second, after they pay, and get the IPN feedback to validate the sale, you could copy the pdf from your safe directory (outside of apache) to the webroot and rename it something unique. You could go so far as creating a maze of unique directories: ie: /ra123/poo/fluff/uuid123123123123.pdf Then remove it after 24 hours or something. - Ben Kristina Anderson wrote: > This might be off topic as well...but I have a PHP app that submits to > Paypal and then on the "thank you" page, I provide a link to a PDF that > they bought. > > The server is Unix based, and before submitting the sale, I collect > various information about the user, and then when the transaction is > complete, I get a unique transaction ID from Paypal. > > What's the easiest, quickest way to provide some level of complexity to > the downloads so that people can't just go back into the directory and > download every PDF without paying? It doesn't have to be 100% secure > but should be secure enough to keep out "most" people. > > I've been looking into .htaccess but wondering if that's overkill and > there isn't some way to authenticate against my DB information before > allowing the download? > > -- 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 Wed May 28 11:29:22 2008 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 28 May 2008 11:29:22 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211988321.10102@coral.he.net> References: <1211988321.10102@coral.he.net> Message-ID: <483D7A52.9000209@projectskyline.com> Or just email the purchasers email address (obtained through paypal) the .pdf. - Ben Kristina Anderson wrote: > This might be off topic as well...but I have a PHP app that submits to > Paypal and then on the "thank you" page, I provide a link to a PDF that > they bought. > > The server is Unix based, and before submitting the sale, I collect > various information about the user, and then when the transaction is > complete, I get a unique transaction ID from Paypal. > > What's the easiest, quickest way to provide some level of complexity to > the downloads so that people can't just go back into the directory and > download every PDF without paying? It doesn't have to be 100% secure > but should be secure enough to keep out "most" people. > > I've been looking into .htaccess but wondering if that's overkill and > there isn't some way to authenticate against my DB information before > allowing the download? > > -- 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 ashaw at polymerdb.org Wed May 28 11:38:41 2008 From: ashaw at polymerdb.org (Allen Shaw) Date: Wed, 28 May 2008 10:38:41 -0500 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211988321.10102@coral.he.net> References: <1211988321.10102@coral.he.net> Message-ID: <483D7C81.9080302@polymerdb.org> Kristina Anderson wrote: > This might be off topic as well...but I have a PHP app that submits to > Paypal and then on the "thank you" page, I provide a link to a PDF that > they bought. > Hi Kristina, I would say don't provide a link directly to the file (e.g., http://example.com/protected/file.pdf). Instead, provide them a unique key embedded in a link to a script, which script would then download the file for them (e.g., http://example.com/getfile.php?key=secretstuff&file=file.pdf). This way the script controls who gets what. (And if you really want to clamp down, it would even allow you to make keys valid for only one use, etc.) - Allen -- Allen Shaw slidePresenter (http://slides.sourceforge.net) From zippy1981 at gmail.com Wed May 28 11:41:02 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 28 May 2008 11:41:02 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <483D7A34.8040105@projectskyline.com> References: <1211988321.10102@coral.he.net> <483D7A34.8040105@projectskyline.com> Message-ID: <5458db3c0805280841h7d8f8875q3109df75a14c08f0@mail.gmail.com> Kristina, A proxy is the best way to go. 1) Create a table that has userid, pdfid (or jsut pdf filename) and transactionid (from paypal). You don't need the transactionid fro this, but its good for auditing 2) Creat a simple php prody for serving the pdfs. It will take a pdfid, or file name as a parameter. Have it set the mime type, open the file and write the file contents to the web client. This allows you to move the pdfs out of the web readable directory. Of course you have no added security, yet. 3) At the top of the file make sure of 2 things 1 - The user is logged in 2 - There is an entry in that table where userid and pdfid(or pdf filename) matches. People can then download as much as they want but only the files they bought. You can add a timestamp to the above table and allow them downloads for a limited amount of time. On Wed, May 28, 2008 at 11:28 AM, Ben Sgro wrote: > Hello Kristina, > > First off, don't have the PDF's "serveable" from Apache. > Have them OUT of the web root. > > Second, after they pay, and get the IPN feedback to validate the sale, > you could copy the pdf from your safe directory (outside of apache) > to the webroot and rename it something unique. > > You could go so far as creating a maze of unique directories: > > ie: /ra123/poo/fluff/uuid123123123123.pdf > > Then remove it after 24 hours or something. > > - Ben > > Kristina Anderson wrote: >> >> This might be off topic as well...but I have a PHP app that submits to >> Paypal and then on the "thank you" page, I provide a link to a PDF that they >> bought. >> >> The server is Unix based, and before submitting the sale, I collect >> various information about the user, and then when the transaction is >> complete, I get a unique transaction ID from Paypal. >> >> What's the easiest, quickest way to provide some level of complexity to >> the downloads so that people can't just go back into the directory and >> download every PDF without paying? It doesn't have to be 100% secure but >> should be secure enough to keep out "most" people. >> >> I've been looking into .htaccess but wondering if that's overkill and >> there isn't some way to authenticate against my DB information before >> allowing the download? >> >> -- 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 ken at secdat.com Wed May 28 11:44:33 2008 From: ken at secdat.com (Kenneth Downs) Date: Wed, 28 May 2008 11:44:33 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211988321.10102@coral.he.net> References: <1211988321.10102@coral.he.net> Message-ID: <483D7DE1.3070102@secdat.com> We did it this way: 1) when the paypal IPN comes back make an entry a database table that lists customers and pdf's. 2) Point the download link to a php program, like download.php?file=x.pdf. There are tricks here with doing it like /downloads/filename.pdf, but that can easily be added once you get the download.php program working. 3) The download.php checks the database table to see if they are allowed. If not, return some kind of error. 4) If the user is clear, run code like this below, be sure not to send anything at all to the browser before this code runs, not even a blank line: $path = '....'; $filename = '....'; header('Content-Type: application/x-pdf'); header('Content-Disposition: attachment; filename="'.strtolower($filename).'"'); header('Content-Length: '.(string)(filesize($path.$filename))); readfile($path.$filename); Kristina Anderson wrote: > This might be off topic as well...but I have a PHP app that submits to > Paypal and then on the "thank you" page, I provide a link to a PDF that > they bought. > > The server is Unix based, and before submitting the sale, I collect > various information about the user, and then when the transaction is > complete, I get a unique transaction ID from Paypal. > > What's the easiest, quickest way to provide some level of complexity to > the downloads so that people can't just go back into the directory and > download every PDF without paying? It doesn't have to be 100% secure > but should be secure enough to keep out "most" people. > > I've been looking into .htaccess but wondering if that's overkill and > there isn't some way to authenticate against my DB information before > allowing the download? > > -- 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 > -- 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 ka at kacomputerconsulting.com Wed May 28 11:45:53 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 08:45:53 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211989553.21527@coral.he.net> Hmm... I like this... if I copy the file to the web server I can name the directory after their transaction ID....make unique directory for each customer...then delete them after a day or so...we have lots of room..is this doable on a shared host? ...outside "public_html" is outside the root, or no? --Kristina > Hello Kristina, > > First off, don't have the PDF's "serveable" from Apache. > Have them OUT of the web root. > > Second, after they pay, and get the IPN feedback to validate the sale, > you could copy the pdf from your safe directory (outside of apache) > to the webroot and rename it something unique. > > You could go so far as creating a maze of unique directories: > > ie: /ra123/poo/fluff/uuid123123123123.pdf > > Then remove it after 24 hours or something. > > - Ben > > Kristina Anderson wrote: > > This might be off topic as well...but I have a PHP app that submits to > > Paypal and then on the "thank you" page, I provide a link to a PDF that > > they bought. > > > > The server is Unix based, and before submitting the sale, I collect > > various information about the user, and then when the transaction is > > complete, I get a unique transaction ID from Paypal. > > > > What's the easiest, quickest way to provide some level of complexity to > > the downloads so that people can't just go back into the directory and > > download every PDF without paying? It doesn't have to be 100% secure > > but should be secure enough to keep out "most" people. > > > > I've been looking into .htaccess but wondering if that's overkill and > > there isn't some way to authenticate against my DB information before > > allowing the download? > > > > -- 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 ka at kacomputerconsulting.com Wed May 28 11:47:25 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 08:47:25 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211989645.22503@coral.he.net> the string I get back from Paypal doesn't have that email address... just transaction id, "completed", amount & item number. > Or just email the purchasers email address (obtained through paypal) the > .pdf. > > - Ben > > Kristina Anderson wrote: > > This might be off topic as well...but I have a PHP app that submits to > > Paypal and then on the "thank you" page, I provide a link to a PDF that > > they bought. > > > > The server is Unix based, and before submitting the sale, I collect > > various information about the user, and then when the transaction is > > complete, I get a unique transaction ID from Paypal. > > > > What's the easiest, quickest way to provide some level of complexity to > > the downloads so that people can't just go back into the directory and > > download every PDF without paying? It doesn't have to be 100% secure > > but should be secure enough to keep out "most" people. > > > > I've been looking into .htaccess but wondering if that's overkill and > > there isn't some way to authenticate against my DB information before > > allowing the download? > > > > -- 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 ka at kacomputerconsulting.com Wed May 28 11:49:29 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 08:49:29 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211989769.23675@coral.he.net> Hmm...seems quick and easy. I'm not sure how to do that in PHP though, any links to sample code? I could use the transaction ID for that, which is what I really want to use somehow, as they are guaranteed unique. > Kristina Anderson wrote: > > This might be off topic as well...but I have a PHP app that submits to > > Paypal and then on the "thank you" page, I provide a link to a PDF that > > they bought. > > > Hi Kristina, > > I would say don't provide a link directly to the file (e.g., > http://example.com/protected/file.pdf). Instead, provide them a unique > key embedded in a link to a script, which script would then download the > file for them (e.g., > http://example.com/getfile.php?key=secretstuff&file=file.pdf). This way > the script controls who gets what. (And if you really want to clamp > down, it would even allow you to make keys valid for only one use, etc.) > > - Allen > > -- > Allen Shaw > slidePresenter (http://slides.sourceforge.net) > > _______________________________________________ > 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 May 28 12:17:23 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 28 May 2008 12:17:23 -0400 (EDT) Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211989553.21527@coral.he.net> Message-ID: On Wed, 28 May 2008, Kristina Anderson wrote: > Hmm... I like this... if I copy the file to the web server I can name > the directory after their transaction ID....make unique directory for > each customer...then delete them after a day or so...we have lots of > room..is this doable on a shared host? ...outside "public_html" is > outside the root, or no? As someone else pointed out, you probably should NOT have Apache serve the PDF directly. Much better to generate a token that gets emailed to them when they checkout. During the checkout, you would need to make a record of the transaction and token. You will need to write a download script that takes the token, does some checks in your database and then returns the PDF directly with the correct MIME type. -- Aj. From dan.horning at planetnoc.com Wed May 28 12:25:52 2008 From: dan.horning at planetnoc.com (Dan Horning) Date: Wed, 28 May 2008 12:25:52 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <01C11F14C66F4C5B8DEC85A877CF47EF@PlanetNOC.local> References: <1211989553.21527@coral.he.net> <01C11F14C66F4C5B8DEC85A877CF47EF@PlanetNOC.local> Message-ID: my question is do you really need to custom roll this out - there are a few apps (which are slipping my mind atm) that do exactly this out of the box..... ? 1) customer order is directed to paypal 2) on payment complete paypal notifies your script 3) customer receives download link via email 4) customer has X times to download the file within Y time 5) Admins can reactivate the order allowing X more times or Y time to download 6) works with any number of download products and that's just the framework method... you could use a zencart / freeway /x-cart if you needed a more robust solution Dan Horning American Digital Services - Where you are only limited by imagination. direct 1-866-493-4218 . main 1-800-863-3854 . fax 1-888-474-6133 dan.horning at planetnoc.com http://www.americandigitalservices.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ajai Khattri Sent: Wednesday, May 28, 2008 12:18 PM To: NYPHP Talk Subject: Re: [nycphp-talk] protecting download directory in PHP app on Unix box? On Wed, 28 May 2008, Kristina Anderson wrote: > Hmm... I like this... if I copy the file to the web server I can name > the directory after their transaction ID....make unique directory for > each customer...then delete them after a day or so...we have lots of > room..is this doable on a shared host? ...outside "public_html" is > outside the root, or no? As someone else pointed out, you probably should NOT have Apache serve the PDF directly. Much better to generate a token that gets emailed to them when they checkout. During the checkout, you would need to make a record of the transaction and token. You will need to write a download script that takes the token, does some checks in your database and then returns the PDF directly with the correct MIME type. -- 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 ashaw at polymerdb.org Wed May 28 12:33:29 2008 From: ashaw at polymerdb.org (Allen Shaw) Date: Wed, 28 May 2008 11:33:29 -0500 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211989769.23675@coral.he.net> References: <1211989769.23675@coral.he.net> Message-ID: <483D8959.4000400@polymerdb.org> Kristina Anderson wrote: > Hmm...seems quick and easy. > > I'm not sure how to do that in PHP though, any links to sample code? > > I could use the transaction ID for that, which is what I really want to > use somehow, as they are guaranteed unique. > Hi Kristina, Kenneth's reply is more detailed than mine, with the same idea in mind. His #4 shows sample code for downloading files through PHP. It's up to you of course how you organize your data tables to store the paid transactions and validate new download requests against them. Dan Horning also makes a good point in this thread about using a pre-existing framework (though I can't think of any by name, and I'm not sure what you'd Google for other than php download framework, which seems terribly broad...) When I was starting out with things like this, a framework did not seem near as fun as rolling my own, and it had the added drawback of seeming like overkill, but I bet it would have exposed me to projects and code of far higher quality than I was getting on the tutorial sites, which probably would have helped me as a developer in general. Maybe worthwhile in the long run. - Allen -- Allen Shaw slidePresenter (http://slides.sourceforge.net) From ioplex at gmail.com Wed May 28 12:39:37 2008 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 28 May 2008 12:39:37 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211988321.10102@coral.he.net> References: <1211988321.10102@coral.he.net> Message-ID: <78c6bd860805280939w25f54b2bucf8bbfbe388508c6@mail.gmail.com> On Wed, May 28, 2008 at 11:25 AM, Kristina Anderson wrote: > This might be off topic as well...but I have a PHP app that submits to > Paypal and then on the "thank you" page, I provide a link to a PDF that > they bought. > > The server is Unix based, and before submitting the sale, I collect > various information about the user, and then when the transaction is > complete, I get a unique transaction ID from Paypal. > > What's the easiest, quickest way to provide some level of complexity to > the downloads so that people can't just go back into the directory and > download every PDF without paying? It doesn't have to be 100% secure > but should be secure enough to keep out "most" people. > > I've been looking into .htaccess but wondering if that's overkill and > there isn't some way to authenticate against my DB information before > allowing the download? Hi Kristina, If you want to allow static downloads (meaning the user directly links to the file) then your options are fairly limited. Apache might offer some kind of connection based controls but I'm not aware of anything that would be applicable. If you allow user's static access to files, in general, anyone can access any files. About the only thing you could do with static downloads is make the filename or part of the path name unique to the user or their session. Meaning you could create a subdirectory based on the user's username or the session ID and then place the file or a link to the file in that directory. Then you could have a cron that deletes directories older than a certain time. If you can do scripted downloads (meaning PHP is interpreting the request and writing the file contents to the client) then your access control options increase significantly. With script level access control you can of course check the user's information in the database to determine definitively if they are permitted access to the particular file. Or you could use a combination of both static and scripted access. For example, you could scramble your filenames using a reversible transformation such as using mcrypt_{encrypt,decrypt}. Store your files using the scrambled names. Send the user a link with the scrambled name. Then when they request the file, de-scramble the name so that you can send a Content-Disposition header with the friendly filename. Of course there are many permutations of this. It really depends on your specific needs and constraints. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ From ken at secdat.com Wed May 28 12:41:08 2008 From: ken at secdat.com (Kenneth Downs) Date: Wed, 28 May 2008 12:41:08 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211989645.22503@coral.he.net> References: <1211989645.22503@coral.he.net> Message-ID: <483D8B24.4080405@secdat.com> Kristina Anderson wrote: > the string I get back from Paypal doesn't have that email address... > > just transaction id, "completed", amount & item number. > ah, yes,forgot to mention that. You can generate your own order # for the transaction and give it to paypal, and they will give it back to you. You can follow this chain: 1) Insert a row into your customer-pdf table, with a flag indicating it is not complete 2) Pull the id from the row and hand it to Paypal as the order # 3) When the IPN comes back you use the ID # to know what customer and pdf are involved, and you can get any customer information from your customer file. > >> Or just email the purchasers email address (obtained through paypal) >> > the > >> .pdf. >> >> - Ben >> >> Kristina Anderson wrote: >> >>> This might be off topic as well...but I have a PHP app that submits >>> > to > >>> Paypal and then on the "thank you" page, I provide a link to a PDF >>> > that > >>> they bought. >>> >>> The server is Unix based, and before submitting the sale, I collect >>> various information about the user, and then when the transaction >>> > is > >>> complete, I get a unique transaction ID from Paypal. >>> >>> What's the easiest, quickest way to provide some level of >>> > complexity to > >>> the downloads so that people can't just go back into the directory >>> > and > >>> download every PDF without paying? It doesn't have to be 100% >>> > secure > >>> but should be secure enough to keep out "most" people. >>> >>> I've been looking into .htaccess but wondering if that's overkill >>> > and > >>> there isn't some way to authenticate against my DB information >>> > before > >>> allowing the download? >>> >>> -- 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 >> >> >> > > > _______________________________________________ > 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 ka at kacomputerconsulting.com Wed May 28 13:49:34 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 10:49:34 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211996974.22458@coral.he.net> The entire app is written except for this part of it, and I am expecting to be able to implement something with medium security in a reasonable period of time, like, today :) And the client has stated they do not want any solution where the customer has to be emailed, they want a direct link for the download right after payment. I like the idea of using the transaction id/PDF id pair in a lookup table to authenticate the redirect to a file download URL... -- Kristina > my question is do you really need to custom roll this out - there are a > few apps (which are slipping my mind atm) that do exactly this out of > the box..... ? > > 1) customer order is directed to paypal > 2) on payment complete paypal notifies your script > 3) customer receives download link via email > 4) customer has X times to download the file within Y time > 5) Admins can reactivate the order allowing X more times or Y time to > download > 6) works with any number of download products > > and that's just the framework method... you could use a zencart / > freeway /x-cart if you needed a more robust solution > > Dan Horning > > American Digital Services - Where you are only limited by imagination. > direct 1-866-493-4218 . main 1-800-863-3854 . fax 1-888-474-6133 > dan.horning at planetnoc.com > http://www.americandigitalservices.com > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- bounces at lists.nyphp.org] > On Behalf Of Ajai Khattri > Sent: Wednesday, May 28, 2008 12:18 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] protecting download directory in PHP app on > Unix box? > > On Wed, 28 May 2008, Kristina Anderson wrote: > > > Hmm... I like this... if I copy the file to the web server I can name > > the directory after their transaction ID....make unique directory for > > each customer...then delete them after a day or so...we have lots of > > room..is this doable on a shared host? ...outside "public_html" is > > outside the root, or no? > > As someone else pointed out, you probably should NOT have Apache serve > the > PDF directly. Much better to generate a token that gets emailed to them > when they checkout. During the checkout, you would need to make a record > > of the transaction and token. You will need to write a download script > that takes the token, does some checks in your database and then returns > > the PDF directly with the correct MIME type. > > > > -- > 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 > > > > _______________________________________________ > 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 May 28 13:54:32 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 28 May 2008 13:54:32 -0400 Subject: [nycphp-talk] Remove folder from document root.... Message-ID: <8f0676b40805281054q58c7351budef1fcf8e0623e73@mail.gmail.com> I have a site that has a bunch of stuff that shouldn't be within the document root (cron scripts, class files, etc.). I could move the files, but fixing all of the include statements is more trouble than it's worth. What is the best way to tell Apache ignore a folder that resides in the document root? I could just rewrite/redirect requests into oblivion, but that seems like a kludge. I feel like there should be a one line apache command to do this, but I can't find it in the docs. Regards, John Campbell From dcech at phpwerx.net Wed May 28 14:02:20 2008 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 28 May 2008 14:02:20 -0400 Subject: [nycphp-talk] Remove folder from document root.... In-Reply-To: <8f0676b40805281054q58c7351budef1fcf8e0623e73@mail.gmail.com> References: <8f0676b40805281054q58c7351budef1fcf8e0623e73@mail.gmail.com> Message-ID: <483D9E2C.2030104@phpwerx.net> John Campbell wrote: > I have a site that has a bunch of stuff that shouldn't be within the > document root (cron scripts, class files, etc.). I could move the > files, but fixing all of the include statements is more trouble than > it's worth. > > What is the best way to tell Apache ignore a folder that resides in > the document root? > I could just rewrite/redirect requests into oblivion, but that seems > like a kludge. I feel like there should be a one line apache command > to do this, but I can't find it in the docs. Try this in a .htaccess: Order Allow,Deny Deny from all Dan From ka at kacomputerconsulting.com Wed May 28 14:02:31 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 11:02:31 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211997751.28793@coral.he.net> This is similar to what I was planning on doing... http://www.proofmagazine.com/getfile.php? tx=funkypaypaltransid&PDFid=1234&file=file.pdf authenticates against the transaction id / pdf id pair and then serves up a file...but where does the file live and how does this page know where to find it and etc...that's what I'm not clear on, can anyone further explain this file=file.pdf aspect? > The entire app is written except for this part of it, and I am > expecting to be able to implement something with medium security in a > reasonable period of time, like, today :) > > And the client has stated they do not want any solution where the > customer has to be emailed, they want a direct link for the download > right after payment. > > I like the idea of using the transaction id/PDF id pair in a lookup > table to authenticate the redirect to a file download URL... > > -- Kristina > > > > my question is do you really need to custom roll this out - there are > a > > few apps (which are slipping my mind atm) that do exactly this out of > > the box..... ? > > > > 1) customer order is directed to paypal > > 2) on payment complete paypal notifies your script > > 3) customer receives download link via email > > 4) customer has X times to download the file within Y time > > 5) Admins can reactivate the order allowing X more times or Y time to > > download > > 6) works with any number of download products > > > > and that's just the framework method... you could use a zencart / > > freeway /x-cart if you needed a more robust solution > > > > Dan Horning > > > > American Digital Services - Where you are only limited by imagination. > > direct 1-866-493-4218 . main 1-800-863-3854 . fax 1-888-474-6133 > > dan.horning at planetnoc.com > > http://www.americandigitalservices.com > > > > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] > > On Behalf Of Ajai Khattri > > Sent: Wednesday, May 28, 2008 12:18 PM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] protecting download directory in PHP app on > > Unix box? > > > > On Wed, 28 May 2008, Kristina Anderson wrote: > > > > > Hmm... I like this... if I copy the file to the web server I can > name > > > the directory after their transaction ID....make unique directory > for > > > each customer...then delete them after a day or so...we have lots > of > > > room..is this doable on a shared host? ...outside "public_html" is > > > outside the root, or no? > > > > As someone else pointed out, you probably should NOT have Apache serve > > the > > PDF directly. Much better to generate a token that gets emailed to > them > > when they checkout. During the checkout, you would need to make a > record > > > > of the transaction and token. You will need to write a download > script > > that takes the token, does some checks in your database and then > returns > > > > the PDF directly with the correct MIME type. > > > > > > > > -- > > 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 > > > > > > > > _______________________________________________ > > 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 zippy1981 at gmail.com Wed May 28 14:16:10 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 28 May 2008 14:16:10 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211997751.28793@coral.he.net> References: <1211997751.28793@coral.he.net> Message-ID: <5458db3c0805281116l7e48f7aauf2247214ef7fa96e@mail.gmail.com> Have the files lie in a folder outside of public_html and reference the files via ../pdf_folder/$filename. On Wed, May 28, 2008 at 2:02 PM, Kristina Anderson wrote: > This is similar to what I was planning on doing... > > http://www.proofmagazine.com/getfile.php? > tx=funkypaypaltransid&PDFid=1234&file=file.pdf > > authenticates against the transaction id / pdf id pair and then serves > up a file...but where does the file live and how does this page know > where to find it and etc...that's what I'm not clear on, can anyone > further explain this file=file.pdf aspect? > >> The entire app is written except for this part of it, and I am >> expecting to be able to implement something with medium security in a >> reasonable period of time, like, today :) >> >> And the client has stated they do not want any solution where the >> customer has to be emailed, they want a direct link for the download >> right after payment. >> >> I like the idea of using the transaction id/PDF id pair in a lookup >> table to authenticate the redirect to a file download URL... >> >> -- Kristina >> >> >> > my question is do you really need to custom roll this out - there > are >> a >> > few apps (which are slipping my mind atm) that do exactly this out > of >> > the box..... ? >> > >> > 1) customer order is directed to paypal >> > 2) on payment complete paypal notifies your script >> > 3) customer receives download link via email >> > 4) customer has X times to download the file within Y time >> > 5) Admins can reactivate the order allowing X more times or Y time > to >> > download >> > 6) works with any number of download products >> > >> > and that's just the framework method... you could use a zencart / >> > freeway /x-cart if you needed a more robust solution >> > >> > Dan Horning >> > >> > American Digital Services - Where you are only limited by > imagination. >> > direct 1-866-493-4218 . main 1-800-863-3854 . fax 1-888-474-6133 >> > dan.horning at planetnoc.com >> > http://www.americandigitalservices.com >> > >> > >> > -----Original Message----- >> > From: talk-bounces at lists.nyphp.org [mailto:talk- >> bounces at lists.nyphp.org] >> > On Behalf Of Ajai Khattri >> > Sent: Wednesday, May 28, 2008 12:18 PM >> > To: NYPHP Talk >> > Subject: Re: [nycphp-talk] protecting download directory in PHP app > on >> > Unix box? >> > >> > On Wed, 28 May 2008, Kristina Anderson wrote: >> > >> > > Hmm... I like this... if I copy the file to the web server I can >> name >> > > the directory after their transaction ID....make unique directory >> for >> > > each customer...then delete them after a day or so...we have lots >> of >> > > room..is this doable on a shared host? ...outside "public_html" > is >> > > outside the root, or no? >> > >> > As someone else pointed out, you probably should NOT have Apache > serve >> > the >> > PDF directly. Much better to generate a token that gets emailed to >> them >> > when they checkout. During the checkout, you would need to make a >> record >> > >> > of the transaction and token. You will need to write a download >> script >> > that takes the token, does some checks in your database and then >> returns >> > >> > the PDF directly with the correct MIME type. >> > >> > >> > >> > -- >> > 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 >> > >> > >> > >> > _______________________________________________ >> > 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 Wed May 28 14:25:39 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 11:25:39 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1211999139.8580@coral.he.net> OK so something in the script like $filepath = ../pdf_folder/$filename this is what I was asking about...how to reference that specifically...is there a specific function I need to call that uses this filepath or...? > Have the files lie in a folder outside of public_html and reference > the files via ../pdf_folder/$filename. > > > > On Wed, May 28, 2008 at 2:02 PM, Kristina Anderson > wrote: > > This is similar to what I was planning on doing... > > > > http://www.proofmagazine.com/getfile.php? > > tx=funkypaypaltransid&PDFid=1234&file=file.pdf > > > > authenticates against the transaction id / pdf id pair and then serves > > up a file...but where does the file live and how does this page know > > where to find it and etc...that's what I'm not clear on, can anyone > > further explain this file=file.pdf aspect? > > > >> The entire app is written except for this part of it, and I am > >> expecting to be able to implement something with medium security in a > >> reasonable period of time, like, today :) > >> > >> And the client has stated they do not want any solution where the > >> customer has to be emailed, they want a direct link for the download > >> right after payment. > >> > >> I like the idea of using the transaction id/PDF id pair in a lookup > >> table to authenticate the redirect to a file download URL... > >> > >> -- Kristina > >> > >> > >> > my question is do you really need to custom roll this out - there > > are > >> a > >> > few apps (which are slipping my mind atm) that do exactly this out > > of > >> > the box..... ? > >> > > >> > 1) customer order is directed to paypal > >> > 2) on payment complete paypal notifies your script > >> > 3) customer receives download link via email > >> > 4) customer has X times to download the file within Y time > >> > 5) Admins can reactivate the order allowing X more times or Y time > > to > >> > download > >> > 6) works with any number of download products > >> > > >> > and that's just the framework method... you could use a zencart / > >> > freeway /x-cart if you needed a more robust solution > >> > > >> > Dan Horning > >> > > >> > American Digital Services - Where you are only limited by > > imagination. > >> > direct 1-866-493-4218 . main 1-800-863-3854 . fax 1-888-474-6133 > >> > dan.horning at planetnoc.com > >> > http://www.americandigitalservices.com > >> > > >> > > >> > -----Original Message----- > >> > From: talk-bounces at lists.nyphp.org [mailto:talk- > >> bounces at lists.nyphp.org] > >> > On Behalf Of Ajai Khattri > >> > Sent: Wednesday, May 28, 2008 12:18 PM > >> > To: NYPHP Talk > >> > Subject: Re: [nycphp-talk] protecting download directory in PHP app > > on > >> > Unix box? > >> > > >> > On Wed, 28 May 2008, Kristina Anderson wrote: > >> > > >> > > Hmm... I like this... if I copy the file to the web server I can > >> name > >> > > the directory after their transaction ID....make unique directory > >> for > >> > > each customer...then delete them after a day or so...we have lots > >> of > >> > > room..is this doable on a shared host? ...outside "public_html" > > is > >> > > outside the root, or no? > >> > > >> > As someone else pointed out, you probably should NOT have Apache > > serve > >> > the > >> > PDF directly. Much better to generate a token that gets emailed to > >> them > >> > when they checkout. During the checkout, you would need to make a > >> record > >> > > >> > of the transaction and token. You will need to write a download > >> script > >> > that takes the token, does some checks in your database and then > >> returns > >> > > >> > the PDF directly with the correct MIME type. > >> > > >> > > >> > > >> > -- > >> > 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 > >> > > >> > > >> > > >> > _______________________________________________ > >> > 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 > > > _______________________________________________ > 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 zippy1981 at gmail.com Wed May 28 14:41:16 2008 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 28 May 2008 14:41:16 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211999139.8580@coral.he.net> References: <1211999139.8580@coral.he.net> Message-ID: <5458db3c0805281141v15dfe636k7894cf6c749688d7@mail.gmail.com> On Wed, May 28, 2008 at 2:25 PM, Kristina Anderson wrote: > OK so something in the script like $filepath = ../pdf_folder/$filename > > this is what I was asking about...how to reference that > specifically...is there a specific function I need to call that uses > this filepath or...? > readfile() is what your looking for. See Ken's original example. From ka at kacomputerconsulting.com Wed May 28 14:52:05 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 11:52:05 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1212000725.22077@coral.he.net> AHA!!! Thanks you guys, when I have it working I'll post the URL and you're ALL invited to this client's next party!!!! Open bar! > On Wed, May 28, 2008 at 2:25 PM, Kristina Anderson > wrote: > > OK so something in the script like $filepath = ../pdf_folder/ $filename > > > > this is what I was asking about...how to reference that > > specifically...is there a specific function I need to call that uses > > this filepath or...? > > > > readfile() is what your looking for. See Ken's original example. > _______________________________________________ > 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 Wed May 28 15:24:12 2008 From: smanes at magpie.com (Steve Manes) Date: Wed, 28 May 2008 15:24:12 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211989769.23675@coral.he.net> References: <1211989769.23675@coral.he.net> Message-ID: <483DB15C.2040405@magpie.com> Kristina Anderson wrote: > Hmm...seems quick and easy. > > I'm not sure how to do that in PHP though, any links to sample code? > > I could use the transaction ID for that, which is what I really want to > use somehow, as they are guaranteed unique. MD5. Here's a function I use in a file_store class to generate a munged directory file path given (for instance) a user's unique ID. public function generate_upload_path($id) { $hash = md5($id); $p1 = substr($hash, 0, 3); $p2 = substr($hash, 3, 3); return $this->attachments_dir . "/$p1/$p2/$id"; } From ajai at bitblit.net Wed May 28 15:29:27 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 28 May 2008 15:29:27 -0400 (EDT) Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <483DB15C.2040405@magpie.com> Message-ID: On Wed, 28 May 2008, Steve Manes wrote: > MD5. Here's a function I use in a file_store class to generate a munged > directory file path given (for instance) a user's unique ID. SHA1 is better. -- Aj. From ajai at bitblit.net Wed May 28 15:32:09 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 28 May 2008 15:32:09 -0400 (EDT) Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1211997751.28793@coral.he.net> Message-ID: On Wed, 28 May 2008, Kristina Anderson wrote: > This is similar to what I was planning on doing... > > http://www.proofmagazine.com/getfile.php? > tx=funkypaypaltransid&PDFid=1234&file=file.pdf > > authenticates against the transaction id / pdf id pair and then serves > up a file...but where does the file live and how does this page know > where to find it and etc...that's what I'm not clear on, can anyone > further explain this file=file.pdf aspect? That's something YOU would decide/design. If the PDFs are custom per user then you should probably create a unique path with their user ID embedded in it. If not, then you can decide how to organize the tree of PDFs. BUT the user will not see the pathname, only your download script, so you decide. -- Aj. From ka at kacomputerconsulting.com Wed May 28 15:48:20 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 12:48:20 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1212004100.18831@coral.he.net> Thanks Ajai -- I was wondering how to pass the filepath into the function and call the download...but as usual my questions have been answered here on our wonderful list! Basically I'm having the web host recommend the most secure location for our directory and then just name the PDFs by ID#...they're not custom by user but will be for sale to anyone for 99 cents...URL to be posted ASAP! :) > On Wed, 28 May 2008, Kristina Anderson wrote: > > > This is similar to what I was planning on doing... > > > > http://www.proofmagazine.com/getfile.php? > > tx=funkypaypaltransid&PDFid=1234&file=file.pdf > > > > authenticates against the transaction id / pdf id pair and then serves > > up a file...but where does the file live and how does this page know > > where to find it and etc...that's what I'm not clear on, can anyone > > further explain this file=file.pdf aspect? > > That's something YOU would decide/design. > > If the PDFs are custom per user then you should probably create a unique > path with their user ID embedded in it. If not, then you can decide how to > organize the tree of PDFs. BUT the user will not see the pathname, only > your download script, so you decide. > > > > -- > 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 smanes at magpie.com Wed May 28 15:51:16 2008 From: smanes at magpie.com (Steve Manes) Date: Wed, 28 May 2008 15:51:16 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: References: Message-ID: <483DB7B4.6080101@magpie.com> Ajai Khattri wrote: > On Wed, 28 May 2008, Steve Manes wrote: > >> MD5. Here's a function I use in a file_store class to generate a munged >> directory file path given (for instance) a user's unique ID. > > SHA1 is better. For this purpose, the level of encryption security is academic. From jcampbell1 at gmail.com Wed May 28 16:17:07 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 28 May 2008 16:17:07 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <483DB15C.2040405@magpie.com> References: <1211989769.23675@coral.he.net> <483DB15C.2040405@magpie.com> Message-ID: <8f0676b40805281317q636af96y465e5ad4b2d9867c@mail.gmail.com> On Wed, May 28, 2008 at 3:24 PM, Steve Manes wrote: > MD5. Here's a function I use in a file_store class to generate a munged > directory file path given (for instance) a user's unique ID. > > public function generate_upload_path($id) > { > $hash = md5($id); > $p1 = substr($hash, 0, 3); > $p2 = substr($hash, 3, 3); > > return $this->attachments_dir . "/$p1/$p2/$id"; > } What is the point of this? It offers no security -- if one knows the id, then then they know $p1 and $p2. Why not just put it in a folder of the id? If you want to make $p1 and $p2 harder to guess, you will need to do something like: $hash = md5(md5("a secret long enough that it can't be rainbowed") . $id); -John C. From ajai at bitblit.net Wed May 28 16:17:31 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 28 May 2008 16:17:31 -0400 (EDT) Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1212004100.18831@coral.he.net> Message-ID: On Wed, 28 May 2008, Kristina Anderson wrote: > Thanks Ajai -- I was wondering how to pass the filepath into the > function and call the download...but as usual my questions have been > answered here on our wonderful list! Generally, I dont like to pass actual filenames - much better to generate a token and use that to reference a database table that maps it to the transaction. -- Aj. From ka at kacomputerconsulting.com Wed May 28 16:38:20 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 13:38:20 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1212007100.17662@coral.he.net> John -- as long as 1. The actual filepath is not exposed to the user at any point; and 2. The download is authenticated against their unique Paypal transaction ID beforehand (certifying payment received); and 3. The directory storing the files is outside the web root in some secure location -- I think I am fully covered...yes? -- Kristina > On Wed, May 28, 2008 at 3:24 PM, Steve Manes wrote: > > MD5. Here's a function I use in a file_store class to generate a munged > > directory file path given (for instance) a user's unique ID. > > > > public function generate_upload_path($id) > > { > > $hash = md5($id); > > $p1 = substr($hash, 0, 3); > > $p2 = substr($hash, 3, 3); > > > > return $this->attachments_dir . "/$p1/$p2/$id"; > > } > > What is the point of this? It offers no security -- if one knows the > id, then then they know $p1 and $p2. Why not just put it in a folder > of the id? > > If you want to make $p1 and $p2 harder to guess, you will need to do > something like: > $hash = md5(md5("a secret long enough that it can't be rainbowed") . $id); > > -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 May 28 18:42:44 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 15:42:44 -0700 Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <1212014564.26527@coral.he.net> I have two questions regarding syntax for MySQL queries. 1. I have complex queries where there are lots of conditional statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR thing2=thing2... They are not erroring out but they aren't narrowing the resultset sufficiently...do I need parentheses or is there something else I need? 2. How can I select the last row inserted from a table WHERE field1=somethingineed and field2 is NULL? Thanks in advance...full of questions today I am! --- Kristina From smanes at magpie.com Wed May 28 19:01:01 2008 From: smanes at magpie.com (Steve Manes) Date: Wed, 28 May 2008 19:01:01 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <8f0676b40805281317q636af96y465e5ad4b2d9867c@mail.gmail.com> References: <1211989769.23675@coral.he.net> <483DB15C.2040405@magpie.com> <8f0676b40805281317q636af96y465e5ad4b2d9867c@mail.gmail.com> Message-ID: <483DE42D.4060708@magpie.com> John Campbell wrote: > What is the point of this? It offers no security -- if one knows the > id, then then they know $p1 and $p2. Why not just put it in a folder > of the id? Because stashing potentially tens of thousands of files into a single directory is an SA nightmare even if you have a filesystem that supports that many nodes in a directory. The question wasn't about security. It was about how to break up an ID into something that could point to file inside a directory hierarchy. It's not a URL but a file path that the application generates from the user's ID. Making it harder for the user to guess isn't an issue because the directory would presumably (hopefully) live outside web root. From susan_shemin at yahoo.com Wed May 28 19:02:02 2008 From: susan_shemin at yahoo.com (Susan Shemin) Date: Wed, 28 May 2008 16:02:02 -0700 (PDT) Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <964558.55763.qm@web50203.mail.re2.yahoo.com> For #1, if you had parentheses around what you want together, MySQL will understand what to return.? For example (no logic here, just example): SELECT * FROM table WHERE ( this=this )?AND (?( that=that OR thing=thing )?OR ( ( blah=blah OR foo=foo )?AND ( bar=bar OR etc=etc ) ) ) ----- Original Message ---- From: Kristina Anderson To: talk at lists.nyphp.org Sent: Wednesday, May 28, 2008 3:42:44 PM Subject: [nycphp-talk] MySQL Syntax questions I have two questions regarding syntax for MySQL queries. 1.? I have complex queries where there are lots of conditional statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR thing2=thing2... They are not erroring out but they aren't narrowing the resultset sufficiently...do I need parentheses or is there something else I need? 2.? How can I select the last row inserted from a table WHERE field1=somethingineed and field2 is NULL? Thanks in advance...full of questions today I am! --- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim_lists at o2group.com Wed May 28 19:01:36 2008 From: tim_lists at o2group.com (Tim Lieberman) Date: Wed, 28 May 2008 17:01:36 -0600 Subject: [nycphp-talk] MySQL Syntax questions In-Reply-To: <1212014564.26527@coral.he.net> References: <1212014564.26527@coral.he.net> Message-ID: On May 28, 2008, at 4:42 PM, Kristina Anderson wrote: > I have two questions regarding syntax for MySQL queries. > > 1. I have complex queries where there are lots of conditional > statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR > thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR > thing2=thing2... > > > They are not erroring out but they aren't narrowing the resultset > sufficiently...do I need parentheses or is there something else I > need? > In short: you have to be careful of how expressions are evaluated. More parenthesis are likely the solution. > 2. How can I select the last row inserted from a table WHERE > field1=somethingineed and field2 is NULL? If you've got an auto_increment field (named "id", perhaps): SELECT max(id) as lastId FROM table where feld1='foo' and field2 is null -Tim From ka at kacomputerconsulting.com Wed May 28 19:11:42 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 16:11:42 -0700 Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <1212016302.11470@coral.he.net> awesome, thanks both of you! --- Kristina > > For #1, if you had parentheses around what you want together, MySQL will understand what to return.? For example (no logic here, just example): > SELECT * FROM table WHERE ( this=this )?AND (?( that=that OR > thing=thing )?OR ( ( blah=blah OR foo=foo )?AND ( bar=bar OR etc=etc ) ) ) > > > ----- Original Message ---- > From: Kristina Anderson > To: talk at lists.nyphp.org > Sent: Wednesday, May 28, 2008 3:42:44 PM > Subject: [nycphp-talk] MySQL Syntax questions > > I have two questions regarding syntax for MySQL queries. > > 1.? I have complex queries where there are lots of conditional > statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR > thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR > thing2=thing2... > > > They are not erroring out but they aren't narrowing the resultset > sufficiently...do I need parentheses or is there something else I need? > > 2.? How can I select the last row inserted from a table WHERE > field1=somethingineed and field2 is NULL? > > Thanks in advance...full of questions today I am! > > > > --- 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 ka at kacomputerconsulting.com Wed May 28 19:14:07 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 16:14:07 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1212016447.12511@coral.he.net> In the case of this project, there will potentially be several hundred PDFs but no more than that, at least for the foreseeable future...there are about 30 articles or less published per year by this magazine. So I think one static directory can work for us. -Kristina > John Campbell wrote: > > What is the point of this? It offers no security -- if one knows the > > id, then then they know $p1 and $p2. Why not just put it in a folder > > of the id? > > Because stashing potentially tens of thousands of files into a single > directory is an SA nightmare even if you have a filesystem that supports > that many nodes in a directory. > > The question wasn't about security. It was about how to break up an ID > into something that could point to file inside a directory hierarchy. > It's not a URL but a file path that the application generates from the > user's ID. Making it harder for the user to guess isn't an issue > because the directory would presumably (hopefully) live outside web root. > > _______________________________________________ > 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 May 28 21:43:37 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 18:43:37 -0700 Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <1212025417.28512@coral.he.net> Tim, with regard to the second query, I wanted the entire row not just the ID...do I need to do two queries to get that? --Kristina > On May 28, 2008, at 4:42 PM, Kristina Anderson wrote: > > > I have two questions regarding syntax for MySQL queries. > > > > 1. I have complex queries where there are lots of conditional > > statements, i.e. SELECT * FROM table WHERE this=this AND that=that OR > > thing=thing OR blah=blah OR foo=foo AND bar=bar OR etc=etc OR > > thing2=thing2... > > > > > > They are not erroring out but they aren't narrowing the resultset > > sufficiently...do I need parentheses or is there something else I > > need? > > > > In short: you have to be careful of how expressions are evaluated. > More parenthesis are likely the solution. > > > > 2. How can I select the last row inserted from a table WHERE > > field1=somethingineed and field2 is NULL? > > If you've got an auto_increment field (named "id", perhaps): > > SELECT max(id) as lastId FROM table where feld1='foo' and field2 is null > > -Tim > > _______________________________________________ > 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 Wed May 28 22:19:04 2008 From: smanes at magpie.com (Steve Manes) Date: Wed, 28 May 2008 22:19:04 -0400 Subject: [nycphp-talk] MySQL Syntax questions In-Reply-To: <1212025417.28512@coral.he.net> References: <1212025417.28512@coral.he.net> Message-ID: <483E1298.7000706@magpie.com> Kristina Anderson wrote: > Tim, with regard to the second query, I wanted the entire row not just > the ID...do I need to do two queries to get that? Or a subquery: SELECT * FROM table_foo WHERE id = (SELECT MAX(id) FROM table_foo); From rolan at omnistep.com Wed May 28 22:39:12 2008 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 28 May 2008 22:39:12 -0400 Subject: [nycphp-talk] MySQL Syntax questions In-Reply-To: <483E1298.7000706@magpie.com> References: <1212025417.28512@coral.he.net> <483E1298.7000706@magpie.com> Message-ID: <483E1750.3060803@omnistep.com> Steve Manes wrote: > Kristina Anderson wrote: >> Tim, with regard to the second query, I wanted the entire row not >> just the ID...do I need to do two queries to get that? > > Or a subquery: > > SELECT > * > FROM > table_foo > WHERE > id = (SELECT MAX(id) FROM table_foo); > > select * from table_foo order by id desc limit 1 From ka at kacomputerconsulting.com Wed May 28 22:40:08 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Wed, 28 May 2008 19:40:08 -0700 Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <1212028808.19977@coral.he.net> these two don't take into consideration my conditional statements on the two fields but I get the idea ...thanks Kristina > Steve Manes wrote: > > Kristina Anderson wrote: > >> Tim, with regard to the second query, I wanted the entire row not > >> just the ID...do I need to do two queries to get that? > > > > Or a subquery: > > > > SELECT > > * > > FROM > > table_foo > > WHERE > > id = (SELECT MAX(id) FROM table_foo); > > > > > > select * from table_foo order by id desc limit 1 > _______________________________________________ > 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 brian at realm3.com Thu May 29 10:28:42 2008 From: brian at realm3.com (Brian D.) Date: Thu, 29 May 2008 10:28:42 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr Message-ID: There are some new ways to show your involvement in the New York PHP Community! LinkedIn Group - If you're on LinkedIn joining the NYPHP Community group will allow you to contact other NYPHP Community members and view their profiles. You can join the group by following the link below: http://www.linkedin.com/e/gis/110439/53F044687FCA Flickr NYPHP Group - I've been adding pictures to this group for a few months now, but it doesn't have to just be pictures of New York PHP meetings. If any of you NYPHPers went to PHP|tek or any of the other conventions, feel free to add your pictures to the group. http://flickr.com/groups/nyphp/pool/ - Brian D. -- realm3 web applications [realm3.com] freelance consulting, application development (917) 512-3594 From consult at covenantedesign.com Thu May 29 12:02:00 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 29 May 2008 12:02:00 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: References: Message-ID: <483ED378.7070005@covenantedesign.com> Brian, NYPHP ***http://www.linkedin.com/e/gis/81366/4871173BBA17 I made a month or so ago * Brian D. wrote: > There are some new ways to show your involvement in the New York PHP Community! > > LinkedIn Group - > If you're on LinkedIn joining the NYPHP Community group will allow you > to contact other NYPHP Community members and view their profiles. You > can join the group by following the link below: > > http://www.linkedin.com/e/gis/110439/53F044687FCA > > Flickr NYPHP Group - > I've been adding pictures to this group for a few months now, but it > doesn't have to just be pictures of New York PHP meetings. If any of > you NYPHPers went to PHP|tek or any of the other conventions, feel > free to add your pictures to the group. > > http://flickr.com/groups/nyphp/pool/ > > > - Brian D. > > From consult at covenantedesign.com Thu May 29 12:05:04 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 29 May 2008 12:05:04 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: References: Message-ID: <483ED430.3010407@covenantedesign.com> Brian D. wrote: > There are some new ways to show your involvement in the New York PHP Community! > > LinkedIn Group - > If you're on LinkedIn joining the NYPHP Community group will allow you > to contact other NYPHP Community members and view their profiles. You > can join the group by following the link below: > > http://www.linkedin.com/e/gis/110439/53F044687FCA > > Flickr NYPHP Group - > I've been adding pictures to this group for a few months now, but it > doesn't have to just be pictures of New York PHP meetings. If any of > you NYPHPers went to PHP|tek or any of the other conventions, feel > free to add your pictures to the group. > > http://flickr.com/groups/nyphp/pool/ > > > - Brian D. > > as well as AlbanyPHP.org For those of you who aren't in the immediate NYC area, but find yourselves further north. From codebowl at gmail.com Thu May 29 12:07:58 2008 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 29 May 2008 12:07:58 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <483ED430.3010407@covenantedesign.com> References: <483ED430.3010407@covenantedesign.com> Message-ID: <3889D4B8-A414-4520-AFA8-0783285E9BD0@gmail.com> I joined, pending approval glad to see nyphp on LinkedIn On May 29, 2008, at 12:05 PM, Webmaster wrote: > Brian D. wrote: >> There are some new ways to show your involvement in the New York >> PHP Community! >> >> LinkedIn Group - >> If you're on LinkedIn joining the NYPHP Community group will allow >> you >> to contact other NYPHP Community members and view their profiles. You >> can join the group by following the link below: >> >> http://www.linkedin.com/e/gis/110439/53F044687FCA >> >> Flickr NYPHP Group - >> I've been adding pictures to this group for a few months now, but it >> doesn't have to just be pictures of New York PHP meetings. If any of >> you NYPHPers went to PHP|tek or any of the other conventions, feel >> free to add your pictures to the group. >> >> http://flickr.com/groups/nyphp/pool/ >> >> >> - Brian D. >> >> > as well as AlbanyPHP.org > > For those of you who aren't in the immediate NYC area, but find > yourselves further north. > > _______________________________________________ > 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 Thu May 29 12:42:18 2008 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 29 May 2008 12:42:18 -0400 (EDT) Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <1212016447.12511@coral.he.net> Message-ID: On Wed, 28 May 2008, Kristina Anderson wrote: > In the case of this project, there will potentially be several hundred > PDFs but no more than that, at least for the foreseeable future...there > are about 30 articles or less published per year by this magazine. > > So I think one static directory can work for us. Always plan to make it future-proof as much as you can. If that becomes 100 per year, then what? -- Aj. From jcampbell1 at gmail.com Thu May 29 13:26:34 2008 From: jcampbell1 at gmail.com (John Campbell) Date: Thu, 29 May 2008 13:26:34 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: References: <1212016447.12511@coral.he.net> Message-ID: <8f0676b40805291026u34ce16cel60833c09657359de@mail.gmail.com> On Thu, May 29, 2008 at 12:42 PM, Ajai Khattri wrote: > On Wed, 28 May 2008, Kristina Anderson wrote: > >> In the case of this project, there will potentially be several hundred >> PDFs but no more than that, at least for the foreseeable future...there >> are about 30 articles or less published per year by this magazine. >> >> So I think one static directory can work for us. > > Always plan to make it future-proof as much as you can. If that becomes > 100 per year, then what? > Then in the year 2108, she will have to make changes to the code. In my experience, this type of future proofing buys you nothing. I have found that tons of other problems arise before overflow issues start to be a problem. I did a similar thing and I just put the files in a folder with the id. Bandwidth and diskspace became a problem long before a too many folder problem. The solution was to move everything to Amazon S3. S3 doesn't have folders and supports and unlimited number of objects. It turned out to be a blessing that I didn't do something fancy with the folder naming. Regards, John Campbell From anthony at thrillist.com Thu May 29 13:59:00 2008 From: anthony at thrillist.com (anthony wlodarski) Date: Thu, 29 May 2008 13:59:00 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: References: Message-ID: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> Joined as well, pending approval. :) -Anthony On May 29, 2008, at 10:28 AM, Brian D. wrote: > There are some new ways to show your involvement in the New York PHP > Community! > > LinkedIn Group - > If you're on LinkedIn joining the NYPHP Community group will allow you > to contact other NYPHP Community members and view their profiles. You > can join the group by following the link below: > > http://www.linkedin.com/e/gis/110439/53F044687FCA > > Flickr NYPHP Group - > I've been adding pictures to this group for a few months now, but it > doesn't have to just be pictures of New York PHP meetings. If any of > you NYPHPers went to PHP|tek or any of the other conventions, feel > free to add your pictures to the group. > > http://flickr.com/groups/nyphp/pool/ > > > - Brian D. > > -- > realm3 web applications [realm3.com] > freelance consulting, application development > (917) 512-3594 > _______________________________________________ > 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 > Anthony Wlodarski Web Applications Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeleo724 at gmail.com Thu May 29 14:03:24 2008 From: joeleo724 at gmail.com (Joe Leo) Date: Thu, 29 May 2008 14:03:24 -0400 Subject: [nycphp-talk] Apache Mod-Proxy Access Control Message-ID: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> Hi All, I am hoping someone can help me with a solution. I have a main website that is also acting as a reverse proxy. Thes proxy is a frontend to a few other web servers on the backend. All is working o.k... What I'm looking to do now is to put in place some kind of access control so that the proxy will ONLY serve web pages from those who are authenticate from the main site. Again, the main site in on the same server as the proxy. Here's the setup: www.mainsite.com (Proxy) server1.mainsite.com server2.mainsite.com server3.mainsite.com The www.mainsite.com has my drupal users where they can sign-up and authenticate. What I want is: If users enter url server1.mainsite.com then the proxy would somehow prompt users to first login. But, I'm not sure how this can be done/achieved. I would appreciate any comments/suggestions to accomplish this. Regards, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From anoland at indigente.net Thu May 29 14:42:01 2008 From: anoland at indigente.net (anoland at indigente.net) Date: Thu, 29 May 2008 11:42:01 -0700 (PDT) Subject: [nycphp-talk] MySQL Syntax questions Message-ID: <3294916890.25472352@smtp.gmail.com> Kristina, There are 2 good articles on melonfire.com that discuss subselects. You may find them enlightening. -----Original Message----- From: "Kristina Anderson" Date: Wednesday, May 28, 2008 10:40 pm Subject: Re: [nycphp-talk] MySQL Syntax questions To: NYPHP Talk Reply-To: NYPHP Talk these two don't take into consideration my conditional statements on >the two fields but I get the idea ...thanks > >Kristina > >> Steve Manes wrote: >> > Kristina Anderson wrote: >> >> Tim, with regard to the second query, I wanted the entire row not >> >> just the ID...do I need to do two queries to get that? >> > >> > Or a subquery: >> > >> > SELECT >> > * >> > FROM >> > table_foo >> > WHERE >> > id = (SELECT MAX(id) FROM table_foo); >> > >> > >> >> select * from table_foo order by id desc limit 1 >> From consult at covenantedesign.com Thu May 29 14:50:23 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 29 May 2008 14:50:23 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> Message-ID: <483EFAEF.1060006@covenantedesign.com> there may be some confusion... *http://www.linkedin.com/e/gis/81366/4871173BBA17 Was started a few months ago. * From dan.horning at planetnoc.com Thu May 29 15:22:34 2008 From: dan.horning at planetnoc.com (Dan Horning) Date: Thu, 29 May 2008 15:22:34 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> Message-ID: <483F027A.9070106@planetnoc.com> I've added myself to both :-) thanks -dan Webmaster wrote: > there may be some confusion... > > *http://www.linkedin.com/e/gis/81366/4871173BBA17 > > Was started a few months ago. > * > > _______________________________________________ > 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 Thu May 29 15:38:26 2008 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 29 May 2008 15:38:26 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <483F027A.9070106@planetnoc.com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> <483F027A.9070106@planetnoc.com> Message-ID: <330532b60805291238l406f61d0o10b40b6c21f53d19@mail.gmail.com> Can we consolidate, and which one is THE group for NYPHP? -- Mitch, struggling to keep up with groups, lists, blogs, tweets and all that other shiznit From consult at covenantedesign.com Thu May 29 15:41:06 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 29 May 2008 15:41:06 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <483EFAEF.1060006@covenantedesign.com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> <483EFAEF.1060006@covenantedesign.com> Message-ID: <483F06D2.2040809@covenantedesign.com> It looks as though we are forming 2 LinkedIn groups One entitled "NYPHP" http://www.linkedin.com/e/gis/81366/4871173BBA17 and One entitled "NYPHP Community" http://www.linkedin.com/e/gis/110439/53F044687FCA Webmaster wrote: > there may be some confusion... > > *http://www.linkedin.com/e/gis/81366/4871173BBA17 > > Was started a few months ago. > * > > _______________________________________________ > 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 codebowl at gmail.com Thu May 29 15:56:19 2008 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 29 May 2008 15:56:19 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <483F06D2.2040809@covenantedesign.com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> <483EFAEF.1060006@covenantedesign.com> <483F06D2.2040809@covenantedesign.com> Message-ID: I joined the Community one as there were more members :) On May 29, 2008, at 3:41 PM, Webmaster wrote: > It looks as though we are forming 2 LinkedIn groups > > One entitled "NYPHP" > http://www.linkedin.com/e/gis/81366/4871173BBA17 > > and One entitled "NYPHP Community" > http://www.linkedin.com/e/gis/110439/53F044687FCA > > > > Webmaster wrote: >> there may be some confusion... >> >> *http://www.linkedin.com/e/gis/81366/4871173BBA17 >> >> Was started a few months ago. >> * >> >> _______________________________________________ >> 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 Thu May 29 15:57:55 2008 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 29 May 2008 12:57:55 -0700 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? Message-ID: <1212091075.667@coral.he.net> It's going to be tough to locate me in 2108 when their directory fills up but they can try me at the retirement village on Alpha Centauri :) --Kristina > On Thu, May 29, 2008 at 12:42 PM, Ajai Khattri wrote: > > On Wed, 28 May 2008, Kristina Anderson wrote: > > > >> In the case of this project, there will potentially be several hundred > >> PDFs but no more than that, at least for the foreseeable future...there > >> are about 30 articles or less published per year by this magazine. > >> > >> So I think one static directory can work for us. > > > > Always plan to make it future-proof as much as you can. If that becomes > > 100 per year, then what? > > > Then in the year 2108, she will have to make changes to the code. > > In my experience, this type of future proofing buys you nothing. I > have found that tons of other problems arise before overflow issues > start to be a problem. I did a similar thing and I just put the files > in a folder with the id. Bandwidth and diskspace became a problem > long before a too many folder problem. The solution was to move > everything to Amazon S3. S3 doesn't have folders and supports and > unlimited number of objects. It turned out to be a blessing that I > didn't do something fancy with the folder naming. > > Regards, > 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 > > ------------------- Kristina D. H. Anderson Senior Application Developer/Consultant "Building a Better Tomorrow, One Line of Code at a Time" 646-247-4987 From lists at zaunere.com Thu May 29 16:03:01 2008 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 29 May 2008 16:03:01 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <483F06D2.2040809@covenantedesign.com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> <483EFAEF.1060006@covenantedesign.com> <483F06D2.2040809@covenantedesign.com> Message-ID: <012601c8c1c6$ffff5cb0$fffe1610$@com> > It looks as though we are forming 2 LinkedIn groups We shouldn't be. > One entitled "NYPHP" > http://www.linkedin.com/e/gis/81366/4871173BBA17 I don't think anyone knew about this one - Webmaster, who are you? > and One entitled "NYPHP Community" > http://www.linkedin.com/e/gis/110439/53F044687FCA This is the one that Brian just created after talking to me. Webmaster, can you merge your group into the NYPHP Community one Brian just announced? H From consult at covenantedesign.com Thu May 29 16:08:33 2008 From: consult at covenantedesign.com (Webmaster) Date: Thu, 29 May 2008 16:08:33 -0400 Subject: [nycphp-talk] New York PHP on LinkedIn and Flickr In-Reply-To: <012601c8c1c6$ffff5cb0$fffe1610$@com> References: <5E0B97D5-3E58-4DD5-8B16-738F893E2C14@thrillist.com> <483EFAEF.1060006@covenantedesign.com> <483F06D2.2040809@covenantedesign.com> <012601c8c1c6$ffff5cb0$fffe1610$@com> Message-ID: <483F0D41.2070701@covenantedesign.com> Hans, I had started this a few months ago, you may have missed my off-list emails prior to it's creation. -Ed Edward Prevost Me at EdwardPrevost.info 518-331-5061 Hans Zaunere wrote: >> It looks as though we are forming 2 LinkedIn groups >> > > We shouldn't be. > > >> One entitled "NYPHP" >> http://www.linkedin.com/e/gis/81366/4871173BBA17 >> > > I don't think anyone knew about this one - Webmaster, who are you? > > >> and One entitled "NYPHP Community" >> http://www.linkedin.com/e/gis/110439/53F044687FCA >> > > This is the one that Brian just created after talking to me. > > Webmaster, can you merge your group into the NYPHP Community one Brian just > announced? > > 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 chsnyder at gmail.com Thu May 29 16:08:56 2008 From: chsnyder at gmail.com (csnyder) Date: Thu, 29 May 2008 16:08:56 -0400 Subject: [nycphp-talk] Apache Mod-Proxy Access Control In-Reply-To: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> References: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> Message-ID: On Thu, May 29, 2008 at 2:03 PM, Joe Leo wrote: > The www.mainsite.com has my drupal users where they can sign-up and > authenticate. What I want is: If users enter url server1.mainsite.com then > the proxy would somehow prompt users to first login. But, I'm not sure how > this can be done/achieved. I would appreciate any comments/suggestions to > accomplish this. > It sounds tough, because the browser isn't going to send the www.mainsite.com cookie to server1.mainsite.com. But wait, you said www was acting as a reverse proxy, so why would someone go directly to server1? If all the connections go through www, you can use mod_rewrite to check for existence of drupal's session cookie, and redirect to login if not found. If someone knew the setup, they could fake the drupal cookie, so if you're trying to protect something valuable using this scheme you may need to consider a different mechanism, such as an auto-prepend script that checks if the session is valid. -- Chris Snyder http://chxo.com/ From joeleo724 at gmail.com Thu May 29 16:24:38 2008 From: joeleo724 at gmail.com (Joe Leo) Date: Thu, 29 May 2008 16:24:38 -0400 Subject: [nycphp-talk] Apache Mod-Proxy Access Control In-Reply-To: References: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> Message-ID: <799abcd40805291324k23bf1226ud2fa443ce6f3e077@mail.gmail.com> Chis, thanks for your reply/comments... > But wait, you said www was acting as a reverse proxy, so why would > someone go directly to server1? > To answer your question above, typically, users will visit main site which has webpage links that would take user to inside server via the proxy. However, that URL is shown/known when user mouse over the links. So, it can easily be used for future visits to server-x.mainsite.com.... And, I suspect, web engines will pick those links up as well. And, even if users that access site via main site they may not have authenticated before clicking on the link that would take them to the backend server. So, you are right, it seems that I would need something like mod_rewrite and/or the prepend script you mentioned. I've struggled to get my proxy working and have not yet played around with mod_rewrite. Also, the pre-pend script you refered to - Can you give me more info on this? Is there a sample of this script you can share and how it would work? Would really appreciate any help on this! Joe On Thu, May 29, 2008 at 4:08 PM, csnyder wrote: > On Thu, May 29, 2008 at 2:03 PM, Joe Leo wrote: > > > The www.mainsite.com has my drupal users where they can sign-up and > > authenticate. What I want is: If users enter url server1.mainsite.comthen > > the proxy would somehow prompt users to first login. But, I'm not sure > how > > this can be done/achieved. I would appreciate any comments/suggestions to > > accomplish this. > > > > It sounds tough, because the browser isn't going to send the > www.mainsite.com cookie to server1.mainsite.com. > > But wait, you said www was acting as a reverse proxy, so why would > someone go directly to server1? > > If all the connections go through www, you can use mod_rewrite to > check for existence of drupal's session cookie, and redirect to login > if not found. > > If someone knew the setup, they could fake the drupal cookie, so if > you're trying to protect something valuable using this scheme you may > need to consider a different mechanism, such as an auto-prepend script > that checks if the session is valid. > > > -- > Chris Snyder > http://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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Fri May 30 08:33:50 2008 From: ken at secdat.com (Kenneth Downs) Date: Fri, 30 May 2008 08:33:50 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <8f0676b40805291026u34ce16cel60833c09657359de@mail.gmail.com> References: <1212016447.12511@coral.he.net> <8f0676b40805291026u34ce16cel60833c09657359de@mail.gmail.com> Message-ID: <483FF42E.5070800@secdat.com> John Campbell wrote: > On Thu, May 29, 2008 at 12:42 PM, Ajai Khattri wrote: > >> On Wed, 28 May 2008, Kristina Anderson wrote: >> >> >>> In the case of this project, there will potentially be several hundred >>> PDFs but no more than that, at least for the foreseeable future...there >>> are about 30 articles or less published per year by this magazine. >>> >>> So I think one static directory can work for us. >>> >> Always plan to make it future-proof as much as you can. If that becomes >> 100 per year, then what? >> >> > Then in the year 2108, she will have to make changes to the code. > > In my experience, this type of future proofing buys you nothing. I > have found that tons of other problems arise before overflow issues > start to be a problem. I will go further and say it is worse than nothing. You end up with code you need to test against a case that receives no real-world pressure. Then when you have to make real changes in response to actual (as opposed to hypothetical) needs you have tip-toe around this code and avoid breaking it -- even though it is not necessary! I eventually wrote in my little book: Do not abstract against non-existent cases. > I did a similar thing and I just put the files > in a folder with the id. Bandwidth and diskspace became a problem > long before a too many folder problem. The solution was to move > everything to Amazon S3. S3 doesn't have folders and supports and > unlimited number of objects. It turned out to be a blessing that I > didn't do something fancy with the folder naming. > > Regards, > 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 > -- 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 joeleo724 at gmail.com Fri May 30 12:54:18 2008 From: joeleo724 at gmail.com (Joe Leo) Date: Fri, 30 May 2008 10:54:18 -0600 Subject: [nycphp-talk] Apache Mod-Proxy Access Control In-Reply-To: <799abcd40805291324k23bf1226ud2fa443ce6f3e077@mail.gmail.com> References: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> <799abcd40805291324k23bf1226ud2fa443ce6f3e077@mail.gmail.com> Message-ID: <799abcd40805300954j543435celf801aba76166a347@mail.gmail.com> Chris, Wanted to see if you can help me implement the mod-rewrite and/or the pre-pend script you mentioned below. I'm starting to read up on using mod-rewrite and it seems it could take a bit of time to master it. I am hoping to get a sample setup that would work for me. Thanks! Joe On Thu, May 29, 2008 at 2:24 PM, Joe Leo wrote: > Chis, thanks for your reply/comments... > >> But wait, you said www was acting as a reverse proxy, so why would >> someone go directly to server1? >> > > To answer your question above, typically, users will visit main site which > has webpage links that would take user to inside server via the proxy. > However, that URL is shown/known when user mouse over the links. So, it can > easily be used for future visits to server-x.mainsite.com.... And, I > suspect, web engines will pick those links up as well. > > And, even if users that access site via main site they may not have > authenticated before clicking on the link that would take them to the > backend server. > > So, you are right, it seems that I would need something like mod_rewrite > and/or the prepend script you mentioned. I've struggled to get my proxy > working and have not yet played around with mod_rewrite. Also, the pre-pend > script you refered to - Can you give me more info on this? > > Is there a sample of this script you can share and how it would work? Would > really appreciate any help on this! > > Joe > > > On Thu, May 29, 2008 at 4:08 PM, csnyder wrote: > >> On Thu, May 29, 2008 at 2:03 PM, Joe Leo wrote: >> >> > The www.mainsite.com has my drupal users where they can sign-up and >> > authenticate. What I want is: If users enter url server1.mainsite.comthen >> > the proxy would somehow prompt users to first login. But, I'm not sure >> how >> > this can be done/achieved. I would appreciate any comments/suggestions >> to >> > accomplish this. >> > >> >> It sounds tough, because the browser isn't going to send the >> www.mainsite.com cookie to server1.mainsite.com. >> >> But wait, you said www was acting as a reverse proxy, so why would >> someone go directly to server1? >> >> If all the connections go through www, you can use mod_rewrite to >> check for existence of drupal's session cookie, and redirect to login >> if not found. >> >> If someone knew the setup, they could fake the drupal cookie, so if >> you're trying to protect something valuable using this scheme you may >> need to consider a different mechanism, such as an auto-prepend script >> that checks if the session is valid. >> >> >> -- >> Chris Snyder >> http://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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Fri May 30 13:16:06 2008 From: chsnyder at gmail.com (csnyder) Date: Fri, 30 May 2008 13:16:06 -0400 Subject: [nycphp-talk] Apache Mod-Proxy Access Control In-Reply-To: <799abcd40805300954j543435celf801aba76166a347@mail.gmail.com> References: <799abcd40805291103k7966126ejdceac5b621d169c3@mail.gmail.com> <799abcd40805291324k23bf1226ud2fa443ce6f3e077@mail.gmail.com> <799abcd40805300954j543435celf801aba76166a347@mail.gmail.com> Message-ID: On Fri, May 30, 2008 at 12:54 PM, Joe Leo wrote: > Chris, > > Wanted to see if you can help me implement the mod-rewrite and/or the > pre-pend script you mentioned below. I'm starting to read up on using > mod-rewrite and it seems it could take a bit of time to master it. I am > hoping to get a sample setup that would work for me. Thanks! > > Joe Your situation isn't something that I've done before, so I can't really help you other than pointing you in the (hopefully) right direction. Don't be scared of mod_rewrite, there are plenty of people on this list and elsewhere that can answer questions. I forgot that Apache's mod_proxy is too dumb to rewrite the links. There is a Free module called mod_proxy_html that will: http://apache.webthing.com/mod_proxy_html/ If you can use that instead of the default mod_proxy it will make things much easier, because then the internal servers can stay hidden. At that point, you could even configure them to only answer to www. -- Chris Snyder http://chxo.com/ From jbaltz at altzman.com Fri May 30 15:22:25 2008 From: jbaltz at altzman.com (Jerry B. Altzman) Date: Fri, 30 May 2008 15:22:25 -0400 Subject: [nycphp-talk] protecting download directory in PHP app on Unix box? In-Reply-To: <483FF42E.5070800@secdat.com> References: <1212016447.12511@coral.he.net> <8f0676b40805291026u34ce16cel60833c09657359de@mail.gmail.com> <483FF42E.5070800@secdat.com> Message-ID: <484053F1.4000507@altzman.com> on 2008-05-30 08:33 Kenneth Downs said the following: > John Campbell wrote: >> In my experience, this type of future proofing buys you nothing. I >> have found that tons of other problems arise before overflow issues >> start to be a problem. > I will go further and say it is worse than nothing. You end up with > code you need to test against a case that receives no real-world > pressure. Then when you have to make real changes in response to actual > (as opposed to hypothetical) needs you have tip-toe around this code and > avoid breaking it -- even though it is not necessary! This kind of thinking is so prevalent it even has its own acronym: YAGNI. (You Ain't Gonna Need It.) It's at the core of just about all the agile little-m methodologies. > Kenneth Downs //jblatz -- jerry b. altzman jbaltz at altzman.com www.jbaltz.com thank you for contributing to the heat death of the universe.

Account Information

Username:abaker
' . $name . '
onMouseOver="showColor( ' . $tableCounter . ' )" > onMouseOut="showColor( false )">' . $name . '
' . $name . '> onMouseOver="showColor( ' . $tableCounter . ' )" >> onMouseOut="blankOut( ' . $tableCounter . ' )">' . $name . ' onMouseOver="showColor( ' . $tableCounter . ' )" > onMouseOut="blankOut( ' . $tableCounter . ' )">' . $name . '