From shaijudavis at gmail.com Fri Jun 1 10:38:25 2007 From: shaijudavis at gmail.com (shaiju davis) Date: Fri, 1 Jun 2007 20:08:25 +0530 Subject: [nycphp-talk] How to hide the status bar Message-ID: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> Hi, How to hide the status bar in a browser using Javascript ?. If you have any idea please reply ASAP. Thanks & Regards, Shaiju Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at enobrev.com Fri Jun 1 11:11:17 2007 From: lists at enobrev.com (Mark Armendariz) Date: Fri, 1 Jun 2007 11:11:17 -0400 Subject: [nycphp-talk] How to hide the status bar In-Reply-To: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> Message-ID: <00f301c7a45f$1c1783e0$84b6a8c0@enobrev> > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of shaiju davis > Sent: Friday, June 01, 2007 10:38 AM > To: NYPHP Talk > Subject: [nycphp-talk] How to hide the status bar > > How to hide the status bar in a browser using Javascript ?. If you have any idea please reply ASAP. Can't be done as it's a security issue http://www.mozilla.org/projects/security/components/signed-scripts.html http://docs.sun.com/source/816-6409-10/sec.htm (search for the word 'status' in those docs) IE7 and Firefox have settings (in their settings menus) to allow JS to do so, but unless you're dealing with an intranet of sorts, that may not be much help to you since they're off by default. Mark From rmarscher at beaffinitive.com Fri Jun 1 11:28:43 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Fri, 1 Jun 2007 11:28:43 -0400 Subject: [nycphp-talk] How to hide the status bar In-Reply-To: <00f301c7a45f$1c1783e0$84b6a8c0@enobrev> References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> <00f301c7a45f$1c1783e0$84b6a8c0@enobrev> Message-ID: On Jun 1, 2007, at 11:11 AM, Mark Armendariz wrote: >> How to hide the status bar in a browser using Javascript ?. If >> you have any idea please reply ASAP. > Can't be done as it's a security issue > http://www.mozilla.org/projects/security/components/signed- > scripts.html > > http://docs.sun.com/source/816-6409-10/sec.htm > > (search for the word 'status' in those docs) > > IE7 and Firefox have settings (in their settings menus) to allow JS > to do > so, but unless you're dealing with an intranet of sorts, that may > not be > much help to you since they're off by default. > > Mark You used to be able to pop open a new window without a status bar though... I'm pretty sure that still works... so you do a window.open with the option 'status=no'. Your users may find a popup annoying though (or may block it). -Rob From ramons at gmx.net Fri Jun 1 11:30:08 2007 From: ramons at gmx.net (David Krings) Date: Fri, 01 Jun 2007 11:30:08 -0400 Subject: [nycphp-talk] How to hide the status bar In-Reply-To: <00f301c7a45f$1c1783e0$84b6a8c0@enobrev> References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> <00f301c7a45f$1c1783e0$84b6a8c0@enobrev> Message-ID: <46603B80.9050101@gmx.net> Mark Armendariz wrote: > Can't be done as it's a security issue > http://www.mozilla.org/projects/security/components/signed-scripts.html > > http://docs.sun.com/source/816-6409-10/sec.htm > > (search for the word 'status' in those docs) > > IE7 and Firefox have settings (in their settings menus) to allow JS to do > so, but unless you're dealing with an intranet of sorts, that may not be > much help to you since they're off by default. > > Mark The only thing I think is possible is to open a new window from a page that does not have a status bar (or any bars for that matter). That may not work out in Firefox as those links are typically opened in a new tab, which doesn't get you anything. Maybe knowing why you want to hide the status bar will make it easier to give some tips. David From rudy at taytek.com Fri Jun 1 11:29:55 2007 From: rudy at taytek.com (Rudy) Date: Fri, 1 Jun 2007 11:29:55 -0400 Subject: [nycphp-talk] How to hide the status bar References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> Message-ID: <00a101c7a461$b6226980$8b030a0a@InterDigital.com> Not sure if this is what you are looking for but I know you can open a browser and disable the status bar. http://www.pageresource.com/jscript/jwinopen.htm I do this often when creating admin interfaces and I want my browser to look more like a dialog box. Rudy ----- Original Message ----- From: shaiju davis To: NYPHP Talk Sent: Friday, June 01, 2007 10:38 AM Subject: [nycphp-talk] How to hide the status bar Hi, How to hide the status bar in a browser using Javascript ?. If you have any idea please reply ASAP. Thanks & Regards, Shaiju Davis ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 enobrev.com Fri Jun 1 12:01:54 2007 From: lists at enobrev.com (Mark Armendariz) Date: Fri, 1 Jun 2007 12:01:54 -0400 Subject: [nycphp-talk] How to hide the status bar In-Reply-To: <46603B80.9050101@gmx.net> References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com><00f301c7a45f$1c1783e0$84b6a8c0@enobrev> <46603B80.9050101@gmx.net> Message-ID: <00fa01c7a466$2e7f69b0$84b6a8c0@enobrev> > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings > > > Can't be done as it's a security issue > The only thing I think is possible is to open a new window > from a page that does not have a status bar (or any bars for > that matter). That may not work out in Firefox as those links > are typically opened in a new tab, which doesn't get you anything. > AT first glance, I thought you guys were absolutely right and in my reply I was specifically referring to the current window's status bar. But it seems the newer browsers don't even let you control the status bar in the popups. The oldschool way to do it was adding a 'scrollbars=0' to the window.open command like this: Window!! But I just tested this in IE 7.latest and FF 2.whatever.i.downloaded.yesterday and everything is gone except the status bar. I'm betting this is an even bigger deal now that these browsers tend to show https status and other such security warnings in the status bar. Unless there's another way to open a window, I'd say you can't do it in a new window anymore. Mark From chsnyder at gmail.com Fri Jun 1 12:06:41 2007 From: chsnyder at gmail.com (csnyder) Date: Fri, 1 Jun 2007 12:06:41 -0400 Subject: [nycphp-talk] How to hide the status bar In-Reply-To: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> References: <30ce306c0706010738s1b6f57f6nf2a7d0904937b6d2@mail.gmail.com> Message-ID: On 6/1/07, shaiju davis wrote: > > How to hide the status bar in a browser using Javascript ?. If you have any > idea please reply ASAP. > No javascript required, just have the client use Safari. (just kidding) As others pointed out, hiding the status bar is considered a security no-no because it is often the only way for a user to discover cross-site scripting and phishing attacks. Even if you can control it in older browsers, you probably won't be able to in newer ones. -- Chris Snyder http://chxo.com/ From lists at zaunere.com Sat Jun 2 15:49:01 2007 From: lists at zaunere.com (Hans Zaunere) Date: Sat, 2 Jun 2007 15:49:01 -0400 Subject: [nycphp-talk] FW: PHP statistics for May 2007 Message-ID: <055f01c7a54f$11ad7bd0$640aa8c0@MobileZ> FYI, updated > PHP adoption statistics for May 2007 are released. > > * Recodr progression for PHP 5 : +1.6% > * All PHP 5.2 are gaining new users > * PHP 5.2 is now 3rd most popular version > * PHP 4.4.7 didn't interest too many users > > New this month : a map of China and USA with detail by province and > state. > As usual, lots of other details : PHP versions, Apache, country > details, etc. > Feel free to ask any other details, stats or context about the study. > > PHP stats evolution for May 2007 > > http://www.nexen.net/chiffres_cles/phpversion/17145-php_stats_evolution_for_ may_2007.php > PHP statistics for May 2007 > http://www.nexen.net/chiffres_cles/phpversion/17148-php_statistics_for_may_2 007.php > > All nexen.net articles in English : > http://www.nexen.net/the_english_speaking_nexen.net.php From ramons at gmx.net Sun Jun 3 13:26:32 2007 From: ramons at gmx.net (David Krings) Date: Sun, 03 Jun 2007 13:26:32 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT Message-ID: <4662F9C8.8030801@gmx.net> Hi! Which one is faster: PHP array_unique or SQL DISTINCT ? I learned about the DISTINCT key word for SQL some time ago and remember that pro developers always told me that SQL is faster than code. I tested a slightly complex select query across three tables and used DISTINCT. The tables have each less than 1,000 records, two of the three have only about 600 rows. I let the query run for at least half an hour before I hit the reset button (PHP would have timed out much earlier). I then tested again but without any sorting, but that didn't make any difference. I then googled and some claim that DISTINCT isn't all that speedy. Any advice is greatly appreciated. David From ramons at gmx.net Sun Jun 3 13:58:37 2007 From: ramons at gmx.net (David Krings) Date: Sun, 03 Jun 2007 13:58:37 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <4662F9C8.8030801@gmx.net> References: <4662F9C8.8030801@gmx.net> Message-ID: <4663014D.5080809@gmx.net> David Krings wrote: > Hi! > > Which one is faster: PHP array_unique or SQL DISTINCT ? > OK, while I still like to know what the answer is, the DISTINCT wasn't the culprit, but the way I join the tables. I ran the query across only two tables and with that got millions of records when I expected only a few hundred. I guess it is time to learn some more SQL and not just go for broke and run queries without knowing what they really do. Worked fine in the test system with only a dozen records in each table. My approach apparently doesn't scale well. David From jonbaer at jonbaer.com Sun Jun 3 14:50:08 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Sun, 3 Jun 2007 14:50:08 -0400 Subject: [nycphp-talk] Google Gears / Apollo / FF3 ... Message-ID: Anyone played w/ it yet? Just saw that Apollo will *also* support SQLite in the end (and combine APIs w/ Google) ... http://www.mikechambers.com/blog/2007/05/30/apollo-beta-will-include- sqlite-embedded-database/ Does it mean the end of P(*) + MySQL on the backend? ;-) While I don't think it is the end, it would mark a new way to program for sure, kinda like a "bring your own data to the party" type of programming. Thoughts? Will some of this be cover in 6.28 meetup re: RIA? - Jon From anoland at indigente.net Sun Jun 3 18:07:54 2007 From: anoland at indigente.net (Adrian Noland) Date: Sun, 3 Jun 2007 18:07:54 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <4663014D.5080809@gmx.net> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> Message-ID: <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> On 6/3/07, David Krings wrote: > > David Krings wrote: > > Hi! > > > > Which one is faster: PHP array_unique or SQL DISTINCT ? > > > > OK, while I still like to know what the answer is, the DISTINCT wasn't > the culprit, but the way I join the tables. I ran the query across only > two tables and with that got millions of records when I expected only a > few hundred. > I guess it is time to learn some more SQL and not just go for broke and > run queries without knowing what they really do. Worked fine in the test > system with only a dozen records in each table. My approach apparently > doesn't scale well. > > David The key to speedy SQL is in the indexes. Without an index the SQL engine iterates over every row. With an index it automagically grabs the correct value. Try using EXPLAIN to check your queries if they don't seem to be working as expected. EXPLAIN SELECT * FROM table_name; -------------- next part -------------- An HTML attachment was scrubbed... URL: From mba2000 at ioplex.com Sun Jun 3 18:50:35 2007 From: mba2000 at ioplex.com (Michael B Allen) Date: Sun, 3 Jun 2007 18:50:35 -0400 Subject: [nycphp-talk] The page you are tring to view contains POSTDATA ... Message-ID: <20070603185035.0f2fced2.mba2000@ioplex.com> Good Afternoon NYPHP Talk, If you hit the browser's Back button after submitted POST, that dialog box pops up that reads: "The page you are trying to view contains POSTDATA ... To resend the data hit Ok. Otherwise hit Cancel." The way I see it, this message box must NEVER appear on a professional site. It makes no sense [1]. For most things I can use GET. Fine. But to submit forms with GET it seems to me that would require some questionable JavaScript to build a URL from the form field elements. Does anyone condone such a thing? What do you recommend for avoiding that stupid POSTDATA dialog box? Mike [1] and it should have been removed from browsers a long time ago since you can catch and ignore redundant POSTs (but that's a different rant). From shiflett at php.net Sun Jun 3 18:53:03 2007 From: shiflett at php.net (Chris Shiflett) Date: Sun, 03 Jun 2007 18:53:03 -0400 Subject: [nycphp-talk] The page you are tring to view contains POSTDATA ... In-Reply-To: <20070603185035.0f2fced2.mba2000@ioplex.com> References: <20070603185035.0f2fced2.mba2000@ioplex.com> Message-ID: <4663464F.6020307@php.net> Michael B Allen wrote: > If you hit the browser's Back button after submitted POST, that dialog > box pops up that reads: > > "The page you are trying to view contains POSTDATA ... To resend the > data hit Ok. Otherwise hit Cancel." > > The way I see it, this message box must NEVER appear on a professional > site. I think you'll find this article helpful: http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings Chris -- Chris Shiflett http://shiflett.org/ From ramons at gmx.net Sun Jun 3 19:05:42 2007 From: ramons at gmx.net (David Krings) Date: Sun, 03 Jun 2007 19:05:42 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> Message-ID: <46634946.5090308@gmx.net> Adrian Noland wrote: > The key to speedy SQL is in the indexes. Without an index the SQL engine > iterates over every row. With an index it automagically grabs the > correct value. Good to know. I heard about indices before, but wasn't really aware that they have such a huge impact. Since my days of maintaining Paradox tables I am a bit scared of indices as for Paradox they are often more trouble than they are worth. I know, SQL is a different universe. Any good tips as what to index? I doubt that indexing every column makes sense. I see what changes when I index those columns that I use within selects. There are some columns that I read out after I made my selection and also in a different script in a different context and there for only one row from. > Try using EXPLAIN to check your queries if they don't seem to be working > as expected. > > EXPLAIN SELECT * FROM table_name; I will let SQL explain to me what I try to explain to SQL. While working on a workaround I thought about what my misfiring query does and in fact it does what I want it to do. I'll have a copy of the old file and I will see what happens after indexing. The workaround is something I used before and that works fairly well. I select the wanted rows from each of the three tables. They are all keyed based on an ID that logically links the records together (I don't use set table links, because I don't know how that works in MySQL). I end up with three arrays of IDs, I merge the arrays, make the values unique, rekey, then populate a temporary table that has the ID column and the few columns I want to do sorts on. I then pull a new array of IDs from that table using a simple select with the desired sorting. Of course, the db now has to process hundreds (thousands) selects and deal with a temp table that requires simple inserts, but since each of those queries runs in a few microseconds if not faster this may be OK for what I need it for. I read a few articles where some claim that people have no right to life for using temp tables, but others say that they are helpful and make things faster and easier, especially when it is about working through complex selects. And there I thought I'm almost done...LOL. David From ramons at gmx.net Sun Jun 3 20:40:55 2007 From: ramons at gmx.net (David Krings) Date: Sun, 03 Jun 2007 20:40:55 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> Message-ID: <46635F97.7040703@gmx.net> Adrian Noland wrote: > The key to speedy SQL is in the indexes. Without an index the SQL engine > iterates over every row. With an index it automagically grabs the > correct value. This is really an eyeopener. After indexing all those columns that come up in some selects running the same query that took over 30 minutes (that's when I hit the reset button) now takes 26 seconds. This is plain awesome! Thanks for making me less dumb. David From mba2000 at ioplex.com Sun Jun 3 23:17:30 2007 From: mba2000 at ioplex.com (Michael B Allen) Date: Sun, 3 Jun 2007 23:17:30 -0400 Subject: [nycphp-talk] The page you are tring to view contains POSTDATA ... In-Reply-To: <4663464F.6020307@php.net> References: <20070603185035.0f2fced2.mba2000@ioplex.com> <4663464F.6020307@php.net> Message-ID: <20070603231730.54198d5b.mba2000@ioplex.com> On Sun, 03 Jun 2007 18:53:03 -0400 Chris Shiflett wrote: > Michael B Allen wrote: > > If you hit the browser's Back button after submitted POST, that dialog > > box pops up that reads: > > > > "The page you are trying to view contains POSTDATA ... To resend the > > data hit Ok. Otherwise hit Cancel." > > > > The way I see it, this message box must NEVER appear on a professional > > site. > > I think you'll find this article helpful: > > http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings Hi Chris, Thanks. Your HTTP spec references are interesting. I think I'll stick to POST for actions. I've always felt a little icky about using the Location header but I'll try it out and see how it goes. One special case is the search box which uses POST so I'll have to use some JavaScript to make that use GET. Thanks, Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ From mba2000 at ioplex.com Mon Jun 4 02:32:30 2007 From: mba2000 at ioplex.com (Michael B Allen) Date: Mon, 4 Jun 2007 02:32:30 -0400 Subject: [nycphp-talk] The page you are tring to view contains POSTDATA ... In-Reply-To: <20070603231730.54198d5b.mba2000@ioplex.com> References: <20070603185035.0f2fced2.mba2000@ioplex.com> <4663464F.6020307@php.net> <20070603231730.54198d5b.mba2000@ioplex.com> Message-ID: <20070604023230.bb392b36.mba2000@ioplex.com> On Sun, 3 Jun 2007 23:17:30 -0400 Michael B Allen wrote: > One special case is the search box which uses POST so I'll have to use > some JavaScript to make that use GET. Actually what am I talking about, I can just set the form method to GET. Feeling stupid, Mike From ben at projectskyline.com Mon Jun 4 08:59:23 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Mon, 4 Jun 2007 08:59:23 -0400 Subject: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal Message-ID: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> Hello All, I've asked some questions similiar to this in the past .. but would like to get additional information and hopefully some real feedback from those who have experiance with it. We currently have a paypal merchant account that we use to collect payments from customers with. We are releasing a product that will offer a monthly subscription. I'd like to use our existing paypal account to handle the billing. I've looked into the subscription text on paypal, and I understand it fine. What I'm not sure about doing is this: When a visitor decides to purchase our software (its web based) and signs up for the account I need to get their data into paypal. Now, once they finish the transaction, I want to return them to my software, and if they successfully completed the paypal signup I will automagically create their account. I also want to be able to query paypal every month to make sure they have paid, and if not, possibly suspend their account. So my question is: Does anyone have experiance using the paypal IPN (i believe that is what its called), or experiance with another merchant account that allows this type of integreation? Also, could you recommened other merchant accounts and include some comparision against paypal? Thanks! - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) -------------- next part -------------- An HTML attachment was scrubbed... URL: From support at dailytechnology.net Mon Jun 4 09:12:02 2007 From: support at dailytechnology.net (Brian Dailey) Date: Mon, 04 Jun 2007 09:12:02 -0400 Subject: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal In-Reply-To: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> References: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> Message-ID: <46640FA2.307@dailytechnology.net> I have not used Paypal for recurring payments - I did write a system that integrated with Verisign's recurring payment system (now actually owned by Paypal). Zend had an article on Paypal integration (including recurring payments) but they took it down. You can still find the article on archive.org's "wayback machine": The original URL was http://www.zend.com/zend/tut/tutorial-paypal.php Ben Sgro (ProjectSkyline) wrote: > Hello All, > > I've asked some questions similiar to this in the past .. but would like > to get additional > information and hopefully some real feedback from those who > have experiance with it. > > We currently have a paypal merchant account that we use to collect > payments from customers with. > > We are releasing a product that will offer a monthly subscription. I'd > like to use our existing paypal > account to handle the billing. I've looked into the subscription text on > paypal, and I understand it fine. > > What I'm not sure about doing is this: > > When a visitor decides to purchase our software (its web based) and > signs up for the account > I need to get their data into paypal. Now, once they finish the > transaction, I want to return them > to my software, and if they successfully completed the paypal signup I > will automagically create > their account. > > I also want to be able to query paypal every month to make sure they > have paid, and if not, possibly > suspend their account. > > So my question is: Does anyone have experiance using the paypal IPN (i > believe that is what its called), > or experiance with another merchant account that allows this type of > integreation? > Also, could you recommened other merchant accounts and include some > comparision against paypal? > > Thanks! > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > +1 718.487.9368 (N.Y. Office) > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Thanks! - Brian Dailey Software Developer New York, NY www.dailytechnology.net -------------- next part -------------- A non-text attachment was scrubbed... Name: support.vcf Type: text/x-vcard Size: 264 bytes Desc: not available URL: From chsnyder at gmail.com Mon Jun 4 09:34:26 2007 From: chsnyder at gmail.com (csnyder) Date: Mon, 4 Jun 2007 09:34:26 -0400 Subject: [nycphp-talk] Google Gears / Apollo / FF3 ... In-Reply-To: References: Message-ID: On 6/3/07, Jon Baer wrote: > Anyone played w/ it yet? I wonder how it affects those who already use a proxy for connection to the web? I really, really want to be able to use it, but when I think about what it's doing to my browser settings, I get queasy. Fine for home use, but is any sane enterprise admin going to allow it? -- Chris Snyder http://chxo.com/ From chsnyder at gmail.com Mon Jun 4 09:37:07 2007 From: chsnyder at gmail.com (csnyder) Date: Mon, 4 Jun 2007 09:37:07 -0400 Subject: [nycphp-talk] Google Gears / Apollo / FF3 ... In-Reply-To: References: Message-ID: On 6/4/07, csnyder wrote: > I wonder how it affects those who already use a proxy for connection to the web? > > I really, really want to be able to use it, but when I think about > what it's doing to my browser settings, I get queasy. Fine for home > use, but is any sane enterprise admin going to allow it? ...Okay, admittedly this describes Dojo Storage's offline component, but this is what I mean by what something like Gears does to your browser settings: http://dojotoolkit.org/files/manualUninstall.html From ben at projectskyline.com Mon Jun 4 09:57:46 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Mon, 4 Jun 2007 09:57:46 -0400 Subject: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal References: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> <46640FA2.307@dailytechnology.net> Message-ID: <009c01c7a6b0$558d3180$6b01a8c0@gamebox> Hello, Brian - How was the experiance with Verisign ..? Archive.org is having lots of problems returning a result for my search .. but I did find through google this pretty good link: http://www.zend.com/code/codex.php?id=1488&single=1 It mentions setting up sandbox accounts for a buyer and fake cc/bank accounts, which is something else I was wondering about for testing purposes. Thanks. - Ben ----- Original Message ----- From: "Brian Dailey" To: "NYPHP Talk" Sent: Monday, June 04, 2007 9:12 AM Subject: Re: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal >I have not used Paypal for recurring payments - I did write a system > that integrated with Verisign's recurring payment system (now actually > owned by Paypal). > > Zend had an article on Paypal integration (including recurring payments) > but they took it down. You can still find the article on archive.org's > "wayback machine": > > The original URL was http://www.zend.com/zend/tut/tutorial-paypal.php > > Ben Sgro (ProjectSkyline) wrote: >> Hello All, >> >> I've asked some questions similiar to this in the past .. but would like >> to get additional >> information and hopefully some real feedback from those who >> have experiance with it. >> >> We currently have a paypal merchant account that we use to collect >> payments from customers with. >> >> We are releasing a product that will offer a monthly subscription. I'd >> like to use our existing paypal >> account to handle the billing. I've looked into the subscription text on >> paypal, and I understand it fine. >> >> What I'm not sure about doing is this: >> >> When a visitor decides to purchase our software (its web based) and >> signs up for the account >> I need to get their data into paypal. Now, once they finish the >> transaction, I want to return them >> to my software, and if they successfully completed the paypal signup I >> will automagically create >> their account. >> >> I also want to be able to query paypal every month to make sure they >> have paid, and if not, possibly >> suspend their account. >> >> So my question is: Does anyone have experiance using the paypal IPN (i >> believe that is what its called), >> or experiance with another merchant account that allows this type of >> integreation? >> Also, could you recommened other merchant accounts and include some >> comparision against paypal? >> >> Thanks! >> - Ben >> >> Ben Sgro, Chief Engineer >> ProjectSkyLine - Defining New Horizons >> +1 718.487.9368 (N.Y. Office) >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > -- > > Thanks! > - Brian Dailey > Software Developer > New York, NY > www.dailytechnology.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 anoland at indigente.net Mon Jun 4 12:06:52 2007 From: anoland at indigente.net (Adrian Noland) Date: Mon, 4 Jun 2007 12:06:52 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <46635F97.7040703@gmx.net> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> <46635F97.7040703@gmx.net> Message-ID: <1d8a0e930706040906k5c2ef158qe52b814a91f76eb6@mail.gmail.com> On 6/3/07, David Krings wrote: > > Adrian Noland wrote: > > The key to speedy SQL is in the indexes. Without an index the SQL engine > > iterates over every row. With an index it automagically grabs the > > correct value. > > This is really an eyeopener. After indexing all those columns that come > up in some selects running the same query that took over 30 minutes > (that's when I hit the reset button) now takes 26 seconds. > > This is plain awesome! Thanks for making me less dumb. > > David > > When it comes to choosing which columns to index, you want to pick something with a high cardinality, or, for lack of a better term, "uniqueablity". Gender wont have a high cardinality because there are only 2 choices for many records. Last name on your personal family address book will have a low cardinality because of family members sharing last name. A key of last name + first name will have a high cardinality and will make a good index. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Jun 4 13:03:47 2007 From: ramons at gmx.net (David Krings) Date: Mon, 04 Jun 2007 13:03:47 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <1d8a0e930706040906k5c2ef158qe52b814a91f76eb6@mail.gmail.com> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> <46635F97.7040703@gmx.net> <1d8a0e930706040906k5c2ef158qe52b814a91f76eb6@mail.gmail.com> Message-ID: <466445F3.5050202@gmx.net> Adrian Noland wrote: > When it comes to choosing which columns to index, you want to pick > something with a high cardinality, or, for lack of a better term, > "uniqueablity". Gender wont have a high cardinality because there are > only 2 choices for many records. Last name on your personal family > address book will have a low cardinality because of family members > sharing last name. A key of last name + first name will have a high > cardinality and will make a good index. Thanks for the explanation. I will index based on that. I decided to go with the temp table approach for now as this lets me work with queries that I can comprehend. I a past post I wrote that I merge the arrays that I get for each table. While I in fact did that, I really need to do an intersect to create an INNER JOIN. I filter each table based on the contents or ranges of particular fields and only those items that have at least one row in each table are the ones that I want. Two tables can have only one row per item by design, so the distinct will come into play for only one query. With that I also do not need an array_unique as the intersect cannot have duplicate values. Good stuff! David From rolan at omnistep.com Mon Jun 4 13:58:29 2007 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 04 Jun 2007 13:58:29 -0400 Subject: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal In-Reply-To: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> References: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> Message-ID: <466452C5.3070306@omnistep.com> Ben Sgro (ProjectSkyline) wrote: > Hello All, > .. > When a visitor decides to purchase our software (its web based) and > signs up for the account > I need to get their data into paypal. Now, once they finish the > transaction, I want to return them > to my software, and if they successfully completed the paypal signup I > will automagically create > their account. > > I also want to be able to query paypal every month to make sure they > have paid, and if not, possibly > suspend their account. > > So my question is: Does anyone have experiance using the paypal IPN (i > believe that is what its called), > or experiance with another merchant account that allows this type of > integreation? > Also, could you recommened other merchant accounts and include some > comparision against paypal? > > Thanks! > - Ben > Your customer can sign up for the paypal subscription just like purchasing any other paypal item. Your IPN script will be called by paypal whenever a recurring payment is made. The status of the payment is sent to your IPN script so you will know if it was successful or not. ~Rolan From ben at projectskyline.com Mon Jun 4 14:23:09 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Mon, 4 Jun 2007 14:23:09 -0400 Subject: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal References: <004701c7a6a8$2d8de920$6b01a8c0@gamebox> <466452C5.3070306@omnistep.com> Message-ID: <01d801c7a6d5$68210db0$6b01a8c0@gamebox> Great, thanks! Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidential information intended only for the use of the individual to whom it is addressed. ----- Original Message ----- From: "Rolan Yang" To: "NYPHP Talk" Sent: Monday, June 04, 2007 1:58 PM Subject: Re: [nycphp-talk] Merchant Accounts, Ecommerce and Paypal > Ben Sgro (ProjectSkyline) wrote: >> Hello All, >> .. >> When a visitor decides to purchase our software (its web based) and signs >> up for the account >> I need to get their data into paypal. Now, once they finish the >> transaction, I want to return them >> to my software, and if they successfully completed the paypal signup I >> will automagically create >> their account. >> I also want to be able to query paypal every month to make sure they >> have paid, and if not, possibly >> suspend their account. >> So my question is: Does anyone have experiance using the paypal IPN (i >> believe that is what its called), >> or experiance with another merchant account that allows this type of >> integreation? >> Also, could you recommened other merchant accounts and include some >> comparision against paypal? >> Thanks! >> - Ben >> > Your customer can sign up for the paypal subscription just like purchasing > any other paypal item. Your IPN script will be called by paypal whenever a > recurring payment is made. The status of the payment is sent to your IPN > script so you will know if it was successful or not. > > ~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 morgan at forsalebyowner.com Mon Jun 4 14:51:01 2007 From: morgan at forsalebyowner.com (Morgan Craft) Date: Mon, 04 Jun 2007 14:51:01 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <466445F3.5050202@gmx.net> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> <46635F97.7040703@gmx.net> <1d8a0e930706040906k5c2ef158qe52b814a91f76eb6@mail.gmail.com> <466445F3.5050202@gmx.net> Message-ID: <46645F15.8090907@forsalebyowner.com> If you are using DISTINCT probably means you need to normalize your data and look to join more appropriately. Also for creating indexes you really need to consider how you plan to access your data and how it will be used - which goes back to properly normalizing database tables. With properly structured tables you should be easily able to identify certain relationships and know where to put indexes - preferably columns that are used for JOINS and WHERE. Good place to start: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Hope it helps David Krings wrote: > Adrian Noland wrote: > > When it comes to choosing which columns to index, you want to pick >> something with a high cardinality, or, for lack of a better term, >> "uniqueablity". Gender wont have a high cardinality because there are >> only 2 choices for many records. Last name on your personal family >> address book will have a low cardinality because of family members >> sharing last name. A key of last name + first name will have a high >> cardinality and will make a good index. > > Thanks for the explanation. I will index based on that. I decided to > go with the temp table approach for now as this lets me work with > queries that I can comprehend. > I a past post I wrote that I merge the arrays that I get for each > table. While I in fact did that, I really need to do an intersect to > create an INNER JOIN. I filter each table based on the contents or > ranges of particular fields and only those items that have at least > one row in each table are the ones that I want. Two tables can have > only one row per item by design, so the distinct will come into play > for only one query. With that I also do not need an array_unique as > the intersect cannot have duplicate values. > > Good stuff! > > David > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ramons at gmx.net Mon Jun 4 18:12:44 2007 From: ramons at gmx.net (David Krings) Date: Mon, 04 Jun 2007 18:12:44 -0400 Subject: [nycphp-talk] PHP array_unique vs. SQL DISTINCT In-Reply-To: <46645F15.8090907@forsalebyowner.com> References: <4662F9C8.8030801@gmx.net> <4663014D.5080809@gmx.net> <1d8a0e930706031507n50e7a9a6x757a67eb94365db@mail.gmail.com> <46635F97.7040703@gmx.net> <1d8a0e930706040906k5c2ef158qe52b814a91f76eb6@mail.gmail.com> <466445F3.5050202@gmx.net> <46645F15.8090907@forsalebyowner.com> Message-ID: <46648E5C.1010209@gmx.net> Morgan Craft wrote: > If you are using DISTINCT probably means you need to normalize your data > and look to join more appropriately. Also for creating indexes you > really need to consider how you plan to access your data and how it will > be used - which goes back to properly normalizing database tables. With > properly structured tables you should be easily able to identify certain > relationships and know where to put indexes - preferably columns that > are used for JOINS and WHERE. > > Good place to start: > > http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html > > Hope it helps > Thank you for that pointer. The three tables that I have are for pictures. One table contains everything that revolves around the file itself, such as storage location, rotation angle, addition and creation dates. The second table has the name and description for the picture. The third table holds all the categories that can be attached to a single picture. And that table will have more than one row for each picture, unless I limit assignment to one category, which is pretty useless. OK, I could force one row and have a column for each category, but then I set a hard limit on the maximum number of categories. With my approach I can change the maximum number of categories in code without requiring a different table structure. I can't see how I could reasonably normalize that and keep the flexibility that I have now. What happens when I want 10 categories today and 20 tomorrow and I do not want to add more tables or change exisiting ones? David From nyphp at omnistep.com Mon Jun 4 22:27:20 2007 From: nyphp at omnistep.com (Rolan) Date: Mon, 04 Jun 2007 22:27:20 -0400 Subject: [nycphp-talk] seeking backup/support programmer Message-ID: <4664CA08.6090302@omnistep.com> I'm looking for someone who can do light programming work or backup support for me in the event of an emergency or for short vacations. Must be knowledgeable in php, html, css, javascript, mysql, linux/bsd, have plenty of practical experience and be quick to pick up on existing projects. I'm not looking to employ someone full or part time, but to work out some sort of reciprocal agreement with another qualified independent contractor that may be in the same position as me (managing 5-6 dozen clients, most of them in a situation where they are self-sufficient but occasionally need small changes or updates). If you happen to be flooded with work, I may be able to take on some of the simpler stuff and vice versa. It's always good to have one or more backups to care for your clients in case you fall into a snake pit, are hit by a truck, or encounter some other unforeseen circumstances. I don't have a specific compensation structure in mind, but we can work it out. If you are located in the NY/NJ/PA area and fit the above description feel free to drop me an email. I know this probably belongs on the "jobs" list, but all the competent people are subscribed to this group and the last thing I need is more headhunter spam. Thanks, Rolan From Consult at CovenantEDesign.com Mon Jun 4 22:34:06 2007 From: Consult at CovenantEDesign.com (CED) Date: Mon, 4 Jun 2007 22:34:06 -0400 Subject: [nycphp-talk] seeking backup/support programmer References: <4664CA08.6090302@omnistep.com> Message-ID: <002701c7a719$fda15c20$07d6f4a7@ced> Rolan, I'm your man. And I'm cheap! -Edward ----- Original Message ----- From: "Rolan" To: Sent: Monday, June 04, 2007 10:27 PM Subject: [nycphp-talk] seeking backup/support programmer > I'm looking for someone who can do light programming work or backup > support for me in the event of an emergency or for short vacations. Must > be knowledgeable in php, html, css, javascript, mysql, linux/bsd, have > plenty of practical experience and be quick to pick up on existing > projects. I'm not looking to employ someone full or part time, but to > work out some sort of reciprocal agreement with another qualified > independent contractor that may be in the same position as me (managing > 5-6 dozen clients, most of them in a situation where they are > self-sufficient but occasionally need small changes or updates). If you > happen to be flooded with work, I may be able to take on some of the > simpler stuff and vice versa. It's always good to have one or more > backups to care for your clients in case you fall into a snake pit, are > hit by a truck, or encounter some other unforeseen circumstances. I > don't have a specific compensation structure in mind, but we can work it > out. If you are located in the NY/NJ/PA area and fit the above > description feel free to drop me an email. > I know this probably belongs on the "jobs" list, but all the competent > people are subscribed to this group and the last thing I need is more > headhunter spam. > > Thanks, > 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 Mon Jun 4 22:45:08 2007 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 04 Jun 2007 22:45:08 -0400 Subject: [nycphp-talk] seeking backup/support programmer In-Reply-To: <002701c7a719$fda15c20$07d6f4a7@ced> References: <4664CA08.6090302@omnistep.com> <002701c7a719$fda15c20$07d6f4a7@ced> Message-ID: <4664CE34.306@omnistep.com> CED wrote: > Rolan, > > I'm your man. And I'm cheap! > > -Edward > > One more thing, please respond to nyphp at omnistep.com, not back to the list. Thanks, Rolan From jonbaer at jonbaer.com Tue Jun 5 20:04:06 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Tue, 5 Jun 2007 20:04:06 -0400 Subject: [nycphp-talk] PHP Abstract Episode 1 - PHP Secuity Tips Message-ID: Just stumbled on this, came out today ... pretty good looking podcast so far ... http://devzone.zend.com/article/2092-PHP-Abstract-Episode-1---PHP- Secuity-Tips Eli (White) talks to us about practical tips you can use to help make your application more secure. - Jon From ben at projectskyline.com Wed Jun 6 08:15:15 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 6 Jun 2007 08:15:15 -0400 Subject: [nycphp-talk] PHPAuction Software Message-ID: <005c01c7a834$578be460$6b01a8c0@gamebox> Good Morning, Yesterday I purchased the GPL version of PHPAuction. http://www.phpauction.net/gpl.php After installing it I fixed a few small bugs that were preventing me from accessing different parts of the site. Anyways, yeah, sucks right? Unfortunately the script that enables a user to post an item to sell, is broke beyond anything I've ever seen. My error log file was about 5 pages long for a single transaction (clicking the "submit" button). And to top it of, their customer support is pretty awful: Dear Ben, Please could you ask to your hosting company to set E_ALL&~E_NOTICE in the directive of PHP 'error_reporting'. error_reporting = E_ALL&~E_NOTICE; This action will fix the problem. At Phpauction we value our users and will be more than happy to assist you with all of your needs. If you have any further issues please do not hesitate to contact us. With best regards, Yeah bud, that will surely fix your code. So, my question is, can anyone recommened some auction software. I'd really like it to be in PHP/MySQL but I will settle for PERL or PostgresSQL. Save me!! - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.southwell at nyphp.com Wed Jun 6 11:28:33 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 06 Jun 2007 11:28:33 -0400 Subject: [nycphp-talk] http basic auth suddenly not working Message-ID: <6.2.3.4.2.20070606112206.02878de8@mail.optonline.net> A host I use recently upgraded to PHP 5.2.0, running on Apache 1.3.37, and suddenly a perfectly functioning HTTP Basic Authentication is not working, presumably because PHP is no longer returning $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'], or at least not returning them correctly. They aren't very cooperative on fixing this. I don't see anything with phpinfo() that might give a clue as to what is happening. Can anyone suggest something? Michael Southwell, Vice President for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From lists at zaunere.com Wed Jun 6 12:16:10 2007 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 6 Jun 2007 12:16:10 -0400 Subject: [nycphp-talk] PHP a Toy? Message-ID: <002601c7a855$feb304a0$681ba8c0@MobileZ> Hi all, While some may think PHP is a toy, there may be some merit to that now. In cooperation with Vincent Pontier, the PHP elephant designer, Damien Seguy has developed a plush toy. Details are at the end of this message. It depends on how many we order, but we're looking at a price of about $10 USD. If you're interested, please contact me offlist and I'll help coordinate with Damien. Please respond by June 10th. Regards, H > http://www.nexen.net/component/option,com_rsgallery2/Itemid,268/catid,32/ > > The evolution of the Elephant : > http://video.google.com/videoplay?docid=8642557610829220802&hl=en > > Dimensions: > ========== > The toy is 8 inches by 3.5 by 6 inches. With the tail and the opened ears, > it is now 10 inches by 3.5 by 8 inches. It is weighting 100 g. > > the big one: > =========== > According to the prototype's dimension, it will be > 24 inches by 11 inches by 18 inches, and will weight a full kilogramm. > Pricing will be around 70 Euros. From mitch.pirtle at gmail.com Wed Jun 6 17:16:16 2007 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 6 Jun 2007 17:16:16 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <002601c7a855$feb304a0$681ba8c0@MobileZ> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> Message-ID: <330532b60706061416v4eb7c0b8m809f421ad5b3d545@mail.gmail.com> On 6/6/07, Hans Zaunere wrote: > > Hi all, > > While some may think PHP is a toy, there may be some merit to that now. So why is "PHP" on a PostgreSQL elephant? *spacemonkey cackles like a witch From nelly at cgim.com Wed Jun 6 20:17:00 2007 From: nelly at cgim.com (Nelly Yusupova) Date: Wed, 6 Jun 2007 20:17:00 -0400 Subject: [nycphp-talk] A Form That Builds Itself Message-ID: <009601c7a899$2aea2880$c6fba8c0@D2Y4NP61> Hello Everyone, I am trying to create a page where users can upload images to the server via a form. I wanted to offer 5 input fields and an option that says "click + to add another image", to allow the user to upload as many images as they want. Does anyone know how I can achieve this? Thank you in advance for your help. Sincerely, Nelly Yusupova http://www.digitalwoman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Consult at CovenantEDesign.com Wed Jun 6 20:28:11 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 20:28:11 -0400 Subject: [nycphp-talk] A Form That Builds Itself References: <009601c7a899$2aea2880$c6fba8c0@D2Y4NP61> Message-ID: <002a01c7a89a$bade76c0$07d6f4a7@ced> Asunchronous JAvascript that writes to a Div, and you run a loop intot hat div of form input elements incremented by each click. HTH, Ed Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Nelly Yusupova To: 'NYPHP Talk' Sent: Wednesday, June 06, 2007 8:17 PM Subject: [nycphp-talk] A Form That Builds Itself Hello Everyone, I am trying to create a page where users can upload images to the server via a form. I wanted to offer 5 input fields and an option that says "click + to add another image", to allow the user to upload as many images as they want. Does anyone know how I can achieve this? Thank you in advance for your help. Sincerely, Nelly Yusupova http://www.digitalwoman.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 Consult at CovenantEDesign.com Wed Jun 6 20:29:53 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 20:29:53 -0400 Subject: [nycphp-talk] PHP a Toy? References: <002601c7a855$feb304a0$681ba8c0@MobileZ> Message-ID: <003c01c7a89a$f7c71d80$07d6f4a7@ced> Hans, I'd like to buy a few. Edward JS Prevost II AlbanyPHP Founder Webmaster at AlbanyPHP.org www.AlbanyPHP.org ----- Original Message ----- From: "Hans Zaunere" To: "'NYPHP Talk'" Sent: Wednesday, June 06, 2007 12:16 PM Subject: [nycphp-talk] PHP a Toy? > > Hi all, > > While some may think PHP is a toy, there may be some merit to that now. > > In cooperation with Vincent Pontier, the PHP elephant designer, Damien Seguy > has developed a plush toy. > > Details are at the end of this message. It depends on how many we order, > but we're looking at a price of about $10 USD. > > If you're interested, please contact me offlist and I'll help coordinate > with Damien. > > Please respond by June 10th. > > Regards, > > H > > > http://www.nexen.net/component/option,com_rsgallery2/Itemid,268/catid,32/ > > > > The evolution of the Elephant : > > http://video.google.com/videoplay?docid=8642557610829220802&hl=en > > > > Dimensions: > > ========== > > The toy is 8 inches by 3.5 by 6 inches. With the tail and the opened ears, > > it is now 10 inches by 3.5 by 8 inches. It is weighting 100 g. > > > > the big one: > > =========== > > According to the prototype's dimension, it will be > > 24 inches by 11 inches by 18 inches, and will weight a full kilogramm. > > Pricing will be around 70 Euros. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From patrick at hexane.org Wed Jun 6 20:33:22 2007 From: patrick at hexane.org (Patrick May) Date: Wed, 6 Jun 2007 20:33:22 -0400 Subject: [nycphp-talk] A Form That Builds Itself In-Reply-To: <002a01c7a89a$bade76c0$07d6f4a7@ced> References: <009601c7a899$2aea2880$c6fba8c0@D2Y4NP61> <002a01c7a89a$bade76c0$07d6f4a7@ced> Message-ID: <6F8B7F73-ABE7-41EC-8AEF-3F53E7FB4297@hexane.org> You don't actually need to use ajax and talk to the server, just some javascript DOM code to insert another input field. On Jun 6, 2007, at 8:28 PM, CED wrote: > Asunchronous JAvascript that writes to a Div, and you run a loop > intot hat div of form input elements incremented by each click. > > HTH, > Ed > Edward JS Prevost II > Me at EdwardPrevost.info > www.EdwardPrevost.info > ----- Original Message ----- > From: Nelly Yusupova > To: 'NYPHP Talk' > Sent: Wednesday, June 06, 2007 8:17 PM > Subject: [nycphp-talk] A Form That Builds Itself > > Hello Everyone, > > I am trying to create a page where users can upload images to the > server via a form. I wanted to offer 5 input fields and an option > that says "click + to add another image", to allow the user to > upload as many images as they want. Does anyone know how I can > achieve this? > > Thank you in advance for your help. > Sincerely, > Nelly Yusupova > http://www.digitalwoman.com > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From Consult at CovenantEDesign.com Wed Jun 6 20:36:25 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 20:36:25 -0400 Subject: [nycphp-talk] A Form That Builds Itself References: <009601c7a899$2aea2880$c6fba8c0@D2Y4NP61><002a01c7a89a$bade76c0$07d6f4a7@ced> <6F8B7F73-ABE7-41EC-8AEF-3F53E7FB4297@hexane.org> Message-ID: <00ab01c7a89b$e1797860$07d6f4a7@ced> yeah, that too. Anything referencing the div. I'm just ajax happy, go XOAD!... Ignore me. Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: "Patrick May" To: "NYPHP Talk" Sent: Wednesday, June 06, 2007 8:33 PM Subject: Re: [nycphp-talk] A Form That Builds Itself > You don't actually need to use ajax and talk to the server, just some > javascript DOM code to insert another input field. > > > On Jun 6, 2007, at 8:28 PM, CED wrote: > > > Asunchronous JAvascript that writes to a Div, and you run a loop > > intot hat div of form input elements incremented by each click. > > > > HTH, > > Ed > > Edward JS Prevost II > > Me at EdwardPrevost.info > > www.EdwardPrevost.info > > ----- Original Message ----- > > From: Nelly Yusupova > > To: 'NYPHP Talk' > > Sent: Wednesday, June 06, 2007 8:17 PM > > Subject: [nycphp-talk] A Form That Builds Itself > > > > Hello Everyone, > > > > I am trying to create a page where users can upload images to the > > server via a form. I wanted to offer 5 input fields and an option > > that says "click + to add another image", to allow the user to > > upload as many images as they want. Does anyone know how I can > > achieve this? > > > > Thank you in advance for your help. > > Sincerely, > > Nelly Yusupova > > http://www.digitalwoman.com > > > > > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ben at projectskyline.com Wed Jun 6 20:44:21 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 6 Jun 2007 20:44:21 -0400 Subject: [nycphp-talk] Removing Text from an Input Box Message-ID: <022801c7a89c$fe025a00$6b01a8c0@gamebox> Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirn at dirnonline.com Wed Jun 6 20:47:54 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Wed, 6 Jun 2007 20:47:54 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <022801c7a89c$fe025a00$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> Message-ID: <001801c7a89d$7ccb0440$76610cc0$@com> I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From Consult at CovenantEDesign.com Wed Jun 6 20:48:19 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 20:48:19 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> Message-ID: <00d001c7a89d$8b3a8af0$07d6f4a7@ced> Set the text as the value, then set it blank onFocus... onFocus(javascript:document.f.inputfield.value = ""); and onBlur(javascript:document.form.inputfield.value ="Username";); -Ed Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Ben Sgro (ProjectSkyline) To: NYPHP Talk Sent: Wednesday, June 06, 2007 8:44 PM Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 nelly at cgim.com Wed Jun 6 20:49:39 2007 From: nelly at cgim.com (Nelly Yusupova) Date: Wed, 6 Jun 2007 20:49:39 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <022801c7a89c$fe025a00$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> Message-ID: <00ad01c7a89d$bad19e20$c6fba8c0@D2Y4NP61> Here is working example... Sincerely, Nelly Yusupova http://www.digitalwoman.com _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Wed Jun 6 20:53:59 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 6 Jun 2007 20:53:59 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com> Message-ID: <025001c7a89e$566be840$6b01a8c0@gamebox> Hello, Yeah, I just hacked up this: . "" . "" What im trying to do is turn that type to a password..so I can see the text...is that possible. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Andy Dirnberger To: 'NYPHP Talk' Sent: Wednesday, June 06, 2007 8:47 PM Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 Consult at CovenantEDesign.com Wed Jun 6 20:50:32 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 20:50:32 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <00d001c7a89d$8b3a8af0$07d6f4a7@ced> Message-ID: <010101c7a89d$da2fb540$07d6f4a7@ced> Don't forget to wrap teh onBlur to check if they entered something different. ----- Original Message ----- From: CED To: NYPHP Talk Sent: Wednesday, June 06, 2007 8:48 PM Subject: Re: [nycphp-talk] Removing Text from an Input Box Set the text as the value, then set it blank onFocus... onFocus(javascript:document.f.inputfield.value = ""); and onBlur(javascript:document.form.inputfield.value ="Username";); -Ed Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: Ben Sgro (ProjectSkyline) To: NYPHP Talk Sent: Wednesday, June 06, 2007 8:44 PM Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ---------------------------------------------------------------------------- _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirn at dirnonline.com Wed Jun 6 20:53:50 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Wed, 6 Jun 2007 20:53:50 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <001801c7a89d$7ccb0440$76610cc0$@com> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com> Message-ID: <003501c7a89e$509cc920$f1d65b60$@com> is a bit more complete. Or can replace empty values with your label. From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at silmail.com Wed Jun 6 20:59:36 2007 From: lists at silmail.com (Jiju Thomas Mathew) Date: Thu, 7 Jun 2007 06:29:36 +0530 Subject: [nycphp-talk] http basic auth suddenly not working In-Reply-To: <6.2.3.4.2.20070606112206.02878de8@mail.optonline.net> References: <6.2.3.4.2.20070606112206.02878de8@mail.optonline.net> Message-ID: <6431a0f40706061759r1f622ff3odbd721be689d5194@mail.gmail.com> try print_r(get_defined_vars()) and see if you can identify the _SERVER key to use.. if it is changed.. On 6/6/07, Michael Southwell wrote: > > A host I use recently upgraded to PHP 5.2.0, running on Apache > 1.3.37, and suddenly a perfectly functioning HTTP Basic > Authentication is not working, presumably because PHP is no longer > returning $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'], or > at least not returning them correctly. They aren't very cooperative > on fixing this. I don't see anything with phpinfo() that might give a > clue as to what is happening. Can anyone suggest something? > > Michael Southwell, Vice President for Education > New York PHP > http://www.nyphp.com/training - In-depth PHP Training Courses > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Jiju Thomas Mathew http://www.php-trivandrum.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirn at dirnonline.com Wed Jun 6 20:59:24 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Wed, 6 Jun 2007 20:59:24 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <025001c7a89e$566be840$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox> Message-ID: <004601c7a89f$17e74f50$47b5edf0$@com> I think this will work in some browsers, but not all. I believe to accomplish this in IE you'd have to completely replace the with . From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:54 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Removing Text from an Input Box Hello, Yeah, I just hacked up this: . "" . "" What im trying to do is turn that type to a password..so I can see the text...is that possible. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Andy Dirnberger To: 'NYPHP Talk' Sent: Wednesday, June 06, 2007 8:47 PM Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons _____ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 enobrev.com Wed Jun 6 21:02:19 2007 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 6 Jun 2007 21:02:19 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <025001c7a89e$566be840$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox> Message-ID: <003c01c7a89f$8033e6e0$0300a8c0@enobrev> >> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) What im trying to do is turn that type to a password..so I can see the text...is that possible. Yes it is possible to change a field type to text and then back to password in Firefox, but you'll get errors from IE and opera. They don't like the idea of changing form field types. The way I've gotten around this is by creating an new field (innerHtml), using the old field's values, and then replacing the old field. It's a lot easier than it sounds using a framwork's insertion methods (prototype::Insertion.Before), though shouldn't terribly difficult using straight javascript. Mark From patrick at hexane.org Wed Jun 6 21:02:42 2007 From: patrick at hexane.org (Patrick May) Date: Wed, 6 Jun 2007 21:02:42 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <022801c7a89c$fe025a00$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> Message-ID: <7C8AFD60-F4A1-41D4-ABBA-E689AF6DA177@hexane.org> Now your passwords are screen-visible.... On Jun 6, 2007, at 8:44 PM, Ben Sgro ((ProjectSkyline)) wrote: > Hello, > > This is more of a JS question, but I'm going to ask it anyways. > > I just got the book, "Pro Javascript Techniques" (Apress) and what > sucks is that many of > the examples do not work. > > What I want to do is have to input boxes, a username and password. > Instead of having labels next to them such as: > > Username: [INPUT BOX] > Password: [INPUT BOX] > > I want to have the text inside the box [INPUT BOX: Username]. etc... > > When the user mouses over, I want to make that "Username" text > dissapear so they can type their username in. > > Any help? > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 Jun 6 21:03:33 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 21:03:33 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <003501c7a89e$509cc920$f1d65b60$@com> Message-ID: <017b01c7a89f$abf0cd20$07d6f4a7@ced> Andy's two functions cover it all, just make a third function that sets type. Although I'm not sure if changing the fields type will reveal the characters or not, it should. ----- Original Message ----- From: Andy Dirnberger To: 'NYPHP Talk' Sent: Wednesday, June 06, 2007 8:53 PM Subject: RE: [nycphp-talk] Removing Text from an Input Box is a bit more complete. Or can replace empty values with your label. From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 ramons at gmx.net Wed Jun 6 21:04:16 2007 From: ramons at gmx.net (David Krings) Date: Wed, 06 Jun 2007 21:04:16 -0400 Subject: [nycphp-talk] A Form That Builds Itself In-Reply-To: <00ab01c7a89b$e1797860$07d6f4a7@ced> References: <009601c7a899$2aea2880$c6fba8c0@D2Y4NP61><002a01c7a89a$bade76c0$07d6f4a7@ced> <6F8B7F73-ABE7-41EC-8AEF-3F53E7FB4297@hexane.org> <00ab01c7a89b$e1797860$07d6f4a7@ced> Message-ID: <46675990.8080603@gmx.net> CED wrote: > yeah, that too. Anything referencing the div. > > I'm just ajax happy, go XOAD!... Ignore me. > Or if you don't know how to get around with AJAX or such, have the users upload the image files as a zip archive. Depenging on which images you want to allow, adding a few .bmp files may quickly fill up the submit buffer of the server and / or PHP. I finished just last week such an uploader and I must say, I am still impressed on how quickly I could jam 800 images into the system (in chunks of 100 due to server upload limits). In all fairness, I did this while being local to the server, but anything else would be upload time which depends on client-server connection. I did add a URL load option as well, so that one could upload the archive first via FTP to the web server and then have the server download it from itself or a different FTP or web server assuming the connection between the two servers is significantly faster than from the client to the target server. I also made it so that users can have the image files in any amount of subfolders. Or you could do that with PHP and by using a script that calls itself. But I really don't recommend this as this requires not only an entire page reload each time, but mandates the full submission of the form each round - with the already specified image files. This is the dumb stuff I did three years ago when starting with PHP. Don't do it, that approach sucks. Besides that, since HTML has such a crappy file upload control you will get into other trouble for sure. I couldn't have done my 'turboloader' without the help from the great NYPHP folks. So, any way you go, you will find help here. David From lists at enobrev.com Wed Jun 6 21:05:01 2007 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 6 Jun 2007 21:05:01 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <003501c7a89e$509cc920$f1d65b60$@com> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <003501c7a89e$509cc920$f1d65b60$@com> Message-ID: <003d01c7a89f$e146f9e0$0300a8c0@enobrev> Is the defaultValue property cross-browser (and platform)? Mark _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:54 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box is a bit more complete. Or can replace empty values with your label. From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirn at dirnonline.com Wed Jun 6 21:08:21 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Wed, 6 Jun 2007 21:08:21 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <003c01c7a89f$8033e6e0$0300a8c0@enobrev> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox> <003c01c7a89f$8033e6e0$0300a8c0@enobrev> Message-ID: <005701c7a8a0$582c7210$08855630$@com> Something along these lines should work.
function swapOut (container_id, field_name) { var el = document.getElementById (container_id); el.innerHTML = ""; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Armendariz Sent: Wednesday, June 06, 2007 9:02 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box >> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) What im trying to do is turn that type to a password..so I can see the text...is that possible. Yes it is possible to change a field type to text and then back to password in Firefox, but you'll get errors from IE and opera. They don't like the idea of changing form field types. The way I've gotten around this is by creating an new field (innerHtml), using the old field's values, and then replacing the old field. It's a lot easier than it sounds using a framwork's insertion methods (prototype::Insertion.Before), though shouldn't terribly difficult using straight javascript. Mark _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From dirn at dirnonline.com Wed Jun 6 21:15:04 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Wed, 6 Jun 2007 21:15:04 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <003d01c7a89f$e146f9e0$0300a8c0@enobrev> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <003501c7a89e$509cc920$f1d65b60$@com> <003d01c7a89f$e146f9e0$0300a8c0@enobrev> Message-ID: <006401c7a8a1$48186db0$d8494910$@com> At present I only have IE and FF installed and it works in both of those. From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Armendariz Sent: Wednesday, June 06, 2007 9:05 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box Is the defaultValue property cross-browser (and platform)? Mark _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:54 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box is a bit more complete. Or can replace empty values with your label. From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:48 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nycphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Wed Jun 6 21:16:00 2007 From: ramons at gmx.net (David Krings) Date: Wed, 06 Jun 2007 21:16:00 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <002601c7a855$feb304a0$681ba8c0@MobileZ> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> Message-ID: <46675C50.9070900@gmx.net> Hans Zaunere wrote: > Hi all, > > While some may think PHP is a toy, there may be some merit to that now. > > In cooperation with Vincent Pontier, the PHP elephant designer, Damien Seguy > has developed a plush toy. > Don't have the German TV station WDR catch them, they came up with a blue elephant in the 70s for their "Sendung mit der Maus" (Mouse Show). The mouse is very 70ish styled in orange and brown. They have some spots online here http://www.wdrmaus.de/lachgeschichten/mausspots/index.phtml It's a show for children, they have the cartoons and always explain how something works or is done. Their explanation of the WWW is a classic. David From Consult at CovenantEDesign.com Wed Jun 6 21:20:15 2007 From: Consult at CovenantEDesign.com (CED) Date: Wed, 6 Jun 2007 21:20:15 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox><003c01c7a89f$8033e6e0$0300a8c0@enobrev> <005701c7a8a0$582c7210$08855630$@com> Message-ID: <001801c7a8a2$015d79a0$07d6f4a7@ced> or... ----- Original Message ----- From: "Andy Dirnberger" To: "'NYPHP Talk'" Sent: Wednesday, June 06, 2007 9:08 PM Subject: RE: [nycphp-talk] Removing Text from an Input Box > Something along these lines should work. > >
> >
> > function swapOut (container_id, field_name) { > var el = document.getElementById (container_id); > el.innerHTML = ""; > } > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On > Behalf Of Mark Armendariz > Sent: Wednesday, June 06, 2007 9:02 PM > To: 'NYPHP Talk' > Subject: RE: [nycphp-talk] Removing Text from an Input Box > > >> From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) > > What im trying to do is turn that type to a password..so I can see > the text...is that possible. > > > > Yes it is possible to change a field type to text and then back to password > in Firefox, but you'll get errors from IE and opera. They don't like the > idea of changing form field types. > > The way I've gotten around this is by creating an new field (innerHtml), > using the old field's values, and then replacing the old field. It's a lot > easier than it sounds using a framwork's insertion methods > (prototype::Insertion.Before), though shouldn't terribly difficult using > straight javascript. > > Mark > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From ben at projectskyline.com Wed Jun 6 21:55:50 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 6 Jun 2007 21:55:50 -0400 Subject: [nycphp-talk] Removing Text from an Input Box - Thanks! References: <022801c7a89c$fe025a00$6b01a8c0@gamebox><001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox><003c01c7a89f$8033e6e0$0300a8c0@enobrev><005701c7a8a0$582c7210$08855630$@com> <001801c7a8a2$015d79a0$07d6f4a7@ced> Message-ID: <030a01c7a8a6$fa1b9e60$6b01a8c0@gamebox> Hello, Thanks for everyones response, it is much appreciated! I decided to work with the code provided by Andy Dirnberger, thank you. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons From rolan at omnistep.com Wed Jun 6 22:03:14 2007 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 06 Jun 2007 22:03:14 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <025001c7a89e$566be840$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com> <025001c7a89e$566be840$6b01a8c0@gamebox> Message-ID: <46676762.9040503@omnistep.com> Ben Sgro (ProjectSkyline) wrote: > Hello, > > Yeah, I just hacked up this: > > . "" > . " onfocus=\"this.value=''\" onfocus=\"this.type='password'\">" > > What im trying to do is turn that type to a password..so I can see the > text...is that possible. > > - Ben > > I'm not clear on whether you actually want the typed passwords to be visible as plaintext or hidden as asterisk/dots. Regardless, below is a css+javascript solution which hides the password field underneath until you mouseover. I feel so filthy for doing it like this, but there are times when painting over the page with CSS is the only way to accomplish the objective. One of my clients has a cafe press store and they didn't want the cafepress logo to be visible on the page. Cafe press doesn't let you disable the logo, but with little bit of dirty css ... voila! http://www.cafepress.com/doyourememberus/2478464 The logo is gone. In reality it's hidden behind the blue circle at the top left. And now for the example:
~Rolan From ben at projectskyline.com Wed Jun 6 22:10:06 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 6 Jun 2007 22:10:06 -0400 Subject: [nycphp-talk] Removing Text from an Input Box References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com><025001c7a89e$566be840$6b01a8c0@gamebox> <46676762.9040503@omnistep.com> Message-ID: <031601c7a8a8$f8579550$6b01a8c0@gamebox> Hello Rolan, Well, ideally, yes, but people can identify well enought with a Textbox stating: Username and one beneath it stating: *******. If they can't figure that out, they don't deserve accesss to the app. = ] Thanks for the code, I'll take a look. That's a neat little trick! - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: "Rolan Yang" To: "NYPHP Talk" Sent: Wednesday, June 06, 2007 10:03 PM Subject: Re: [nycphp-talk] Removing Text from an Input Box > Ben Sgro (ProjectSkyline) wrote: >> Hello, >> Yeah, I just hacked up this: >> . "" >> . "> onfocus=\"this.value=''\" onfocus=\"this.type='password'\">" >> What im trying to do is turn that type to a password..so I can see the >> text...is that possible. >> - Ben >> > I'm not clear on whether you actually want the typed passwords to be > visible as plaintext or hidden as asterisk/dots. > Regardless, below is a css+javascript solution which hides the password > field underneath until you mouseover. I feel so filthy for doing it like > this, but there are times when painting over the page with CSS is the only > way to accomplish the objective. One of my clients has a cafe press store > and they didn't want the cafepress logo to be visible on the page. Cafe > press doesn't let you disable the logo, but with little bit of dirty css > ... voila! > > http://www.cafepress.com/doyourememberus/2478464 > > The logo is gone. In reality it's hidden behind the blue circle at the top > left. > > And now for the example: > > > > > > >
onMouseover="document.getElementById('TOP').style.visibility='hidden';">
>
> > > > > > > ~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 lists at enobrev.com Wed Jun 6 23:43:35 2007 From: lists at enobrev.com (Mark Armendariz) Date: Wed, 6 Jun 2007 23:43:35 -0400 Subject: [nycphp-talk] Removing Text from an Input Box In-Reply-To: <031601c7a8a8$f8579550$6b01a8c0@gamebox> References: <022801c7a89c$fe025a00$6b01a8c0@gamebox> <001801c7a89d$7ccb0440$76610cc0$@com><025001c7a89e$566be840$6b01a8c0@gamebox><46676762.9040503@omnistep.com> <031601c7a8a8$f8579550$6b01a8c0@gamebox> Message-ID: <005d01c7a8b6$0755db90$0300a8c0@enobrev> > > Ben Sgro (ProjectSkyline) wrote: > >> Hello, > >> Yeah, I just hacked up this: > >> . " onfocus=\"this.value=''\">" > >> . " >> onfocus=\"this.value=''\" onfocus=\"this.type='password'\">" > >> What im trying to do is turn that type to a password..so > I can see the > >> text...is that possible. > >> - Ben > >> I had to do something similar for a recent project. My clients asked for a 'show' link instead of an onFocus. Also had cross-browser considerations. (for noscript, could use js to hide labels) defaultValue is very nice, and I'm glad to have learned it (thanks Andy). Unfortunately changing the defaultValue changed the value. In order to replace the old password field with a new text field, you have to set the new field's defaultValue to 'Password', which makes the value of the field 'Password', which means you lose whatever the user may have typed in. So, you'll notice I use _defaultValue (my own) to tell the script which value to replace if it sees it. Also note, when using defaultValue, if you load the page with the user's info already filled in (a likely scenario for an account management page), the defaultValue will no longer be 'Username', which might be what you want (a clear field regardless of what they're typing), but would probably be unexpected. Of course in the account management context, not having labels on fields is a bit less user-friendly, but that's off-topic. getTarget is just from my standard toolbox, and replaceElement is from prototype (and a bit of research as to how prototype's methods work). Everything that's in the head would probably be in a separate file and the stuff at the bottom probably in a window.onload (even better http://tetlaw.id.au/view/javascript/fastinit) Here's what I have: show Anyways, good luck, hope this helps anyone who needs it. (also, not sure if you know, but nyphp has a front-end list for js questions as well - http://lists.nyphp.org/mailman/listinfo/front-end). Mark Armendariz From codebowl at gmail.com Thu Jun 7 22:04:42 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 7 Jun 2007 22:04:42 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <46675C50.9070900@gmx.net> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> <46675C50.9070900@gmx.net> Message-ID: <8d9a42800706071904p65a05146j4eee1afcd06964c2@mail.gmail.com> Hans, I'll take one ;) Although i do wonder why an elephant? On 6/6/07, David Krings wrote: > > Hans Zaunere wrote: > > Hi all, > > > > While some may think PHP is a toy, there may be some merit to that now. > > > > In cooperation with Vincent Pontier, the PHP elephant designer, Damien > Seguy > > has developed a plush toy. > > > > Don't have the German TV station WDR catch them, they came up with a > blue elephant in the 70s for their "Sendung mit der Maus" (Mouse Show). > The mouse is very 70ish styled in orange and brown. > They have some spots online here > http://www.wdrmaus.de/lachgeschichten/mausspots/index.phtml > > It's a show for children, they have the cartoons and always explain how > something works or is done. Their explanation of the WWW is a classic. > > 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 > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.rundlett at gmail.com Fri Jun 8 03:01:00 2007 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Fri, 8 Jun 2007 03:01:00 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <8d9a42800706071904p65a05146j4eee1afcd06964c2@mail.gmail.com> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> <46675C50.9070900@gmx.net> <8d9a42800706071904p65a05146j4eee1afcd06964c2@mail.gmail.com> Message-ID: <5e2aaca40706080001l48c3e72eua8fdfbddc05ffad3@mail.gmail.com> On 6/7/07, Joseph Crawford wrote: > Hans, > > I'll take one ;) Although i do wonder why an elephant? In France, (and Germany, etc?) the elephant has been a mascot for PHP for a while (since about '98). http://www.elroubio.net/?p=adopt_an_elephpant From shadab_w at yahoo.co.in Fri Jun 8 07:02:33 2007 From: shadab_w at yahoo.co.in (Shadab Wadiwala) Date: Fri, 8 Jun 2007 12:02:33 +0100 (BST) Subject: [nycphp-talk] Problem with PHPMailer Class Message-ID: <12346.42387.qm@web8704.mail.in.yahoo.com> Hi !! I am involved in developing a web-based email service as a part of my College Minor Project ..... I rely on PHPMailer library to send mails using SMTP service on port 25 But I am facing some trouble .... Whenever I send a mail I get an error stating :-- LANGUAGE STRING FAILED TO LOAD : RECIPIENTS FAILED What is the remedy to this problem so that I can start to send the mails successfully ... A quick reply in this regard will be very much benficial to me Shadab .I. Wadiwala My homepage:-- http://shadabworld.110mb.com --------------------------------- Download prohibited? No problem! CHAT from any browser, without download. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Fri Jun 8 08:36:55 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Fri, 8 Jun 2007 08:36:55 -0400 Subject: [nycphp-talk] Problem with PHPMailer Class References: <12346.42387.qm@web8704.mail.in.yahoo.com> Message-ID: <004101c7a9c9$b48bcd10$6b01a8c0@gamebox> Hello, I believe you need to set the following: $emailObject = new PHPMailer( ); $emailObject->SetLanguage('en', "${OOP_INC_PATH}/language/"); Where $OOP_INC_PATH is the path to your PHPMAILER directory and the language directory. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Shadab Wadiwala To: NYPHP Talk Sent: Friday, June 08, 2007 7:02 AM Subject: [nycphp-talk] Problem with PHPMailer Class Hi !! I am involved in developing a web-based email service as a part of my College Minor Project ..... I rely on PHPMailer library to send mails using SMTP service on port 25 But I am facing some trouble .... Whenever I send a mail I get an error stating :-- LANGUAGE STRING FAILED TO LOAD : RECIPIENTS FAILED What is the remedy to this problem so that I can start to send the mails successfully ... A quick reply in this regard will be very much benficial to me Shadab .I. Wadiwala My homepage:-- http://shadabworld.110mb.com ------------------------------------------------------------------------------ Download prohibited? No problem! CHAT from any browser, without download. ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 vugranam at us.ibm.com Fri Jun 8 10:21:34 2007 From: vugranam at us.ibm.com (Vugranam Sreedhar) Date: Fri, 8 Jun 2007 10:21:34 -0400 Subject: [nycphp-talk] Vugranam Sreedhar is out of the office. Message-ID: I will be out of the office starting 06/08/2007 and will not return until 06/15/2007. I will respond to your message when I return. Please contact my manager for all of my activities. From tedd at sperling.com Fri Jun 8 11:25:01 2007 From: tedd at sperling.com (tedd) Date: Fri, 8 Jun 2007 11:25:01 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <330532b60706061416v4eb7c0b8m809f421ad5b3d545@mail.gmail.com> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> <330532b60706061416v4eb7c0b8m809f421ad5b3d545@mail.gmail.com> Message-ID: At 5:16 PM -0400 6/6/07, Mitch Pirtle wrote: > >So why is "PHP" on a PostgreSQL elephant? I dunno, but it sounds kind of kinky. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From arzala at gmail.com Sat Jun 9 07:42:22 2007 From: arzala at gmail.com (Anirudh Zala) Date: Sat, 9 Jun 2007 17:12:22 +0530 Subject: [nycphp-talk] A useful link Message-ID: <200706091712.22882.arzala@gmail.com> http://en.wikipedia.org/wiki/Category:Free_network-related_software Important link to search various free softwares. Thanks Anirudh Zala From lists at zaunere.com Sat Jun 9 19:23:48 2007 From: lists at zaunere.com (Hans Zaunere) Date: Sat, 9 Jun 2007 19:23:48 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <002601c7a855$feb304a0$681ba8c0@MobileZ> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> Message-ID: <055401c7aaed$3b513fa0$681ba8c0@MobileZ> Hi again, Tomorrow is the last call for getting your PHP toy. Please let me know by noonish tomorrow if you haven't already and want one. H Hans Zaunere wrote on Wednesday, June 06, 2007 12:16 PM: > Hi all, > > While some may think PHP is a toy, there may be some merit to that > now. > > In cooperation with Vincent Pontier, the PHP elephant designer, > Damien Seguy has developed a plush toy. > > Details are at the end of this message. It depends on how many we > order, but we're looking at a price of about $10 USD. > > If you're interested, please contact me offlist and I'll help > coordinate with Damien. > > Please respond by June 10th. > > Regards, > > H > > > http://www.nexen.net/component/option,com_rsgallery2/Itemid,268/catid,32/ > > > > The evolution of the Elephant : > > http://video.google.com/videoplay?docid=8642557610829220802&hl=en > > > > Dimensions: > > ========== > > The toy is 8 inches by 3.5 by 6 inches. With the tail and the > > opened ears, it is now 10 inches by 3.5 by 8 inches. It is > > weighting 100 g. > > > > the big one: > > =========== > > According to the prototype's dimension, it will be > > 24 inches by 11 inches by 18 inches, and will weight a full > > kilogramm. Pricing will be around 70 Euros. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 cliff at pinestream.com Mon Jun 11 11:37:07 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 11:37:07 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited Message-ID: Recently, there was a thread on pages expires, POSTDATA and the back/resubmit button, etc. Chris Shiflett provided a link to a page expire article. Yet the thread seems to die without fully addressing this issue. Secret keys effectively prevent duplicate submissions, but don?t prevent that geek-speak browser message. Header redirects seem to solve the back/resubmit problem, but create duplicate processing on the server side and generally add session overhead. For a successful form submission, the ?thanks redirect? probably need to grab data again. For a bad form submission, the postdata probably needs to be stored in a session to be echo?d back. My question is, what is the best practice or industry standard practice, if there is one, for handling POST form submissions while addressing the back/resubmit issue? Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From thenov at gmail.com Mon Jun 11 11:43:46 2007 From: thenov at gmail.com (Michael Novak) Date: Mon, 11 Jun 2007 11:43:46 -0400 Subject: [nycphp-talk] PHP Form submit Message-ID: I am having trouble submitting a form using php when i have an onclick method attached to the submit button. I am trying to show a loading graphic on the page while php processes the page but PHP doesn't actually get the form submission in Safari. It seems to work just fine in any other browser tested. any ideas? -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Mon Jun 11 11:46:52 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 11:46:52 -0400 Subject: [nycphp-talk] PHP Form submit In-Reply-To: Message-ID: On 6/11/07 11:43 AM, "Michael Novak" wrote: > I am having trouble submitting a form using php when i have an onclick method > attached to the submit button. I am trying to show a loading graphic on the > page while php processes the page but PHP doesn't actually get the form > submission in Safari. It seems to work just fine in any other browser tested. > > any ideas? > > -mike No ideas, but a suggestion. The Aptana IDE has a great help guide that indicates what methods work with what browser versions. Worth a look. Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From thenov at gmail.com Mon Jun 11 11:50:51 2007 From: thenov at gmail.com (Michael Novak) Date: Mon, 11 Jun 2007 11:50:51 -0400 Subject: [nycphp-talk] PHP Form submit In-Reply-To: References: Message-ID: thanks! On 6/11/07, Cliff Hirsch wrote: > > On 6/11/07 11:43 AM, "Michael Novak" wrote: > > I am having trouble submitting a form using php when i have an onclick > method attached to the submit button. I am trying to show a loading graphic > on the page while php processes the page but PHP doesn't actually get the > form submission in Safari. It seems to work just fine in any other browser > tested. > > any ideas? > > -mike > > > No ideas, but a suggestion. The Aptana IDE has a great help guide that > indicates what methods work with what browser versions. Worth a look. > > Cliff > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 rahmin at insite-out.com Mon Jun 11 11:56:57 2007 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Mon, 11 Jun 2007 11:56:57 -0400 Subject: [nycphp-talk] PHP Form submit In-Reply-To: Message-ID: Not exactly sure what you're doing onclick (which may or may not be affecting this), but it sounds like Safari is getting confused by multiple events. Try capturing the form submission instead of the click:
Whereas: function good(form) { // do your stuff, but 'return true' to submit to action: return true; } Michael Novak wrote: > I am having trouble submitting a form using php when i have an onclick > method attached to the submit button. I am trying to show a loading graphic > on the page while php processes the page but PHP doesn't actually get the > form submission in Safari. It seems to work just fine in any other browser > tested. > > any ideas? > > -mike > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From shiflett at php.net Mon Jun 11 11:57:14 2007 From: shiflett at php.net (Chris Shiflett) Date: Mon, 11 Jun 2007 11:57:14 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: References: Message-ID: <466D70DA.5080406@php.net> Cliff Hirsch wrote: > Header redirects seem to solve the back/resubmit problem, but create > duplicate processing on the server side and generally add session > overhead. For a successful form submission, the ?thanks redirect? > probably need to grab data again. For a bad form submission, the > postdata probably needs to be stored in a session to be echo?d back. I might be wrong, but these comments make me think you misinterpreted the article. 1. Why is there any duplicate processing? 2. What is the basis of your concern regarding session overhead? You can persist data in cookies, if it's really a concern. 3. What is a thanks redirect, and why must it grab data again? 4. If a form submission is deemed bad, you can opt to display the form again with the errors noted, but the 302 redirect is the only way to prevent the back / forward warning. Chris -- Chris Shiflett http://shiflett.org/ From jonbaer at jonbaer.com Mon Jun 11 12:04:16 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Mon, 11 Jun 2007 12:04:16 -0400 Subject: [nycphp-talk] PHP-based Hpricot equivalent? Message-ID: <00F3689E-749E-4CD0-A2C1-09E6749BB6B3@jonbaer.com> Might anyone know of a package which would be equivalent to Ruby's Hpricot gem? http://code.whytheluckystiff.net/hpricot/ libcurl-based would be ok. So far doing it by hand but thinking maybe something else is available. Thanks in advanced. - Jon From cliff at pinestream.com Mon Jun 11 13:16:57 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 13:16:57 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <466D70DA.5080406@php.net> Message-ID: On 6/11/07 11:57 AM, "Chris Shiflett" wrote: > Cliff Hirsch wrote: >> Header redirects seem to solve the back/resubmit problem, but create >> duplicate processing on the server side and generally add session >> overhead. For a successful form submission, the ?thanks redirect? >> probably need to grab data again. For a bad form submission, the >> postdata probably needs to be stored in a session to be echo?d back. > > I might be wrong, but these comments make me think you misinterpreted > the article. > > 1. Why is there any duplicate processing? A Form submission would start by running the front-end controller, which loads a whole lot of classes, checks authentication, establishes the DB connection, inits sessions, sets up the template controller, and other housekeeping chores. The way I understand it, we would do all that, and then when the script finally gets to the action related to the form submission, we would redirect, which would go through that initial process all over again -- essentially scrapping that first pass of cycles. Am I missing something here? > 2. What is the basis of your concern regarding session overhead? You can > persist data in cookies, if it's really a concern. This probably dates back to a presentation at the Zend conference several years ago given by Joyce from Renkoo regarding the evils of sessions. But I use them, so what's another few fields. I've all but given up on minimizing SQL hits. More session variables do mean more states to run amok though. > 3. What is a thanks redirect, and why must it grab data again? By this I meant the page following a form submission. Say the form did something as simple as store a record in a DB. Now if we redirect, and want to say, "hey thanks for submitting this data", we need to query the DB to retrieve it. Without the redirect, we would innately have the data, since we're still in the same script that processed the form. > 4. If a form submission is deemed bad, you can opt to display the form > again with the errors noted, but the 302 redirect is the only way to > prevent the back / forward warning. Seems like I just have to model human behavior versus performance and do what is most intuitive for the end-user. From shiflett at php.net Mon Jun 11 13:32:06 2007 From: shiflett at php.net (Chris Shiflett) Date: Mon, 11 Jun 2007 13:32:06 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: References: Message-ID: <466D8716.7070408@php.net> Cliff Hirsch wrote: > > 1. Why is there any duplicate processing? > > A Form submission would start by running the front-end controller, > which loads a whole lot of classes, checks authentication, > establishes the DB connection, inits sessions, sets up the template > controller, and other housekeeping chores. This sounds like an argument against using a framework. :-) Jesting aside, if you accept this overhead for every request, why would it suddenly be unacceptable for a request to process a form? You incur this overhead twice, but if adding a request / response transaction noticeably degrades the performance of your web site, I would speculate that your problems have little to nothing to do with whether you use this particular technique. > > 2. What is the basis of your concern regarding session overhead? > > You can persist data in cookies, if it's really a concern. > > This probably dates back to a presentation at the Zend conference > several years ago given by Joyce from Renkoo regarding the evils of > sessions. She might have been speaking about scalability. As your userbase increases, server-side session data stores become increasingly difficult to scale, although solutions like memcache make this problem manageable for lots of really popular sites. An alternative is to use cookies as your session data store, but then you have to incur extra processing overhead, because you need to take steps to ensure that you can detect any attempt to tamper with the cookies. > But I use them, so what's another few fields. In that case, the overheard of fetching session data is an expense you already incur. > > 3. What is a thanks redirect, and why must it grab data again? > > By this I meant the page following a form submission. Say the form > did something as simple as store a record in a DB. Now if we > redirect, and want to say, "hey thanks for submitting this data", we > need to query the DB to retrieve it. You're already using sessions, so you can persist data for free. By the way, since writing the article, this technique has been described as a design pattern called PRG (POST, Request, GET). Hope that helps. Chris -- Chris Shiflett http://shiflett.org/ From pmjones88 at gmail.com Mon Jun 11 13:38:49 2007 From: pmjones88 at gmail.com (Paul M Jones) Date: Mon, 11 Jun 2007 10:38:49 -0700 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <466D8716.7070408@php.net> References: <466D8716.7070408@php.net> Message-ID: <616DEA04-0613-4968-B726-56084EE9062D@gmail.com> Hey Chris, > By the way, since writing the article, this technique has been > described > as a design pattern called PRG (POST, Request, GET). Do you recall by whom? Any links to the pattern description/outline? -- pmj From cliff at pinestream.com Mon Jun 11 13:57:33 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 13:57:33 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <466D8716.7070408@php.net> Message-ID: On 6/11/07 1:32 PM, "Chris Shiflett" wrote: > Cliff Hirsch wrote: >>> 1. Why is there any duplicate processing? >> >> A Form submission would start by running the front-end controller, >> which loads a whole lot of classes, checks authentication, >> establishes the DB connection, inits sessions, sets up the template >> controller, and other housekeeping chores. > > This sounds like an argument against using a framework. :-) True. A trivial script becomes a simple dispatcher becomes a front-end controller becomes a Framework, becomes...before you know it...ASP.NET?! > Jesting aside, if you accept this overhead for every request, why would > it suddenly be unacceptable for a request to process a form? Excellent point. > You incur this overhead twice, but if adding a request / response > transaction noticeably degrades the performance of your web site, I > would speculate that your problems have little to nothing to do with > whether you use this particular technique. Good point. I'm sure other bottlenecks will arise long before this. >>> 2. What is the basis of your concern regarding session overhead? >>> You can persist data in cookies, if it's really a concern. >> >> This probably dates back to a presentation at the Zend conference >> several years ago given by Joyce from Renkoo regarding the evils of >> sessions. > > She might have been speaking about scalability. As your userbase > increases, server-side session data stores become increasingly difficult > to scale, although solutions like memcache make this problem manageable > for lots of really popular sites. Exactly. I've been designer for millions of users before I have even one. Talk about putting the cart before the horse.... > By the way, since writing the article, this technique has been described > as a design pattern called PRG (POST, Request, GET). Makes sense -- its all starting to make sense, albeit slowly... Chris, as always you are a wealth of knowledge. Thanks, Cliff From shiflett at php.net Mon Jun 11 13:59:20 2007 From: shiflett at php.net (Chris Shiflett) Date: Mon, 11 Jun 2007 13:59:20 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <616DEA04-0613-4968-B726-56084EE9062D@gmail.com> References: <466D8716.7070408@php.net> <616DEA04-0613-4968-B726-56084EE9062D@gmail.com> Message-ID: <466D8D78.9090608@php.net> Paul M Jones wrote: > > By the way, since writing the article, this technique has been > > described as a design pattern called PRG (POST, Request, GET). > > Do you recall by whom? Any links to the pattern description/outline? I don't recall where I saw it first described as such, but the Wikipedia entry lists a few references: http://en.wikipedia.org/wiki/Post/Redirect/Get The first one is pretty good: http://theserverside.com/tt/articles/article.tss?l=RedirectAfterPost Chris -- Chris Shiflett http://shiflett.org/ From cliff at pinestream.com Mon Jun 11 14:04:05 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 14:04:05 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <616DEA04-0613-4968-B726-56084EE9062D@gmail.com> Message-ID: This looks like a good starting point: http://en.wikipedia.org/wiki/Post/Redirect/Get >From the wiki, this describes it in depth: http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost It also has a brief explanation of 302 versus 303 codes. Cliff P.S. Why do I always feel that I'm learning this stuff years too late? On 6/11/07 1:38 PM, "Paul M Jones" wrote: > Hey Chris, > >> By the way, since writing the article, this technique has been >> described >> as a design pattern called PRG (POST, Request, GET). > > Do you recall by whom? Any links to the pattern description/outline? > > > -- pmj From cliff at pinestream.com Mon Jun 11 14:06:42 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 11 Jun 2007 14:06:42 -0400 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: <466D8D78.9090608@php.net> Message-ID: >>> By the way, since writing the article, this technique has been >>> described as a design pattern called PRG (POST, Request, GET). Do any Frameworks incorporate this pattern seamlessly...hint, hint Nate... From pmjones88 at gmail.com Mon Jun 11 14:12:12 2007 From: pmjones88 at gmail.com (Paul M Jones) Date: Mon, 11 Jun 2007 11:12:12 -0700 Subject: [nycphp-talk] POSTDATA and back/resubmit revisited In-Reply-To: References: Message-ID: On Jun 11, 2007, at 11:04 AM, Cliff Hirsch wrote: > From the wiki, this describes it in depth: > http://www.theserverside.com/tt/articles/article.tss? > l=RedirectAfterPost > > It also has a brief explanation of 302 versus 303 codes. After reading that theserververside.com entry, it seems like we've been doing this in Solar (framework for PHP5) for a little while now. Essentially, after processing a form, you call $this- >_redirectNoCache('controller/action') and you shouldn't get any re- POST troubles. Boring code from the page-controller follows. /** * * Redirects to another page and action after disabling HTTP caching. * * The _redirect() method is often called after a successful POST * operation, to show a "success" or "edit" page. In such cases, clicking * clicking "back" or "reload" will generate a warning in the * browser allowing for a possible re-POST if the user clicks OK. * Typically this is not what you want. * * In those cases, use _redirectNoCache() to turn off HTTP caching, so * that the re-POST warning does not occur. * * This method sends the following headers before setting Location: * * {{code: php * header("Cache-Control: no-store, no-cache, must- revalidate"); * header("Cache-Control: post-check=0, pre-check=0", false); * header("Pragma: no-cache"); * }} * * @param Solar_Uri_Action|string $spec The URI to redirect to. * * @param int|string $code The HTTP status code to redirect with; default * is '303 See Other'. * * @return void * */ protected function _redirectNoCache($spec, $code = 303) { // reset cache-control $this->_response->setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate' ); // append cache-control $this->_response->setHeader( 'Cache-Control', 'post-check=0, pre-check=0', false ); // reset pragma header $this->_response->setHeader('Pragma', 'no-cache'); // continue with redirection return $this->_redirect($spec, $code); } -- Paul M. Jones Solar: Simple Object Library and Application Repository for PHP5. Savant: The simple, elegant, and powerful solution for templates in PHP. From captainjc at gmail.com Mon Jun 11 17:34:29 2007 From: captainjc at gmail.com (Jeremy Campbell) Date: Mon, 11 Jun 2007 17:34:29 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) Message-ID: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> the classes at nyphp seem really good, but i'm a little hesitant to enroll in an intensive 2-day thing. would prefer something evenings, drawn out over a few weeks. gives more time to let things sink in and come up with questions. does anyone have any recommendations? as far as background, i've been doing front end development (hand coding html) for many years so i know my way around a text-editor and understand a lot of the basic principles of php but i have never attempted a php project on my own and am pretty hazy with anything concerning databases. thanks, jeremy From ben at projectskyline.com Mon Jun 11 18:03:56 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Mon, 11 Jun 2007 18:03:56 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> Message-ID: <021f01c7ac74$689d6dc0$6b01a8c0@gamebox> Hello Jeremy, I'd suggest taking on a small project that interests you, and have it contain some database or other types technologies and programming challenges you don't have experiance with. Since its something that interests you, I'd bet you'll have the motivation to see it through. As questions arise, you can consult google, books, or this list for answers. Nothing is better for learning than doing. You could also get involved with an open source project. As far as classes, how about enrolling in some classes at a local college (I'm not sure who offers php coding). - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: "Jeremy Campbell" To: Sent: Monday, June 11, 2007 5:34 PM Subject: [nycphp-talk] nyc php classes (night/long format) > the classes at nyphp seem really good, but i'm a little hesitant to > enroll in an intensive 2-day thing. would prefer something evenings, > drawn out over a few weeks. gives more time to let things sink in and > come up with questions. does anyone have any recommendations? > > as far as background, i've been doing front end development (hand coding > html) for many years so i know my way around a text-editor and understand > a lot of the basic principles of php but i have never attempted a php > project on my own and am pretty hazy with anything concerning databases. > > thanks, > > jeremy > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From ramons at gmx.net Mon Jun 11 19:11:39 2007 From: ramons at gmx.net (David Krings) Date: Mon, 11 Jun 2007 19:11:39 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> Message-ID: <466DD6AB.70905@gmx.net> Jeremy Campbell wrote: > as far as background, i've been doing front end development (hand coding > html) for many years so i know my way around a text-editor and > understand a lot of the basic principles of php but i have never > attempted a php project on my own and am pretty hazy with anything > concerning databases. > > thanks, > > jeremy Then you know way more than I did when I first started with PHP. I recommend picking some project that you have some personal interest in. My first project was a self-replicating script that parsed through the current directory and dynamically created links to image and flash video files (used Jeoren Wijering's Flash Video player). It copied itself into any lower level directory and created a link in the dynamically generated page if the file existed. The names and descriptions for the images and videos came from an INI style text file. That script was always pretty shaky and by now it entirely stopped working. My next project was writing a database backend and some additional code for wrapping Jeroen Wijering's Flash MP3 player into a script that allows me to search through my MP3s, create an XML playlist, and then play the list using the flash based player. Although the script still works, I am ebarrassed by the code. It is full of flaws that just don't come to play because of my setup and use. I then got a big break and was allowed to create a bug tracking / CRM application for work. Although it never was used, it served me well for learning. Next came a new script for pics from my digital and video camera. I added a quite complex search function, and stored everything except for the files of course in a database. My goal was that I do not need to process anything about the pictures, such as renaming or rotating some of them. It was quite a challange to dive into exif, arrays, GD, more SQL, more queries, and other nifty stuff. My best resources were the O'Reilly XHTML book (I doubt you need it), W3Schools SQL course (you can do quite a bit with very primitive select, insert, and update queries), php.net (be cautious of the user contributions, some of them send you down the wrong path), anything that Google barfed up and above all, no, wayyyyyy above all the folks here on the NYPHP list. I have no training in web or GUI design (and that shows unfortunately), I have no training in programming, and until I came across PHP absolutely hated coding. I did work for over six years as software tester, supporter, and tech writer in a software engineering team, which did help quite a bit. In any case, if I can do it, you can for sure! Just pick something, get a very good idea of what you want the script to do in the end, and then just go at it. When you are looking for a good IDE that doesn't cost a thing, ask the nice folks at Waterproof.fr if you can have a personal license. Their IDE is really nice, but the debugger implementation isn't so hot. Same applies for all the others except for NuSphere. And don't even bother with the Zend IDE. Their app just doesn't make any sense. David From anyamiretsky at bbg.org Tue Jun 12 09:31:13 2007 From: anyamiretsky at bbg.org (Miretsky, Anya) Date: Tue, 12 Jun 2007 09:31:13 -0400 Subject: [nycphp-talk] PHP equivalent of the XMLHTTP Library ? Message-ID: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> I am trying to retrieve and send data to a remote web server using HTTP, I know that there is a library that can be used in ASP code called XMLHTTP which does exactly what I need to do. Is there something like this in PHP? I've looked at the php online manual but have not come up with anything so far. Can anyone point me in the right direction? A. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at sun-code.com Tue Jun 12 10:46:48 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Tue, 12 Jun 2007 10:46:48 -0400 Subject: [nycphp-talk] PHP equivalent of the XMLHTTP Library ? In-Reply-To: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> References: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> Message-ID: <002f01c7ad00$8337dcb0$89a79610$@com> Are you looking for things like NuSOAP, PEAR::SOAP or whatever SOAP extensions are in PHP5? Warmest regards, Peter Sawczynec Technology Dir. Sun-code.com Web related services 646.316.3678 ps at sun-code.com From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Miretsky, Anya Sent: Tuesday, June 12, 2007 9:31 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] PHP equivalent of the XMLHTTP Library ? I am trying to retrieve and send data to a remote web server using HTTP, I know that there is a library that can be used in ASP code called XMLHTTP which does exactly what I need to do. Is there something like this in PHP? I've looked at the php online manual but have not come up with anything so far. Can anyone point me in the right direction? A. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dell at sala.ca Tue Jun 12 11:07:20 2007 From: dell at sala.ca (Dell Sala) Date: Tue, 12 Jun 2007 11:07:20 -0400 Subject: [nycphp-talk] PHP equivalent of the XMLHTTP Library ? In-Reply-To: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> References: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> Message-ID: <819F0466-9109-4A22-839A-D93F3B4D1EB8@sala.ca> On Jun 12, 2007, at 9:31 AM, Miretsky, Anya wrote: > I am trying to retrieve and send data to a remote web server using > HTTP. [...] Can anyone point me in the right direction? There are a few ways to do it... For simple GET requests the easiest is to use file functions that support the HTTP protocol, like fopen() or file(). (The php.ini setting allow_url_fopen must be enabled for this to work). EX: $responseLines = file('http://google.com/'); more details: http://us.php.net/manual/en/features.remote-files.php For POST request you'll need to use either the curl, or socket functions. http://us.php.net/manual/en/ref.curl.php http://us.php.net/manual/en/function.fsockopen.php PEAR also has an HTTP_Request package. This uses the socket functions internally, but is much simpler to work with. http://pear.php.net/package/HTTP_Request Hope this helps. -- Dell From jonbaer at jonbaer.com Tue Jun 12 11:34:08 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Tue, 12 Jun 2007 11:34:08 -0400 Subject: [nycphp-talk] PHP equivalent of the XMLHTTP Library ? In-Reply-To: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> References: <5BF707B7ED37FE4BBD274D3BA180C6110161C5B6@Boston.home.bbg.org> Message-ID: <20ACA4AF-E15F-4246-B731-33D0AA61E4A2@jonbaer.com> http://www.xajaxproject.org On Jun 12, 2007, at 9:31 AM, Miretsky, Anya wrote: > I am trying to retrieve and send data to a remote web server using > HTTP, I know that there is a library that can be used in ASP code > called > XMLHTTP which does exactly what I need to do. Is there something like > this in PHP? I've looked at the php online manual but have not come up > with anything so far. Can anyone point me in the right direction? > > > A. From anyamiretsky at bbg.org Tue Jun 12 13:20:56 2007 From: anyamiretsky at bbg.org (Miretsky, Anya) Date: Tue, 12 Jun 2007 13:20:56 -0400 Subject: [nycphp-talk] (no subject) Message-ID: <5BF707B7ED37FE4BBD274D3BA180C6110161C5BC@Boston.home.bbg.org> Anya Miretsky Information Technology Dept. Brooklyn Botanic Garden 1000 Washington Avenue Brooklyn, NY 11225 (718)623-7265 anyamiretsky at bbg.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From anyamiretsky at bbg.org Tue Jun 12 13:26:48 2007 From: anyamiretsky at bbg.org (Miretsky, Anya) Date: Tue, 12 Jun 2007 13:26:48 -0400 Subject: [nycphp-talk] Re: PHP equivalent of the XMLHTTP Library Message-ID: <5BF707B7ED37FE4BBD274D3BA180C6110161C5BD@Boston.home.bbg.org> thanks so much for your responses, I think the HTTP_Request package might be all I need. A. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Tue Jun 12 16:25:19 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Tue, 12 Jun 2007 16:25:19 -0400 Subject: [nycphp-talk] Form PRG revisited -- again Message-ID: I have been testing the Form PRG pattern, and really like the way it acts on the user side. The back button and resubmit/reload button behave so much nicer, versus those ugly POSTDATA messages. But it is a bear to implement, unless I?m missing something as usual. Paul Jones showed how the Solar Framwork supports redirectNoCache function. But this is just a small part of the equation. For a redirect after a successful form submission, its a no-brainer ? clean and simple. The problem is forms with errors. These forms need to be presented to the user again, with all relevant data and error messages ? inline and otherwise. To me, this means the following: 1. Process the form via post for the first pass 2. Redirect to display form again via get with data and error msgs. This means not just presenting the form again, but also the previously form data, and all error messages, which means processing/validating the form to catch the error messages, but not redirecting this time round. This is a major pain. Every form controller/action needs to be tweaked. Am I reinventing the wheel here? Time to switch to ASP or Java?! I see several options: 1. Skip the PRG pattern. Let users struggle with the back/resubmit buttons. 2. Go for the low-hanging fruit ? redirect only after successful form submissions 3. Use AJAX to ?pre-validate? a form prior to submission 4. Make a global PRG function at the start of the controller like so.... if form post submission save post variables in session redirect to same URL (add post/timestamp tag or some other identifier if necessary?) elseif (isset(post/timetamp/identifier tag) && that tag passes some validation step) get saved post variable from session and repopulate $_POST array clear post variables from session continue on our merry way as if this were a post submission (but how do our controller/actions detect get versus post submissions ? looking for a post variable or some http field?) else clear post variables from session, if any What do you think? Seems to make sense. This essentially turns every post into a get. To the forms, it should be transparent ? right? We could still redirect for results pages when desired on a case-by-case basis so that the reload button displays the results again instead of the original form. And we do this as close to the top the script as possible, right after session initiation, to reduce unnecessary server load. Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Tue Jun 12 19:59:55 2007 From: ramons at gmx.net (David Krings) Date: Tue, 12 Jun 2007 19:59:55 -0400 Subject: [nycphp-talk] ucfirst question Message-ID: <466F337B.8060803@gmx.net> Hi! Being a ucfirst issue, I want to capitalize the first letter in a string. What caught my attention is this sentence in the PHP documentation: "Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (?) will not be converted." Well, that is what potentially might happen. Is there a less language discriminatory version of ucfirst or do I need to snip off the first character and check it against ?,?, and ? to make them ?, ?, and ?? That will take care of German, but what about other languages? The locale of my system is US-English, but the script could run on other locales as well. Is there any way to switch the locale on the fly? Even if, I'd neet to noodle the string through ucfirst through all quite a bunch of locales. This is "bupid" how my 2 year old would put it. David From mba2000 at ioplex.com Tue Jun 12 20:30:14 2007 From: mba2000 at ioplex.com (Michael B Allen) Date: Tue, 12 Jun 2007 20:30:14 -0400 Subject: [nycphp-talk] ucfirst question In-Reply-To: <466F337B.8060803@gmx.net> References: <466F337B.8060803@gmx.net> Message-ID: <20070612203014.066c4924.mba2000@ioplex.com> On Tue, 12 Jun 2007 19:59:55 -0400 David Krings wrote: > Hi! > > Being a ucfirst issue, I want to capitalize the first letter in a > string. What caught my attention is this sentence in the PHP > documentation: "Note that 'alphabetic' is determined by the current > locale. For instance, in the default "C" locale characters such as > umlaut-a (?) will not be converted." > > Well, that is what potentially might happen. Is there a less language > discriminatory version of ucfirst or do I need to snip off the first > character and check it against ?,?, and ? to make them ?, ?, and ?? That > will take care of German, but what about other languages? > > The locale of my system is US-English, but the script could run on other > locales as well. Is there any way to switch the locale on the fly? Even > if, I'd neet to noodle the string through ucfirst through all quite a > bunch of locales. By default programs (and thus PHP scripts) run in the C locale. If you call setlocale(LC_CTYPE, ""); this will switch to the locale specified in the environment usually throught the LANG variable. So you can test this by running your script like: $ LANG=de_DE.UTF-8 ./myscript.php > This is "bupid" how my 2 year old would put it. Much of PHP is derived from the the C language standards. Because C is a machine language abstraction, it is deliberately coarse about things that different systems may or may not support (e.g. i18n). This is contrary to the top-down method of designing more modern and user friendly scripting languages but it provides somewhat of a guarantee that there will be no holes in the API since C is the common denominator of programming languages. Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ From ps at sun-code.com Wed Jun 13 09:08:20 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 13 Jun 2007 09:08:20 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> Message-ID: <000001c7adbb$eb1a2fc0$c14e8f40$@com> I am recommending, as best as you can lookup and use only coding examples that program with classes. Don't avoid it, go straight to it. Learn everything in context of classes, your potential hourly rate 9 months from now will ikely be 33% higher than what you might get without class knowledge. And my impression is that there is not a job posting anymore that doesn't call for classes. A young turk should know the new stuff. Learn only the newest version of everything software, meaning e.g. PHP 6 and 5 over version 4.x. Never bother to learn old versions. By the time you get competitive nobody is gonna care that you know old versions of software. Use multi-page tutorials on the internet that show how to build a login section or make a basic mailer app. When you look these up with google, you might try to use the advanced search filter by date feature and stay with things posted within the last year to stay out of old ideas and techniques since marked as bad paractice. Get a book that shows several rudimetary projects done with classes and step by step coding. Look up all you function related questions on php.net. Often if you look at related functions you will find user contributions that answer your needs too. Ultimately, php.net usually answers everything. You'll find a lot of other answer sites source from php.net anyway. And, of course, yes, this list is pedigree for answers. Contibutors are awake all over the world 24 hrs, 7 days with answers often showing up within an hour. And if you cloak all questions as somehow related to a PHP issue, you can get excellent answers to RegExp, SQL, XML, AJAX and even CSS from people who a clearly expert. Meanwhile, like Jim Cramer be prepared for drinking some cheap dark Scotch by yourself down on the cold linoleum floor. Warmest regards, Peter Sawczynec Technology Dir. Sun-code.com Web related services 646.316.3678 ps at sun-code.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeremy Campbell Sent: Monday, June 11, 2007 5:34 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] nyc php classes (night/long format) the classes at nyphp seem really good, but i'm a little hesitant to enroll in an intensive 2-day thing. would prefer something evenings, drawn out over a few weeks. gives more time to let things sink in and come up with questions. does anyone have any recommendations? as far as background, i've been doing front end development (hand coding html) for many years so i know my way around a text-editor and understand a lot of the basic principles of php but i have never attempted a php project on my own and am pretty hazy with anything concerning databases. thanks, jeremy _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ramons at gmx.net Wed Jun 13 11:09:55 2007 From: ramons at gmx.net (David Krings) Date: Wed, 13 Jun 2007 11:09:55 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <000001c7adbb$eb1a2fc0$c14e8f40$@com> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> <000001c7adbb$eb1a2fc0$c14e8f40$@com> Message-ID: <467008C3.5090304@gmx.net> Peter Sawczynec wrote: > Get a book that shows several rudimetary projects done with classes and > step by step coding. > Being somewhat in the same boat as Jeremy, I'd be interested in any recommendations for books tthat show usage of classes. Unlike objects, I have no idea what classes can do and are there for, although I haven't really used either (I used a few objects, such as the zip object). I'm looking at a quite large project that I am likely to be allowed to do at work. I am convinced that I can accomplish it with the knowledge I have now, but why not take that opportunity and learn something new. David From ps at sun-code.com Wed Jun 13 11:34:54 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 13 Jun 2007 11:34:54 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <467008C3.5090304@gmx.net> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> <000001c7adbb$eb1a2fc0$c14e8f40$@com> <467008C3.5090304@gmx.net> Message-ID: <002001c7add0$69140130$3b3c0390$@com> I have a 2-part series of very nice books published in 2003 by Sitepoint. Labeled as "PHP 5 Ready" and entitled: "The PHP Anthology - Object Oriented PHP Solutions, Vols I and II" File handling, images, email, error handling and more; every project executed step by step with classes only. I am not vouchsafing that these examples are secure or the utlimate in best practice (that you must explore on your own), but certainly a good starting point and I have not found anything else that took you right into classes explaining precisely by simple example without 250+ pages of abstract explanantion (though in the long run you will absolutley positively definitely need one such full-on abstract tome also). I have found in my own experience (in VB, VBScript, ASP, PHP, XML, SQL, JavaScript, etc.), that every time you learn something and the author hints that technically there is actually a more obscure, more difficult to comprehend and harder to execute, more exacting technique that handles more exceptions and degrades gracefully -- that the moment you get invovled in even the most trivial commercial project you will instantly discover that you absolutley must employ that more arcane, more difficult programming technique to successfully handle even the most minor task before you. That is why ultimately you will absolutely need an abstract learning tome under your belt too. Warmest regards, Peter Sawczynec Technology Dir. Sun-code.com Web related services 646.316.3678 ps at sun-code.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings Sent: Wednesday, June 13, 2007 11:10 AM To: NYPHP Talk Subject: Re: [nycphp-talk] nyc php classes (night/long format) Peter Sawczynec wrote: > Get a book that shows several rudimetary projects done with classes and > step by step coding. > Being somewhat in the same boat as Jeremy, I'd be interested in any recommendations for books tthat show usage of classes. Unlike objects, I have no idea what classes can do and are there for, although I haven't really used either (I used a few objects, such as the zip object). I'm looking at a quite large project that I am likely to be allowed to do at work. I am convinced that I can accomplish it with the knowledge I have now, but why not take that opportunity and learn something new. David _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ps at sun-code.com Wed Jun 13 12:05:42 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 13 Jun 2007 12:05:42 -0400 Subject: [nycphp-talk] All In the Game of PHP Message-ID: <002101c7add4$b21a2b80$164e8280$@com> The number one muck up I have observed in coding, is programmers creating functions or tools that leave off the final "else" clause at the end of a conditional logic tree. That is, programming logic error examples, such as: You expect users to weigh platinum by the pound; someone will try to weigh chicken necks by the ounce. You expect users to pay in Dollars, Punds, Yen, Franc, Lire and Marks; someone will try to pay in Real. You expect users to pick a State; they live in Canada and need Provinces. You expect 5-digit numerical Zip; UK users have 6-char alpha/numeric mixed. You execute a cart in English, Japanese and Spanish; a user is visually impaired and speaks native Dutch. You build online tech support live chat 8AM-8PM EST; only to find 23% of users log in from Eastern Europe in off hours. Every function you write, every tool you develop has to be prepared to accept and deal with wrong information or input out of your expected bounds. Incomplete function logic tree I have seen many times: if dollars do this elseif yen do this elseif marks do this else pounds do this end if When tighter functions and logic need to be fashioned like so: if dollars do this elseif yen do this elseif marks do this elseif pounds do this else unknown currency raise user error flag end if This one precuationary step alone will CYA so many times you may appear teflon. Warmest regards, Peter Sawczynec Technology Dir. Sun-code.com Web related services 646.316.3678 ps at sun-code.com From captainjc at gmail.com Wed Jun 13 12:38:18 2007 From: captainjc at gmail.com (Jeremy Campbell) Date: Wed, 13 Jun 2007 12:38:18 -0400 Subject: [nycphp-talk] Re: nyc php classes (night/long format) In-Reply-To: <466ec310.6164b0b3.08a4.37daSMTPIN_ADDED@mx.google.com> References: <466ec310.6164b0b3.08a4.37daSMTPIN_ADDED@mx.google.com> Message-ID: thanks for all the insight guys. nyu was the only college i found offering a class at the moment and it's halfway over. i think i'm gonna go for it with the 2-day designers class at nyphp next week. after i'll have the o'reiley book and i've got a few things to sink my teeth into to put it into practice - namely some customizations to zencart for a client of mine (anyone around these parts have much experience with it?). thanks, jeremy From ramons at gmx.net Wed Jun 13 13:34:54 2007 From: ramons at gmx.net (David Krings) Date: Wed, 13 Jun 2007 13:34:54 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <002001c7add0$69140130$3b3c0390$@com> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> <000001c7adbb$eb1a2fc0$c14e8f40$@com> <467008C3.5090304@gmx.net> <002001c7add0$69140130$3b3c0390$@com> Message-ID: <46702ABE.8010208@gmx.net> Peter Sawczynec wrote: > I have found in my own experience (in VB, VBScript, ASP, PHP, XML, SQL, > JavaScript, etc.), that every time you learn something and the author > hints that technically there is actually a more obscure, more difficult > to comprehend and harder to execute, more exacting technique that > handles more exceptions and degrades gracefully -- that the moment you > get invovled in even the most trivial commercial project you will > instantly discover that you absolutley must employ that more arcane, > more difficult programming technique to successfully handle even the > most minor task before you. > > That is why ultimately you will absolutely need an abstract learning > tome under your belt too. > Thank you very much for the hints. I am more interested in improving the maintainability of my code. I often do not anticipate what I might want to do and when I add functionality I often find myself creating code that is only slightly different from existing code. I sometimes manage to simplify and externalize into functions that can be included when needed, but something tells me that there might be a better way. I am not engaging in commercial projects and don't plan to do so. I have no formal software development background and do this for fun. Shouldn't stop me from learning new things and doing it 'right', whatever that is. I used to be scared by arrays and $_SESSION, now I use them all the time. C'mon, classes can't be that tricky. David From ramons at gmx.net Wed Jun 13 14:49:19 2007 From: ramons at gmx.net (David Krings) Date: Wed, 13 Jun 2007 14:49:19 -0400 Subject: [nycphp-talk] All In the Game of PHP In-Reply-To: <002101c7add4$b21a2b80$164e8280$@com> References: <002101c7add4$b21a2b80$164e8280$@com> Message-ID: <46703C2F.5010503@gmx.net> Peter Sawczynec wrote: > The number one muck up I have observed in coding, is programmers > creating functions or tools that leave off the final "else" clause at > the > end of a conditional logic tree. True! Bit me in the behind before where I was staring at a blank page in the browser not knowing why. > > You expect users to weigh platinum by the pound; > someone will try to weigh chicken necks by the ounce. Or in general, uses metric. "23" can be anything and if not made clear it might as well drill your multimillion $ space probe straight into Mars. Honestly, Americans with their "English" system don't deserve better. ;) > You expect users to pay in Dollars, Punds, Yen, Franc, Lire and Marks; > someone will try to pay in Real. See above, depends on which Franc you are talking about. And even worse, French Franc, Italian Lira, and German Marks don't exist anymore. > You expect 5-digit numerical Zip; > UK users have 6-char alpha/numeric mixed. I dove into this some time ago and there are about a dozen standardized means of writing an address. I think I have that code somewhere to handle this. That covers at least the majority of cases, but for sure not all. > You execute a cart in English, Japanese and Spanish; > a user is visually impaired and speaks native Dutch. Or is German and has an attidue like Simon Cowell. > Incomplete function logic tree I have seen many times: > > if > dollars do this > elseif > yen do this > elseif > marks do this > else > pounds do this > end if > > This one precuationary step alone will CYA so many times you may appear > teflon. > Or use switch, case, and default, which supposedly is the better approach since the Logo days. David From paul at devonianfarm.com Wed Jun 13 21:29:32 2007 From: paul at devonianfarm.com (Paul Houle) Date: Wed, 13 Jun 2007 21:29:32 -0400 Subject: [nycphp-talk] All In the Game of PHP In-Reply-To: <002101c7add4$b21a2b80$164e8280$@com> References: <002101c7add4$b21a2b80$164e8280$@com> Message-ID: <467099FC.1030808@devonianfarm.com> Peter Sawczynec wrote: > The number one muck up I have observed in coding, is programmers > creating functions or tools that leave off the final "else" clause at > the > end of a conditional logic tree. That is, programming logic error > examples, such as: > Long if-then-else ladders are an antipattern. After a while, they usually end up like this list: http://www.multicians.org/thvv/borges-animals.html In some cases, switch/case is better: http://www.php.net/manual/en/control-structures.switch.php Other good patterns are 'guarded method/subroutine' function a_good_subroutine($x) { if (invalid_input($x)) { return; } ... do something ... } and the patterns of 'computed subroutine name', 'computed method name', 'computed object name' and 'computed file name'; ie. if (invalid_type($data_type)) { throw new Exception("..."); } require "something-doers/do-something-to-{$data_type}"; From michael.southwell at nyphp.com Wed Jun 13 21:29:46 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Wed, 13 Jun 2007 21:29:46 -0400 Subject: [nycphp-talk] problem: session variables disappear after redirection Message-ID: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Here is a baffling problem that piggybacks in a sense on recent discussions about form handling. The situation is this: I have a form which submits to a processor script. The processor writes the post variables into the session and checks for correctness. If there is a problem, it redirects to the form which is preloaded from the session, and we start over again. If there is no problem, the processor redirects to a thanks page which pulls the submitted information out of the session and sends it via email and says "thanks" to the submitter. This works perfectly for everybody except two out of about 400 people. Unfortunately one of those two is an officer of the organization. I have determined that, even for these two people, the processor does indeed receive the post variables and does indeed write them into the session. But (for those two people, and only for them) when we get to the thanks page, the session information is somehow lost in the course of the redirection, and so the email is sent with blank information. The two people for whom this is happening are both on Macs, and both experience the problem with both Safari and Firefox. Other Mac users with either browser have no problem. Can anyone imagine or suggest what might be happening here? Michael Southwell, Vice President for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From rolan at omnistep.com Wed Jun 13 22:14:22 2007 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 13 Jun 2007 22:14:22 -0400 Subject: [nycphp-talk] problem: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> References: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Message-ID: <4670A47E.9040103@omnistep.com> Michael Southwell wrote: > Here is a baffling problem that piggybacks in a sense on recent > discussions about form handling. The situation is this: > > I have a form which submits to a processor script. The processor > writes the post variables into the session and checks for correctness. > If there is a problem, it redirects to the form which is preloaded > from the session, and we start over again. If there is no problem, the > processor redirects to a thanks page which pulls the submitted > information out of the session and sends it via email and says > "thanks" to the submitter. > > This works perfectly for everybody except two out of about 400 people. > Unfortunately one of those two is an officer of the organization. > > I have determined that, even for these two people, the processor does > indeed receive the post variables and does indeed write them into the > session. But (for those two people, and only for them) when we get to > the thanks page, the session information is somehow lost in the course > of the redirection, and so the email is sent with blank information. > > The two people for whom this is happening are both on Macs, and both > experience the problem with both Safari and Firefox. Other Mac users > with either browser have no problem. > > Can anyone imagine or suggest what might be happening here? > They may have cookies disabled . If you're doing a javascript "onLoad" redirect or using http headers (ie. header("Location:http://www.yoursite.com") the redirect may not be passing the session id onward. It might be ugly, but to be safe, include the "session id" in the redirect url (eg, http://www.yoursite.com/formpage.php?SID=2932398f2398hf23983f ) ~Rolan From ramons at gmx.net Wed Jun 13 22:36:11 2007 From: ramons at gmx.net (David Krings) Date: Wed, 13 Jun 2007 22:36:11 -0400 Subject: [nycphp-talk] problem: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> References: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Message-ID: <4670A99B.1090401@gmx.net> Michael Southwell wrote: > This works perfectly for everybody except two out of about 400 people. > Unfortunately one of those two is an officer of the organization. > > Can anyone imagine or suggest what might be happening here? > The only thing that I can think of is that their browsers don't accept cookies of any kind and silently block them. Unless I am totally mistaken, the session relies on the session id to be available from a cookie. More a guess than a definitive answer. David From pmjones88 at gmail.com Wed Jun 13 22:51:24 2007 From: pmjones88 at gmail.com (Paul M Jones) Date: Wed, 13 Jun 2007 19:51:24 -0700 Subject: [nycphp-talk] problem: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> References: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Message-ID: On Jun 13, 2007, at 6:29 PM, Michael Southwell wrote: > I have a form which submits to a processor script. The processor > writes the post variables into the session and checks for correctness. > If there is a problem, it redirects to the form which is preloaded > from the session, and we start over again. If there is no problem, the > processor redirects to a thanks page which pulls the submitted > information out of the session and sends it via email and says > "thanks" to the submitter. > > This works perfectly for everybody except two out of about 400 people. > Unfortunately one of those two is an officer of the organization. > > I have determined that, even for these two people, the processor does > indeed receive the post variables and does indeed write them into the > session. But (for those two people, and only for them) when we get to > the thanks page, the session information is somehow lost in the course > of the redirection, and so the email is sent with blank information. > > The two people for whom this is happening are both on Macs, and both > experience the problem with both Safari and Firefox. Other Mac users > with either browser have no problem. > > Can anyone imagine or suggest what might be happening here? The only suggestion I can think of is to explicitly call session_commit() or session_write_close() just before the redirect. This will force the session values to be stored before the redirect. (Other comments on the session_write_close() page may be of use to you here.) -- Paul M. Jones Solar: Simple Object Library and Application Repository for PHP5. Savant: The simple, elegant, and powerful solution for templates in PHP. From shiflett at php.net Wed Jun 13 23:47:22 2007 From: shiflett at php.net (Chris Shiflett) Date: Wed, 13 Jun 2007 23:47:22 -0400 Subject: [nycphp-talk] problem: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> References: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Message-ID: <4670BA4A.7080703@php.net> Michael Southwell wrote: > Can anyone imagine or suggest what might be happening here? Based on the subject line alone, my guess is that you're sending a malformed Location header. Can you show us that specific line? Chris -- Chris Shiflett http://shiflett.org/ From rmarscher at beaffinitive.com Thu Jun 14 00:22:18 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Thu, 14 Jun 2007 00:22:18 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <46702ABE.8010208@gmx.net> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> <000001c7adbb$eb1a2fc0$c14e8f40$@com> <467008C3.5090304@gmx.net> <002001c7add0$69140130$3b3c0390$@com> <46702ABE.8010208@gmx.net> Message-ID: <71F5EE58-B23E-438C-84EB-B0417324810F@beaffinitive.com> Hey David, A couple quick things I thought I'd point out: On Jun 13, 2007, at 11:09 AM, David Krings wrote: > Unlike objects, I have no idea what classes can do and are there > for, although I haven't really used either (I used a few objects, > such as the zip object). Classes are actually the way that you define objects. So they're really the same thing and you'll often see the terms used interchangeably. So somewhere out there (in this case, probably written in C and compiled into the zip extension), there is a class that defines the zip objects you've been using. Here's a quick example: class ZipArchive { protected $file; public function open($filename) { echo "code to handle reading $file would go here"; return true; } // etc... } So that's the class... but as soon as you do this: $zip = new ZipArchive(); $zip->open('somefile.zip'); $zip is an object. Does that make sense? I'm sure the books will lay it all out, but just thought I'd clarify the class vs. object thing. On Jun 13, 2007, at 1:34 PM, David Krings wrote: > I am more interested in improving the maintainability of my code. I > often do not anticipate what I might want to do and when I add > functionality I often find myself creating code that is only > slightly different from existing code. I sometimes manage to > simplify and externalize into functions that can be included when > needed, but something tells me that there might be a better way. This process of simplifying and combining code to be reusable is called "refactoring" and it's one of the best skills a developer can possess. Googling "refactoring php" will bring up a few articles. I also saw that the June 2006 issue of php|a has an article on refactoring your procedural code (functions) into object-oriented code (classes/objects). I haven't read it though so I can't comment on how good it is or easy to understand but here's a link to get it: http://www.phparch.com/issue.php?mid=82 Later, Rob From rmarscher at beaffinitive.com Thu Jun 14 00:42:03 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Thu, 14 Jun 2007 00:42:03 -0400 Subject: [nycphp-talk] problem: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> References: <6.2.3.4.2.20070613212541.0287a138@mail.optonline.net> Message-ID: <6FA547C8-B971-4534-8F07-9C8914E72FC3@beaffinitive.com> On Jun 13, 2007, at 9:29 PM, Michael Southwell wrote: > But (for those two people, and only for them) when we get to > the thanks page, the session information is somehow lost in the course > of the redirection, and so the email is sent with blank information. Are you using the default php session handler? I was just reading a thread in Zend Framework discussion where they were suggesting that with a custom db session handler, it could be possible for a read of the session to happen (mainly in an ajax based app) before the previous request finished writing it. That doesn't make sense though with how this would only ever happen to two specific users. That definitely sounds like a browser/os issue. Unless there is something specific about data for these users that causes it to not get written properly. Is their entire session data cleared out? Or only what was written by that form submission? I actually was troubleshooting a session issue that I had with a user on one of our sites and it turned out that his OS time was set far enough in the future that it was causing the session cookie be immediately expired . I could only reproduce that on IE/Windows though... Firefox seemed to figure it out. I know this is the easy way out... but if you're writing the form data to a database, you could just read it from the database on the "Thanks" page instead. -Rob From 1j0lkq002 at sneakemail.com Thu Jun 14 01:26:34 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 13 Jun 2007 22:26:34 -0700 Subject: [nycphp-talk] All In the Game of PHP In-Reply-To: <002101c7add4$b21a2b80$164e8280$@com> References: <002101c7add4$b21a2b80$164e8280$@com> Message-ID: <26355-32802@sneakemail.com> Caution: I am not a good coder. That said.... Peter Sawczynec ps-at-sun-code.com |nyphp dev/internal group use| wrote: >The number one muck up I have observed in coding, is programmers >creating functions or tools that leave off the final "else" clause at >the >end of a conditional logic tree. > The first thing I define when I create a control flow structure is the default condition. Set it up with the test and empty brackets, set the default action, and then go back to fill it in. >Every function you write, every tool you develop has to be prepared to >accept and deal with wrong information or input out of your expected >bounds. > A strict default action can go a long way towards letting you code what you need now to make progress, while leaving the rest for later. I see too many coders take all day to try and accommodate everything when all we needed was A and B (for now). Code the default case. Protect against anything that is not what is expected for A and B, then code A and B and move on. Sure it will fail for tons of situations, but it will never let you down for A or B (and that is what I asked for ;-) -=john -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From cliff at pinestream.com Thu Jun 14 16:00:10 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 14 Jun 2007 16:00:10 -0400 Subject: [nycphp-talk] Filter extension problems Message-ID: I am getting the following error message: Call to undefined function: filter_var() in.... I?m using XAMPP V1.5.5, PHP V5.1.6. My server check says that the filter extension is installed. Any thoughts? Anyone using the filter extension with this version on Xampp/PHP? Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Thu Jun 14 20:41:39 2007 From: chsnyder at gmail.com (csnyder) Date: Thu, 14 Jun 2007 20:41:39 -0400 Subject: [nycphp-talk] Form PRG revisited -- again In-Reply-To: References: Message-ID: On 6/12/07, Cliff Hirsch wrote: > > I have been testing the Form PRG pattern, and really like the way it acts > on the user side. The back button and resubmit/reload button behave so much > nicer, versus those ugly POSTDATA messages. But it is a bear to implement, > unless I'm missing something as usual. Thread is a few days old, but hopefully not moldy yet.... The pattern I use goes something like: load request subject define form (allowed values, expected types) if POST, get form values from POST (validating/filtering on the way) else get default form values from subject if POST and no validation errors { use form values to update subject redirect 303 to subject view } render form (with any errors marked) I hope that's clear enough. It's not a bear to implement, but it helps to have a smart class for defining, validating, and rendering form values. Pear's HTML Form was the model for mine. I always think of unsuccessful posts as "falling through" the validation logic, so the form can be shown again. The only thing that breaks between successive unsuccessful form submissions is uploaded files. -- Chris Snyder http://chxo.com/ From michael.southwell at nyphp.com Thu Jun 14 20:58:58 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Thu, 14 Jun 2007 20:58:58 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection Message-ID: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> Rolan Yang, David Krings, and Paul Jones all suggested that the problem might be caused by users who weren't accepting cookies (and for whom the session id therefore needed to be passed as a $_GET variable); they were right. As soon as I fixed the redirect to include that, the problems went away. Thanks, guys, and everybody else who responded. Michael Southwell, Vice President for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From cliff at pinestream.com Thu Jun 14 21:09:34 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 14 Jun 2007 21:09:34 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> Message-ID: On 6/14/07 8:58 PM, "Michael Southwell" wrote: > Rolan Yang, David Krings, and Paul Jones all suggested that the > problem might be caused by users who weren't accepting cookies (and > for whom the session id therefore needed to be passed as a $_GET > variable); they were right. As soon as I fixed the redirect to > include that, the problems went away. Thanks, guys, and everybody > else who responded. > > Michael Southwell, Vice President for Education > New York PHP > http://www.nyphp.com/training - In-depth PHP Training Courses Just remember, its a balancing act between usability and security. By including the session id in the URL, you are exposing it, allowing it to be bookmarked, forwarded, etc. I'm sure Chris or Chris could provide far more insight. From shiflett at php.net Thu Jun 14 21:14:22 2007 From: shiflett at php.net (Chris Shiflett) Date: Thu, 14 Jun 2007 21:14:22 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> References: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> Message-ID: <4671E7EE.50107@php.net> Michael Southwell wrote: > Rolan Yang, David Krings, and Paul Jones all suggested that the problem > might be caused by users who weren't accepting cookies (and for whom the > session id therefore needed to be passed as a $_GET variable); they were > right. As soon as I fixed the redirect to include that, the problems > went away. I'd still be interested in seeing where you set the Location header, because it's possible you're not addressing the root cause of the problem. Chris -- Chris Shiflett http://shiflett.org/ From michael.southwell at nyphp.com Thu Jun 14 21:44:30 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Thu, 14 Jun 2007 21:44:30 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection In-Reply-To: <4671E7EE.50107@php.net> References: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> <4671E7EE.50107@php.net> Message-ID: <6.2.3.4.2.20070614213650.02954ff8@pop.nyphp.com> At 09:14 PM 6/14/2007, you wrote: >I'd still be interested in seeing where you set the Location header, >because it's possible you're not addressing the root cause of the problem. Here it is; comments/criticism/suggestions welcome: // get it at the very beginning just so I have it, regardless of cookies list( $label, $id ) = explode( '=', SID ); $_SESSION['id'] = $id; ....... // test input ....... // passed all tests, redirect to thanks, pay now (non-working one ended after $joinFlag) header( "Location: http://example.com/membership.php?action=pay_internet&join=$joinFlag&PHPSESSID={$_SESSION['id']}" ); Michael Southwell, Vice President for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From rolan at omnistep.com Thu Jun 14 21:56:49 2007 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 14 Jun 2007 21:56:49 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection In-Reply-To: <6.2.3.4.2.20070614213650.02954ff8@pop.nyphp.com> References: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> <4671E7EE.50107@php.net> <6.2.3.4.2.20070614213650.02954ff8@pop.nyphp.com> Message-ID: <4671F1E1.8000009@omnistep.com> Michael Southwell wrote: > > Here it is; comments/criticism/suggestions welcome: > > // get it at the very beginning just so I have it, regardless of cookies > list( $label, $id ) = explode( '=', SID ); > $_SESSION['id'] = $id; > ....... > // test input > ....... > // passed all tests, redirect to thanks, pay now (non-working one > ended after $joinFlag) > header( "Location: > http://example.com/membership.php?action=pay_internet&join=$joinFlag&PHPSESSID={$_SESSION['id']}" > ); > > This should suffice header( "Location: http://example.com/membership.php?action=pay_internet&join=$joinFlag&".SID ); From michael.southwell at nyphp.com Thu Jun 14 22:16:47 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Thu, 14 Jun 2007 22:16:47 -0400 Subject: [nycphp-talk] problem SOLVED: session variables disappear after redirection In-Reply-To: <4671F1E1.8000009@omnistep.com> References: <6.2.3.4.2.20070614205520.0292ae00@mail.optonline.net> <4671E7EE.50107@php.net> <6.2.3.4.2.20070614213650.02954ff8@pop.nyphp.com> <4671F1E1.8000009@omnistep.com> Message-ID: <6.2.3.4.2.20070614221017.028c08f0@pop.nyphp.com> At 09:56 PM 6/14/2007, you wrote: header( "Location: http://example.com/membership.php?action=pay_internet&join=$joinFlag&PHPSESSID={$_SESSION['id']}" ); >This should suffice > >header( "Location: >http://example.com/membership.php?action=pay_internet&join=$joinFlag&".SID ); I knew that, but I wanted to be able to see it myself. SID is empty if cookies are working, so the header doesn't really need it for those people; and SID is set when cookies are disabled, so the header will have it for them. But I felt a little more comfortable actually seeing it, especially during testing. I could also have used session_id() but you had gotten me started down the SID trail, so I stayed there ;-). >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/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 for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From cliff at pinestream.com Fri Jun 15 13:36:15 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 15 Jun 2007 13:36:15 -0400 Subject: [nycphp-talk] Form PRG revisited -- again In-Reply-To: Message-ID: > The pattern I use goes something like: > > load request subject > define form (allowed values, expected types) > if POST, get form values from POST (validating/filtering on the way) > else get default form values from subject > if POST and no validation errors { > use form values to update subject > redirect 303 to subject view > } > render form (with any errors marked) > > I hope that's clear enough. It's not a bear to implement, but it helps > to have a smart class for defining, validating, and rendering form > values. Pear's HTML Form was the model for mine. Interesting. This indicates that you are not doing a redirect to display form errors, or are you? To eliminate the back/reload problem, shouldn't all views be redirected after a post, whether a success or error? I have a fairly smart form class, but drop out of it to cascade through varying levels of validation beyond input checking...database queries, password comparisons, product stock checks, DNA testing, political affiliation, etc. It sounds like anything that can cause the form to be redisplayed should be considered a form error and pulled into the form validation routine -- probably best done with a callback. Right? I still like the idea of saving a post to a session and immediately redirecting. Its global is scope, which can be scary, and I haven't tested it yet -- weekend project, but that's the beauty. Here's what I'm thinking again, for those that fell asleep the first time: // PRG FORM PATTERN AT TOP OF CONTROLLER // ERROR CHECKNIG TO BE ADDED if ($_SERVER['REQUEST_METHOD'] = 'post) { // Store post submission, then redirect $_SESSION['post'] = array('post' => $_POST, 'time' => now(), 'uri' => $_SERVER[' REQUEST_URI']); 303 redirect to same URI } elseif ($_SESSION['post']['uri'] == $_SERVER['REQUEST_URI'] && now() < $_SESSION['post']['time']+a few seconds) { // Retrieve post session using get method. Makes the assumption that // this get resulted from the redirect above. Why wouldn't it? $_POST[] = $_SESSION['post']['post']; unset($_SESSION['post']); // continue on our merry way as if this were a post submission // Everything should look like a post except $_SERVER['REQUEST_METHOD'] } else { // Flush session post variables, if necessary unset($_SESSION['post']); } Thought process: 1. A rendered form with errors will drop through with only the first redirect -- perfect 2. A success form will drop through with only the first redirect -- perfect 3. An existing form that already has a success redirect will drop through with one extra redirect step -- not a big deal, unless its really prevalent. From ben at projectskyline.com Fri Jun 15 13:43:58 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Fri, 15 Jun 2007 13:43:58 -0400 Subject: [nycphp-talk] E-Commerce Freelances Message-ID: <03c201c7af74$c167a210$6b01a8c0@gamebox> Hello, I realize there is a PHP Job list, but I dont' know anyone on it, nor do I subscribe to it. In hopes of getting some valid responses, I decided to post here first. I run a small web dev shop and I'm looking for someone with e-commerce experiance to aid in some future work. This is a paying project based position. Email me off list to get more information. Thanks. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at adcl.biz Fri Jun 15 13:48:41 2007 From: anthony at adcl.biz (Anthony) Date: Fri, 15 Jun 2007 12:48:41 -0500 Subject: [nycphp-talk] E-Commerce Freelances References: <03c201c7af74$c167a210$6b01a8c0@gamebox> Message-ID: <000d01c7af75$699a1ad0$6501a8c0@ADCL1> Hi Ben, I'm interested in knowing more and I've got a ton of e-commerce and PHP experience. Can you tell me more about the positions or contracts you ned help with? Thanks, Anthony ----- Original Message ----- From: Ben Sgro (ProjectSkyline) To: NYPHP Talk Sent: Friday, June 15, 2007 12:43 PM Subject: [nycphp-talk] E-Commerce Freelances Hello, I realize there is a PHP Job list, but I dont' know anyone on it, nor do I subscribe to it. In hopes of getting some valid responses, I decided to post here first. I run a small web dev shop and I'm looking for someone with e-commerce experiance to aid in some future work. This is a paying project based position. Email me off list to get more information. Thanks. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 anthony at adcl.biz Fri Jun 15 13:50:10 2007 From: anthony at adcl.biz (Anthony) Date: Fri, 15 Jun 2007 12:50:10 -0500 Subject: [nycphp-talk] Sorry Message-ID: <002401c7af75$9ebbf120$6501a8c0@ADCL1> Accidentally sent a private email down the public list. My apologies. Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Fri Jun 15 13:51:55 2007 From: shiflett at php.net (Chris Shiflett) Date: Fri, 15 Jun 2007 13:51:55 -0400 Subject: [nycphp-talk] Sorry In-Reply-To: <002401c7af75$9ebbf120$6501a8c0@ADCL1> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> Message-ID: <4672D1BB.5050609@php.net> Anthony wrote: > Accidentally sent a private email down the public list. My > apologies. No worries. It's our fault, not yours. Reply should work correctly. Chris -- Chris Shiflett http://shiflett.org/ From chsnyder at gmail.com Fri Jun 15 14:29:29 2007 From: chsnyder at gmail.com (csnyder) Date: Fri, 15 Jun 2007 14:29:29 -0400 Subject: [nycphp-talk] Form PRG revisited -- again In-Reply-To: References: Message-ID: On 6/15/07, Cliff Hirsch wrote: > Interesting. This indicates that you are not doing a redirect to display > form errors, or are you? To eliminate the back/reload problem, shouldn't all > views be redirected after a post, whether a success or error? I'm not sure that you have a back/reload problem. Since the POST didn't actually change anything, it's more like a GET. The user can hit reload as much as she wants, the form still won't be submitted. In the case I mentioned where file upload is lost, I have found myself taking advantage of the back button so that I can fix the values and resubmit without having to browse for the file again. -- Chris Snyder http://chxo.com/ From cliff at pinestream.com Fri Jun 15 14:35:14 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 15 Jun 2007 14:35:14 -0400 Subject: [nycphp-talk] Form PRG revisited -- again In-Reply-To: Message-ID: >> Interesting. This indicates that you are not doing a redirect to display >> form errors, or are you? To eliminate the back/reload problem, shouldn't all >> views be redirected after a post, whether a success or error? > > I'm not sure that you have a back/reload problem. Since the POST > didn't actually change anything, it's more like a GET. The user can > hit reload as much as she wants, the form still won't be submitted. In this case, submission isn't the issue. It's just that annoying message that pop up when you use the reload button on a post. I bet 9 out of ten people don't really know what it means. > In the case I mentioned where file upload is lost, I have found myself > taking advantage of the back button so that I can fix the values and > resubmit without having to browse for the file again. This is a good case where the back button makes a lot of sense. From ashaw at polymerdb.org Fri Jun 15 15:41:52 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 15 Jun 2007 14:41:52 -0500 Subject: [nycphp-talk] Sorry In-Reply-To: <4672D1BB.5050609@php.net> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> Message-ID: <4672EB80.3030509@polymerdb.org> Chris Shiflett wrote: > Reply should work correctly. Actually, I like the fact that Reply goes to the list. Usually if I'm replying I want it to go to the group, and it kind of seems like that's how a group should work: by default you send to the group, and sending off-list is a special case (which is why people actually specify "contact me off-list" if that's what they want). It's really frustrating to post to a list and then find out it only went to the OP. I hope nobody's trying to change this list to work like that. - Allen -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From ashaw at polymerdb.org Fri Jun 15 15:42:09 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 15 Jun 2007 14:42:09 -0500 Subject: [nycphp-talk] Sorry In-Reply-To: <4672D1BB.5050609@php.net> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> Message-ID: <4672EB91.5090601@polymerdb.org> Chris Shiflett wrote: > Reply should work correctly. Actually, I like the fact that Reply goes to the list. Usually if I'm replying I want it to go to the group, and it kind of seems like that's how a group should work: by default you send to the group, and sending off-list is a special case (which is why people actually specify "contact me off-list" if that's what they want). It's really frustrating to post to a list and then find out it only went to the OP. I hope nobody's trying to change this list to work like that. - Allen -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From agfische at email.smith.edu Fri Jun 15 15:51:36 2007 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 15 Jun 2007 15:51:36 -0400 Subject: [nycphp-talk] Sorry In-Reply-To: <4672EB80.3030509@polymerdb.org> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> <4672EB80.3030509@polymerdb.org> Message-ID: +1. All of the lists that I am on (except one) have the reply set to go to the list. The one list that sends replies to the person who posts is annoying and (to me) does not seem to be a logical process. -Aaron On Jun 15, 2007, at 3:41 PM, Allen Shaw wrote: > Actually, I like the fact that Reply goes to the list. Usually if > I'm replying I want it to go to the group, and it kind of seems > like that's how a group should work: by default you send to the > group, and sending off-list is a special case (which is why people > actually specify "contact me off-list" if that's what they want). From chsnyder at gmail.com Fri Jun 15 15:52:26 2007 From: chsnyder at gmail.com (csnyder) Date: Fri, 15 Jun 2007 15:52:26 -0400 Subject: [nycphp-talk] Sorry In-Reply-To: <4672EB80.3030509@polymerdb.org> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> <4672EB80.3030509@polymerdb.org> Message-ID: On 6/15/07, Allen Shaw wrote: > I hope nobody's trying to change this list to work like that. Nope. Others appreciate this behavior as well. -- Chris Snyder http://chxo.com/ From lists at enobrev.com Fri Jun 15 17:45:29 2007 From: lists at enobrev.com (Mark Armendariz) Date: Fri, 15 Jun 2007 16:45:29 -0500 Subject: [nycphp-talk] Sorry In-Reply-To: References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> <4672EB80.3030509@polymerdb.org> Message-ID: <58f08dcf0706151445u3eb3e2cao27d7096acaff5598@mail.gmail.com> On 6/15/07, Aaron Fischer wrote: > All of the lists that I am on (except one) have the reply set to go > to the list. The one list that sends replies to the person who posts > is annoying and (to me) does not seem to be a logical process. > I definitely feel that "Reply" should go to sender and "Reply To All" to group as that seems to be the way it's _supposed_ to work, but I'm a fan of replying to the group as a default as well. I'm on lists that work otherwise, and reply-to-group as a default seems to promote conversation, which, it seems, is the point. Considering our general place of business (the internet), if the world used things as they were built, we'd all be out of a job and hence wouldn't have very much to talk about here. Mark From ramons at gmx.net Fri Jun 15 17:49:04 2007 From: ramons at gmx.net (David Krings) Date: Fri, 15 Jun 2007 17:49:04 -0400 Subject: [nycphp-talk] Sorry In-Reply-To: References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> <4672EB80.3030509@polymerdb.org> Message-ID: <46730950.7040504@gmx.net> Aaron Fischer wrote: > +1. > > All of the lists that I am on (except one) have the reply set to go to > the list. The one list that sends replies to the person who posts is > annoying and (to me) does not seem to be a logical process. > > -Aaron > +1 as well. The worst solution is the MUG list I am on. The reply goes to a "no-reply" address. You think you posted and five hours later you get a bouncer back. David From cliff at pinestream.com Fri Jun 15 20:21:51 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 15 Jun 2007 20:21:51 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" Message-ID: When redirecting from a secure login page to a non-secure page after logging in, Internet Explore pops up the following security alert: ?You are about to be redirected to a connection that is not secure" Doe anyone know how to prevent this? Cliff From ashaw at polymerdb.org Sat Jun 16 00:00:28 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 15 Jun 2007 23:00:28 -0500 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: References: Message-ID: <4673605C.4070708@polymerdb.org> Cliff Hirsch wrote: > When redirecting from a secure login page to a non-secure page after logging > in, Internet Explore pops up the following security alert: > > ?You are about to be redirected to a connection that is not secure" > > Doe anyone know how to prevent this? > Hi Cliff, I'm pretty sure this is a client/user preference issue. You can turn it off in IE as a user, but from the server side, I think you're just stuck with it. Best you can do is explain it to your users. - Allen -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From cliff at pinestream.com Sat Jun 16 08:24:01 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Sat, 16 Jun 2007 08:24:01 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: <4673605C.4070708@polymerdb.org> Message-ID: On 6/16/07 12:00 AM, "Allen Shaw" wrote: > Cliff Hirsch wrote: >> When redirecting from a secure login page to a non-secure page after logging >> in, Internet Explore pops up the following security alert: >> >> ?You are about to be redirected to a connection that is not secure" >> >> Doe anyone know how to prevent this? >> > Hi Cliff, > > I'm pretty sure this is a client/user preference issue. You can turn it > off in IE as a user, but from the server side, I think you're just stuck > with it. Best you can do is explain it to your users. > > - Allen But I just tried logging into Hotmail using IE and SSL. After login, it redirects to a non-secure page without the warning. So they figured out how to get around the bug, Could they be doing a double redirect? First redirect to a secure page, which does an immediate client-side redirect to a non-secure page? Poking around I've seen some proposed solutions the use the http header 400 response code and also a meta refresh tag. From cliff at pinestream.com Sat Jun 16 10:38:26 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Sat, 16 Jun 2007 10:38:26 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: Message-ID: On 6/16/07 8:24 AM, "Cliff Hirsch" wrote: > On 6/16/07 12:00 AM, "Allen Shaw" wrote: > >> Cliff Hirsch wrote: >>> When redirecting from a secure login page to a non-secure page after logging >>> in, Internet Explore pops up the following security alert: >>> >>> ?You are about to be redirected to a connection that is not secure" >>> >>> Doe anyone know how to prevent this? I found an ASP fix: http://www.codeproject.com/useritems/switchprotocol.asp Implement Tranz.aspx, which takes care of the script-block redirect: <%@ Page Language="C#" Theme="" %> Don't know what this does. Anyone have a PHP equivalent? From dirn at dirnonline.com Sat Jun 16 12:15:56 2007 From: dirn at dirnonline.com (Andy Dirnberger) Date: Sat, 16 Jun 2007 12:15:56 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: References: Message-ID: <002601c7b031$9f0cf0e0$dd26d2a0$@com> It looks like all the C# does is decode the URL of the page to which you want to redirect. The page then uses JavaScript (window.location.replace) to actually handle the redirect. You should be able to accomplish this with something like: -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Cliff Hirsch Sent: Saturday, June 16, 2007 10:38 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" On 6/16/07 8:24 AM, "Cliff Hirsch" wrote: > On 6/16/07 12:00 AM, "Allen Shaw" wrote: > >> Cliff Hirsch wrote: >>> When redirecting from a secure login page to a non-secure page after logging >>> in, Internet Explore pops up the following security alert: >>> >>> ?You are about to be redirected to a connection that is not secure" >>> >>> Doe anyone know how to prevent this? I found an ASP fix: http://www.codeproject.com/useritems/switchprotocol.asp Implement Tranz.aspx, which takes care of the script-block redirect: <%@ Page Language="C#" Theme="" %> Don't know what this does. Anyone have a PHP equivalent? _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 cliff at pinestream.com Sat Jun 16 12:42:27 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Sat, 16 Jun 2007 12:42:27 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: <002601c7b031$9f0cf0e0$dd26d2a0$@com> Message-ID: On 6/16/07 12:15 PM, "Andy Dirnberger" wrote: > It looks like all the C# does is decode the URL of the page to which you > want to redirect. The page then uses JavaScript (window.location.replace) > to actually handle the redirect. > > You should be able to accomplish this with something like: > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > $to = urldecode ($_GET ['to']); > ?> > > > > > > > Andy: Awesome! Seems simple now that you "decoded" it. When I first saw the foreign language, it looked like gibberish. Cliff From cliff at pinestream.com Sat Jun 16 13:06:04 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Sat, 16 Jun 2007 13:06:04 -0400 Subject: [nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure" In-Reply-To: <002601c7b031$9f0cf0e0$dd26d2a0$@com> Message-ID: On 6/16/07 12:15 PM, "Andy Dirnberger" wrote: > It looks like all the C# does is decode the URL of the page to which you > want to redirect. The page then uses JavaScript (window.location.replace) > to actually handle the redirect. > > You should be able to accomplish this with something like: > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > $to = urldecode ($_GET ['to']); > ?> > > > > > > > I finally analyzed the Yahoo login, and the above solution is very similar. Here's how Yahoo does it -- very nice, multiple levels of fallback. The page below is still https, so you don't get the IE https -> http warning. If you are seeing this page, your browser settings prevent you from automatically redirecting to a new URL.

Please click here to continue. From 1j0lkq002 at sneakemail.com Sat Jun 16 18:02:30 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 16 Jun 2007 15:02:30 -0700 Subject: [nycphp-talk] Sorry In-Reply-To: <46730950.7040504@gmx.net> References: <002401c7af75$9ebbf120$6501a8c0@ADCL1> <4672D1BB.5050609@php.net> <4672EB80.3030509@polymerdb.org> <46730950.7040504@gmx.net> Message-ID: <21612-95860@sneakemail.com> David Krings ramons-at-gmx.net |nyphp dev/internal group use| wrote: > Aaron Fischer wrote: > >> +1. >> >> All of the lists that I am on (except one) have the reply set to go >> to the list. The one list that sends replies to the person who posts >> is annoying and (to me) does not seem to be a logical process. >> >> -Aaron >> > > +1 as well. The worst solution is the MUG list I am on. The reply goes > to a "no-reply" address. You think you posted and five hours later you > get a bouncer back. > > David Well now that sends a pretty clear message about how much they value discussion, right? From mikesz at qualityadvantages.com Sat Jun 16 23:53:29 2007 From: mikesz at qualityadvantages.com (mikesz at qualityadvantages.com) Date: Sun, 17 Jun 2007 11:53:29 +0800 Subject: [nycphp-talk] Sessions / Cookie question Message-ID: <4674B039.9080903@qualityadvantages.com> Hello and greetings, I have an application I am working on and I have a question about session timeout and its relationship to the cookie that is set when the member logs into their account. The time out code drops the session and logs a timestamp in the database to indicate when the user was last logged in. That's all fine. The expectation is that if the member comes back after the time out, then they would be required to login again but the login code does a check for an active cookie and not a session and allows the user to access the site apparently creating a new session. I hope this explanation is clear enough for someone to give me some ideas about how to go about solving this. As far as I can see, the session timeout code is only looking at a time stamp in the database to drop the session. How do I get it to reset the cookie at the same time. I was thinking that add a conditional to test for an active cookie on the login but that doesn't cover all the bases like if the member just went to their CP or some other feature directly. Most of the pages only require an active cookie for authorization. Any Ideas greatly appreciated. thanks, mikesz From rolan at omnistep.com Sun Jun 17 08:36:14 2007 From: rolan at omnistep.com (Rolan Yang) Date: Sun, 17 Jun 2007 08:36:14 -0400 Subject: [nycphp-talk] Sessions / Cookie question In-Reply-To: <4674B039.9080903@qualityadvantages.com> References: <4674B039.9080903@qualityadvantages.com> Message-ID: <46752ABE.3060801@omnistep.com> mikesz at qualityadvantages.com wrote: > ... The expectation is that if the member comes back after the time > out, then they would be required to login again but the login code > does a check for an active cookie and not a session and allows the > user to access the site apparently creating a new session. > > I hope this explanation is clear enough for someone to give me some > ideas about how to go about solving this. ... > If you're using sessions, there's no need for the cookie. If you must, try setting the timeout value of your cookie to the same amount as the timeout for the PHP sesssion id. Example: setcookie('somesessionid','MrX-a8g238goenrgarPassHash',time()+60*30); The example above sets a cookie to expire after (current time + 60 seconds * 30 minutes). The cookie expires at the designated absolute time and may fail if the user has the time/date on their computer set incorrectly. ~Rolan From ben at projectskyline.com Sun Jun 17 19:48:17 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Sun, 17 Jun 2007 19:48:17 -0400 Subject: [nycphp-talk] Going rates: Message-ID: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Hello All, Hope all the fathers are having a nice day today. Lately, I've been really getting into the cost structure and finicial forces at work within my company. While attempting to refine our overhead cost calculations, I've begun to break up jobs by the time spent doing one of many tasks: Information Architecture - Creating the database, flowcharting, high and low level details. Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. User Interface Creation - Designing the UI and Wireframes. Programming - Heads down coding. Testing - Q/A Deployment - Pushing the site live. Support - After the site is live ... this is everying EXCEPT fixing bugs (we don't charge for that!). I'm trying to find the "going-rates" for such activities. Is there a standard right now, or a place to find this information online. Thanks. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshmccormack at travelersdiary.com Sun Jun 17 19:57:03 2007 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Sun, 17 Jun 2007 18:57:03 -0500 Subject: [nycphp-talk] Going rates: In-Reply-To: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Message-ID: I've spent a lot of time at various agencies pricing, and I currently run my own web testing and development company. I'd be happy to talk to you about pricing and estimating timing and all that, if you'd like. Josh -- Josh McCormack Owner, InteractiveQA Web testing & development http://www.interactiveqa.com 917.620.4902 On 6/17/07, Ben Sgro (ProjectSkyline) wrote: > > Hello All, > > Hope all the fathers are having a nice day today. > > Lately, I've been really getting into the cost structure and finicial forces > at work within my company. > > While attempting to refine our overhead cost calculations, I've begun to > break up jobs > by the time spent doing one of many tasks: > > Information Architecture - Creating the database, flowcharting, high and low > level details. > Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. > User Interface Creation - Designing the UI and Wireframes. > Programming - Heads down coding. > Testing - Q/A > Deployment - Pushing the site live. > Support - After the site is live ... this is everying EXCEPT fixing bugs (we > don't charge for that!). > > I'm trying to find the "going-rates" for such activities. Is there a > standard right now, > or a place to find this information online. > > Thanks. > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 Sun Jun 17 21:48:50 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Sun, 17 Jun 2007 21:48:50 -0400 Subject: [nycphp-talk] Going rates: References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Message-ID: <004401c7b14a$d21905e0$6b01a8c0@gamebox> Hello Josh, That sounds good. I'm still curious if there is an online resource that publishes technical disciplines and their going rates. Feel free to contact me off list. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: "Josh McCormack" To: "NYPHP Talk" Sent: Sunday, June 17, 2007 7:57 PM Subject: Re: [nycphp-talk] Going rates: > I've spent a lot of time at various agencies pricing, and I currently > run my own web testing and development company. I'd be happy to talk > to you about pricing and estimating timing and all that, if you'd > like. > > Josh > > -- > Josh McCormack > Owner, InteractiveQA > Web testing & development > http://www.interactiveqa.com > 917.620.4902 > > On 6/17/07, Ben Sgro (ProjectSkyline) wrote: >> >> Hello All, >> >> Hope all the fathers are having a nice day today. >> >> Lately, I've been really getting into the cost structure and finicial >> forces >> at work within my company. >> >> While attempting to refine our overhead cost calculations, I've begun to >> break up jobs >> by the time spent doing one of many tasks: >> >> Information Architecture - Creating the database, flowcharting, high and >> low >> level details. >> Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. >> User Interface Creation - Designing the UI and Wireframes. >> Programming - Heads down coding. >> Testing - Q/A >> Deployment - Pushing the site live. >> Support - After the site is live ... this is everying EXCEPT fixing bugs >> (we >> don't charge for that!). >> >> I'm trying to find the "going-rates" for such activities. Is there a >> standard right now, >> or a place to find this information online. >> >> Thanks. >> >> - Ben >> >> Ben Sgro, Chief Engineer >> ProjectSkyLine - Defining New Horizons >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/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 greg.rundlett at gmail.com Sun Jun 17 22:19:22 2007 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Sun, 17 Jun 2007 22:19:22 -0400 Subject: [nycphp-talk] Going rates: In-Reply-To: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Message-ID: <5e2aaca40706171919x76e1edb8r13f0b8e1802b6d3@mail.gmail.com> On 6/17/07, Ben Sgro (ProjectSkyline) wrote: > > > Hello All, > > Hope all the fathers are having a nice day today. > > Lately, I've been really getting into the cost structure and finicial forces > at work within my company. > > While attempting to refine our overhead cost calculations, I've begun to > break up jobs > by the time spent doing one of many tasks: > > Information Architecture - Creating the database, flowcharting, high and low > level details. > Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. > User Interface Creation - Designing the UI and Wireframes. > Programming - Heads down coding. > Testing - Q/A > Deployment - Pushing the site live. > Support - After the site is live ... this is everying EXCEPT fixing bugs (we > don't charge for that!). > > I'm trying to find the "going-rates" for such activities. Is there a > standard right now, > or a place to find this information online. Aside from all the usual suspects like Dice, Monster and Craigslist for searching for salary and rate info, I've always used www.salary.com www.realrates.com > > Thanks. > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? From ben at projectskyline.com Sun Jun 17 22:33:23 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Sun, 17 Jun 2007 22:33:23 -0400 Subject: [nycphp-talk] Going rates: References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> <5e2aaca40706171919x76e1edb8r13f0b8e1802b6d3@mail.gmail.com> Message-ID: <005001c7b151$0b8436f0$6b01a8c0@gamebox> Hello Greg, Thanks: The data on salary.com is great ... I can see what the medium salary is for said jobs. Even better would be a site that lists the per/hour rate of said jobs. Thanks again. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidential information intended only for the use of the individual to whom it is addressed. ----- Original Message ----- From: "Greg Rundlett" To: "NYPHP Talk" Sent: Sunday, June 17, 2007 10:19 PM Subject: Re: [nycphp-talk] Going rates: > On 6/17/07, Ben Sgro (ProjectSkyline) wrote: >> >> >> Hello All, >> >> Hope all the fathers are having a nice day today. >> >> Lately, I've been really getting into the cost structure and finicial >> forces >> at work within my company. >> >> While attempting to refine our overhead cost calculations, I've begun to >> break up jobs >> by the time spent doing one of many tasks: >> >> Information Architecture - Creating the database, flowcharting, high and >> low >> level details. >> Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. >> User Interface Creation - Designing the UI and Wireframes. >> Programming - Heads down coding. >> Testing - Q/A >> Deployment - Pushing the site live. >> Support - After the site is live ... this is everying EXCEPT fixing bugs >> (we >> don't charge for that!). >> >> I'm trying to find the "going-rates" for such activities. Is there a >> standard right now, >> or a place to find this information online. > > Aside from all the usual suspects like Dice, Monster and Craigslist > for searching for salary and rate info, I've always used > www.salary.com > www.realrates.com > > >> >> Thanks. >> >> - Ben >> >> Ben Sgro, Chief Engineer >> ProjectSkyLine - Defining New Horizons >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > > -- > A: Yes. >> Q: Are you sure? >>> A: Because it reverses the logical flow of conversation. >>>> Q: Why is top posting annoying in email? > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From patrick at hexane.org Sun Jun 17 23:57:23 2007 From: patrick at hexane.org (Patrick May) Date: Sun, 17 Jun 2007 23:57:23 -0400 Subject: [nycphp-talk] Going rates: In-Reply-To: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Message-ID: <26F13974-6E82-4CE7-85E1-35179DB8104D@hexane.org> It's listed in yearly salary, but still: http://www.labor.state.ny.us/workforceindustrydata/uiwages.shtm Cheers, Patrick On Jun 17, 2007, at 7:48 PM, Ben Sgro ((ProjectSkyline)) wrote: > Hello All, > > Hope all the fathers are having a nice day today. > > Lately, I've been really getting into the cost structure and > finicial forces at work within my company. > > While attempting to refine our overhead cost calculations, I've > begun to break up jobs > by the time spent doing one of many tasks: > > Information Architecture - Creating the database, flowcharting, > high and low level details. > Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. > User Interface Creation - Designing the UI and Wireframes. > Programming - Heads down coding. > Testing - Q/A > Deployment - Pushing the site live. > Support - After the site is live ... this is everying EXCEPT fixing > bugs (we don't charge for that!). > > I'm trying to find the "going-rates" for such activities. Is there > a standard right now, > or a place to find this information online. > > Thanks. > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 adcl.biz Mon Jun 18 06:20:44 2007 From: anthony at adcl.biz (Anthony) Date: Mon, 18 Jun 2007 05:20:44 -0500 Subject: [nycphp-talk] Going rates: References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> Message-ID: <001501c7b192$54ad65e0$6501a8c0@ADCL1> Hi Ben, I think the "going rate" largely depends on where you're getting your talent from and where they are going to work from. People who live and/or work in NYC or the tri-state area are going to cost a little more than, say, someone like me who works and lives in the midwest. Since our cost of living and dowing business is substantially lower than many other parts of the country, our rates are going to be a lot lower too - and still be considered good by our, midwestern, standards. I think that's why there is a new focus on "insourcing" or "outsourcing within US borders but in lower cost areas". So, if you're wanting to reduce costs, start by looking at where the generators of your primary costs are and see how you can reduce that. I can guarantee that you can get the same level of talent, the same level of performance, at much lower rates WITHOUT having to leave the USA. Hope this helps, Anthony ----- Original Message ----- From: Ben Sgro (ProjectSkyline) To: NYPHP Talk Sent: Sunday, June 17, 2007 6:48 PM Subject: [nycphp-talk] Going rates: Hello All, Hope all the fathers are having a nice day today. Lately, I've been really getting into the cost structure and finicial forces at work within my company. While attempting to refine our overhead cost calculations, I've begun to break up jobs by the time spent doing one of many tasks: Information Architecture - Creating the database, flowcharting, high and low level details. Graphic Design - Creating the actual graphics, .pngs, .gifs, etc. User Interface Creation - Designing the UI and Wireframes. Programming - Heads down coding. Testing - Q/A Deployment - Pushing the site live. Support - After the site is live ... this is everying EXCEPT fixing bugs (we don't charge for that!). I'm trying to find the "going-rates" for such activities. Is there a standard right now, or a place to find this information online. Thanks. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 ramons at gmx.net Mon Jun 18 11:11:56 2007 From: ramons at gmx.net (David Krings) Date: Mon, 18 Jun 2007 11:11:56 -0400 Subject: [nycphp-talk] filewhatevertime for Windows folder Message-ID: <4676A0BC.3090506@gmx.net> Hi! I want to do some housekeeping and wipe a bunch of folders of a drive that were not used in the past 24 hours. I get the current timestamp, subtract the seconds for a day, and then use fileatime of the folder to make a determination. To my surprise, the fileatime appears to be always more recent than the timestamp from 24 hours ago, which means that none of the folders get whacked, although they are four of five days old. Is it better to use filemtime? Or something totally different? The script will run exclusively against a file server running Windows, which probably makes a difference. Any advice? I really don't want to track file access of my system in a database table or such. David From pyurt at yahoo.com Mon Jun 18 15:24:43 2007 From: pyurt at yahoo.com (pyurt) Date: Mon, 18 Jun 2007 12:24:43 -0700 Subject: [nycphp-talk] filewhatevertime for Windows folder In-Reply-To: <4676A0BC.3090506@gmx.net> Message-ID: <011201c7b1de$55134210$0a00a8c0@Pres2103> David Can you provide a little more detail. How are you testing file time? What OS? Are you getting increasing times from the files with just the wrong time or complete random values? Paul The most accurate credible, & timely website directory on the web: mastermoz.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings Sent: Monday, June 18, 2007 8:12 AM To: NYPHP Talk Subject: [nycphp-talk] filewhatevertime for Windows folder Hi! I want to do some housekeeping and wipe a bunch of folders of a drive that were not used in the past 24 hours. I get the current timestamp, subtract the seconds for a day, and then use fileatime of the folder to make a determination. To my surprise, the fileatime appears to be always more recent than the timestamp from 24 hours ago, which means that none of the folders get whacked, although they are four of five days old. Is it better to use filemtime? Or something totally different? The script will run exclusively against a file server running Windows, which probably makes a difference. Any advice? I really don't want to track file access of my system in a database table or such. David _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From greg.rundlett at gmail.com Mon Jun 18 16:41:21 2007 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Mon, 18 Jun 2007 16:41:21 -0400 Subject: [nycphp-talk] Going rates: In-Reply-To: <005001c7b151$0b8436f0$6b01a8c0@gamebox> References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> <5e2aaca40706171919x76e1edb8r13f0b8e1802b6d3@mail.gmail.com> <005001c7b151$0b8436f0$6b01a8c0@gamebox> Message-ID: <5e2aaca40706181341p2906e2cbl50bdf35891533596@mail.gmail.com> On 6/17/07, Ben Sgro (ProjectSkyline) wrote: > Hello Greg, > > Thanks: The data on salary.com is great ... I can see what the medium > salary is for said jobs. > > Even better would be a site that lists the per/hour rate of said jobs. > > Thanks again. Annual Salary/2,000 = hourly rate There are 52 weeks /yr minus 2 weeks /yr vacation = 50 weeks @ 40 hrs / week = 2,000 hours / yr available for work This is a rough estimation of the hourly *Cost* E.g. for worker "John" 100K annual rate (~$50/hr) Actual project estimation and costing can include a whole slew of adjustments, but at least that gets you a quick idea. I know you didn't ask about rate calculation, but I just wanted to add a quick note about that because people new to the idea of consulting can easily get trapped by bad assumptions. As an example to how this is just a quick formula for cost comparison and NOT a formula for calculating 'rates': In consulting, I would never charge $50/hr to earn $100K / year. The available hours for working aren't even close to 2,000 hours after you subtract a reasonable number for holidays and sick days. Subtract the amount of time you expect to be learning, prospecting, marketing, administering your business etc. When you finally arrive at the amount of time you will actually spend working billiable hours for a customer (in whatever capacity: sales, dev, support), then you can figure out what the hourly charge should be. Often it is 3x what the nominal rate would be ($150/hr to earn 100K). Also billing is sometimes done on a defined deliverable basis instead so that you can forget the clock. E.g. bill $200 for an application version upgrade (with an unstated but easily adhered to limit of 1hr because you know that the site upgrade process is routine and repeatable.) Anyway, i digress. From mailinglists at caseysoftware.com Tue Jun 19 06:32:09 2007 From: mailinglists at caseysoftware.com (Keith Casey) Date: Tue, 19 Jun 2007 06:32:09 -0400 Subject: [nycphp-talk] Going rates: In-Reply-To: <5e2aaca40706181341p2906e2cbl50bdf35891533596@mail.gmail.com> References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> <5e2aaca40706171919x76e1edb8r13f0b8e1802b6d3@mail.gmail.com> <005001c7b151$0b8436f0$6b01a8c0@gamebox> <5e2aaca40706181341p2906e2cbl50bdf35891533596@mail.gmail.com> Message-ID: On 6/18/07, Greg Rundlett wrote: > Annual Salary/2,000 = hourly rate > > There are 52 weeks /yr > minus 2 weeks /yr vacation > = 50 weeks @ 40 hrs / week > = 2,000 hours / yr available for work > > This is a rough estimation of the hourly *Cost* > E.g. for worker "John" 100K annual rate (~$50/hr) Just to throw out one additional tidbit... this is *only* considering the actual dollar-cost of the person's salary but that's not the whole picture. Once you factor in Social Security (employer's half), health insurance, workers comp, 401k contributions, office space, etc, you can add anywhere from 20-33% to this number to represent the *cost* of the employee to the employer. The last time I was with the Feds and we were calculating FTE's, we used +31.5% on top of base salary... so the above $50/hour should be $66/hour to be a real FTE. kc -- D. Keith Casey Jr. CEO, CaseySoftware, LLC http://CaseySoftware.com From ramons at gmx.net Tue Jun 19 10:25:55 2007 From: ramons at gmx.net (David Krings) Date: Tue, 19 Jun 2007 10:25:55 -0400 Subject: [nycphp-talk] filewhatevertime for Windows folder In-Reply-To: <011201c7b1de$55134210$0a00a8c0@Pres2103> References: <011201c7b1de$55134210$0a00a8c0@Pres2103> Message-ID: <4677E773.8030004@gmx.net> pyurt wrote: > David > > Can you provide a little more detail. > How are you testing file time? > What OS? > Are you getting increasing times from the files with just the wrong time or > complete random values? > > Paul I tested this on XP and the reported times are always the same. This is what I used to have as code: // Clean up stale login data // Make time stamp for 24 hours in the past $timestamp = time() - 24 * 60 * 60; // Read temp dir if ($handle = opendir($_SESSION['filepathtoroot'].DIRECTORY_SEPARATOR."temp")) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { // Check file time of directory $filetime = fileatime($_SESSION['filepathtoroot'].DIRECTORY_SEPARATOR."temp".DIRECTORY_SEPARATOR.$file); if ($filetime < $timestamp) $oldsessionids[] = $file; } } closedir($handle); } The problem was that opening the directory for read changes the access time of all subdirectories. I changed the code to use filemtime and that appears to work better and gives sufficient accuracy for my needs. I now have to add some code at significant points where the script checks when the login occured so that I don't end up writing to a directory that some other login just deleted. That should be easy enough by checking against my login table and forcing everyone to login again when their login was more than 24 hours ago. I may make this more lenient/configurable as I can see some value for allowing someone to hanng around in the system for more than 24 hours assuming that the session lives that long, which I doubt. Does anyone know for how long session data is kept when idling? David From 1j0lkq002 at sneakemail.com Tue Jun 19 18:43:02 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 19 Jun 2007 15:43:02 -0700 Subject: [nycphp-talk] Going rates: In-Reply-To: References: <001c01c7b139$fbce6c10$6b01a8c0@gamebox> <5e2aaca40706171919x76e1edb8r13f0b8e1802b6d3@mail.gmail.com> <005001c7b151$0b8436f0$6b01a8c0@gamebox> <5e2aaca40706181341p2906e2cbl50bdf35891533596@mail.gmail.com> Message-ID: <8086-09907@sneakemail.com> Keith Casey mailinglists-at-caseysoftware.com |nyphp dev/internal group use| wrote: > On 6/18/07, Greg Rundlett wrote: > >> Annual Salary/2,000 = hourly rate >> >> There are 52 weeks /yr >> minus 2 weeks /yr vacation >> = 50 weeks @ 40 hrs / week >> = 2,000 hours / yr available for work >> >> This is a rough estimation of the hourly *Cost* >> E.g. for worker "John" 100K annual rate (~$50/hr) > > > Just to throw out one additional tidbit... this is *only* considering > the actual dollar-cost of the person's salary but that's not the whole > picture. > > Once you factor in Social Security (employer's half), health > insurance, workers comp, 401k contributions, office space, etc, you > can add anywhere from 20-33% to this number to represent the *cost* of > the employee to the employer. > > The last time I was with the Feds and we were calculating FTE's, we > used +31.5% on top of base salary... so the above $50/hour should be > $66/hour to be a real FTE. > > kc > Yes and in grant world (where proposals are written to get government contracts) each institution has an "indirect rate" pre-negotiated with the government. So before even applying for a contract, you negotiate the overhead that covers all those costs. Last I heard Johns Hopkins was in the 70% range... meaning if they bid $100k as the cost for doing the work, they would get a check for $170k. A lesser institution may have negotiated a 40% indirect rate, so when they bid the same $100k to do the work they would actually get $140k. You can probably see how the government tries to separately manage the larger issues of the cost of quality / credit history/ impact of regional economies from the actual costs of doing the work. -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From rahmin at insite-out.com Tue Jun 19 18:55:27 2007 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Tue, 19 Jun 2007 18:55:27 -0400 Subject: [nycphp-talk] Stored MS Access procedures > PHP/MySQL? Message-ID: A colleague of mine wants to convert a large MS Access DB to the web, while retaining all keys, queries, forms and stored procedures in some sort of manageable CMS. (I can easily dump the data, but would have to manually redo the stored stuff.) Anyone know of such a thing? I'm assuming there're probably some VB-esque services out there, but I'd like to both ween him off MS products and better integrate his application into our LAMPmosphere. ~TIA From ramons at gmx.net Tue Jun 19 18:58:36 2007 From: ramons at gmx.net (David Krings) Date: Tue, 19 Jun 2007 18:58:36 -0400 Subject: [nycphp-talk] OT: Technical Writing Message-ID: <46785F9C.5040204@gmx.net> Hi! Most of you work in the software industry and may have a good tip for an employment opportunity as Technical Writer. Ideally in the Capital Region of NY. I am also open to software support and software testing. I wish I could do something with PHP, but my skills are so limited that I doubt anyone would even pay minimum wage for it. Any further details to be discussed off-list. Thanks for reading and thanks in advance. David From ramons at gmx.net Tue Jun 19 19:02:58 2007 From: ramons at gmx.net (David Krings) Date: Tue, 19 Jun 2007 19:02:58 -0400 Subject: [nycphp-talk] Stored MS Access procedures > PHP/MySQL? In-Reply-To: References: Message-ID: <467860A2.2090807@gmx.net> Rahmin Pavlovic wrote: > A colleague of mine wants to convert a large MS Access DB to the web, while > retaining all keys, queries, forms and stored procedures in some sort of > manageable CMS. (I can easily dump the data, but would have to manually > redo the stored stuff.) > > Anyone know of such a thing? I'm assuming there're probably some VB-esque > services out there, but I'd like to both ween him off MS products and better > integrate his application into our LAMPmosphere. > > ~TIA > A quick googling gave this among others: http://www.convert-in.com/acc2sql.htm They sell the converter apparently for 25$, which is cheap enough to not even try anything manual. I do wonder about the "stored procedures" portion as this is the first time that I heard MS Access being capable of that. David From rahmin at insite-out.com Tue Jun 19 19:12:46 2007 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Tue, 19 Jun 2007 19:12:46 -0400 Subject: [nycphp-talk] Stored MS Access procedures > PHP/MySQL? In-Reply-To: <467860A2.2090807@gmx.net> Message-ID: David Krings wrote: > A quick googling gave this among others: > http://www.convert-in.com/acc2sql.htm > I actually use that, which can be incredibly useful. It keeps the keys and does a create table/insert into for all the data; I'm more interested in retaining more of the fancier stuff like what MS calls 'forms' and 'queries'.. From gatzby3jr at gmail.com Wed Jun 20 10:26:53 2007 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Wed, 20 Jun 2007 10:26:53 -0400 Subject: [nycphp-talk] nyc php classes (night/long format) In-Reply-To: <71F5EE58-B23E-438C-84EB-B0417324810F@beaffinitive.com> References: <29CD03A3-F30E-4E3D-8C5F-38882581893F@gmail.com> <000001c7adbb$eb1a2fc0$c14e8f40$@com> <467008C3.5090304@gmx.net> <002001c7add0$69140130$3b3c0390$@com> <46702ABE.8010208@gmx.net> <71F5EE58-B23E-438C-84EB-B0417324810F@beaffinitive.com> Message-ID: <29da5d150706200726pcdd7e79vd3ec27e9cc90583b@mail.gmail.com> Last year I took our introduction to OOP (not called that, but that's what it was), and they explained the difference between classes and objects quite well. Although some people consider them interchangeable terms, they're actually different. The analogy I like to use is that a class is like a blue print for a building, and an object is a building that is created using that blue print. The class is a plan for how to make it, where as the object is the result of that plan. Hope that helps - Brian O'Connor On 6/14/07, Rob Marscher wrote: > > Hey David, > > A couple quick things I thought I'd point out: > > On Jun 13, 2007, at 11:09 AM, David Krings wrote: > > Unlike objects, I have no idea what classes can do and are there > > for, although I haven't really used either (I used a few objects, > > such as the zip object). > > Classes are actually the way that you define objects. So they're > really the same thing and you'll often see the terms used > interchangeably. So somewhere out there (in this case, probably > written in C and compiled into the zip extension), there is a class > that defines the zip objects you've been using. Here's a quick example: > > class ZipArchive > { > protected $file; > > public function open($filename) > { > echo "code to handle reading $file would go here"; > return true; > } > > // etc... > } > > So that's the class... but as soon as you do this: > > $zip = new ZipArchive(); > $zip->open('somefile.zip'); > > $zip is an object. Does that make sense? I'm sure the books will > lay it all out, but just thought I'd clarify the class vs. object thing. > > On Jun 13, 2007, at 1:34 PM, David Krings wrote: > > I am more interested in improving the maintainability of my code. I > > often do not anticipate what I might want to do and when I add > > functionality I often find myself creating code that is only > > slightly different from existing code. I sometimes manage to > > simplify and externalize into functions that can be included when > > needed, but something tells me that there might be a better way. > > This process of simplifying and combining code to be reusable is > called "refactoring" and it's one of the best skills a developer can > possess. Googling "refactoring php" will bring up a few articles. I > also saw that the June 2006 issue of php|a has an article on > refactoring your procedural code (functions) into object-oriented > code (classes/objects). I haven't read it though so I can't comment > on how good it is or easy to understand but here's a link to get it: > http://www.phparch.com/issue.php?mid=82 > > > Later, > Rob > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From nelly at cgim.com Wed Jun 20 12:12:13 2007 From: nelly at cgim.com (Nelly Yusupova) Date: Wed, 20 Jun 2007 12:12:13 -0400 Subject: [nycphp-talk] Resize pictures before uploading Message-ID: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> Hello Everyone, I wrote a script that allows users to upload up to 10 photo files to the server. The script automatically resizes the photos to the appropriate size. The upload and resizing scripts are working perfectly. The problem is that clients are uploading large photo files and it takes a long time to upload them. Is there a script or any way I can resize the pictures before uploading? Thank you in advance. Sincerely, Nelly Yusupova DigitalWoman.com nelly at digitalwoman.com 917 603-9226 (phone) http://www.digitalwoman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Wed Jun 20 13:50:08 2007 From: ramons at gmx.net (David Krings) Date: Wed, 20 Jun 2007 13:50:08 -0400 Subject: [nycphp-talk] Resize pictures before uploading In-Reply-To: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> References: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> Message-ID: <467968D0.4060707@gmx.net> Nelly Yusupova wrote: > Is there a script or any way I can resize the pictures before uploading? > Not via server side scripts. Even on the client side you most likely will need to open the file, process it, and then write a (temporary) file for upload. I finished a similar script some time ago and I make the users ZIP the files together into one archive and upload that one. The ZIP file may still be large, but without having the user change the image dimension that is about as small as it will get. David From chsnyder at gmail.com Wed Jun 20 14:13:41 2007 From: chsnyder at gmail.com (csnyder) Date: Wed, 20 Jun 2007 14:13:41 -0400 Subject: [nycphp-talk] Resize pictures before uploading In-Reply-To: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> References: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> Message-ID: On 6/20/07, Nelly Yusupova wrote: > > Is there a script or any way I can resize the pictures before uploading? There used to be (circ 2003) commercially-available Active-X controls that would do this, but those require Internet Explorer or an extended Firefox. I thought you might be able to do it in Flash, but I don't think the Flash player can actually re-encode the images. Sometimes the best solution is to encourage users to use Picassa or iPhoto to manage their photos, and then export the ones they want to upload at some reasonable size. -- Chris Snyder http://chxo.com/ From jonbaer at jonbaer.com Wed Jun 20 14:31:49 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 20 Jun 2007 14:31:49 -0400 Subject: [nycphp-talk] Resize pictures before uploading In-Reply-To: References: <200706201612.l5KGCcss010473@ms-smtp-03.rdc-nyc.rr.com> Message-ID: Depending on what you are trying to do, I think its always best to keep the ~original~ photos intact ... there is a great script available here: http://phpthumb.sourceforge.net/ Don't let the "thumb" fool you, its a pretty handy script that allows you to also resize + add filters (watermarks) and hash your URLs if need be. Then in the view part of your code you basically state the size you want and it is cached out for you automatically. - Jon On Jun 20, 2007, at 2:13 PM, csnyder wrote: > On 6/20/07, Nelly Yusupova wrote: >> >> Is there a script or any way I can resize the pictures before >> uploading? > > There used to be (circ 2003) commercially-available Active-X controls > that would do this, but those require Internet Explorer or an extended > Firefox. > > I thought you might be able to do it in Flash, but I don't think the > Flash player can actually re-encode the images. > > Sometimes the best solution is to encourage users to use Picassa or > iPhoto to manage their photos, and then export the ones they want to > upload at some reasonable size. > > -- > 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 paulcheung at tiscali.co.uk Thu Jun 21 10:07:21 2007 From: paulcheung at tiscali.co.uk (PaulCheung) Date: Thu, 21 Jun 2007 15:07:21 +0100 Subject: [nycphp-talk] Javascript & PHP Message-ID: <002001c7b40d$7c22f9f0$0400a8c0@X9183> I have put together an HTML form that uses Javascript which works well. However when I fill it in and fire it off to my PHP script (which for the purpose of testing simply echos what was entered in to the form) it cannot find the entered data; But when I strip out the Javascript and the fields that uses the javascript my PHP script happly echos back what was entered into the form. does anubody know what I am doing wrong?? Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenrbnsn at rbnsn.com Thu Jun 21 10:09:49 2007 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Thu, 21 Jun 2007 10:09:49 -0400 Subject: [nycphp-talk] Javascript & PHP In-Reply-To: <002001c7b40d$7c22f9f0$0400a8c0@X9183> References: <002001c7b40d$7c22f9f0$0400a8c0@X9183> Message-ID: <20070621100949.7jz6hneas08ssgso@www.rbnsn.com> Quoting PaulCheung : > I have put together an HTML form that uses Javascript which works > well. However when I fill it in and fire it off to my PHP script > (which for the purpose of testing simply echos what was entered in > to the form) it cannot find the entered data; But when I strip out > the Javascript and the fields that uses the javascript my PHP script > happly echos back what was entered into the form. does anubody know > what I am doing wrong?? Not without seeing what you're doing. If you don't want to post your original code, create an example that shows the same symptoms and post that code. Ken From rudy at taytek.com Thu Jun 21 10:30:44 2007 From: rudy at taytek.com (Rudy) Date: Thu, 21 Jun 2007 10:30:44 -0400 Subject: [nycphp-talk] Javascript & PHP References: <002001c7b40d$7c22f9f0$0400a8c0@X9183> Message-ID: <002501c7b410$c2b310a0$8b030a0a@InterDigital.com> You are suffering from the split-brain syndrome of web development. PHP as you know is a server-side while Javascript is client-side application. The left side of the brain needs to communicate to the right side of the brain. For the PHP to see the variables they must be posted to the server either as Form-Post variables or hidden-form-variables. I've done this by invoking DOM to instantiate client-side objects (hidden-form-variables) and then posted the form via a submit (Javascript called). If I'm off base here sorry about that but I know that I've been stung by this a lot in my applications. Rudy ----- Original Message ----- From: PaulCheung To: talk at lists.nyphp.org Sent: Thursday, June 21, 2007 10:07 AM Subject: [nycphp-talk] Javascript & PHP I have put together an HTML form that uses Javascript which works well. However when I fill it in and fire it off to my PHP script (which for the purpose of testing simply echos what was entered in to the form) it cannot find the entered data; But when I strip out the Javascript and the fields that uses the javascript my PHP script happly echos back what was entered into the form. does anubody know what I am doing wrong?? Paul ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 morgan at forsalebyowner.com Thu Jun 21 12:08:02 2007 From: morgan at forsalebyowner.com (Morgan Craft) Date: Thu, 21 Jun 2007 12:08:02 -0400 Subject: [nycphp-talk] Javascript & PHP In-Reply-To: <002001c7b40d$7c22f9f0$0400a8c0@X9183> References: <002001c7b40d$7c22f9f0$0400a8c0@X9183> Message-ID: <467AA262.2020706@forsalebyowner.com> really hard to debug this without any code provided. It could be numerous things... Your javascript could be clearing your form data before submit? How do you have the onEvent handles configured for your javascript? Also, there could be things wrong with your server-side logic. Do you have your echo statements wrapped in any logic that are dependent on the request variables? Maybe your echo statements are skipped because something happened to one of the request values? What type of echo statements are you using? Have you tried doing print_r($_POST) or print_r($_REQUEST). Gotta give us something more to run with on this one :) PaulCheung wrote: > I have put together an HTML form that uses Javascript which works > well. However when I fill it in and fire it off to my PHP script > (which for the purpose of testing simply echos what was entered in to > the form) it cannot find the entered data; But when I strip out the > Javascript and the fields that uses the javascript my PHP > script happly echos back what was entered into the form. does anubody > know what I am doing wrong?? > > Paul > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 paulcheung at tiscali.co.uk Fri Jun 22 06:21:28 2007 From: paulcheung at tiscali.co.uk (PaulCheung) Date: Fri, 22 Jun 2007 11:21:28 +0100 Subject: [nycphp-talk] Javascript & PHP References: <002001c7b40d$7c22f9f0$0400a8c0@X9183> <467AA262.2020706@forsalebyowner.com> Message-ID: <000601c7b4b7$18b92470$0300a8c0@X9183> I have to thank everybody for helping me and I do appreciate all the help I also take onboard that it is difficult to debug anything you cannot see. So I have included 3 files the HTML with JavaScript in, another HTML with the JavaScript stripped out and (I would not insult Mickey Mouse) a PHP test script to echo back what has been entered. albeit only the first field using "HELLO WORLD". The objective of the JavaScript is to achieve word-processing style text wraparound upto to a max length (in this case 255 characters, being a nice round computer number and exceeding the maximum single text length of most peoples screens) all simply because HTML does appear to support text wraparound and maximum length (TEXTAREA MAXLENGTH). I have been told some it can and by others it cannot I have even been pointed to the 1x1 pixel trick which I don't really understand. My goal is to talk clientside to serverside keep users focused instead of just truncating without their knowledge and by doing so keep them on my side and keep my i/o and processing down to a minimum thus avoiding things such as bottleneck and keep traffic flowing as smoothly as possible. Paul ----- Original Message ----- From: "Morgan Craft" To: "NYPHP Talk" Sent: Thursday, June 21, 2007 5:08 PM Subject: Re: [nycphp-talk] Javascript & PHP > really hard to debug this without any code provided. It could be numerous > things... Your javascript could be clearing your form data before submit? > How do you have the onEvent handles configured for your javascript? > Also, there could be things wrong with your server-side logic. Do you > have your echo statements wrapped in any logic that are dependent on the > request variables? Maybe your echo statements are skipped because > something happened to one of the request values? What type of echo > statements are you using? Have you tried doing print_r($_POST) or > print_r($_REQUEST). Gotta give us something more to run with on this one > :) > > PaulCheung wrote: >> I have put together an HTML form that uses Javascript which works well. >> However when I fill it in and fire it off to my PHP script (which for the >> purpose of testing simply echos what was entered in to the form) it >> cannot find the entered data; But when I strip out the Javascript and the >> fields that uses the javascript my PHP script happly echos back what was >> entered into the form. does anubody know what I am doing wrong?? >> Paul >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestReport.PHP Type: application/octet-stream Size: 220 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Fri Jun 22 12:15:03 2007 From: chsnyder at gmail.com (csnyder) Date: Fri, 22 Jun 2007 12:15:03 -0400 Subject: [nycphp-talk] InfoPath (xsn) discovery / conversion Message-ID: I just started working on a project that uses MS InfoPath forms to capture all their data. Does anybody here have any experience using PHP or some unix tool to extract the forms and schema contained in an .msn file? -- Chris Snyder http://chxo.com/ From kenrbnsn at rbnsn.com Fri Jun 22 18:16:08 2007 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Fri, 22 Jun 2007 18:16:08 -0400 Subject: [nycphp-talk] Javascript & PHP In-Reply-To: <000601c7b4b7$18b92470$0300a8c0@X9183> References: <002001c7b40d$7c22f9f0$0400a8c0@X9183> <467AA262.2020706@forsalebyowner.com> <000601c7b4b7$18b92470$0300a8c0@X9183> Message-ID: At 06:21 AM 6/22/2007, PaulCheung wrote: >I have to thank everybody for helping me and I do appreciate all the >help I also take onboard that it is difficult to debug anything you >cannot see. So I have included 3 files the HTML with JavaScript in, >another HTML with the JavaScript stripped out and (I would not >insult Mickey Mouse) a PHP test script to echo back what has been >entered. albeit only the first field using "HELLO WORLD". I saw two problems with the source containing the Javascript: 1) You have a line of dashes in the Javascript which don't seem to commented. The Firebug debugger throws an error on that line. 2) Your tag is incorrect. You have commas between the attributes instead of spaces. Using the FF addon LiveHTTPheaders shows the form values passed by the GET method. Remove the commas and it should work fine. You don't have commas in the stripped version. Ken From paulcheung at tiscali.co.uk Sat Jun 23 02:22:17 2007 From: paulcheung at tiscali.co.uk (PaulCheung) Date: Sat, 23 Jun 2007 07:22:17 +0100 Subject: [nycphp-talk] Javascript & PHP References: <002001c7b40d$7c22f9f0$0400a8c0@X9183><467AA262.2020706@forsalebyowner.com><000601c7b4b7$18b92470$0300a8c0@X9183> <467AFB070075335E@mail-9-uk.mail.tiscali.sys> (added by postmaster@mail-9.uk.tiscali.com) Message-ID: <000301c7b55e$d91f02f0$0300a8c0@X9183> I would like to thank everybody for all your help Paul ----- Original Message ----- From: "Ken Robinson" To: "NYPHP Talk" Sent: Friday, June 22, 2007 11:16 PM Subject: Re: [nycphp-talk] Javascript & PHP > At 06:21 AM 6/22/2007, PaulCheung wrote: >>I have to thank everybody for helping me and I do appreciate all the >>help I also take onboard that it is difficult to debug anything you >>cannot see. So I have included 3 files the HTML with JavaScript in, >>another HTML with the JavaScript stripped out and (I would not >>insult Mickey Mouse) a PHP test script to echo back what has been >>entered. albeit only the first field using "HELLO WORLD". > > I saw two problems with the source containing the Javascript: > 1) You have a line of dashes in the Javascript which don't seem to > commented. The Firebug debugger throws an error on that line. > > 2) Your tag is incorrect. You have commas between the > attributes instead of spaces. Using the FF addon LiveHTTPheaders > shows the form values passed by the GET method. Remove the commas and > it should work fine. You don't have commas in the stripped version. > > > > Ken > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 anieshjoseph at gmail.com Sat Jun 23 09:03:52 2007 From: anieshjoseph at gmail.com (Aniesh joseph) Date: Sat, 23 Jun 2007 18:33:52 +0530 Subject: [nycphp-talk] compare two binary files. Message-ID: <1b3d2fde0706230603s294c39d2xe6016b1794c15328@mail.gmail.com> Hi, I have two binary file name bunary1 & binary2. I need to compare these two files and find following changed byte + location +old value +new value The files are opened in read binary mod and returns each byte. Can someone suggest any method to compare bytes? Thanks. Regards Aniesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.com Sat Jun 23 09:27:58 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Sat, 23 Jun 2007 09:27:58 -0400 Subject: [nycphp-talk] compare two binary files. In-Reply-To: <1b3d2fde0706230603s294c39d2xe6016b1794c15328@mail.gmail.com> References: <1b3d2fde0706230603s294c39d2xe6016b1794c15328@mail.gmail.com> Message-ID: <5CA4BE0A-3E5B-4FCA-B4B0-DB73D78CA6E4@jonbaer.com> First question is on what platform, Intel or other + are you asking about processing via PHP or just in general? The premiere tool is BinDiff (http://www.sabre-security.com/products/ screens_bindiff.html) ... A nice toolset (can probably be patched for PHP use): http://radare.nopcode.org/wiki/index.php?n=Utils.Bindiff - Jon On Jun 23, 2007, at 9:03 AM, Aniesh joseph wrote: > Hi, > > I have two binary file name bunary1 & binary2. I need to compare > these two files and find following > > changed byte + location +old value +new value > > The files are opened in read binary mod and returns each byte. Can > someone suggest any method to compare bytes? > > Thanks. > > Regards > Aniesh > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 aw at sap8.com Sat Jun 23 10:22:04 2007 From: aw at sap8.com (Anthony Wlodarski) Date: Sat, 23 Jun 2007 10:22:04 -0400 Subject: [nycphp-talk] compare two binary files. In-Reply-To: <5CA4BE0A-3E5B-4FCA-B4B0-DB73D78CA6E4@jonbaer.com> References: <1b3d2fde0706230603s294c39d2xe6016b1794c15328@mail.gmail.com> <5CA4BE0A-3E5B-4FCA-B4B0-DB73D78CA6E4@jonbaer.com> Message-ID: <001201c7b5a1$df9451b0$9ebcf510$@com> I have come across this script online for things like that: http://www.holomind.de/phpnet/diff.src.php See if that is what you are really looking for. -Anthony From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jon Baer Sent: Saturday, June 23, 2007 9:28 AM To: NYPHP Talk Subject: Re: [nycphp-talk] compare two binary files. First question is on what platform, Intel or other + are you asking about processing via PHP or just in general? The premiere tool is BinDiff (http://www.sabre-security.com/products/screens_bindiff.html) ... A nice toolset (can probably be patched for PHP use): http://radare.nopcode.org/wiki/index.php?n=Utils.Bindiff - Jon On Jun 23, 2007, at 9:03 AM, Aniesh joseph wrote: Hi, I have two binary file name bunary1 & binary2. I need to compare these two files and find following changed byte + location +old value +new value The files are opened in read binary mod and returns each byte. Can someone suggest any method to compare bytes? Thanks. Regards Aniesh _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 jakob.buchgraber at googlemail.com Sat Jun 23 11:50:52 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Sat, 23 Jun 2007 17:50:52 +0200 Subject: [nycphp-talk] Encapsulating $_FILE, $_SERVER ... in objects? Message-ID: <467D415C.8020905@gmail.com> Hey! I was wondering how you handle the data from $_FILE, $_SERVER etc. in your application. I mean, most of you probably use some framework that implements the request object pattern in combination with the intercepting filter pattern. So this makes unit testing easy and may also improve the security of your application. So how do you handle e.g. the data coming from $_FILE? Do yo just access them directly or is there also some super cool solution? :D Cheers, Jay -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From ramons at gmx.net Sat Jun 23 13:23:14 2007 From: ramons at gmx.net (David Krings) Date: Sat, 23 Jun 2007 13:23:14 -0400 Subject: [nycphp-talk] Encapsulating $_FILE, $_SERVER ... in objects? In-Reply-To: <467D415C.8020905@gmail.com> References: <467D415C.8020905@gmail.com> Message-ID: <467D5702.3040500@gmx.net> Jakob Buchgraber wrote: > Hey! > > I was wondering how you handle the data from $_FILE, $_SERVER etc. in > your application. I mean, most of you probably use some framework that > implements the request object pattern in combination with the > intercepting filter pattern. So this makes unit testing easy and may > also improve the security of your application. So how do you handle e.g. > the data coming from $_FILE? Do yo just access them directly or is there > also some super cool solution? :D > > Cheers, > Jay Honestly, I think that acessing them directly is already a supercool solution. Can't get any easier to get a file from A to B. I also wouldn't know what a framework could make easier in regards to that. What is nice is to have consistent array values mainly from $_SERVER. Some time ago someone posted code for this as reply to a question that I asked. And that code did come from a framework and I think that is indeed super cool as it helps to get stuff working regardless of server and OS platform. I must admit that I haven't work much with frameworks, but would use one mostly for the UI and database access so that I don't have to bother with layouts and going through the several steps for a select query. In regards to security, input is evil, even when it comes from a table that only your app writes to. Always check for sanity and never trust anything, not even a file to be there that you just created a few lines earlier. I tend to get a bit paranoid in those cases where something being there really matters. David From jakob.buchgraber at googlemail.com Sat Jun 23 14:11:58 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Sat, 23 Jun 2007 20:11:58 +0200 Subject: [nycphp-talk] Filter extension problems In-Reply-To: References: Message-ID: <467D626E.2070205@gmail.com> Cliff Hirsch wrote: > I am getting the following error message: > > Call to undefined function: filter_var() in.... > > I?m using XAMPP V1.5.5, PHP V5.1.6. My server check says that the filter > extension is installed. > > Any thoughts? Anyone using the filter extension with this version on > Xampp/PHP? > > Cliff > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php Just have a look at the manual: filter_var (PHP 5 >= 5.2.0, PECL filter:0.11.0) So this function is only available since PHP 5.2.0 and you are using 5.1.6 ... . I remember that I had a similar problem, because they renamed the function from filter_xxx to filter_var. However I can't remember the name of the old function. Just type php -re filter on the command line to get the correct function name for 5.1. cheers, jay -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From jakob.buchgraber at googlemail.com Sat Jun 23 14:14:47 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Sat, 23 Jun 2007 20:14:47 +0200 Subject: [nycphp-talk] Encapsulating $_FILE, $_SERVER ... in objects? In-Reply-To: <467D5702.3040500@gmx.net> References: <467D415C.8020905@gmail.com> <467D5702.3040500@gmx.net> Message-ID: <467D6317.4020009@gmail.com> I was actually asking for some design pattern making it easier to unit test my classes ;). I am probably going to implement just the same request pattern for $_FILE as for $_REQUEST. cheers, jay -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From shadab_w at yahoo.co.in Sat Jun 23 15:30:38 2007 From: shadab_w at yahoo.co.in (Shadab Wadiwala) Date: Sat, 23 Jun 2007 20:30:38 +0100 (BST) Subject: [nycphp-talk] Difference between the CONSTANT and the GLOBAL VARIABLE ?? Message-ID: <626439.82208.qm@web8708.mail.in.yahoo.com> Hi, community !! Can somebody make me understand what is the difference between the CONSTANT and the GLOBAL VARIABLE ?? " Three days without programming and life becomes boring " Shadab .I. Wadiwala My homepage:-- http://shadabworld.110mb.com --------------------------------- Download prohibited? No problem. CHAT from any browser, without download. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Sat Jun 23 16:10:10 2007 From: ramons at gmx.net (David Krings) Date: Sat, 23 Jun 2007 16:10:10 -0400 Subject: [nycphp-talk] Difference between the CONSTANT and the GLOBAL VARIABLE ?? In-Reply-To: <626439.82208.qm@web8708.mail.in.yahoo.com> References: <626439.82208.qm@web8708.mail.in.yahoo.com> Message-ID: <467D7E22.90801@gmx.net> Shadab Wadiwala wrote: > Hi, community !! > > > Can somebody make me understand what is the difference between the > CONSTANT and the GLOBAL VARIABLE ?? > A constant is a value that never changes, whereas a variable can change its value (which means that there cannot be something like a "constant variable" or a "variable constant", similar to a "variable datum", which is also an oxymoron). A global variable is one that is available in any context (any script and any function even when not explicitly declared in that one). Examples: the constant M_PI has the value of pi. No matter what you do, M_PI does not change its value. You can also use the function pi() to have the value of M_PI returned. You can use the PHP keyword global to make any variable to have global scope. Some variables are global per definition and are called the superglobals, such as $_SERVER or $_SESSION. Hope that helps, David From michael.southwell at nyphp.com Sat Jun 23 16:26:53 2007 From: michael.southwell at nyphp.com (Michael Southwell) Date: Sat, 23 Jun 2007 16:26:53 -0400 Subject: [nycphp-talk] Difference between the CONSTANT and the GLOBAL VARIABLE ?? In-Reply-To: <626439.82208.qm@web8708.mail.in.yahoo.com> References: <626439.82208.qm@web8708.mail.in.yahoo.com> Message-ID: <6.2.3.4.2.20070623161246.0290c878@pop.nyphp.com> An HTML attachment was scrubbed... URL: From ps at sun-code.com Sat Jun 23 17:52:15 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Sat, 23 Jun 2007 17:52:15 -0400 Subject: [nycphp-talk] [OT] Web 2.0 Internet Radio Based on the Music Genome Project Message-ID: <002b01c7b5e0$c3edecc0$4bc9c640$@com> http://www.pandora.com At this internet radio web site, when you arrive you enter the name of an Artist that you like and they immediately create an internet radio stream that only plays songs from the Artist you selected and other similar Artists. And you can make as many custom streams as you would like for all your differing tastes and moods. Now that is a pretty good hit almost out of the park for a Web 2.0 style application, I feel. Anybody got any other nice web site apps like this that they can recommend for expanding the programmer/designer's mindset? Warmest regards, ? Peter Sawczynec Technology Dir. Sun-code.com Web related services 646.316.3678 ps at sun-code.com From ramons at gmx.net Sun Jun 24 13:49:20 2007 From: ramons at gmx.net (David Krings) Date: Sun, 24 Jun 2007 13:49:20 -0400 Subject: [nycphp-talk] PHP job Message-ID: <467EAEA0.2020301@gmx.net> Hi! I came across this while looking for a job for myself. Maybe someone is interested. http://www.liniumstaffing.com/job.cfm?id=66 David From sbeam at onsetcorps.net Tue Jun 26 10:26:50 2007 From: sbeam at onsetcorps.net (sbeam) Date: Tue, 26 Jun 2007 10:26:50 -0400 Subject: [nycphp-talk] [OT] Web 2.0 Internet Radio Based on the Music Genome Project In-Reply-To: <002b01c7b5e0$c3edecc0$4bc9c640$@com> References: <002b01c7b5e0$c3edecc0$4bc9c640$@com> Message-ID: <200706261026.51021.sbeam@onsetcorps.net> On Saturday 23 June 2007, Peter Sawczynec wrote: > http://www.pandora.com > > At this internet radio web site, when you arrive you enter the name of > an Artist that you like and they immediately create an internet radio > stream that only plays songs from the Artist you selected and other > similar Artists. And you can make as many custom streams as you would > like for all your differing tastes and moods. Now that is a pretty good > hit almost out of the park for a Web 2.0 style application, ?I feel. > It is a great site - but FYI this and most other net radio streams will go off the "air" on July 15th, thanks to the RIAA's dedication to preserving their monopoly on your eardrums. http://writ.news.findlaw.com/commentary/20070625_mak.html http://www.savenetradio.org/ A note to your congressman may still help... /Sam From rmarscher at beaffinitive.com Tue Jun 26 10:57:36 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue, 26 Jun 2007 10:57:36 -0400 Subject: [nycphp-talk] Encapsulating $_FILE, $_SERVER ... in objects? In-Reply-To: <467D415C.8020905@gmail.com> References: <467D415C.8020905@gmail.com> Message-ID: <952B0B40-6D88-404C-8842-8F10256EBDF1@beaffinitive.com> On Jun 23, 2007, at 11:50 AM, Jakob Buchgraber wrote: > So how do you handle e.g. the data coming from $_FILE? Our request abstraction merges $_FILE array into the $_POST and $_REQUEST arrays before our regular code processing begins. That allows us to set properties of our object via getPost() or getRequest () and then run the object's validate method (which calls various filters depending on the type of each field and any other custom validators that were set). I'm not exactly sure how the popular frameworks handle it. I just took at look at Zend Framework and Zend/Controller/Request/Http.php doesn't seem to have any mention of $_FILE which is odd. I think I remember someone mentioning it on their list... could be fixed by now, I haven't updated in a few weeks. I don't have CakePHP on my laptop right now... Cheers, Rob From rmarscher at beaffinitive.com Tue Jun 26 11:29:57 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue, 26 Jun 2007 11:29:57 -0400 Subject: [nycphp-talk] [OT] Web 2.0 Internet Radio Based on the Music Genome Project In-Reply-To: <002b01c7b5e0$c3edecc0$4bc9c640$@com> References: <002b01c7b5e0$c3edecc0$4bc9c640$@com> Message-ID: <1D1F215B-E893-4532-BDB3-3D730CB56F9F@beaffinitive.com> On Jun 23, 2007, at 5:52 PM, Peter Sawczynec wrote: > Anybody got any other nice web site apps like this that they can > recommend for expanding the programmer/designer's mindset? In a similar vein, http://last.fm -- The super cool thing they do is called "audioscrobbling" where you can automatically send them info on what your listening to in iTunes or other music apps and it will store all of that info and use it to give you recommendations and other info. You don't have to manually input anything. From mjdewitt at alexcommgrp.com Tue Jun 26 13:30:32 2007 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Tue, 26 Jun 2007 13:30:32 -0400 Subject: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? Message-ID: I was going through Google and noticed for some companies, they have a series of grouped links appearing under the main search result. For example: http://www.google.com/search?q=ioma , look at the 1st result for Ioma. They have 4 links plus a "more" link. I thought this might be a "subscribed" link, but I thought you had to subscribe in order to see the additional subscribed links? I would appreciate any insight as to how this is done. Mike From 1j0lkq002 at sneakemail.com Tue Jun 26 14:44:02 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 26 Jun 2007 11:44:02 -0700 Subject: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? In-Reply-To: References: Message-ID: <10280-70933@sneakemail.com> DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group use| wrote: >I was going through Google and noticed for some companies, they have a >series of grouped links appearing under the main search result. For >example: http://www.google.com/search?q=ioma , look at the 1st result for >Ioma. They have 4 links plus a "more" link. I thought this might be a >"subscribed" link, but I thought you had to subscribe in order to see the >additional subscribed links? > >I would appreciate any insight as to how this is done. > >Mike > > These are being called "site links" and are intended to show the searcher how a site has clearly-defined user interest areas, to help them in their search. It is believed that user click data is being used to help determine the need for site links, although some SEO people have been teasing Google this year and there are now some sites showing site links that probably shouldn't have them ;-) Most people I know think site links are based mostly on site structure and back links. If your site qualifies (searchers would benefit from site links as search navigation aids) then a good SEO would probably guide you by suggesting that you: - get inbound links from on-theme trusted sources TO your desired site link demarcation page, and make sure the page it titled and has H1/2 tags that match the theme exactly. e.g. get job sites to link back to /human-resources/index.html and make sure that page is titled "human resources" and has a h1/h2 set to match that specific theme. - make sure the site nav goes to that same demarcation page using the same title/htag-matching anchor text - add some internal text links to refer people to that same demarcation page with matching context words and anchor text (be your own best friend) A more advanced SEO would probably suggest you mine your own traffic logs and find the pages that Google ranks for "human resources", "careers", "jobs" etc and add a section to those (in H tags) that tells visitors that if they are looking for human resources (link) for careers at mycompany (link) they should go to the human resources page (link). In cases where the destnation page for incoming Google referrals on-theme was not important, 301 redirect it to the human resources page. Personally, I would do that last step first. I hope that helps. -=john andrews -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From mjdewitt at alexcommgrp.com Tue Jun 26 15:37:50 2007 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Tue, 26 Jun 2007 15:37:50 -0400 Subject: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? Message-ID: John, Thank you very much for such a complete reply. I am going to have to give this some thought to see what I can do to make this happen for us. I think this is a really cool way to show off all the features offered by a site. Mike > -----Original Message----- > From: inforequest [SMTP:1j0lkq002 at sneakemail.com] > Sent: Tuesday, June 26, 2007 1:44 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] [OT] Does anyone know how Google grouped > links a re done? > > DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group > use| wrote: > > >I was going through Google and noticed for some companies, they have a > >series of grouped links appearing under the main search result. For > >example: http://www.google.com/search?q=ioma , look at the 1st result for > >Ioma. They have 4 links plus a "more" link. I thought this might be a > >"subscribed" link, but I thought you had to subscribe in order to see the > >additional subscribed links? > > > >I would appreciate any insight as to how this is done. > > > >Mike > > > > > These are being called "site links" and are intended to show the > searcher how a site has clearly-defined user interest areas, to help > them in their search. > > It is believed that user click data is being used to help determine the > need for site links, although some SEO people have been teasing Google > this year and there are now some sites showing site links that probably > shouldn't have them ;-) > > Most people I know think site links are based mostly on site structure > and back links. > > If your site qualifies (searchers would benefit from site links as > search navigation aids) then a good SEO would probably guide you by > suggesting that you: > > - get inbound links from on-theme trusted sources TO your desired site > link demarcation page, and make sure the page it titled and has H1/2 > tags that match the theme exactly. e.g. get job sites to link back to > /human-resources/index.html and make sure that page is titled "human > resources" and has a h1/h2 set to match that specific theme. > - make sure the site nav goes to that same demarcation page using the > same title/htag-matching anchor text > - add some internal text links to refer people to that same demarcation > page with matching context words and anchor text (be your own best friend) > > A more advanced SEO would probably suggest you mine your own traffic > logs and find the pages that Google ranks for "human resources", > "careers", "jobs" etc and add a section to those (in H tags) that tells > visitors that if they are looking for human resources (link) for careers > at mycompany (link) they should go to the human resources page (link). > In cases where the destnation page for incoming Google referrals > on-theme was not important, 301 redirect it to the human resources page. > > Personally, I would do that last step first. > > I hope that helps. > > -=john andrews > > -- > ------------------------------------------------------------- > Your web server traffic log file is the most important source of web > business information available. Do you know where your logs are right now? > Do you know who else has access to your log files? When they were last > archived? Where those archives are? --John Andrews Competitive Webmaster > and SEO Blogging at http://www.johnon.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From 1j0lkq002 at sneakemail.com Tue Jun 26 19:31:03 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 26 Jun 2007 16:31:03 -0700 Subject: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? In-Reply-To: References: Message-ID: <1181-03970@sneakemail.com> Good luck, Mike. Just another edge to keep up with as technology advances. Site links do bring traffic, and they displace a half a centimeter or so of web page so the guys below you do suffer a bit for it ;-) I like them for the branding impression... if you search for a web design firm and see they have an SEO section and a "secure web hosting" .... you got branded ;-) I'd pay serious attention to Google Universal Search, coming to browser screens everywhere this summer. Images show up in the first position of page 1 (up to 5 or 6 hyperlinked images in a raw sometimes) and they are very click-attractive. And by the way, there is currently no limit to ownership of multiple images in that row, so you can own them all ;-) Videos are now showing up in-line, and playable inline as embedded videos. An embedded video knocks 3 or 4 competitors right off the "first page". Again, best for branding cause Google's keeping the traffic on the SERP page instead of passing it through to your site. Unless... and here comes that "advanced SEO" stuff again, you populate most of page 1 with embedded videos that are neutral and thus leave only your own web page snippets visible on the page :-) as 'calls to action" after the videos get old. Theuser has no choice but to click on your link.... -=john andrews DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group use| wrote: >John, > >Thank you very much for such a complete reply. I am going to have to give >this some thought to see what I can do to make this happen for us. I think >this is a really cool way to show off all the features offered by a site. > >Mike > > > >>-----Original Message----- >>From: inforequest [SMTP:1j0lkq002 at sneakemail.com] >>Sent: Tuesday, June 26, 2007 1:44 PM >>To: talk at lists.nyphp.org >>Subject: Re: [nycphp-talk] [OT] Does anyone know how Google grouped >>links a re done? >> >>DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group >>use| wrote: >> >> >> >>>I was going through Google and noticed for some companies, they have a >>>series of grouped links appearing under the main search result. For >>>example: http://www.google.com/search?q=ioma , look at the 1st result for >>>Ioma. They have 4 links plus a "more" link. I thought this might be a >>>"subscribed" link, but I thought you had to subscribe in order to see the >>>additional subscribed links? >>> >>>I would appreciate any insight as to how this is done. >>> >>>Mike >>> >>> >>> >>> >>These are being called "site links" and are intended to show the >>searcher how a site has clearly-defined user interest areas, to help >>them in their search. >> >>It is believed that user click data is being used to help determine the >>need for site links, although some SEO people have been teasing Google >>this year and there are now some sites showing site links that probably >>shouldn't have them ;-) >> >>Most people I know think site links are based mostly on site structure >>and back links. >> >>If your site qualifies (searchers would benefit from site links as >>search navigation aids) then a good SEO would probably guide you by >>suggesting that you: >> >>- get inbound links from on-theme trusted sources TO your desired site >>link demarcation page, and make sure the page it titled and has H1/2 >>tags that match the theme exactly. e.g. get job sites to link back to >>/human-resources/index.html and make sure that page is titled "human >>resources" and has a h1/h2 set to match that specific theme. >>- make sure the site nav goes to that same demarcation page using the >>same title/htag-matching anchor text >>- add some internal text links to refer people to that same demarcation >>page with matching context words and anchor text (be your own best friend) >> >>A more advanced SEO would probably suggest you mine your own traffic >>logs and find the pages that Google ranks for "human resources", >>"careers", "jobs" etc and add a section to those (in H tags) that tells >>visitors that if they are looking for human resources (link) for careers >>at mycompany (link) they should go to the human resources page (link). >>In cases where the destnation page for incoming Google referrals >>on-theme was not important, 301 redirect it to the human resources page. >> >>Personally, I would do that last step first. >> >>I hope that helps. >> >>-=john andrews >> >>-- >>------------------------------------------------------------- >>Your web server traffic log file is the most important source of web >>business information available. Do you know where your logs are right now? >>Do you know who else has access to your log files? When they were last >>archived? Where those archives are? --John Andrews Competitive Webmaster >>and SEO Blogging at http://www.johnon.com >> >>_______________________________________________ >>New York PHP Community Talk Mailing List >>http://lists.nyphp.org/mailman/listinfo/talk >> >>NYPHPCon 2006 Presentations Online >>http://www.nyphpcon.com >> >>Show Your Participation in New York PHP >>http://www.nyphp.org/show_participation.php >> >> >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > > > -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From suzerain at suzerain.com Tue Jun 26 22:32:27 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 27 Jun 2007 10:32:27 +0800 Subject: [nycphp-talk] [OT] Web 2.0 Internet Radio Based on the Music Genome Project In-Reply-To: <1D1F215B-E893-4532-BDB3-3D730CB56F9F@beaffinitive.com> References: <002b01c7b5e0$c3edecc0$4bc9c640$@com> <1D1F215B-E893-4532-BDB3-3D730CB56F9F@beaffinitive.com> Message-ID: <5559B2BA-43E3-4524-8C18-777E4B89604D@suzerain.com> Hi there: [FYI: last.fm is not going off the air on July 15th. As they put it [paraphrasing] "we don't want to punish our listeners because of the RIAA".] Sort of on-topic: last.fm is an example of a very well executed "web 2.0" site, IMO. Check out the tools they made for creating a custom list of your tracks to embed somewhere else (http://www.last.fm/tools/ charts/). Very slick; I have been playing around with making my administrative tools totally visual in this way for clients who want a little more creative control over the look of their content. Cheers, Marc Le 26 juin 07 ? 23:29, Rob Marscher a ?crit : > On Jun 23, 2007, at 5:52 PM, Peter Sawczynec wrote: >> Anybody got any other nice web site apps like this that they can >> recommend for expanding the programmer/designer's mindset? > > In a similar vein, http://last.fm -- The super cool thing they do > is called "audioscrobbling" where you can automatically send them > info on what your listening to in iTunes or other music apps and it > will store all of that info and use it to give you recommendations > and other info. You don't have to manually input anything. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 suzerain at suzerain.com Wed Jun 27 04:43:15 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 27 Jun 2007 16:43:15 +0800 Subject: [nycphp-talk] [OT] migrating old site to cleaner URLs In-Reply-To: <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> References: <30ce306c0705281108y34f70ed0l4c6b889a3c3a0084@mail.gmail.com> <465B1B52.8050001@php.net> <30ce306c0705281125l391a24adme8b69a5af2089917@mail.gmail.com> <465B1FD9.7050209@php.net> <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> Message-ID: Hi there: I have an old site that has been online for ~7 years, and it is established, if a bit old and crusty. It's a database-driven directory of products for the Mac, and it performs reasonably well in google's search results, and gets a fair amount of traffic. This site was built before I even had a framework, so it's all cobbled together, and I'm just now finally building it out to what I always wanted it to be, while simultaneously moving it to my clean (er) framework. So, the question is this... My URLs are all something like www.xyz.com/trigger/0/1/4. I think at the time I just wanted them to be short. Now that I'm rebuilding it, I have different needs, because the site will be structured a bit differently in order to list products for more platforms. I would like to have www.xyz.com/product/1234/ platform/567. Still short, but makes more sense. Thing is, the site does receive a great deal of its traffic from google, and who knows how many bazillion links there are pointing to various pieces of the site, so I need to implement an intelligent way to parse the old URLs into the new ones. But that's not the hard part; the part I am worried about is losing the search weighting I've built up over the years. I've read that google ignores 302 redirection codes and doesn't update its index, so I'm a bit at a loss as how to proceed. Anyway, wondering if someone could give me advice or share a real- world example of what they have done in the past. Cheers, Marc Vose http://www.suzerain.com From brenttech at gmail.com Wed Jun 27 10:13:10 2007 From: brenttech at gmail.com (Brent Baisley) Date: Wed, 27 Jun 2007 10:13:10 -0400 Subject: [nycphp-talk] [OT] migrating old site to cleaner URLs In-Reply-To: References: <30ce306c0705281108y34f70ed0l4c6b889a3c3a0084@mail.gmail.com> <465B1B52.8050001@php.net> <30ce306c0705281125l391a24adme8b69a5af2089917@mail.gmail.com> <465B1FD9.7050209@php.net> <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> Message-ID: <5003FCCD-8683-4615-AC55-CA48E486EC0C@gmail.com> You probably want to look into Apache mod_rewrite, if you are running Apache. It will do exactly what you are looking for. The alternative is to put a php file in all of the "old" locations that is really just a single include line that loads the file from the new location you want to move to. On Jun 27, 2007, at 4:43 AM, Marc Antony Vose wrote: > Hi there: > > I have an old site that has been online for ~7 years, and it is > established, if a bit old and crusty. It's a database-driven > directory of products for the Mac, and it performs reasonably well > in google's search results, and gets a fair amount of traffic. > > This site was built before I even had a framework, so it's all > cobbled together, and I'm just now finally building it out to what > I always wanted it to be, while simultaneously moving it to my clean > (er) framework. So, the question is this... > > My URLs are all something like www.xyz.com/trigger/0/1/4. I think > at the time I just wanted them to be short. > > Now that I'm rebuilding it, I have different needs, because the > site will be structured a bit differently in order to list products > for more platforms. I would like to have www.xyz.com/product/1234/ > platform/567. Still short, but makes more sense. > > Thing is, the site does receive a great deal of its traffic from > google, and who knows how many bazillion links there are pointing > to various pieces of the site, so I need to implement an > intelligent way to parse the old URLs into the new ones. > > But that's not the hard part; the part I am worried about is losing > the search weighting I've built up over the years. I've read that > google ignores 302 redirection codes and doesn't update its index, > so I'm a bit at a loss as how to proceed. > > Anyway, wondering if someone could give me advice or share a real- > world example of what they have done in the past. > > Cheers, > > Marc Vose > http://www.suzerain.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From shiflett at php.net Wed Jun 27 10:15:51 2007 From: shiflett at php.net (Chris Shiflett) Date: Wed, 27 Jun 2007 10:15:51 -0400 Subject: [nycphp-talk] [OT] migrating old site to cleaner URLs In-Reply-To: References: <30ce306c0705281108y34f70ed0l4c6b889a3c3a0084@mail.gmail.com> <465B1B52.8050001@php.net> <30ce306c0705281125l391a24adme8b69a5af2089917@mail.gmail.com> <465B1FD9.7050209@php.net> <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> Message-ID: <46827117.6010509@php.net> Marc Antony Vose wrote: > I've read that google ignores 302 redirection codes and doesn't > update its index, so I'm a bit at a loss as how to proceed. Use a 301: http://shiflett.org/blog/2007/jan/url-vanity Chris -- Chris Shiflett http://shiflett.org/ From jonbaer at jonbaer.com Wed Jun 27 11:32:52 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 27 Jun 2007 11:32:52 -0400 Subject: [nycphp-talk] [OT] migrating old site to cleaner URLs In-Reply-To: <5003FCCD-8683-4615-AC55-CA48E486EC0C@gmail.com> References: <30ce306c0705281108y34f70ed0l4c6b889a3c3a0084@mail.gmail.com> <465B1B52.8050001@php.net> <30ce306c0705281125l391a24adme8b69a5af2089917@mail.gmail.com> <465B1FD9.7050209@php.net> <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> <5003FCCD-8683-4615-AC55-CA48E486EC0C@gmail.com> Message-ID: <13B114FD-E598-4F6C-909C-5B67F5AA8B61@jonbaer.com> There is a script out there which will run through your 404 apache log + put it into mod_rewrite recipes automatically, if I can dig up will post but Im sure it might also be trivial to write. I used this to clean up a switch over a few years back. - Jon On Jun 27, 2007, at 10:13 AM, Brent Baisley wrote: > You probably want to look into Apache mod_rewrite, if you are > running Apache. It will do exactly what you are looking for. > > The alternative is to put a php file in all of the "old" locations > that is really just a single include line that loads the file from > the new location you want to move to. > > > On Jun 27, 2007, at 4:43 AM, Marc Antony Vose wrote: > >> Hi there: >> >> I have an old site that has been online for ~7 years, and it is >> established, if a bit old and crusty. It's a database-driven >> directory of products for the Mac, and it performs reasonably well >> in google's search results, and gets a fair amount of traffic. >> >> This site was built before I even had a framework, so it's all >> cobbled together, and I'm just now finally building it out to what >> I always wanted it to be, while simultaneously moving it to my >> clean(er) framework. So, the question is this... >> >> My URLs are all something like www.xyz.com/trigger/0/1/4. I think >> at the time I just wanted them to be short. >> >> Now that I'm rebuilding it, I have different needs, because the >> site will be structured a bit differently in order to list >> products for more platforms. I would like to have www.xyz.com/ >> product/1234/platform/567. Still short, but makes more sense. >> >> Thing is, the site does receive a great deal of its traffic from >> google, and who knows how many bazillion links there are pointing >> to various pieces of the site, so I need to implement an >> intelligent way to parse the old URLs into the new ones. >> >> But that's not the hard part; the part I am worried about is >> losing the search weighting I've built up over the years. I've >> read that google ignores 302 redirection codes and doesn't update >> its index, so I'm a bit at a loss as how to proceed. >> >> Anyway, wondering if someone could give me advice or share a real- >> world example of what they have done in the past. >> >> Cheers, >> >> Marc Vose >> http://www.suzerain.com >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From m_rutko at yahoo.com Wed Jun 27 11:37:32 2007 From: m_rutko at yahoo.com (m rutko) Date: Wed, 27 Jun 2007 08:37:32 -0700 (PDT) Subject: [nycphp-talk] [OT] LAMP In-Reply-To: <13B114FD-E598-4F6C-909C-5B67F5AA8B61@jonbaer.com> Message-ID: <589504.92626.qm@web52107.mail.re2.yahoo.com> Hi I'm looking for mid level to senior level developers with LAMP experience for a long term project in Manhattan. Sorry no telecommuting, onsite only. Hourly rate is open. This is a great opportunity to be part of a very talented team in a company which is dedicated in using cutting edge technologies. If you're interested or would like to learn more contact me at mrutkowski at infotechnologiesinc.com or call 212-710-5534. Qualified candidates should have a deep background in web software development and have architected and coded complex software systems for large-scale Internet sites. Specific responsibilities include: - Building and enhancing high-availability database systems based on open-source solutions including MySQL - Architecting software solutions that are robust, scalable, and maintainable - Supporting production by helping to troubleshoot software issues on the site - Working in tandem with fellow engineers to define software architectures and technologies to be used - Evaluate new technologies and implement development best practices. - 5-7 years of software development experience, including at least 5 years of web development experience - Significant development experience in the LAMP environment - Strong background in MySQL, including an understanding of replication, caching, hot backups, load balancing, redundancy, and partitioning - Experience benchmarking, profiling, and identifying slow SQL queries - Excellent communication skills with both technical and non-technical audiences Experience developing in C++ or Java (for patches, performance extensions, and plug-ins), and Unix shell scripts In addition, the candidate will ideally have: - Knowledge of the Sun Solaris operating system - Familiarity with Oracle - Programming experience with more esoteric and powerful languages for data manipulation (Ruby, Python, Haskell, Lisp, Erlang) - Experience with profiling using tools like DTrace for Solaris or SystemTap/Valgrind for Linux - Knowledge of one or more of the following: content management systems, search engines, e-commerce applications, analytics applications, ad-serving technology, and email systems Thanks, Mike New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php --------------------------------- Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Wed Jun 27 12:12:06 2007 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 27 Jun 2007 12:12:06 -0400 Subject: [nycphp-talk] [OT] LAMP In-Reply-To: <589504.92626.qm@web52107.mail.re2.yahoo.com> References: <13B114FD-E598-4F6C-909C-5B67F5AA8B61@jonbaer.com> <589504.92626.qm@web52107.mail.re2.yahoo.com> Message-ID: <01af01c7b8d5$e843c9d0$640aa8c0@MobileZ> Hi Mike, Thanks for the post. However, we do have a NYPHP-Jobs list for job related posts and conversation. http://lists.nyphp.org/mailman/listinfo/jobs Thanks, H m rutko wrote on Wednesday, June 27, 2007 11:38 AM: > Hi > I'm looking for mid level to senior level developers with LAMP > experience for a long term project in Manhattan. > Sorry no telecommuting, onsite only. > Hourly rate is open. > This is a great opportunity to be part of a very talented team in a > company which is dedicated in using cutting edge technologies. > > If you're interested or would like to learn more contact me at > mrutkowski at infotechnologiesinc.com or call 212-710-5534. > > > > Qualified candidates should have a deep background in web software > development and have architected and coded complex software systems > for large-scale Internet sites. > Specific responsibilities include: > - Building and enhancing high-availability database systems based on > open-source solutions including MySQL > - Architecting software solutions that are robust, scalable, and > maintainable > - Supporting production by helping to troubleshoot software issues on > the site > - Working in tandem with fellow engineers to define software > architectures and technologies to be used > - Evaluate new technologies and implement development best practices. > - 5-7 years of software development experience, including at least 5 > years of web development experience > - Significant development experience in the LAMP environment > - Strong background in MySQL, including an understanding of > replication, caching, hot backups, load balancing, redundancy, and > partitioning > - Experience benchmarking, profiling, and identifying slow SQL queries > - Excellent communication skills with both technical and > non-technical audiences Experience developing in C++ or Java (for > patches, performance extensions, and plug-ins), and Unix shell > scripts > In addition, the candidate will ideally have: > - Knowledge of the Sun Solaris operating system > - Familiarity with Oracle > - Programming experience with more esoteric and powerful languages > for data manipulation (Ruby, Python, Haskell, Lisp, Erlang) > - Experience with profiling using tools like DTrace for Solaris or > SystemTap/Valgrind for Linux > - Knowledge of one or more of the following: content management > systems, search engines, e-commerce applications, analytics > applications, ad-serving technology, and email systems > > Thanks, > > Mike > > > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > ________________________________ > > Choose the right car based on your needs. Check out Yahoo! Autos new > Car Finder tool. > From m_rutko at yahoo.com Wed Jun 27 12:25:28 2007 From: m_rutko at yahoo.com (m rutko) Date: Wed, 27 Jun 2007 09:25:28 -0700 (PDT) Subject: [nycphp-talk] [OT] LAMP In-Reply-To: <01af01c7b8d5$e843c9d0$640aa8c0@MobileZ> Message-ID: <400701.831.qm@web52108.mail.re2.yahoo.com> Hi Hans, For some reason the job list is not allowing me to post on it ,I'm not sure why? And since this is a great opportunity that I'm sure a lot of members would want to know about ,I tried "conversations" Thanks, Mike Hans Zaunere wrote: Hi Mike, Thanks for the post. However, we do have a NYPHP-Jobs list for job related posts and conversation. http://lists.nyphp.org/mailman/listinfo/jobs Thanks, H m rutko wrote on Wednesday, June 27, 2007 11:38 AM: > Hi > I'm looking for mid level to senior level developers with LAMP > experience for a long term project in Manhattan. > Sorry no telecommuting, onsite only. > Hourly rate is open. > This is a great opportunity to be part of a very talented team in a > company which is dedicated in using cutting edge technologies. > > If you're interested or would like to learn more contact me at > mrutkowski at infotechnologiesinc.com or call 212-710-5534. > > > > Qualified candidates should have a deep background in web software > development and have architected and coded complex software systems > for large-scale Internet sites. > Specific responsibilities include: > - Building and enhancing high-availability database systems based on > open-source solutions including MySQL > - Architecting software solutions that are robust, scalable, and > maintainable > - Supporting production by helping to troubleshoot software issues on > the site > - Working in tandem with fellow engineers to define software > architectures and technologies to be used > - Evaluate new technologies and implement development best practices. > - 5-7 years of software development experience, including at least 5 > years of web development experience > - Significant development experience in the LAMP environment > - Strong background in MySQL, including an understanding of > replication, caching, hot backups, load balancing, redundancy, and > partitioning > - Experience benchmarking, profiling, and identifying slow SQL queries > - Excellent communication skills with both technical and > non-technical audiences Experience developing in C++ or Java (for > patches, performance extensions, and plug-ins), and Unix shell > scripts > In addition, the candidate will ideally have: > - Knowledge of the Sun Solaris operating system > - Familiarity with Oracle > - Programming experience with more esoteric and powerful languages > for data manipulation (Ruby, Python, Haskell, Lisp, Erlang) > - Experience with profiling using tools like DTrace for Solaris or > SystemTap/Valgrind for Linux > - Knowledge of one or more of the following: content management > systems, search engines, e-commerce applications, analytics > applications, ad-serving technology, and email systems > > Thanks, > > Mike > > > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > ________________________________ > > Choose the right car based on your needs. Check out Yahoo! Autos new > Car Finder tool. > oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg--> _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php --------------------------------- Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmcgraw1 at gmail.com Wed Jun 27 12:38:28 2007 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Wed, 27 Jun 2007 12:38:28 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? Message-ID: Hi All, this is my first post, so if this is in the wrong section please let me know. I'd like to know if anyone has developed a database schema for storing the revision history for a plain text document by multiple users. Basically, I'm talking about a wiki, but something much more simple. Any suggestions on methods of organizing the information using SQL (specifically MySQL) would be much appreciated. Thanks! - jake From ramons at gmx.net Wed Jun 27 12:43:49 2007 From: ramons at gmx.net (David Krings) Date: Wed, 27 Jun 2007 12:43:49 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: References: Message-ID: <468293C5.3050706@gmx.net> Jake McGraw wrote: > Hi All, this is my first post, so if this is in the wrong section > please let me know. > > I'd like to know if anyone has developed a database schema for storing > the revision history for a plain text document by multiple users. > Basically, I'm talking about a wiki, but something much more simple. > Any suggestions on methods of organizing the information using SQL > (specifically MySQL) would be much appreciated. > > Thanks! > - jake I'd just keep individual copies of the text files in the file system and then use a db table to keep track of the file location and their chronological sequence using a UNIX time stamp. Can't think of any easier way to do it. David From rolan at omnistep.com Wed Jun 27 13:40:05 2007 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 27 Jun 2007 13:40:05 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: References: Message-ID: <4682A0F5.7050804@omnistep.com> Jake McGraw wrote: > Hi All, this is my first post, so if this is in the wrong section > please let me know. > > I'd like to know if anyone has developed a database schema for storing > the revision history for a plain text document by multiple users. > Basically, I'm talking about a wiki, but something much more simple. > Any suggestions on methods of organizing the information using SQL > (specifically MySQL) would be much appreciated. > Subversion would be a good tool for your application. http://subversion.tigris.org/ ~Rolan From ps at sun-code.com Wed Jun 27 13:45:47 2007 From: ps at sun-code.com (Peter Sawczynec) Date: Wed, 27 Jun 2007 13:45:47 -0400 Subject: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? In-Reply-To: <1181-03970@sneakemail.com> References: <1181-03970@sneakemail.com> Message-ID: <004c01c7b8e3$01ae0fe0$050a2fa0$@com> Very nice google updates. Thanks. Peter -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of inforequest Sent: Tuesday, June 26, 2007 7:31 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] [OT] Does anyone know how Google grouped links a re done? Good luck, Mike. Just another edge to keep up with as technology advances. Site links do bring traffic, and they displace a half a centimeter or so of web page so the guys below you do suffer a bit for it ;-) I like them for the branding impression... if you search for a web design firm and see they have an SEO section and a "secure web hosting" .... you got branded ;-) I'd pay serious attention to Google Universal Search, coming to browser screens everywhere this summer. Images show up in the first position of page 1 (up to 5 or 6 hyperlinked images in a raw sometimes) and they are very click-attractive. And by the way, there is currently no limit to ownership of multiple images in that row, so you can own them all ;-) Videos are now showing up in-line, and playable inline as embedded videos. An embedded video knocks 3 or 4 competitors right off the "first page". Again, best for branding cause Google's keeping the traffic on the SERP page instead of passing it through to your site. Unless... and here comes that "advanced SEO" stuff again, you populate most of page 1 with embedded videos that are neutral and thus leave only your own web page snippets visible on the page :-) as 'calls to action" after the videos get old. Theuser has no choice but to click on your link.... -=john andrews DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group use| wrote: >John, > >Thank you very much for such a complete reply. I am going to have to give >this some thought to see what I can do to make this happen for us. I think >this is a really cool way to show off all the features offered by a site. > >Mike > > > >>-----Original Message----- >>From: inforequest [SMTP:1j0lkq002 at sneakemail.com] >>Sent: Tuesday, June 26, 2007 1:44 PM >>To: talk at lists.nyphp.org >>Subject: Re: [nycphp-talk] [OT] Does anyone know how Google grouped >>links a re done? >> >>DeWitt, Michael mjdewitt-at-alexcommgrp.com |nyphp dev/internal group >>use| wrote: >> >> >> >>>I was going through Google and noticed for some companies, they have a >>>series of grouped links appearing under the main search result. For >>>example: http://www.google.com/search?q=ioma , look at the 1st result for >>>Ioma. They have 4 links plus a "more" link. I thought this might be a >>>"subscribed" link, but I thought you had to subscribe in order to see the >>>additional subscribed links? >>> >>>I would appreciate any insight as to how this is done. >>> >>>Mike >>> >>> >>> >>> >>These are being called "site links" and are intended to show the >>searcher how a site has clearly-defined user interest areas, to help >>them in their search. >> >>It is believed that user click data is being used to help determine the >>need for site links, although some SEO people have been teasing Google >>this year and there are now some sites showing site links that probably >>shouldn't have them ;-) >> >>Most people I know think site links are based mostly on site structure >>and back links. >> >>If your site qualifies (searchers would benefit from site links as >>search navigation aids) then a good SEO would probably guide you by >>suggesting that you: >> >>- get inbound links from on-theme trusted sources TO your desired site >>link demarcation page, and make sure the page it titled and has H1/2 >>tags that match the theme exactly. e.g. get job sites to link back to >>/human-resources/index.html and make sure that page is titled "human >>resources" and has a h1/h2 set to match that specific theme. >>- make sure the site nav goes to that same demarcation page using the >>same title/htag-matching anchor text >>- add some internal text links to refer people to that same demarcation >>page with matching context words and anchor text (be your own best friend) >> >>A more advanced SEO would probably suggest you mine your own traffic >>logs and find the pages that Google ranks for "human resources", >>"careers", "jobs" etc and add a section to those (in H tags) that tells >>visitors that if they are looking for human resources (link) for careers >>at mycompany (link) they should go to the human resources page (link). >>In cases where the destnation page for incoming Google referrals >>on-theme was not important, 301 redirect it to the human resources page. >> >>Personally, I would do that last step first. >> >>I hope that helps. >> >>-=john andrews >> >>-- >>------------------------------------------------------------- >>Your web server traffic log file is the most important source of web >>business information available. Do you know where your logs are right now? >>Do you know who else has access to your log files? When they were last >>archived? Where those archives are? --John Andrews Competitive Webmaster >>and SEO Blogging at http://www.johnon.com >> >>_______________________________________________ >>New York PHP Community Talk Mailing List >>http://lists.nyphp.org/mailman/listinfo/talk >> >>NYPHPCon 2006 Presentations Online >>http://www.nyphpcon.com >> >>Show Your Participation in New York PHP >>http://www.nyphp.org/show_participation.php >> >> >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > > > -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From jonbaer at jonbaer.com Wed Jun 27 13:48:45 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 27 Jun 2007 13:48:45 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: <468293C5.3050706@gmx.net> References: <468293C5.3050706@gmx.net> Message-ID: Subversion and WebSVN :-) http://websvn.tigris.org/ On Jun 27, 2007, at 12:43 PM, David Krings wrote: > Jake McGraw wrote: >> Hi All, this is my first post, so if this is in the wrong section >> please let me know. >> I'd like to know if anyone has developed a database schema for >> storing >> the revision history for a plain text document by multiple users. >> Basically, I'm talking about a wiki, but something much more simple. >> Any suggestions on methods of organizing the information using SQL >> (specifically MySQL) would be much appreciated. >> Thanks! >> - jake > > I'd just keep individual copies of the text files in the file > system and then use a db table to keep track of the file location > and their chronological sequence using a UNIX time stamp. Can't > think of any easier way to do it. > > 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 steve.francia at gmail.com Wed Jun 27 14:55:45 2007 From: steve.francia at gmail.com (Steve Francia) Date: Wed, 27 Jun 2007 14:55:45 -0400 Subject: [nycphp-talk] [OT] migrating old site to cleaner URLs In-Reply-To: <13B114FD-E598-4F6C-909C-5B67F5AA8B61@jonbaer.com> References: <30ce306c0705281108y34f70ed0l4c6b889a3c3a0084@mail.gmail.com> <465B1B52.8050001@php.net> <30ce306c0705281125l391a24adme8b69a5af2089917@mail.gmail.com> <465B1FD9.7050209@php.net> <30ce306c0705281210v39e294e5je76518d0aecf4dfd@mail.gmail.com> <5003FCCD-8683-4615-AC55-CA48E486EC0C@gmail.com> <13B114FD-E598-4F6C-909C-5B67F5AA8B61@jonbaer.com> Message-ID: If you are using mod rewrite make sure you set the R=301, and don't forget to pass along the query string if you need to. RewriteRule ^oldurl$ /newurl [R=301,L] -Steve Francia On 6/27/07, Jon Baer wrote: > > There is a script out there which will run through your 404 apache > log + put it into mod_rewrite recipes automatically, if I can dig up > will post but Im sure it might also be trivial to write. I used this > to clean up a switch over a few years back. > > - Jon > > On Jun 27, 2007, at 10:13 AM, Brent Baisley wrote: > > > You probably want to look into Apache mod_rewrite, if you are > > running Apache. It will do exactly what you are looking for. > > > > The alternative is to put a php file in all of the "old" locations > > that is really just a single include line that loads the file from > > the new location you want to move to. > > > > > > On Jun 27, 2007, at 4:43 AM, Marc Antony Vose wrote: > > > >> Hi there: > >> > >> I have an old site that has been online for ~7 years, and it is > >> established, if a bit old and crusty. It's a database-driven > >> directory of products for the Mac, and it performs reasonably well > >> in google's search results, and gets a fair amount of traffic. > >> > >> This site was built before I even had a framework, so it's all > >> cobbled together, and I'm just now finally building it out to what > >> I always wanted it to be, while simultaneously moving it to my > >> clean(er) framework. So, the question is this... > >> > >> My URLs are all something like www.xyz.com/trigger/0/1/4. I think > >> at the time I just wanted them to be short. > >> > >> Now that I'm rebuilding it, I have different needs, because the > >> site will be structured a bit differently in order to list > >> products for more platforms. I would like to have www.xyz.com/ > >> product/1234/platform/567. Still short, but makes more sense. > >> > >> Thing is, the site does receive a great deal of its traffic from > >> google, and who knows how many bazillion links there are pointing > >> to various pieces of the site, so I need to implement an > >> intelligent way to parse the old URLs into the new ones. > >> > >> But that's not the hard part; the part I am worried about is > >> losing the search weighting I've built up over the years. I've > >> read that google ignores 302 redirection codes and doesn't update > >> its index, so I'm a bit at a loss as how to proceed. > >> > >> Anyway, wondering if someone could give me advice or share a real- > >> world example of what they have done in the past. > >> > >> Cheers, > >> > >> Marc Vose > >> http://www.suzerain.com > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From captainjc at gmail.com Wed Jun 27 16:59:18 2007 From: captainjc at gmail.com (Jeremy Campbell) Date: Wed, 27 Jun 2007 16:59:18 -0400 Subject: [nycphp-talk] optional vs. mandatory account creation Message-ID: <5EE44AB8-84AC-465D-9D05-2105C56F6153@gmail.com> has anyone come across any worthwhile analysis of optional vs. mandatory account creation in shopping carts. i'm sure it varies by demographic, but i'm curious if the amount of customers you'd lose by making it mandatory is at all significant. thanks, jeremy From cliff at pinestream.com Wed Jun 27 17:10:13 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Wed, 27 Jun 2007 17:10:13 -0400 Subject: [nycphp-talk] Web contact form -- email or database? Message-ID: Appreciate thoughts on contact/help forms on a web site: Options: 1. Directly send email to admins 2. Store form in database for online viewing by admins Thoughts? Email is simplest ? the infrastructure is in place. But storing the form in a database is more powerful. Allows analysis, history, logging, response time measurements, multiple personnel to view the form, etc. Hummm, think I just convinced myself DB is way to go. Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Wed Jun 27 17:28:31 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Wed, 27 Jun 2007 17:28:31 -0400 Subject: [nycphp-talk] Web contact form -- email or database? References: Message-ID: <028b01c7b902$1ca02940$6b01a8c0@gamebox> Web contact form -- email or database?Hello, What's the budget? Like you said, email is quick and works. DB is the better choice...but what does the budget permit? If you don't have the money, convince them of why the DB is better. Its somehting that is an easy sell to my clients when we discuss forms. Also, if you build it once, make it modular and easy to reuse ..that'll drop the inplementation cost and allow you to deploy it in almost situation. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Cliff Hirsch To: NYPHP Talk Sent: Wednesday, June 27, 2007 5:10 PM Subject: [nycphp-talk] Web contact form -- email or database? Appreciate thoughts on contact/help forms on a web site: Options: 1.. Directly send email to admins 2.. Store form in database for online viewing by admins Thoughts? Email is simplest - the infrastructure is in place. But storing the form in a database is more powerful. Allows analysis, history, logging, response time measurements, multiple personnel to view the form, etc. Hummm, think I just convinced myself DB is way to go. Cliff ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/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 rolanyang at gmail.com Wed Jun 27 17:35:22 2007 From: rolanyang at gmail.com (Rolan Yang) Date: Wed, 27 Jun 2007 17:35:22 -0400 Subject: [nycphp-talk] Web contact form -- email or database? In-Reply-To: References: Message-ID: I usually email. AND append the data to a local ascii file. On 6/27/07, Cliff Hirsch wrote: > Appreciate thoughts on contact/help forms on a web site: > > Options: > 1. Directly send email to admins > 2. Store form in database for online viewing by admins > > Thoughts? Email is simplest ? the infrastructure is in place. But storing > the form in a database is more powerful. Allows analysis, history, logging, > response time measurements, multiple personnel to view the form, etc. Hummm, > think I just convinced myself DB is way to go. > > Cliff > > From ken at secdat.com Wed Jun 27 18:44:13 2007 From: ken at secdat.com (Kenneth Downs) Date: Wed, 27 Jun 2007 18:44:13 -0400 Subject: [nycphp-talk] Web contact form -- email or database? In-Reply-To: References: Message-ID: <4682E83D.3070406@secdat.com> Cliff Hirsch wrote: > Appreciate thoughts on contact/help forms on a web site: > > Options: > > 1. Directly send email to admins > 2. Store form in database for online viewing by admins > > > Thoughts? Email is simplest --- the infrastructure is in place. But > storing the form in a database is more powerful. Allows analysis, > history, logging, response time measurements, multiple personnel to > view the form, etc. Hummm, think I just convinced myself DB is way to go. Yup, and if your sequence is: 1) store in db 2) generate and send emal ....then you can also resend emails. It's always good to be able to redo something. > > Cliff > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 steve.francia at gmail.com Wed Jun 27 18:47:07 2007 From: steve.francia at gmail.com (Steve Francia) Date: Wed, 27 Jun 2007 18:47:07 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: References: <468293C5.3050706@gmx.net> Message-ID: If it is just for a single document you can do it pretty easily with just sql (mysql). Make a document table and a version table. The document table would have the shell of what a document was (title, etc). The version table would have the document_id, content and the mod_date and author_id. To get a document just do a join on the most recent version. All the other solutions would require support outside of the application, which could cause scalability problems down the road. On 6/27/07, Jon Baer wrote: > > Subversion and WebSVN :-) > > http://websvn.tigris.org/ > > On Jun 27, 2007, at 12:43 PM, David Krings wrote: > > Jake McGraw wrote: > > Hi All, this is my first post, so if this is in the wrong section > please let me know. > I'd like to know if anyone has developed a database schema for storing > the revision history for a plain text document by multiple users. > Basically, I'm talking about a wiki, but something much more simple. > Any suggestions on methods of organizing the information using SQL > (specifically MySQL) would be much appreciated. > Thanks! > - jake > > > I'd just keep individual copies of the text files in the file system and > then use a db table to keep track of the file location and their > chronological sequence using a UNIX time stamp. Can't think of any easier > way to do it. > > 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 > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 ramons at gmx.net Wed Jun 27 20:28:57 2007 From: ramons at gmx.net (David Krings) Date: Wed, 27 Jun 2007 20:28:57 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: References: <468293C5.3050706@gmx.net> Message-ID: <468300C9.1050605@gmx.net> Steve Francia wrote: > The version table would have the document_id, content and the mod_date > and author_id. I am by no means a database expert, but why would one want to store guaranteed to be static data in a table such as the content. That content will never ever change. I agree with all other parts of your proposal, but recommend to store only a file path to each version of the file to keep the static bloat as small as possible. Since it is to be simple, I wouldn't bother with an author ID as this requires author account management, although it isn't that complex. Another thing to think about is to have some sort of logging and allow the system to delete content. In that case you'd need a "Deleted" column that keeps track of what is marked as deleted and what not. Taking the rows out of the table will corrupt the logging, especially when dealing with author accounts, which also need a "Deleted" column in case one takes one author account out. Anything more complicated than that is probably better done with a real version control system as proposed by others. Just my 2? on top the ones I already put on the table. ;) David From jonbaer at jonbaer.com Wed Jun 27 21:10:34 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 27 Jun 2007 21:10:34 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: References: <468293C5.3050706@gmx.net> Message-ID: <6BEEB2C1-19E4-4D1F-A97D-2984E04367C8@jonbaer.com> Another pretty cool option would be to use PECL's xdiff w/ the db content ... Table it w/ created_at, updated_at, content http://us2.php.net/manual/en/function.xdiff-string-diff.php Haven't had a chance to check it out but would be able to show changes over time. - Jon On Jun 27, 2007, at 6:47 PM, Steve Francia wrote: > If it is just for a single document you can do it pretty easily > with just > sql (mysql). > > Make a document table and a version table. > The document table would have the shell of what a document was > (title, etc). > > The version table would have the document_id, content and the > mod_date and > author_id. > > To get a document just do a join on the most recent version. All > the other > solutions would require support outside of the application, which > could > cause scalability problems down the road. > > > On 6/27/07, Jon Baer wrote: >> >> Subversion and WebSVN :-) >> >> http://websvn.tigris.org/ >> >> On Jun 27, 2007, at 12:43 PM, David Krings wrote: >> >> Jake McGraw wrote: >> >> Hi All, this is my first post, so if this is in the wrong section >> please let me know. >> I'd like to know if anyone has developed a database schema for >> storing >> the revision history for a plain text document by multiple users. >> Basically, I'm talking about a wiki, but something much more simple. >> Any suggestions on methods of organizing the information using SQL >> (specifically MySQL) would be much appreciated. >> Thanks! >> - jake >> >> >> I'd just keep individual copies of the text files in the file >> system and >> then use a db table to keep track of the file location and their >> chronological sequence using a UNIX time stamp. Can't think of any >> easier >> way to do it. >> >> 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 >> >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Thu Jun 28 08:27:24 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 08:27:24 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? Message-ID: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> Good Morning, In a few days, I will be sitting down with a perspective employee, and I'd like to get some feedback on good programming questions or excercises I can have them work on. At my last job, prior to becomming a fulltime consultant, I was asked to create a login function, that checked the username and password against a file. I did well, and felt that was a decent test. It had IO, security, string comparisions, fetching values from $_POST/$_GET ... This test was in addition to source code I provided for libraries I had written, and of course my resume. Now, the position being filled is that of an entry level programmer. I do not expect this person to be well trained in PHP/MySQL, but they must have a pretty strong understanding of programming methodologies in general (they are a college grad - CIS). So, again, what are some good metrics I can use to test these perspective employees? Thank you! - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Thu Jun 28 08:47:10 2007 From: ken at secdat.com (Kenneth Downs) Date: Thu, 28 Jun 2007 08:47:10 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> Message-ID: <4683ADCE.9010103@secdat.com> I can only offer my experience, which I hope will help some. The best employees I've ever had for difficult or changing situations were those with general problem-solving skills. In my two best cases, neither knew anything about the programming language we were using or the database when they were hired,but they quickly became invaluable and productive. In both cases their resumes spoke of their basic intelligence and when I met them I like them, so I hired them (or begged the powers to be to hire them). As for questions, its good to have a formal test you ask them to take, but interviewing is an art you can only get good at with practice. The usual advice applies, be yourself, ask questions about things that are important to you, and see how the person responds. Also check with HR to find out what you are *not* allowed to ask, anything that could be construed to be a basis for discrimination like age. If you like somebody and think they will work out, ask them to come back and invite in 2 or 3 of their potential coworkers and have a short brainstorming session on a problem you have at the moment. See what they contribute. Ben Sgro (ProjectSkyline) wrote: > Good Morning, > > In a few days, I will be sitting down with a perspective employee, > and I'd like to get some feedback on good programming questions > or excercises I can have them work on. > > At my last job, prior to becomming a fulltime consultant, I was asked > to create a login function, that checked the username and password > against a file. > > I did well, and felt that was a decent test. It had IO, security, string > comparisions, fetching values from $_POST/$_GET ... > This test was in addition to source code I provided for libraries I had > written, and of course my resume. > > Now, the position being filled is that of an entry level programmer. > I do not expect this person to be well trained in PHP/MySQL, > but they must have a pretty strong understanding of programming > methodologies in general (they are a college grad - CIS). > > So, again, what are some good metrics I can use to test these > perspective employees? > > Thank you! > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 cmerlo at ncc.edu Thu Jun 28 08:48:02 2007 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Thu, 28 Jun 2007 08:48:02 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> Message-ID: <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com> On 6/28/07, Ben Sgro (ProjectSkyline) wrote: > > Good Morning, > > In a few days, I will be sitting down with a perspective employee, > and I'd like to get some feedback on good programming questions > or excercises I can have them work on. > I think this mostly depends on what you want the employee to do once he/she is employed. If the job is mostly OO class design, then ask candidates to create a class to represent, say, a shopping cart, or a customer. If the job is mostly design, then create a boring HTML page and ask them to mark it up for proper application of CSS, or design on paper (without any code) a user interface for some part of your overall project. That being said, if I were in your shoes, I would try to gauge the candidate's level of understanding regarding certain key areas (inheritance, comments, modularity, etc.), as opposed to how much stuff they have memorized or can look up. My first programming gig straight out of school was cleaning up legacy code, and so in class I always emphasize the importance of looking at code you've never seen before, figuring out what it does, and figuring out ways to improve upon it. So, once again, depending on the actual job description, I might take some ugly code (in any real work environment, there should be no shortage of that :), print it out, and give the candidate a pad and a pen, or a text editor, and say "Clean this up. I'll be back in 20 minutes." -c -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Thu Jun 28 09:05:59 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 09:05:59 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com> Message-ID: <012301c7b985$1416dca0$6b01a8c0@gamebox> Hello all, So, once again, depending on the actual job description, I might take some ugly code (in any real work environment, there should be no shortage of that :), print it out, and give the candidate a pad and a pen, or a text editor, and say "Clean this up. I'll be back in 20 minutes." That's a great idea. Our first product (wasn't meant to ever be realesed heh) is a mess. If the candidate could manage to navigate through it and improve it, I would be impressed. Also check with HR to find out what you are *not* allowed to ask, anything that could be construed to be a basis for discrimination like age. We don't have HR, but I will keep it pretty technical and not personal...besides asking what their personal interests are. If you like somebody and think they will work out, ask them to come back and invite in 2 or 3 of their potential coworkers and have a short brainstorming session on a problem you have at the moment. See what they contribute. That's a great idea. The position is for a coder, but I let candidates know in my post and on the phone that there would be times when they might deal with customers, work an account, provide insight to larger projects, be writing CL scripts, etc. It's a many hats position, because we are a small company and have lots to get done. I know that this may not work, so based on their performance, I can place more of their time onto things they a) enjoy doing b) do well (which probably are related). As for questions, its good to have a formal test you ask them to take, but interviewing is an art you can only get good at with practice. This will be the first time the tables are turned. I've never conducted an interview before. Thanks for the feedback. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Christopher R. Merlo To: NYPHP Talk Sent: Thursday, June 28, 2007 8:48 AM Subject: Re: [nycphp-talk] Questions to ask at a job interview? On 6/28/07, Ben Sgro (ProjectSkyline) wrote: Good Morning, In a few days, I will be sitting down with a perspective employee, and I'd like to get some feedback on good programming questions or excercises I can have them work on. I think this mostly depends on what you want the employee to do once he/she is employed. If the job is mostly OO class design, then ask candidates to create a class to represent, say, a shopping cart, or a customer. If the job is mostly design, then create a boring HTML page and ask them to mark it up for proper application of CSS, or design on paper (without any code) a user interface for some part of your overall project. That being said, if I were in your shoes, I would try to gauge the candidate's level of understanding regarding certain key areas (inheritance, comments, modularity, etc.), as opposed to how much stuff they have memorized or can look up. My first programming gig straight out of school was cleaning up legacy code, and so in class I always emphasize the importance of looking at code you've never seen before, figuring out what it does, and figuring out ways to improve upon it. So, once again, depending on the actual job description, I might take some ugly code (in any real work environment, there should be no shortage of that :), print it out, and give the candidate a pad and a pen, or a text editor, and say "Clean this up. I'll be back in 20 minutes." -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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Thu Jun 28 10:36:04 2007 From: ramons at gmx.net (David Krings) Date: Thu, 28 Jun 2007 10:36:04 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <012301c7b985$1416dca0$6b01a8c0@gamebox> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com> <012301c7b985$1416dca0$6b01a8c0@gamebox> Message-ID: <4683C754.5040707@gmx.net> Hi! I never hired or interviewed anyone, but currently look for a new job and can tell you some of the questions that I ask and my point of view of things you consider doing during the interview. Ben Sgro (ProjectSkyline) wrote: > Hello all, > > /So, once again, depending on the actual job description, I might take > some ugly code (in any real work environment, there should be no > shortage of that :), print it out, and give the candidate a pad and a > pen, or a text editor, and say "Clean this up. I'll be back in 20 > minutes."/ > > That's a great idea. Our first product (wasn't meant to ever be realesed > heh) is a mess. If the candidate could manage to navigate through it and > improve it, I would be impressed. While that is indeed a good exercise it may backfire and make your development team look chaotic and disorganized. It may also give the impression as if it is OK to create ugly code. You or someone on your team apparently did. I would get some doubts if your place is really the best address to apply my skills. As a candidate I'd also be confused as to what the purpose of this exercise is. Do you expect me to go through thousands of lines later and clean up the mess that others left behind? Do these developers consider themselves to be "too good" to do work like that? And does this test tell you anything about how the candidate writes and formats code? At least don't tell the candidates that this code was considered a "product". You need to sell yourself to applicants in the same way as they sell themslves to you. And for anyone who is serious about their work things like coding standards, work ethic, and such matter as much as money. > /Also check with HR to find out what you are *not* allowed to ask, > anything that could be construed to be a basis for discrimination like age. > / > We don't have HR, but I will keep it pretty technical and not > personal...besides asking what > their personal interests are. I wouldn't ask anything personal other than education and previous employment. It is none of your business if the candidate likes watching SpongeBob. This isn't Germany where it is common to ask this, and the occupation of your parents, and to which elementary school you went to. > /If you like somebody and think they will work out, ask them to come > back and invite in 2 or 3 of their potential coworkers and have a short > brainstorming session on a problem you have at the moment. See what > they contribute./ > > That's a great idea. The position is for a coder, but I let candidates > know in my post and on the phone > that there would be times when they might deal with customers, work an > account, provide insight > to larger projects, be writing CL scripts, etc. It's a many hats > position, because we are a small company > and have lots to get done. I know that this may not work, so based on > their performance, I can > place more of their time onto things they a) enjoy doing b) do well > (which probably are related). In that case you may also consider someone who does PHP development as a hobby (like me), but has many other skills such as software QA and support experience (like me)....uh, did I just apply for the job? ;) You can always teach them about objects and classes later if they got the basics down such as loops, conditions, and such. > /As for questions, its good to have a formal test you ask them to take, > but interviewing is an art you can only get good at with practice./ > // > This will be the first time the tables are turned. I've never conducted > an interview before. > I was asked once to take a test during an interview. As soon as the HR person asked me to do that I no longer wanted that job. Hire me because I work well and not because I test well. Knowing a lot doesn't necessarily mean that one can do a lot. There is a fine line between knowledge and skill and you really want to go for skill more than knowledge. I'm not saying that knowing a lot is bad, but I met people with tons of technical degress that were challanged by wiring up a simple phone. Now, the questions that I tend to ask are: What is the ratio between developers and QA staff? (Should be somewhat towards 1:1) Ratio between staff and management? (the lower the better) Do you like working here? (You better shout out a convincing "Yes" immediately and tell me why your company/organization is the best to work for in the entire universe) What is the turnover rate? (If your staff is dropping like the flies you really have a problem, not only in regards to answering this question) Do I have access to all resources and persons on the team and in management? (I don't want to schedule an appointment with my supervisor for an urgent issue and I don't like not being allowed to go straight to other developers to address an issue. This is supposed a team, not a jail or the military) Am I allowed to choose the tools that I consider are the best to do the job? (Saying yes may mean that someone buys anything that Programmer's Paradise has in stock. If it is about buying the favorite PHP IDE for 50$ I'd expect that to be a non-issue as long as it makes me (means the candidate/employee) be more productive / feel more comfortable. After all, you hire someone because they have skills that you currently do not have available at all or in the needed amount in your team. You are looking for a subject matter expert and not a whipping boy.) Now the questions that I was asked and that I think are pretty useless: Where do you want to be in five years? (on my private beach with a huge house and tons of cash....no, I don't answer that, I say I want to broaden my knowledge and become a subject matter expert in the field I am working in. Honestly, first tell me that you will pay me for five years and then we can talk where I want to be.) Why did you apply for this position? (Guess why? I need a job and you are hiring, that's why. You apparently think that I am qualified otherwise you wouldn't have invited me for an interview.) How do you organize your workplace? (Who cares if it looks like a bomb dropped. There are no customers in my cube and in the end the quality of the result counts. A way more interesting question would be how the candidate treats other's workspaces and common areas, like the lunch room or bathroom - but you are not allowed to ask that.) What do you expect to get paid? (A million bucks, please....the candidate will let you know when you make an offer. If you really like one person and they turn you down, you can make a better offer. Use salary.com to find out what the going rate is in the area and be sure that the applicant did the same. Money is important, but really something to talk about at the very very end of the process.) Good luck finding the right person. David From smanes at magpie.com Thu Jun 28 10:40:11 2007 From: smanes at magpie.com (Steve Manes) Date: Thu, 28 Jun 2007 10:40:11 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> Message-ID: <4683C84B.5040603@magpie.com> Ben Sgro (ProjectSkyline) wrote: > Now, the position being filled is that of an entry level programmer. > I do not expect this person to be well trained in PHP/MySQL, > but they must have a pretty strong understanding of programming > methodologies in general (they are a college grad - CIS). > > So, again, what are some good metrics I can use to test these > perspective employees? Start with general logic tasks at the white board, like reversing a string in place. Then inverting all the words in a sentence like "I really hate taking tests", then reversing the letters in all the words in a sentence. This should be done language-agnostic (no strrchr() or reverse()). What I'm mostly interested in learning is how the applicant problem-solves. From ben at projectskyline.com Thu Jun 28 11:09:10 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 11:09:10 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com><012301c7b985$1416dca0$6b01a8c0@gamebox> <4683C754.5040707@gmx.net> Message-ID: <016f01c7b996$48bbab00$6b01a8c0@gamebox> Hello, Lots of good points. > In that case you may also consider someone who does PHP development as a > hobby (like me), but has many other skills such as software QA and support > experience (like me)....uh, did I just apply for the job? ;) > You can always teach them about objects and classes later if they got the > basics down such as loops, conditions, and such. This is exactly the role I'm looking to fill in my company. > uh, did I just apply for the job? ;) You can if you want! Contact me off list if you are truely interested. > I was asked once to take a test during an interview. As soon as the HR > person asked me to do that I no longer wanted that job. Hire me because I > work well and not because I test well. Knowing a lot doesn't necessarily > mean that one can do a lot. There is a fine line between knowledge and > skill and you really want to go for skill more than knowledge. I'm not > saying that knowing a lot is bad, but I met people with tons of technical > degress that were challanged by wiring up a simple phone. I have been asked to solve problems for jobs in the past. One I really bombed and still got the job, another I solved well and got the job. I don't see the point in NOT testing an applicant..I mean..if they're applying for a job as a programmer, and part of that is solving problems, I'm curious to see how they approach "problem solving". I don't care if they get the answer *right*, I just want to see their thought process. > While that is indeed a good exercise it may backfire and make your > development team look chaotic and disorganized True, I guess I'd just be curious if they can follow the code, and also how they could do it better. Point out some mistakes/bad practices. Thanks for the thoughts! - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: "David Krings" To: "NYPHP Talk" Sent: Thursday, June 28, 2007 10:36 AM Subject: Re: [nycphp-talk] Questions to ask at a job interview? > Hi! > > I never hired or interviewed anyone, but currently look for a new job and > can tell you some of the questions that I ask and my point of view of > things you consider doing during the interview. > > > Ben Sgro (ProjectSkyline) wrote: >> Hello all, >> /So, once again, depending on the actual job description, I might take >> some ugly code (in any real work environment, there should be no shortage >> of that :), print it out, and give the candidate a pad and a pen, or a >> text editor, and say "Clean this up. I'll be back in 20 minutes."/ >> That's a great idea. Our first product (wasn't meant to ever be realesed >> heh) is a mess. If the candidate could manage to navigate through it and >> improve it, I would be impressed. > > While that is indeed a good exercise it may backfire and make your > development team look chaotic and disorganized. It may also give the > impression as if it is OK to create ugly code. You or someone on your team > apparently did. I would get some doubts if your place is really the best > address to apply my skills. As a candidate I'd also be confused as to what > the purpose of this exercise is. Do you expect me to go through thousands > of lines later and clean up the mess that others left behind? Do these > developers consider themselves to be "too good" to do work like that? And > does this test tell you anything about how the candidate writes and > formats code? > At least don't tell the candidates that this code was considered a > "product". You need to sell yourself to applicants in the same way as they > sell themslves to you. And for anyone who is serious about their work > things like coding standards, work ethic, and such matter as much as > money. > > > >> /Also check with HR to find out what you are *not* allowed to ask, >> anything that could be construed to be a basis for discrimination like >> age. >> / >> We don't have HR, but I will keep it pretty technical and not >> personal...besides asking what >> their personal interests are. > > I wouldn't ask anything personal other than education and previous > employment. It is none of your business if the candidate likes watching > SpongeBob. This isn't Germany where it is common to ask this, and the > occupation of your parents, and to which elementary school you went to. > > >> /If you like somebody and think they will work out, ask them to come back >> and invite in 2 or 3 of their potential coworkers and have a short >> brainstorming session on a problem you have at the moment. See what they >> contribute./ >> That's a great idea. The position is for a coder, but I let candidates >> know in my post and on the phone >> that there would be times when they might deal with customers, work an >> account, provide insight >> to larger projects, be writing CL scripts, etc. It's a many hats >> position, because we are a small company >> and have lots to get done. I know that this may not work, so based on >> their performance, I can >> place more of their time onto things they a) enjoy doing b) do well >> (which probably are related). > > In that case you may also consider someone who does PHP development as a > hobby (like me), but has many other skills such as software QA and support > experience (like me)....uh, did I just apply for the job? ;) > You can always teach them about objects and classes later if they got the > basics down such as loops, conditions, and such. > > >> /As for questions, its good to have a formal test you ask them to take, >> but interviewing is an art you can only get good at with practice./ >> // This will be the first time the tables are turned. I've never >> conducted an interview before. >> > > I was asked once to take a test during an interview. As soon as the HR > person asked me to do that I no longer wanted that job. Hire me because I > work well and not because I test well. Knowing a lot doesn't necessarily > mean that one can do a lot. There is a fine line between knowledge and > skill and you really want to go for skill more than knowledge. I'm not > saying that knowing a lot is bad, but I met people with tons of technical > degress that were challanged by wiring up a simple phone. > > > Now, the questions that I tend to ask are: > What is the ratio between developers and QA staff? (Should be somewhat > towards 1:1) Ratio between staff and management? (the lower the better) > > Do you like working here? (You better shout out a convincing "Yes" > immediately and tell me why your company/organization is the best to work > for in the entire universe) > > What is the turnover rate? (If your staff is dropping like the flies you > really have a problem, not only in regards to answering this question) > > Do I have access to all resources and persons on the team and in > management? (I don't want to schedule an appointment with my supervisor > for an urgent issue and I don't like not being allowed to go straight to > other developers to address an issue. This is supposed a team, not a jail > or the military) > > Am I allowed to choose the tools that I consider are the best to do the > job? (Saying yes may mean that someone buys anything that Programmer's > Paradise has in stock. If it is about buying the favorite PHP IDE for 50$ > I'd expect that to be a non-issue as long as it makes me (means the > candidate/employee) be more productive / feel more comfortable. After all, > you hire someone because they have skills that you currently do not have > available at all or in the needed amount in your team. You are looking for > a subject matter expert and not a whipping boy.) > > Now the questions that I was asked and that I think are pretty useless: > Where do you want to be in five years? (on my private beach with a huge > house and tons of cash....no, I don't answer that, I say I want to broaden > my knowledge and become a subject matter expert in the field I am working > in. Honestly, first tell me that you will pay me for five years and then > we can talk where I want to be.) > > Why did you apply for this position? (Guess why? I need a job and you are > hiring, that's why. You apparently think that I am qualified otherwise you > wouldn't have invited me for an interview.) > > How do you organize your workplace? (Who cares if it looks like a bomb > dropped. There are no customers in my cube and in the end the quality of > the result counts. A way more interesting question would be how the > candidate treats other's workspaces and common areas, like the lunch room > or bathroom - but you are not allowed to ask that.) > > What do you expect to get paid? (A million bucks, please....the candidate > will let you know when you make an offer. If you really like one person > and they turn you down, you can make a better offer. Use salary.com to > find out what the going rate is in the area and be sure that the applicant > did the same. Money is important, but really something to talk about at > the very very end of the process.) > > > > Good luck finding the right person. > > David > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From cmerlo at ncc.edu Thu Jun 28 11:35:35 2007 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Thu, 28 Jun 2007 11:35:35 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <4683C754.5040707@gmx.net> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com> <012301c7b985$1416dca0$6b01a8c0@gamebox> <4683C754.5040707@gmx.net> Message-ID: <946586480706280835i5e736538j8f2a6f815600f110@mail.gmail.com> On 6/28/07, David Krings wrote: While that [cleaning legacy code -CRM] is indeed a good exercise it may > backfire and make your > development team look chaotic and disorganized. It may also give the > impression as if it is OK to create ugly code. You or someone on your > team apparently did. Just as a counter to that argument, since I'm the one whose first job was cleaning legacy code, the someone one the team who wrote like that was long gone before I arrived. It was a small company, and they just didn't have the manpower to clean up code that worked 99% of the time. Once the code started acting less reliably/failing more often, that's when my job was created. I would get some doubts if your place is really the > best address to apply my skills. As a candidate I'd also be confused as > to what the purpose of this exercise is. Do you expect me to go through > thousands of lines later and clean up the mess that others left behind? That was precisely what was expected of me. Do these developers consider themselves to be "too good" to do work like > that? And does this test tell you anything about how the candidate > writes and formats code? I don't know about the other developers. (Why does that matter, anyway?) And yes, giving that test to someone tells me a lot about how they write and format code. That's why I use similar tests in my courses, because I can't reasonably expect someone to write an entire program in an hour, along with multiple-choice and short-answer questions. I was asked once to take a test during an interview. As soon as the HR > person asked me to do that I no longer wanted that job. That's good, because you probably wouldn't have gotten it. Hire me because > I work well and not because I test well. There's only one way to tell whether a candidate will work well, and that's to watch him work -- at the very least, to examine the results of his work. I would never hire someone for being a nice guy, or for eloquently explaining polymorphism. If you're going to be a coder, I want to see your code. Now the questions that I was asked and that I think are pretty useless: And why employers find them useful: Where do you want to be in five years? If your answer has anything to do with not working, or not living here, then the interviewer will be fearful that you'll bolt as soon as you can. Why did you apply for this position? We need to make sure that this really is the job you want, that it'll be fulfilling, and that you will still want to be here in five years. How do you organize your workplace? The guy you're replacing was an absolute disaster, and people hated to share office space with him. I sure hope you're neat. What do you expect to get paid? If your expectations are unrealistic, you may not be happy working here. Generally speaking, I imagine it greatly diminishes the effectiveness of your interview to be offended by standard interview techniques and to respond with hostility. Then again, I've had my job for 7 years now; maybe I forgot what interviewing is like. -c -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Thu Jun 28 11:54:45 2007 From: ramons at gmx.net (David Krings) Date: Thu, 28 Jun 2007 11:54:45 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <946586480706280835i5e736538j8f2a6f815600f110@mail.gmail.com> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <946586480706280548n687bd5c0ob49a07050194412d@mail.gmail.com> <012301c7b985$1416dca0$6b01a8c0@gamebox> <4683C754.5040707@gmx.net> <946586480706280835i5e736538j8f2a6f815600f110@mail.gmail.com> Message-ID: <4683D9C5.2090401@gmx.net> > Generally speaking, I imagine it greatly diminishes the effectiveness of > your interview to be offended by standard interview techniques and to > respond with hostility. Then again, I've had my job for 7 years now; > maybe I forgot what interviewing is like. > -c Agreed and stand corrected on the other points. Just to make it clear, the ficticious answers that I wrote are not the ones I give during an interview (I may be blunt, but I'm not stupid) and in some cases don't even think that way. I do organize my workspace and find that a tendency to neatness and applying some sort of system makes it way easier to find records and react quickly to requests. I worked with people whose desks looked like the toy box of my five year old and they did very well with that approach. My point is that these questions produce answers that I think give an inaccurate impression of the person. There are better questions to ask, like "What do you want to learn?", "What do you do when your supervisor gives you a task that you think is plain wrong?", "What do you do when you are asked to do 15 tasks, but can do only 10?". Those are the questions through which I think one gets way more information about the candidate. David From lists at enobrev.com Thu Jun 28 12:36:10 2007 From: lists at enobrev.com (Mark Armendariz) Date: Thu, 28 Jun 2007 12:36:10 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? In-Reply-To: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> Message-ID: <007501c7b9a2$70568f70$0300a8c0@enobrev> > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline) > So, again, what are some good metrics I can use to test these perspective employees? Some great articles on hiring developers... FizzBuzz - having the programmer solve a simple programming problem (by Reg Braithwaite) http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers- who-grok-coding/ Jeff Atwood's FizzBuzz response http://www.codinghorror.com/blog/archives/000781.html Reg's response to everyone on the planet trying to solve FizzBuzz (with more about interviewing) http://weblog.raganwald.com/2007/01/dont-overthink-fizzbuzz.html And a more general article: Joel Spolsky's guide to hiring http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html Good luck!! Mark Armendariz From kzimmerm at yahoo.com Thu Jun 28 12:54:23 2007 From: kzimmerm at yahoo.com (Kurt Zimmerman) Date: Thu, 28 Jun 2007 09:54:23 -0700 (PDT) Subject: [nycphp-talk] Questions to ask at a job interview? Message-ID: <95788.81705.qm@web52212.mail.re2.yahoo.com> This is a rather interesting topic and I am quite amused with some of the answers. To start, I have over 27 years in IT. I've been through the ranks of programmer in all sorts of languages. Some of my greatest achievements were to take a medium size corporate lending company into the modern age of computer systems. None the less, I've been on both sides of the table. I've asked those tough questions and I've been asked those same type of questions. The key is to have an objective. If you want someone to clean up someone's mess then you better state that during the interviewing process. When I was looking for experienced developers I made sure the candidate new what I was looking for. In the one situation I told each candidate that I needed to clean up a mess and to mentor the other developers to stop making the mess. I was quite surprised to see how many people actually turned down my offer. If you want to bring someone in to get a few minor tasks developed and to manage then make it clear to the candidates. As for testing, the programmer position I took on last year I was asked to take a test. The test was no big deal but as stated here, it was designed to see if I had the ability to program a solution given a set of rules. My present position I was able to carry my 27 years of experience as well as show some aptitude towards the type of work which turned out to be enough. Hiring talented programmers can be challenging. If you know what you want then the questions often times tend to flow much easier. One other hint. When I was staffing that corporate finance company's development staff I would often have others within the group participate in the interviewing process. This was done for several reasons. I wanted to make sure that the others withing the group felt comfortable with the candidate. It is so important to develop and establish good dynamics withing a group. Groups that get along tend to be much more productive. Keep us posted. Kurt Zimmerman DBA RHWI, Inc Poughkeepsie, NY Kurt W. Zimmerman ____________________________________________________________________________________ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 From Consult at CovenantEDesign.com Thu Jun 28 13:05:32 2007 From: Consult at CovenantEDesign.com (CED) Date: Thu, 28 Jun 2007 13:05:32 -0400 Subject: [nycphp-talk] Questions to ask at a job interview? References: <007401c7b97f$af7cdf10$6b01a8c0@gamebox> <4683C84B.5040603@magpie.com> Message-ID: <004601c7b9a6$899f0bc0$07d6f4a7@ced> Beautiful point Steve. Critical thinking is certainly a talent that is taken for granted, and often missed in the standard interviewing process. Although workspace cleanliness and code hygeine is 'nice-to-have' I'd trade it for the guy that I could drop an emergency project on, and is going to respond with a clear communication of several optional solutions. A critical thinker is also much more likely to learn new concepts and processes, which is invaluable, particularly within software development, where the race is run so bleeding edge from time to time. I would have to also echo Mr. Merlo's comments. Competency is crucial, but that does too depend on the area and software. For instance I would probably be more critical of a C++ heads-down coding position than I would for a PHP UI builder position. hope that make sense, casue that's what it is, my two cents. =D -Ed ----- Original Message ----- From: "Steve Manes" To: "NYPHP Talk" Sent: Thursday, June 28, 2007 10:40 AM Subject: Re: [nycphp-talk] Questions to ask at a job interview? > Ben Sgro (ProjectSkyline) wrote: > > Now, the position being filled is that of an entry level programmer. > > I do not expect this person to be well trained in PHP/MySQL, > > but they must have a pretty strong understanding of programming > > methodologies in general (they are a college grad - CIS). > > > > So, again, what are some good metrics I can use to test these > > perspective employees? > > Start with general logic tasks at the white board, like reversing a > string in place. Then inverting all the words in a sentence like "I > really hate taking tests", then reversing the letters in all the words > in a sentence. This should be done language-agnostic (no strrchr() or > reverse()). What I'm mostly interested in learning is how the applicant > problem-solves. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 Jun 28 14:54:36 2007 From: chsnyder at gmail.com (csnyder) Date: Thu, 28 Jun 2007 14:54:36 -0400 Subject: [nycphp-talk] DB Schema for storing revision history? In-Reply-To: <468300C9.1050605@gmx.net> References: <468293C5.3050706@gmx.net> <468300C9.1050605@gmx.net> Message-ID: On 6/27/07, David Krings wrote: > Steve Francia wrote: > > The version table would have the document_id, content and the mod_date > > and author_id. > > I am by no means a database expert, but why would one want to store > guaranteed to be static data in a table such as the content. That > content will never ever change. I agree with all other parts of your > proposal, but recommend to store only a file path to each version of the > file to keep the static bloat as small as possible. Be careful of over-simplifying so much that it becomes complex. By storing important data outside of the database, you have created a situation in which two different sets of data need to be backed up, migrated to different servers, configured into applications, etc. Databases are extremely useful for keeping related data together. -- Chris Snyder http://chxo.com/ From jakob.buchgraber at googlemail.com Thu Jun 28 15:11:44 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Thu, 28 Jun 2007 21:11:44 +0200 Subject: [nycphp-talk] Rely on destructor to be called?! Message-ID: <468407F0.6090909@gmail.com> Hey! I am writing a logging class which writes all the data that are to be logged in a buffer and when the destructor is called the buffer is cleared and written to some data storage. So I wanted to know whether I can rely on the destructor to be called. In my tests I just figured out that it won't get called if the script ends with a fatal error or something comparable. Otherwise it's always invoked. So just to ensure that I haven't forgotten something? Is there any other situation where it's not invoked? Cheers, Jay -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From ben at projectskyline.com Thu Jun 28 15:21:27 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 15:21:27 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells Message-ID: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> Hello again, I've always had an interest in security. Not too long ago a friend was looking into deploying joomla for a client. He's a pentester/researcher for a very well educated and influential firm = ] , so he had to make sure it was going to be secure. He started researching and found that many joomla installs had/have been comprimised via XSS attacks. Today, he posted the link of a site that had been owned by XSS and the crackers installed this web based backdoor script. I grabbed the script and included it here http://www.projectskyline.com/phplist/r57shell.txt to show PHP developers AGAIN how important security is and give us an inside look at some of the tools our enemies are armed with. For those that deploy joomla, this is especially something to watch for. For everyone else, just something to checkout. You'll notice this script enables: - Mail to be sent out (w/or w/out files attached) - Commands to be run. - Search for SUID, writable directories, files, tmp files., .(files) ... - Outgoing connections to be established - Some kind of IRC implementation - SQL to be run - Files can be downloaded and uploaded - and much, much more. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Thu Jun 28 15:25:21 2007 From: ramons at gmx.net (David Krings) Date: Thu, 28 Jun 2007 15:25:21 -0400 Subject: [nycphp-talk] When to close a mysql connection Message-ID: <46840B21.6000205@gmx.net> Hi! Up until now I always opened a db connection to MySQL, did my query stuff and then closed the connection again, went on to the next script, opened the db connection, did some more queries, closed the connection, went to next script..... Is there anything speaking against making the db link pointer to be global, call the connection script once right at the start of the set of scripts and then assume that it is just there? Or asking differently, is there anything speaking against opening and closing the db connection each time a set of queries is to be executed? I just wonder if I make poor PHP / MySQL work harder than necessary. David From jakob.buchgraber at googlemail.com Thu Jun 28 16:33:02 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Thu, 28 Jun 2007 22:33:02 +0200 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <46840B21.6000205@gmx.net> References: <46840B21.6000205@gmx.net> Message-ID: <46841AFE.6040109@gmail.com> David Krings wrote: > Hi! > > Up until now I always opened a db connection to MySQL, did my query > stuff and then closed the connection again, went on to the next script, > opened the db connection, did some more queries, closed the connection, > went to next script..... > > Is there anything speaking against making the db link pointer to be > global, call the connection script once right at the start of the set of > scripts and then assume that it is just there? > > Or asking differently, is there anything speaking against opening and > closing the db connection each time a set of queries is to be executed? > > I just wonder if I make poor PHP / MySQL work harder than necessary. > > 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 > As long as you need to send queries to the database you should keep the connection open, because connecting to the database is very often the slowest part of the whole script. - Jay -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From ben at projectskyline.com Thu Jun 28 16:43:01 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 16:43:01 -0400 Subject: [nycphp-talk] When to close a mysql connection References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> Message-ID: <026301c7b9c4$ebe35020$6b01a8c0@gamebox> Hello, Doesn't using pconnect take care of this? http://us.php.net/manual/en/function.mysql-pconnect.php What's the best implementation?(provide some source if you can...) - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: "Jakob Buchgraber" To: "NYPHP Talk" Sent: Thursday, June 28, 2007 4:33 PM Subject: Re: [nycphp-talk] When to close a mysql connection > David Krings wrote: >> Hi! >> >> Up until now I always opened a db connection to MySQL, did my query stuff >> and then closed the connection again, went on to the next script, opened >> the db connection, did some more queries, closed the connection, went to >> next script..... >> >> Is there anything speaking against making the db link pointer to be >> global, call the connection script once right at the start of the set of >> scripts and then assume that it is just there? >> >> Or asking differently, is there anything speaking against opening and >> closing the db connection each time a set of queries is to be executed? >> >> I just wonder if I make poor PHP / MySQL work harder than necessary. >> >> 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 >> > > As long as you need to send queries to the database you should keep the > connection open, because connecting to the database is very often the > slowest part of the whole script. > > - Jay > > -- > Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From ramons at gmx.net Thu Jun 28 17:44:29 2007 From: ramons at gmx.net (David Krings) Date: Thu, 28 Jun 2007 17:44:29 -0400 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <026301c7b9c4$ebe35020$6b01a8c0@gamebox> References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> <026301c7b9c4$ebe35020$6b01a8c0@gamebox> Message-ID: <46842BBD.80802@gmx.net> Ben Sgro (ProjectSkyline) wrote: > Hello, > > Doesn't using pconnect take care of this? > http://us.php.net/manual/en/function.mysql-pconnect.php > > What's the best implementation?(provide some source if you can...) > > - Ben > I currently have the connection stuff inside of an include file. So I basically would change the line with the mysql_connect to mysql_pconnect and ditch all the mysql_close lines that I have in my script, since mysql_close does not close persistent connections. But then again, how do I close a persistent connection? Uh...found it, the connection gets dropped automatically by MySQL. Hmmmmmm, I am not really convinced that this is as good as it sounds. Especially in my current project I allow the active work frame to be 24 hours before I force users out (will make that configurable later). I must then set the MySQL timeout to at least the same value, which potentially could cause that MySQL holds many connections. Yea, what is the best implementation? David From jonbaer at jonbaer.com Thu Jun 28 20:18:04 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Thu, 28 Jun 2007 20:18:04 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells In-Reply-To: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> Message-ID: I think an even worse attack would be what happened to WordPress not too long ago, the code itself on the distribution servers was tinkered with. It's a little unfair to point out XSS as being only a Joomla issue. It happens to any software that lingers past even a single minor 0.1 upgrade, including C libraries and such. The bottom line is if you are shared hosting you are leaving "security" in the hands of your ISP period. If you are running your own boxes and don't have things like Tripwire or Snort running you are going to be unaware of such attacks anyway. One of better ways to keep up on it is to monitor files like Bleeding Edge for software you are running ... http://www.bleedingsnort.com/bleeding-web.rules - Jon On Jun 28, 2007, at 3:21 PM, Ben Sgro ((ProjectSkyline)) wrote: > Hello again, > > I've always had an interest in security. Not too long ago a friend > was looking > into deploying joomla for a client. He's a pentester/researcher for > a very well > educated and influential firm = ] , so he had to make sure it was > going to be secure. > > He started researching and found that many joomla installs had/have > been comprimised > via XSS attacks. > > Today, he posted the link of a site that had been owned by XSS and > the crackers installed this > web based backdoor script. > > I grabbed the script and included it here http:// > www.projectskyline.com/phplist/r57shell.txt > to show PHP developers AGAIN how important security is and give us > an inside look at > some of the tools our enemies are armed with. > > For those that deploy joomla, this is especially something to watch > for. > For everyone else, just something to checkout. > > You'll notice this script enables: > > - Mail to be sent out (w/or w/out files attached) > - Commands to be run. > - Search for SUID, writable directories, files, tmp files., . > (files) ... > - Outgoing connections to be established > - Some kind of IRC implementation > - SQL to be run > - Files can be downloaded and uploaded > - and much, much more. > > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New > Horizons_______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 ben at projectskyline.com Thu Jun 28 20:44:13 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Thu, 28 Jun 2007 20:44:13 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> Message-ID: <02ee01c7b9e6$9d6cd340$6b01a8c0@gamebox> Hello Jon, Great points. I think an even worse attack would be what happened to WordPress not too long ago, the code itself on the distribution servers was tinkered with. Wow, that's really awful. Didn't know about that. It's a little unfair to point out XSS as being only a Joomla issue. I didn't mean to say Joomla only has XSS problems...in fact, I don't think I did. I've used snort in the past, and tripwire. I find snort tough, because you have to keep up w/the signatures, and thus requires time and attention. In a small company such as mine, I'd love to set it up, but I don't have the time to monitor and adjust it. Plus, snort is not the end all be all. Its signature based detection, and as far as I know doesn't address polymorphic code. But snort is a key part to an overall strong detection system. Great link BTW, I haven't messed w/snort in years. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons ----- Original Message ----- From: Jon Baer To: NYPHP Talk Sent: Thursday, June 28, 2007 8:18 PM Subject: Re: [nycphp-talk] [OT] XSS, Joomla & Remote Shells I think an even worse attack would be what happened to WordPress not too long ago, the code itself on the distribution servers was tinkered with. It's a little unfair to point out XSS as being only a Joomla issue. It happens to any software that lingers past even a single minor 0.1 upgrade, including C libraries and such. The bottom line is if you are shared hosting you are leaving "security" in the hands of your ISP period. If you are running your own boxes and don't have things like Tripwire or Snort running you are going to be unaware of such attacks anyway. One of better ways to keep up on it is to monitor files like Bleeding Edge for software you are running ... http://www.bleedingsnort.com/bleeding-web.rules - Jon On Jun 28, 2007, at 3:21 PM, Ben Sgro ((ProjectSkyline)) wrote: Hello again, I've always had an interest in security. Not too long ago a friend was looking into deploying joomla for a client. He's a pentester/researcher for a very well educated and influential firm = ] , so he had to make sure it was going to be secure. He started researching and found that many joomla installs had/have been comprimised via XSS attacks. Today, he posted the link of a site that had been owned by XSS and the crackers installed this web based backdoor script. I grabbed the script and included it here http://www.projectskyline.com/phplist/r57shell.txt to show PHP developers AGAIN how important security is and give us an inside look at some of the tools our enemies are armed with. For those that deploy joomla, this is especially something to watch for. For everyone else, just something to checkout. You'll notice this script enables: - Mail to be sent out (w/or w/out files attached) - Commands to be run. - Search for SUID, writable directories, files, tmp files., .(files) ... - Outgoing connections to be established - Some kind of IRC implementation - SQL to be run - Files can be downloaded and uploaded - and much, much more. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.com Thu Jun 28 22:22:25 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Thu, 28 Jun 2007 22:22:25 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells In-Reply-To: <02ee01c7b9e6$9d6cd340$6b01a8c0@gamebox> References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> <02ee01c7b9e6$9d6cd340$6b01a8c0@gamebox> Message-ID: <271D6DC2-B81C-40E2-8BA2-3A9EF4046B5B@jonbaer.com> Just for reference: http://wordpress.org/development/2007/03/upgrade-212/ BTW, you said it nicely, the point being that many smaller shops don't have time for monitoring items that Snort or Tripwire pick up (Network Security Monitoring). Neither do I but staying on top of the packages you do run and the available signatures via RSS/email @ least keep you aware of what is out there. - Jon On Jun 28, 2007, at 8:44 PM, Ben Sgro ((ProjectSkyline)) wrote: > Hello Jon, > > Great points. > > I think an even worse attack would be what happened to WordPress > not too long ago, the code itself on the distribution servers was > tinkered with. > > Wow, that's really awful. Didn't know about that. > > > It's a little unfair to point out XSS as being only a Joomla issue. > > I didn't mean to say Joomla only has XSS problems...in fact, I > don't think I did. > > I've used snort in the past, and tripwire. I find snort tough, > because you have to keep > up w/the signatures, and thus requires time and attention. In a > small company such > as mine, I'd love to set it up, but I don't have the time to > monitor and adjust it. > > Plus, snort is not the end all be all. Its signature based > detection, and as far as I know > doesn't address polymorphic code. But snort is a key part to an > overall strong detection > system. > > Great link BTW, I haven't messed w/snort in years. > > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > ----- Original Message ----- > From: Jon Baer > To: NYPHP Talk > Sent: Thursday, June 28, 2007 8:18 PM > Subject: Re: [nycphp-talk] [OT] XSS, Joomla & Remote Shells > > I think an even worse attack would be what happened to WordPress > not too long ago, the code itself on the distribution servers was > tinkered with. It's a little unfair to point out XSS as being only > a Joomla issue. It happens to any software that lingers past even > a single minor 0.1 upgrade, including C libraries and such. > > The bottom line is if you are shared hosting you are leaving > "security" in the hands of your ISP period. If you are running > your own boxes and don't have things like Tripwire or Snort running > you are going to be unaware of such attacks anyway. > > One of better ways to keep up on it is to monitor files like > Bleeding Edge for software you are running ... > > http://www.bleedingsnort.com/bleeding-web.rules > > - Jon > > On Jun 28, 2007, at 3:21 PM, Ben Sgro ((ProjectSkyline)) wrote: > >> Hello again, >> >> I've always had an interest in security. Not too long ago a friend >> was looking >> into deploying joomla for a client. He's a pentester/researcher >> for a very well >> educated and influential firm = ] , so he had to make sure it was >> going to be secure. >> >> He started researching and found that many joomla installs had/ >> have been comprimised >> via XSS attacks. >> >> Today, he posted the link of a site that had been owned by XSS and >> the crackers installed this >> web based backdoor script. >> >> I grabbed the script and included it here http:// >> www.projectskyline.com/phplist/r57shell.txt >> to show PHP developers AGAIN how important security is and give us >> an inside look at >> some of the tools our enemies are armed with. >> >> For those that deploy joomla, this is especially something to >> watch for. >> For everyone else, just something to checkout. >> >> You'll notice this script enables: >> >> - Mail to be sent out (w/or w/out files attached) >> - Commands to be run. >> - Search for SUID, writable directories, files, tmp files., . >> (files) ... >> - Outgoing connections to be established >> - Some kind of IRC implementation >> - SQL to be run >> - Files can be downloaded and uploaded >> - and much, much more. >> >> >> - Ben >> >> Ben Sgro, Chief Engineer >> ProjectSkyLine - Defining New >> Horizons_______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Fri Jun 29 03:18:29 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Fri, 29 Jun 2007 00:18:29 -0700 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells In-Reply-To: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> Message-ID: <13594-38159@sneakemail.com> Ben Sgro (ProjectSkyline) ben-at-projectskyline.com |nyphp dev/internal group use| wrote: > Hello again, > > I've always had an interest in security. Not too long ago a friend was > looking > into deploying joomla for a client. He's a pentester/researcher for a > very well > educated and influential firm = ] , so he had to make sure it was > going to be secure. > > He started researching and found that many joomla installs had/have > been comprimised > via XSS attacks. > > Today, he posted the link of a site that had been owned by XSS and the > crackers installed this > web based backdoor script. > > I grabbed the script and included it here > http://www.projectskyline.com/phplist/r57shell.txt > to show PHP developers AGAIN how important security is and give us an > inside look at > some of the tools our enemies are armed with. > > For those that deploy joomla, this is especially something to watch for. > For everyone else, just something to checkout. > > You'll notice this script enables: > > - Mail to be sent out (w/or w/out files attached) > - Commands to be run. > - Search for SUID, writable directories, files, tmp files., .(files) ... > - Outgoing connections to be established > - Some kind of IRC implementation > - SQL to be run > - Files can be downloaded and uploaded > - and much, much more. > > > - Ben > Perhaps most interesting about that r57shell is that it quietly remotely logs its own use. So in addition to the use as a backdoor shell script, it becomes a beacon for compromised systems - the tool maker gets a notice of every IP compromised by the tool when used by others. To quote full disclosure, "they [the script authors] can 0wn everything you 0wned...Trust no one... write your own tools." http://seclists.org/fulldisclosure/2006/Sep/0083.html -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From ben at projectskyline.com Fri Jun 29 10:21:19 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Fri, 29 Jun 2007 10:21:19 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox> <13594-38159@sneakemail.com> Message-ID: <008101c7ba58$c4021e30$6b01a8c0@gamebox> Hello, Its funny you mentioned this because I kinda assumed it might behave that way. I've seen shellcode in the past that did things you didn't know about... Great link, thanks! I decided to see what was encoded in the $c1, $c2 variables, which were base64 encoded strings. This is what they held:

- Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidential information intended only for the use of the individual to whom it is addressed. ----- Original Message ----- From: "inforequest" <1j0lkq002 at sneakemail.com> To: Sent: Friday, June 29, 2007 3:18 AM Subject: Re: [nycphp-talk] [OT] XSS, Joomla & Remote Shells > Ben Sgro (ProjectSkyline) ben-at-projectskyline.com |nyphp dev/internal > group use| wrote: > >> Hello again, >> I've always had an interest in security. Not too long ago a friend was >> looking >> into deploying joomla for a client. He's a pentester/researcher for a >> very well >> educated and influential firm = ] , so he had to make sure it was going >> to be secure. >> He started researching and found that many joomla installs had/have been >> comprimised >> via XSS attacks. >> Today, he posted the link of a site that had been owned by XSS and the >> crackers installed this >> web based backdoor script. >> I grabbed the script and included it here >> http://www.projectskyline.com/phplist/r57shell.txt to show PHP developers >> AGAIN how important security is and give us an inside look at >> some of the tools our enemies are armed with. >> For those that deploy joomla, this is especially something to watch for. >> For everyone else, just something to checkout. >> You'll notice this script enables: >> - Mail to be sent out (w/or w/out files attached) >> - Commands to be run. >> - Search for SUID, writable directories, files, tmp files., .(files) ... >> - Outgoing connections to be established >> - Some kind of IRC implementation >> - SQL to be run >> - Files can be downloaded and uploaded >> - and much, much more. >> - Ben >> > > Perhaps most interesting about that r57shell is that it quietly remotely > logs its own use. So in addition to the use as a backdoor shell script, it > becomes a beacon for compromised systems - the tool maker gets a notice of > every IP compromised by the tool when used by others. > > To quote full disclosure, "they [the script authors] can 0wn everything > you 0wned...Trust no one... write your own tools." > > http://seclists.org/fulldisclosure/2006/Sep/0083.html > > > > > > > -- > ------------------------------------------------------------- > Your web server traffic log file is the most important source of web > business information available. Do you know where your logs are right now? > Do you know who else has access to your log files? When they were last > archived? Where those archives are? --John Andrews Competitive Webmaster > and SEO Blogging at http://www.johnon.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From ben at projectskyline.com Fri Jun 29 10:36:40 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Fri, 29 Jun 2007 10:36:40 -0400 Subject: [nycphp-talk] [OT] XSS, Joomla & Remote Shells References: <021401c7b9b9$86cf0130$6b01a8c0@gamebox><13594-38159@sneakemail.com> <008101c7ba58$c4021e30$6b01a8c0@gamebox> Message-ID: <00a101c7ba5a$e8ee1ad0$6b01a8c0@gamebox> Hello again, Just because I was curious, I decoded the remaining variables. That provided 1 .c program and 3 .pl programs. The c code binds to a shell and allows incomming connections dropped to /bin/bash. The first .pl program does the same. The second .pl program connects via lynx to a port/host you specify. The third .pl program spawns child processes to push data to a host/port. Interesting ... You can view the code here: http://www.projectskyline.com/phplist/test.php - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidential information intended only for the use of the individual to whom it is addressed. ----- Original Message ----- From: "Ben Sgro (ProjectSkyline)" To: "NYPHP Talk" Sent: Friday, June 29, 2007 10:21 AM Subject: Re: [nycphp-talk] [OT] XSS, Joomla & Remote Shells > Hello, > > Its funny you mentioned this because I kinda assumed it might behave that > way. > > I've seen shellcode in the past that did things you didn't know about... > > Great link, thanks! > > I decided to see what was encoded in the $c1, $c2 variables, > which were base64 encoded strings. This is what they held: > >

> > - Ben > > Ben Sgro, Chief Engineer > ProjectSkyLine - Defining New Horizons > > Our company: www.projectskyline.com > Our products: www.project-contact.com > > This e-mail is confidential information intended only for the use of the > individual to whom it is addressed. > > ----- Original Message ----- > From: "inforequest" <1j0lkq002 at sneakemail.com> > To: > Sent: Friday, June 29, 2007 3:18 AM > Subject: Re: [nycphp-talk] [OT] XSS, Joomla & Remote Shells > > >> Ben Sgro (ProjectSkyline) ben-at-projectskyline.com |nyphp dev/internal >> group use| wrote: >> >>> Hello again, >>> I've always had an interest in security. Not too long ago a friend was >>> looking >>> into deploying joomla for a client. He's a pentester/researcher for a >>> very well >>> educated and influential firm = ] , so he had to make sure it was going >>> to be secure. >>> He started researching and found that many joomla installs had/have >>> been comprimised >>> via XSS attacks. >>> Today, he posted the link of a site that had been owned by XSS and the >>> crackers installed this >>> web based backdoor script. >>> I grabbed the script and included it here >>> http://www.projectskyline.com/phplist/r57shell.txt to show PHP >>> developers AGAIN how important security is and give us an inside look at >>> some of the tools our enemies are armed with. >>> For those that deploy joomla, this is especially something to watch >>> for. >>> For everyone else, just something to checkout. >>> You'll notice this script enables: >>> - Mail to be sent out (w/or w/out files attached) >>> - Commands to be run. >>> - Search for SUID, writable directories, files, tmp files., .(files) ... >>> - Outgoing connections to be established >>> - Some kind of IRC implementation >>> - SQL to be run >>> - Files can be downloaded and uploaded >>> - and much, much more. >>> - Ben >>> >> >> Perhaps most interesting about that r57shell is that it quietly remotely >> logs its own use. So in addition to the use as a backdoor shell script, >> it becomes a beacon for compromised systems - the tool maker gets a >> notice of every IP compromised by the tool when used by others. >> >> To quote full disclosure, "they [the script authors] can 0wn everything >> you 0wned...Trust no one... write your own tools." >> >> http://seclists.org/fulldisclosure/2006/Sep/0083.html >> >> >> >> >> >> >> -- >> ------------------------------------------------------------- >> Your web server traffic log file is the most important source of web >> business information available. Do you know where your logs are right >> now? Do you know who else has access to your log files? When they were >> last archived? Where those archives are? --John Andrews Competitive >> Webmaster and SEO Blogging at http://www.johnon.com >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From jmcgraw1 at gmail.com Fri Jun 29 10:32:36 2007 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 29 Jun 2007 10:32:36 -0400 Subject: [nycphp-talk] Preferred emailer? Message-ID: Anyone have a preferred email application to use with PHP? I've looked at Pear::Mail and PHPMailer, I'd like to know if you guys would recommend any others. - jake From support at dailytechnology.net Fri Jun 29 10:37:39 2007 From: support at dailytechnology.net (Brian Dailey) Date: Fri, 29 Jun 2007 10:37:39 -0400 Subject: [nycphp-talk] Preferred emailer? In-Reply-To: References: Message-ID: <46851933.6090705@dailytechnology.net> I highly recommend SwiftMailer. I use it in my CakePHP applications. It's far eaisier to modify (and to use, in my opinion) than PHPMailer. I have not tried Pear::Mail myself. http://www.swiftmailer.org/ - Brian Jake McGraw wrote: > Anyone have a preferred email application to use with PHP? I've looked > at Pear::Mail and PHPMailer, I'd like to know if you guys would > recommend any others. > > - jake > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- Thanks! - Brian Dailey Software Developer New York, NY www.dailytechnology.net -------------- next part -------------- A non-text attachment was scrubbed... Name: support.vcf Type: text/x-vcard Size: 264 bytes Desc: not available URL: From ben at projectskyline.com Fri Jun 29 10:43:45 2007 From: ben at projectskyline.com (Ben Sgro (ProjectSkyline)) Date: Fri, 29 Jun 2007 10:43:45 -0400 Subject: [nycphp-talk] Preferred emailer? References: Message-ID: <00b001c7ba5b$e5fad600$6b01a8c0@gamebox> Hello Jake, I've used and still use phpmailer. I like it ... a lot! I haven't used PEARs mailer. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons +1 718.487.9368 (N.Y. Office) Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidential information intended only for the use of the individual to whom it is addressed. ----- Original Message ----- From: "Jake McGraw" To: Sent: Friday, June 29, 2007 10:32 AM Subject: [nycphp-talk] Preferred emailer? > Anyone have a preferred email application to use with PHP? I've looked > at Pear::Mail and PHPMailer, I'd like to know if you guys would > recommend any others. > > - jake > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 paulcheung at tiscali.co.uk Fri Jun 29 11:24:39 2007 From: paulcheung at tiscali.co.uk (PaulCheung) Date: Fri, 29 Jun 2007 16:24:39 +0100 Subject: [nycphp-talk] I want to set up secure login to my website. Message-ID: <001e01c7ba61$9cbe26d0$0300a8c0@X9183> Hello Everybody I would like to set up secure login to my website, which is still under development and I want visitors to login using their allocated User-ID and Password. Of course, if they pass authentication they are in and if not they are 100% completely denied all access to the website. What I am trying to avoid is anybody penetrating security because they know its inner workings. I would also like to understand the coding behind this type of authentication as used on the Internet as opposed to an Intranet Can anybody point me in the right direction? Cheers Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.com Fri Jun 29 12:03:37 2007 From: jonbaer at jonbaer.com (Jon Baer) Date: Fri, 29 Jun 2007 12:03:37 -0400 Subject: [nycphp-talk] Preferred emailer? In-Reply-To: <46851933.6090705@dailytechnology.net> References: <46851933.6090705@dailytechnology.net> Message-ID: +1 for SwiftMailer ... There is a podcast by the author available on Zend DevZone here: http://devzone.zend.com/article/2213-PHP-Abstract-Podcast-Episode-6- SwiftMailer - Jon On Jun 29, 2007, at 10:37 AM, Brian Dailey wrote: > I highly recommend SwiftMailer. I use it in my CakePHP > applications. It's far eaisier to modify (and to use, in my > opinion) than PHPMailer. > > I have not tried Pear::Mail myself. > > http://www.swiftmailer.org/ > > - Brian > > Jake McGraw wrote: >> Anyone have a preferred email application to use with PHP? I've >> looked >> at Pear::Mail and PHPMailer, I'd like to know if you guys would >> recommend any others. >> - jake >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > -- > > Thanks! > - Brian Dailey > Software Developer > New York, NY > www.dailytechnology.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 ashaw at polymerdb.org Fri Jun 29 12:13:01 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 29 Jun 2007 11:13:01 -0500 Subject: [nycphp-talk] I want to set up secure login to my website. In-Reply-To: <001e01c7ba61$9cbe26d0$0300a8c0@X9183> References: <001e01c7ba61$9cbe26d0$0300a8c0@X9183> Message-ID: <46852F8D.6050104@polymerdb.org> PaulCheung wrote: > I would like to set up secure login to my website, which is still > under development ... Can anybody point me in the right > direction? Hi Paul, Most web servers (IIS, Apache, others) will support features to require a username and password on any directory on your site. For Apache, here's a good place to learn more: You could also do this kind of thing with pure PHP or other programming languages, but since your site is still under development, you're probably safer going with a user screening method that doesn't depend on your application code. - Allen -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From cliff at pinestream.com Fri Jun 29 12:33:11 2007 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 29 Jun 2007 12:33:11 -0400 Subject: [nycphp-talk] Preferred emailer? In-Reply-To: Message-ID: On 6/29/07 12:03 PM, "Jon Baer" wrote: > +1 for SwiftMailer ... > > There is a podcast by the author available on Zend DevZone here: > > http://devzone.zend.com/article/2213-PHP-Abstract-Podcast-Episode-6-SwiftMaile> r > > - Jon > But can we trust a program written by someone that plays snooker? I?d hate to get snookered. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmcgraw1 at gmail.com Fri Jun 29 12:39:43 2007 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 29 Jun 2007 12:39:43 -0400 Subject: [nycphp-talk] Preferred emailer? In-Reply-To: References: Message-ID: Thanks for the link, and thanks for everything guys, listening now. - jake On 6/29/07, Cliff Hirsch wrote: > > > On 6/29/07 12:03 PM, "Jon Baer" wrote: > > > +1 for SwiftMailer ... > > There is a podcast by the author available on Zend DevZone here: > > http://devzone.zend.com/article/2213-PHP-Abstract-Podcast-Episode-6-SwiftMailer > > - Jon > > But can we trust a program written by someone that plays snooker? > > I'd hate to get snookered. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/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 Fri Jun 29 14:34:17 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Fri, 29 Jun 2007 14:34:17 -0400 Subject: [nycphp-talk] PHP a Toy? In-Reply-To: <055401c7aaed$3b513fa0$681ba8c0@MobileZ> References: <002601c7a855$feb304a0$681ba8c0@MobileZ> <055401c7aaed$3b513fa0$681ba8c0@MobileZ> Message-ID: <8d9a42800706291134n6ad4565bs3c83cb23c466b8be@mail.gmail.com> I just think it's funny that PG SQL is using the elephant too. On 6/9/07, Hans Zaunere wrote: > > > Hi again, > > Tomorrow is the last call for getting your PHP toy. Please let me know by > noonish tomorrow if you haven't already and want one. > > H > > > > Hans Zaunere wrote on Wednesday, June 06, 2007 12:16 PM: > > Hi all, > > > > While some may think PHP is a toy, there may be some merit to that > > now. > > > > In cooperation with Vincent Pontier, the PHP elephant designer, > > Damien Seguy has developed a plush toy. > > > > Details are at the end of this message. It depends on how many we > > order, but we're looking at a price of about $10 USD. > > > > If you're interested, please contact me offlist and I'll help > > coordinate with Damien. > > > > Please respond by June 10th. > > > > Regards, > > > > H > > > > > > http://www.nexen.net/component/option,com_rsgallery2/Itemid,268/catid,32/ > > > > > > The evolution of the Elephant : > > > http://video.google.com/videoplay?docid=8642557610829220802&hl=en > > > > > > Dimensions: > > > ========== > > > The toy is 8 inches by 3.5 by 6 inches. With the tail and the > > > opened ears, it is now 10 inches by 3.5 by 8 inches. It is > > > weighting 100 g. > > > > > > the big one: > > > =========== > > > According to the prototype's dimension, it will be > > > 24 inches by 11 inches by 18 inches, and will weight a full > > > kilogramm. Pricing will be around 70 Euros. > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/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 > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Fri Jun 29 17:11:40 2007 From: chsnyder at gmail.com (csnyder) Date: Fri, 29 Jun 2007 17:11:40 -0400 Subject: [nycphp-talk] I want to set up secure login to my website. In-Reply-To: <001e01c7ba61$9cbe26d0$0300a8c0@X9183> References: <001e01c7ba61$9cbe26d0$0300a8c0@X9183> Message-ID: On 6/29/07, PaulCheung wrote: > > I would like to set up secure login to my website, which is still under > development and I want visitors to login using their allocated User-ID and > Password. Of course, if they pass authentication they are in and if not they > are 100% completely denied all access to the website. What I am trying to > avoid is anybody penetrating security because they know its inner workings. > I would also like to understand the coding behind this type of > authentication as used on the Internet as opposed to an Intranet Can > anybody point me in the right direction? Securing an internet site is not so different from securing an intranet site. Use a PHP session. If the user isn't logged-in (no userid in the session) then show or process the login form and exit(). session_start(); if ( empty($_SESSION['userid']) ) { if ( !empty($_POST['username'] ) { // authenticate user based on POST ... $_SESSION['userid'] = $userid; header("Location: /"); } // show login form ... exit(); } You'll want to use SSL (HTTPS) since the packets will be traveling over the public network. You might want to include a mechanism for limiting the number of login attempts that can be made, so that a casual attacker can't use "brute force" to guess passwords. Doing this is harder than it sounds; see mod_security for one approach. http://www.modsecurity.org/ -- Chris Snyder http://chxo.com/ From lists at zaunere.com Fri Jun 29 17:22:33 2007 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 29 Jun 2007 17:22:33 -0400 Subject: [nycphp-talk] Yesterday's Presentation Message-ID: <061c01c7ba93$9bd33ee0$640aa8c0@MobileZ> All, I've been informed that our speaker, Justin, was in an accident on the way to the meeting. He is ok but a little shaken. >From the NYPHP Community, the very best wishes. H From matteo.rinaudo at gmail.com Fri Jun 29 21:41:01 2007 From: matteo.rinaudo at gmail.com (Matteo Rinaudo) Date: Fri, 29 Jun 2007 21:41:01 -0400 Subject: [nycphp-talk] Hi from Matteo Rinaudo Message-ID: Hi, this is Matteo Rinaudo! Nice to (re)meet you! I have posted some messages a few years ago. Matteo From matteo.rinaudo at gmail.com Fri Jun 29 22:29:33 2007 From: matteo.rinaudo at gmail.com (Matteo Rinaudo) Date: Fri, 29 Jun 2007 22:29:33 -0400 Subject: [nycphp-talk] POST request Message-ID: Hi all, Is the maximum size allowed for a POST request 2 gigabytes? Apache 2.2 supports large files, like `not-rotated' log files *already* present on the local file system (of the web server), but, when file uploads are concerned, we have the following (from Apache official documentation): LimitRequestBody This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body. It looks like a different thing, not related to the Large File Support above. As far as I have understood, Apache can only support files larger than 2 gigabytes accessed locally, e.g. for appending data in huge log files, and the POST is (maybe) universally fixed to 2GB. Please tell me what you think about this. I am not able to upload files larger than 2GB via HTTP although I have set some (valid) values in the PHP.INI (memory_limit=3.9G, post_max_size=3.5G, upload_max_filesize=3G). If I look at the Apache's `error_log', it displays very weird entries, like that the size of the file I am uploading exceeds zero or a negative value. Thank you, Matteo From ramons at gmx.net Sat Jun 30 07:12:21 2007 From: ramons at gmx.net (David Krings) Date: Sat, 30 Jun 2007 07:12:21 -0400 Subject: [nycphp-talk] POST request In-Reply-To: References: Message-ID: <46863A95.3050605@gmx.net> Matteo Rinaudo wrote: > Hi all, > > Please tell me what you think about this. I am not able to upload > files larger than 2GB via HTTP although I have set some (valid) values > in the PHP.INI (memory_limit=3.9G, post_max_size=3.5G, > upload_max_filesize=3G). If I look at the Apache's `error_log', it > displays very weird entries, like that the size of the file I am > uploading exceeds zero or a negative value. > I am sure there are limits and I am sure they are related to what Apache/PHP can address and the server system you are using. I think the question needs to be not if and how much, but why? HTTP is designed to transfer hypertext, not files. Although it can do that, file transfer with HTTP and huge files is just waste. While I can see how that might be practical for an intranet solution with a fast LAN, I really don't see how it is healthy to upload 2GB files via ther internet using HTTP. Stuff will time out somewhere at some point and your server has quite a bit on its hands when getting several multi GB (pronounced gee byte being 1,073,741,824 bytes, not gigabyte being 1 billion bytes - enough hairsplitting). You also want to look at the upload file limits, which are a subset of the POST limits. The POST limit has to be larger than the upload file limit. I propose you look at FTP transfers and use the cURL functions to do this. I do not know if cURL has something that allows for uploading from the client to the server, but it for sure can grab a file from an FTP server and pull it to your web server's file system. I am sure that there are compact client side FTP apps in ECMAScript or Flash that allow for uploading files via FTP. That strikes me to be the way better approach for moving huge files and remedies any potential timeout problems. David From matteo.rinaudo at gmail.com Sat Jun 30 09:04:24 2007 From: matteo.rinaudo at gmail.com (Matteo Rinaudo) Date: Sat, 30 Jun 2007 09:04:24 -0400 Subject: [nycphp-talk] POST request In-Reply-To: <46863A95.3050605@gmx.net> References: <46863A95.3050605@gmx.net> Message-ID: Hi David, [CUT] > I think the question needs to be not if and how much, but why? HTTP is > designed to transfer hypertext, not files.[CUT] That's right, I agree with you, I considered to use FTP because of that, but I was curious about some HTTP related transfers. [CUT] > You also want to look at the upload file limits, which are a subset of > the POST limits. The POST limit has to be larger than the upload file limit. Yes, sure, as the PHP guys recommend, that's why I set post_max_size=3.5G and upload_max_filesize=3G. Also `memory_limit' must be larger than `post_max_size', as you can see from my previous message. My PHP installation is also compiled with large file support, I double-checked that the Makefile had these compiler flags: -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > I propose you look at FTP transfers and use the cURL functions to do > this.[CUT] > [CUT] That strikes me to be the way better > approach for moving huge files and remedies any potential timeout problems. Yes, no doubt about it. I agree, I was just curious about POST limits. Thank you, Matteo From jakob.buchgraber at googlemail.com Sat Jun 30 10:44:25 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Sat, 30 Jun 2007 16:44:25 +0200 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <46842BBD.80802@gmx.net> References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> <026301c7b9c4$ebe35020$6b01a8c0@gamebox> <46842BBD.80802@gmx.net> Message-ID: <46866C49.4060208@gmail.com> David Krings wrote: > Ben Sgro (ProjectSkyline) wrote: >> Hello, >> >> Doesn't using pconnect take care of this? >> http://us.php.net/manual/en/function.mysql-pconnect.php >> >> What's the best implementation?(provide some source if you can...) >> >> - Ben >> > > I currently have the connection stuff inside of an include file. So I > basically would change the line with the mysql_connect to mysql_pconnect > and ditch all the mysql_close lines that I have in my script, since > mysql_close does not close persistent connections. But then again, how > do I close a persistent connection? Uh...found it, the connection gets > dropped automatically by MySQL. > > Hmmmmmm, I am not really convinced that this is as good as it sounds. > Especially in my current project I allow the active work frame to be 24 > hours before I force users out (will make that configurable later). I > must then set the MySQL timeout to at least the same value, which > potentially could cause that MySQL holds many connections. > > Yea, what is the best implementation? > > 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 > No mysql doesn't hold many connections then as there is only one connection at all when using persistent connections. - Jakob -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From ramons at gmx.net Sat Jun 30 11:06:34 2007 From: ramons at gmx.net (David Krings) Date: Sat, 30 Jun 2007 11:06:34 -0400 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <46866C49.4060208@gmail.com> References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> <026301c7b9c4$ebe35020$6b01a8c0@gamebox> <46842BBD.80802@gmx.net> <46866C49.4060208@gmail.com> Message-ID: <4686717A.6030507@gmx.net> Jakob Buchgraber wrote: > No mysql doesn't hold many connections then as there is only one > connection at all when using persistent connections. > Well, yes, but I assume one per client. So if I'd set the timeout to be x hours then it might just be quite easy to pile up a few hundred of unused connections. And that even with only a few concurrent connections at a time. Playing devil's advocate here. I think that this might be less an issue when setting the timeout reasonably, such as 30 minutes. Much better to reconnect once every half hour (if that) then for every script call. Is that how it works? David From jakob.buchgraber at googlemail.com Sat Jun 30 20:28:32 2007 From: jakob.buchgraber at googlemail.com (Jakob Buchgraber) Date: Sun, 01 Jul 2007 02:28:32 +0200 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <4686717A.6030507@gmx.net> References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> <026301c7b9c4$ebe35020$6b01a8c0@gamebox> <46842BBD.80802@gmx.net> <46866C49.4060208@gmail.com> <4686717A.6030507@gmx.net> Message-ID: <4686F530.9060209@gmail.com> David Krings wrote: > Jakob Buchgraber wrote: > > No mysql doesn't hold many connections then as there is only one >> connection at all when using persistent connections. >> > Well, yes, but I assume one per client. So if I'd set the timeout to be > x hours then it might just be quite easy to pile up a few hundred of > unused connections. And that even with only a few concurrent connections > at a time. Playing devil's advocate here. > > I think that this might be less an issue when setting the timeout > reasonably, such as 30 minutes. Much better to reconnect once every half > hour (if that) then for every script call. Is that how it works? > > 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 > No that's not how it works, that's how normal database connections work. How should MySQL know which user connects? The user makes one HTTP Request and if he does it again nobody knows that he has ever been here (except if the webserver has set a cookie). I don't know how persistent connections exactly work as I haven't used them before. Everything I know and probably everything you need to know from a developers point of view is that when using persistent connections the connection is kept open even if the execution of the PHP script finishes and if the script is executed again and again there is always the same connection being used. If two scripts access this connection concurrently there is no second connection opened, no they are sharing this connection with each other. That's actually how I understood it. So correct me if I am wrong ... :-) - Jakob -- Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 From ramons at gmx.net Sat Jun 30 22:30:40 2007 From: ramons at gmx.net (David Krings) Date: Sat, 30 Jun 2007 22:30:40 -0400 Subject: [nycphp-talk] When to close a mysql connection In-Reply-To: <4686F530.9060209@gmail.com> References: <46840B21.6000205@gmx.net> <46841AFE.6040109@gmail.com> <026301c7b9c4$ebe35020$6b01a8c0@gamebox> <46842BBD.80802@gmx.net> <46866C49.4060208@gmail.com> <4686717A.6030507@gmx.net> <4686F530.9060209@gmail.com> Message-ID: <468711D0.2060101@gmx.net> Jakob Buchgraber wrote: > No that's not how it works, that's how normal database connections work. > How should MySQL know which user connects? The user makes one HTTP > Request and if he does it again nobody knows that he has ever been here > (except if the webserver has set a cookie). I don't know how persistent > connections exactly work as I haven't used them before. Everything I > know and probably everything you need to know from a developers point of > view is that when using persistent connections the connection is kept > open even if the execution of the PHP script finishes and if the script > is executed again and again there is always the same connection being > used. If two scripts access this connection concurrently there is no > second connection opened, no they are sharing this connection with each > other. > > That's actually how I understood it. So correct me if I am wrong ... :-) I am in no position to correct you, but isn't it that PHP talks to MySQL rather then the HTTP client? As far as MySQL is concerned, the connection comes from where the PHP interpreter is located. And since each connection from PHP to MySQL gets named sufficiently uniquely I guess that PHP can keep multiple clients apart. Normally one opens a connection, runs the queries, and then closes it. I always make sure that I explicitly close the connection, but after reading the documentation a script end will close the connection as well. Seems to be quite different from opening files, which stay open and locked even after the script is done. It may just be that PHP uses only one persistent connection and feeds all the queries through that one regardless of client (but returns the values back to the script instance from where the query came), which is what you suspect. Unless someone who really knows what is going on comes forward we can only resort to speculation. I will give it a try and see what happens. It's only adding a "p". Since the mysql_close doesn't do any thing on persistent connections there is no harm in leaving it in - or so the theory goes. I don't see a problem with my current project as this one will never be used by more than a few dozen clients at a time, but I have other projects where some optimization may be more than just OK. David