From webmaster at vbplusme.com Sun Jan 3 00:02:34 2010 From: webmaster at vbplusme.com (webmaster at vbplusme.com) Date: Sun, 3 Jan 2010 13:02:34 +0800 Subject: [nycphp-talk] define variables versus assigned variables Message-ID: <769902134.20100103130234@vbplusme.com> Hello , Happy New Year to all, I have two statements to make a database connection. One of them using define statement variables to parse the information to the function to connect to the database, i.e. open_connect(db_user, db_pass, db_name, db_host = 'localhost', $show_error=1) The second example uses assigned variables, for example, open_connect($db_user, $db_pass, $db_name, $db_host = 'localhost', $show_error=1) Seems to me that both of these techniques do the same thing so I was wondering why one would be any advantage over the other, though I just read that the define variables take twice as long to process under some conditions. Can some one explain which technique is the preferred method or whether or not any compelling reason exist for using one over the other? Thanks in advanced for any comments. -- Best regards, Webmaster mailto:webmaster at vbplusme.com From kkrutoi at gmail.com Sun Jan 3 00:22:50 2010 From: kkrutoi at gmail.com (Konstantin K) Date: Sun, 3 Jan 2010 00:22:50 -0500 Subject: [nycphp-talk] define variables versus assigned variables In-Reply-To: <769902134.20100103130234@vbplusme.com> References: <769902134.20100103130234@vbplusme.com> Message-ID: <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> 1. Your defined constants should be all CAPITALIZED. 2. I ran some tests earlier last year (2009) for this and found the following: - using class constants (and accessing it via ClassName::ConstantName) was about 30x faster than using define(). - there were about 1000 constants used (it's a pretty big and configurable app). - the tests were run using ab (with the top 10% and bottom 10% edge results thrown out) - the tests were run with apc and without apc. Will it make or break your app when it's under stress? Definitely not. Konstantin On Sun, Jan 3, 2010 at 12:02 AM, wrote: > Hello , > > ? ? ? ?Happy New Year to all, > > > ?I have two statements to make a database connection. One of them > ?using define statement variables to parse the information to the > ?function to connect to the database, i.e. > > ?open_connect(db_user, db_pass, db_name, db_host = 'localhost', $show_error=1) > > ?The second example uses assigned variables, for example, > > ?open_connect($db_user, $db_pass, $db_name, $db_host = 'localhost', $show_error=1) > > ?Seems to me that both of these techniques do the same thing so I was > ?wondering why one would be any advantage over the other, though I > ?just read that the define variables take twice as long to process > ?under some conditions. Can some one explain which technique is the > ?preferred method or whether or not any compelling reason exist for > ?using one over the other? > > ?Thanks in advanced for any comments. > > > -- > Best regards, > ?Webmaster ? ? ? ? ? ? ? ? ? ? ? ? ?mailto:webmaster at vbplusme.com > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From webmaster at vbplusme.com Sun Jan 3 00:52:44 2010 From: webmaster at vbplusme.com (webmaster at vbplusme.com) Date: Sun, 3 Jan 2010 13:52:44 +0800 Subject: [nycphp-talk] define variables versus assigned variables In-Reply-To: <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> References: <769902134.20100103130234@vbplusme.com> <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> Message-ID: <966663874.20100103135244@vbplusme.com> Hello Konstantin, Sunday, January 3, 2010, 1:22:50 PM, you wrote: > 1. Your defined constants should be all CAPITALIZED. > 2. I ran some tests earlier last year (2009) for this and found the following: > - using class constants (and accessing it via > ClassName::ConstantName) was about 30x faster than using define(). > - there were about 1000 constants used (it's a pretty big and > configurable app). > - the tests were run using ab (with the top 10% and bottom 10% > edge results thrown out) > - the tests were run with apc and without apc. > Will it make or break your app when it's under stress? Definitely not. > Konstantin > On Sun, Jan 3, 2010 at 12:02 AM, wrote: >> Hello , >> >> ? ? ? ?Happy New Year to all, >> >> >> ?I have two statements to make a database connection. One of them >> ?using define statement variables to parse the information to the >> ?function to connect to the database, i.e. >> >> ?open_connect(db_user, db_pass, db_name, db_host = 'localhost', $show_error=1) >> >> ?The second example uses assigned variables, for example, >> >> ?open_connect($db_user, $db_pass, $db_name, $db_host = 'localhost', $show_error=1) >> >> ?Seems to me that both of these techniques do the same thing so I was >> ?wondering why one would be any advantage over the other, though I >> ?just read that the define variables take twice as long to process >> ?under some conditions. Can some one explain which technique is the >> ?preferred method or whether or not any compelling reason exist for >> ?using one over the other? >> >> ?Thanks in advanced for any comments. >> >> >> -- >> Best regards, >> ?Webmaster ? ? ? ? ? ? ? ? ? ? ? ? ?mailto:webmaster at vbplusme.com >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org/Show-Participation > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4738 (20100102) __________ > The message was checked by ESET NOD32 Antivirus. > http://www.eset.com Thanks for the update. My example here is flawed, the constants in my sources are indeed all in upper case. Are you suggesting that the username, password and datbase name all be class constants and hard coded in the class definition? Sorry if this is a dumb question, I am trying to get my head around PHP OOP and am struggling a bit with the concepts. I am working with a database class that I got from phpclasses.org to try to understand how things work. -- Best regards, Webmaster mailto:webmaster at vbplusme.com From oorza2k5 at gmail.com Sun Jan 3 02:25:22 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Sun, 3 Jan 2010 02:25:22 -0500 Subject: [nycphp-talk] define variables versus assigned variables In-Reply-To: <966663874.20100103135244@vbplusme.com> References: <769902134.20100103130234@vbplusme.com> <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> <966663874.20100103135244@vbplusme.com> Message-ID: <68de37341001022325x384b2808l1049029ef6956be4@mail.gmail.com> The primary difference between a variable and a constant is mutability. If your database authorization details are not going to change, make them constants. If your database details DO change throughout the execution of a script, make them variables. In regards to the performance of constants in PHP, that's an incredibly minor improvement (a microoptimization, really) and it's my opinion that you ought to be writing software to be good code and not have to hack around considerations like how many microseconds your database username declaration takes. My advice: use constants for script immutable values and variables for mutable values. If you want to have a class constant, do that, but it's not worth the hassle to write a class around the idea that class constants are faster than global constants. Use which tool is right for the job. Depending on the structure of your application, DatabaseClass::USERNAME might make more sense than DB_USERNAME, but that decision ought to be dictated by the structure of your code, not some small performance consideration. -Eddie On Sun, Jan 3, 2010 at 12:52 AM, wrote: > Hello Konstantin, > > Sunday, January 3, 2010, 1:22:50 PM, you wrote: > >> 1. Your defined constants should be all CAPITALIZED. >> 2. I ran some tests earlier last year (2009) for this and found the following: >> ? ? - using class constants (and accessing it via >> ClassName::ConstantName) was about 30x faster than using define(). >> ? ? - there were about 1000 constants used (it's a pretty big and >> configurable app). >> ? ? - the tests were run using ab (with the top 10% and bottom 10% >> edge results thrown out) >> ? ? - the tests were run with apc and without apc. > >> Will it make or break your app when it's under stress? ?Definitely not. > >> Konstantin > > > > >> On Sun, Jan 3, 2010 at 12:02 AM, ? wrote: >>> Hello , >>> >>> ? ? ? ?Happy New Year to all, >>> >>> >>> ?I have two statements to make a database connection. One of them >>> ?using define statement variables to parse the information to the >>> ?function to connect to the database, i.e. >>> >>> ?open_connect(db_user, db_pass, db_name, db_host = 'localhost', $show_error=1) >>> >>> ?The second example uses assigned variables, for example, >>> >>> ?open_connect($db_user, $db_pass, $db_name, $db_host = 'localhost', $show_error=1) >>> >>> ?Seems to me that both of these techniques do the same thing so I was >>> ?wondering why one would be any advantage over the other, though I >>> ?just read that the define variables take twice as long to process >>> ?under some conditions. Can some one explain which technique is the >>> ?preferred method or whether or not any compelling reason exist for >>> ?using one over the other? >>> >>> ?Thanks in advanced for any comments. >>> >>> >>> -- >>> Best regards, >>> ?Webmaster ? ? ? ? ? ? ? ? ? ? ? ? ?mailto:webmaster at vbplusme.com >>> >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk > >> http://www.nyphp.org/Show-Participation > >> __________ Information from ESET NOD32 Antivirus, version of virus >> signature database 4738 (20100102) __________ > >> The message was checked by ESET NOD32 Antivirus. > >> http://www.eset.com > > > > > Thanks for the update. My example here is flawed, the constants in my > sources are indeed all in upper case. > > Are you suggesting that the username, password and datbase name all be > class constants and hard coded in the class definition? Sorry if this > is a dumb question, I am trying to get my head around PHP OOP and am > struggling a bit with the concepts. I am working with a database class > that I got from phpclasses.org to try to understand how things work. > > -- > Best regards, > ?Webmaster ? ? ? ? ? ? ? ? ? ? ? ? ? ?mailto:webmaster at vbplusme.com > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From webmaster at vbplusme.com Sun Jan 3 07:48:41 2010 From: webmaster at vbplusme.com (webmaster at vbplusme.com) Date: Sun, 3 Jan 2010 20:48:41 +0800 Subject: [nycphp-talk] define variables versus assigned variables In-Reply-To: <68de37341001022325x384b2808l1049029ef6956be4@mail.gmail.com> References: <769902134.20100103130234@vbplusme.com> <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> <966663874.20100103135244@vbplusme.com> <68de37341001022325x384b2808l1049029ef6956be4@mail.gmail.com> Message-ID: <354761771.20100103204841@vbplusme.com> Hello Eddie, Sunday, January 3, 2010, 3:25:22 PM, you wrote: > The primary difference between a variable and a constant is > mutability. If your database authorization details are not going to > change, make them constants. If your database details DO change > throughout the execution of a script, make them variables. In regards > to the performance of constants in PHP, that's an incredibly minor > improvement (a microoptimization, really) and it's my opinion that you > ought to be writing software to be good code and not have to hack > around considerations like how many microseconds your database > username declaration takes. > My advice: use constants for script immutable values and variables for > mutable values. If you want to have a class constant, do that, but > it's not worth the hassle to write a class around the idea that class > constants are faster than global constants. Use which tool is right > for the job. Depending on the structure of your application, > DatabaseClass::USERNAME might make more sense than DB_USERNAME, but > that decision ought to be dictated by the structure of your code, not > some small performance consideration. > -Eddie Gotcha, thanks for the guidance. I think I have a better understanding about it now. -- Best regards, Webmaster mailto:webmaster at vbplusme.com From matt at atopia.net Sun Jan 3 16:24:34 2010 From: matt at atopia.net (matt at atopia.net) Date: Sun, 3 Jan 2010 21:24:34 +0000 Subject: [nycphp-talk] email system for website Message-ID: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Hi all, I'm working on a website right now and am in charge of implementing email functionality. Multiple types of emails need to be sent, such as action emails (forgot password, new sign up, etc), and passive emails (cron runs every minute to see if something happened where it needs to email a user). At first, I thought about keeping active emailing inside the web code, and passive emailing inside a cron, but that doesn't allow for much control. My other idea was to use a listserv, and put all the emailing functionality in the web code, but have the management of those lists done in the background. My final option, which I like best, is to create an email queue table that can be populated in many ways. For instant actions, I can populate it with triggers, and for passive emails, I can populate it with a cron. Then, I have a single multi threaded perl script read from the queue and generate the emails, and then maintain the queue. Perhaps there is a better solution out there or something that does this already? I would love to use a system that already exists where I could just plug in the information and the "hooks". Thanks for any suggestions, Matt From tim_lists at o2group.com Sun Jan 3 16:42:43 2010 From: tim_lists at o2group.com (Tim Lieberman) Date: Sun, 3 Jan 2010 16:42:43 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: On Jan 3, 2010, at 4:24 PM, matt at atopia.net wrote: > > My final option, which I like best, is to create an email queue > table that can be populated in many ways. For instant actions, I can > populate it with triggers, and for passive emails, I can populate it > with a cron. Then, I have a single multi threaded perl script read > from the queue and generate the emails, and then maintain the queue. This seems a bit like overkill. After all, queueing email for delivery is exactly the job that sendmail et al were designed to do. Your typical email message can be templated as a simple sprintf()- style format string, which you can keep in the filesystem, or database, or whatever. There are also plenty of libraries you can use for composition, if you prefer (SwiftMailer and Zend_Mail come to mind). Then you'll want some code to generate email content, and some code to pass it off for delivery. The last bit (passing it off for delivery) should probably be more than a call to mail() -- but to start, just write a sensible abstraction that wraps mail(). If you later find you need something more involved (for instance, you want to use an external SMTP server, or you find some real need to write your own queuing system as you described), you can swap out the implementation pretty easily. I think the most important task is to separate the composition of mail from the queuing of mail cleanly, so that you retain flexibility. From jmcgraw1 at gmail.com Sun Jan 3 17:01:50 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Sun, 3 Jan 2010 17:01:50 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: On Sun, Jan 3, 2010 at 4:42 PM, Tim Lieberman wrote: > On Jan 3, 2010, at 4:24 PM, matt at atopia.net wrote: >> >> My final option, which I like best, is to create an email queue table that >> can be populated in many ways. For instant actions, I can populate it with >> triggers, and for passive emails, I can populate it with a cron. Then, I >> have a single multi threaded perl script read from the queue and generate >> the emails, and then maintain the queue. > > > This seems a bit like overkill. ?After all, queueing email for delivery is > exactly the job that sendmail et al were designed to do. > > Your typical email message can be templated as a simple sprintf()-style > format string, which you can keep in the filesystem, or database, or > whatever. ?There are also plenty of libraries you can use for composition, > if you prefer (SwiftMailer and Zend_Mail come to mind). > > Then you'll want some code to generate email content, and some code to pass > it off for delivery. > > The last bit (passing it off for delivery) should probably be more than a > call to mail() -- but to start, just write a sensible abstraction that wraps > mail(). ?If you later find you need something more involved (for instance, > you want to use an external SMTP server, or you find some real need to write > your own queuing system as you described), you can swap out the > implementation pretty easily. This is a good suggestion, I'd also recommend logging the email text (database or text log) and putting some kind of sanity check on the number of emails your app is sending out at any time. > > I think the most important task is to separate the composition of mail from > the queuing of mail cleanly, so that you retain flexibility. > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From matt at atopia.net Sun Jan 3 17:09:12 2010 From: matt at atopia.net (Matt Juszczak) Date: Sun, 3 Jan 2010 17:09:12 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: > This is a good suggestion, I'd also recommend logging the email text > (database or text log) and putting some kind of sanity check on the > number of emails your app is sending out at any time. What you are both suggesting makes sense, but correct me if I'm wrong, it duplicates email functionality. Our front ends are programmed in two different languages (forgot to mention that), so if I keep the active emails in the front end web code, I have to write the code twice, plus I have to code backend functionality to allow passive emails to go out (an example of a passive email: someone posts a reply to a thread, and I want to alert all of the users who are subscribed to that thread that there's a new message - too much to put in the code I would think, as there could be 1000's of subscribers). -matt From ajai at bitblit.net Sun Jan 3 17:24:14 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Sun, 3 Jan 2010 17:24:14 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: Message-ID: On Sun, 3 Jan 2010, Matt Juszczak wrote: > > This is a good suggestion, I'd also recommend logging the email text > > (database or text log) and putting some kind of sanity check on the > > number of emails your app is sending out at any time. > > What you are both suggesting makes sense, but correct me if I'm wrong, it > duplicates email functionality. Our front ends are programmed in two > different languages (forgot to mention that), so if I keep the active > emails in the front end web code, I have to write the code twice, plus I > have to code backend functionality to allow passive emails to go out (an > example of a passive email: someone posts a reply to a thread, and I want > to alert all of the users who are subscribed to that thread that there's a > new message - too much to put in the code I would think, as there could be > 1000's of subscribers). Of course, you would send out the emails in batches right? If you're using an MTA to do the heavy lifting (and you probably should be), then queuing emails via a batch process is better. -- From jmcgraw1 at gmail.com Sun Jan 3 17:30:15 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Sun, 3 Jan 2010 17:30:15 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: On Sun, Jan 3, 2010 at 5:09 PM, Matt Juszczak wrote: >> This is a good suggestion, I'd also recommend logging the email text >> (database or text log) and putting some kind of sanity check on the >> number of emails your app is sending out at any time. > > What you are both suggesting makes sense, but correct me if I'm wrong, it > duplicates email functionality. ?Our front ends are programmed in two > different languages (forgot to mention that), so if I keep the active emails > in the front end web code, I have to write the code twice, plus I have to > code backend functionality to allow passive emails to go out (an example of > a passive email: someone posts a reply to a thread, and I want to alert all > of the users who are subscribed to that thread that there's a new message - > too much to put in the code I would think, as there could be 1000's of > subscribers). My suggestion for you is to use something simple for the "front end" web application logic, so when you need to fire off an immediate email after a successful action just use a wrapper for mail(). When you need to fire off 1000s of emails, use a system specifically built for that purpose. - jake > > -matt > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From lists at zaunere.com Sun Jan 3 17:41:51 2010 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 3 Jan 2010 17:41:51 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads Message-ID: <00e801ca8cc5$f1159590$d340c0b0$@com> Oh my :) I'm developing an application running under IIS 7 using FastCGI and PHP 5.3. I've used the recommended installation procedures from MSFT for getting things setup using their Web Platform installer. 1. When I call trigger_error, where does the error go? When I have display_errors on, it's displayed to the browser, but I never see it in any logs. There's a php-errors.log file that gets parse errors/etc from scripts. However, my trigger_error calls never seem to reach any log file - where does it go? 2. I need to handle 200mb+ file uploads. I'm aware of the all the caveats to this, and have set what I've thought to be appropriate limits in php.ini. I'm apparently hitting some other timeout/limit from IIS 7, though. After roughly 60 seconds, I get a server 404 message. I've done some research and have seen this error comes up with ASP developers, and so I don't think I'm hitting a PHP limit/timeout (yet). I've looked at IIS setting MaxAllowedContentLength, but it's default value is apparently at 2gb. Any thoughts on how a resolution, or at least how to debug what limit is getting hit? Of course, if I could figure out #1, I may be better able to debug #2 :) H From matt at atopia.net Sun Jan 3 17:55:19 2010 From: matt at atopia.net (Matt Juszczak) Date: Sun, 3 Jan 2010 17:55:19 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: > after a successful action just use a wrapper for mail(). When you need > to fire off 1000s of emails, use a system specifically built for that > purpose. So how about this: For things like password recovery, private message notifications, welcome emails, etc. that are initiated by the user and are only sent to one user, I'll do those in the code base (the negative being I have to code that twice, in both front ends). For things like thread subscriptions, user subscriptions, alerts, etc., which could potentially go to multiple users, I'll do those in the background with a cron. Does this make sense? From jmcgraw1 at gmail.com Sun Jan 3 17:57:51 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Sun, 3 Jan 2010 17:57:51 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: On Sun, Jan 3, 2010 at 5:55 PM, Matt Juszczak wrote: >> after a successful action just use a wrapper for mail(). When you need >> to fire off 1000s of emails, use a system specifically built for that >> purpose. > > So how about this: > > For things like password recovery, private message notifications, welcome > emails, etc. that are initiated by the user and are only sent to one user, > I'll do those in the code base (the negative being I have to code that > twice, in both front ends). > > For things like thread subscriptions, user subscriptions, alerts, etc., > which could potentially go to multiple users, I'll do those in the > background with a cron. Sounds good, what is the second language? Perhaps you can use a bridge to prevent duplicating the code (have a single PHP implementation). - jake > > Does this make sense? > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From matt at atopia.net Sun Jan 3 17:59:07 2010 From: matt at atopia.net (Matt Juszczak) Date: Sun, 3 Jan 2010 17:59:07 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: > Sounds good, what is the second language? Perhaps you can use a bridge > to prevent duplicating the code (have a single PHP implementation). Procedural PHP :) From jmcgraw1 at gmail.com Sun Jan 3 18:03:13 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Sun, 3 Jan 2010 18:03:13 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: On Sun, Jan 3, 2010 at 5:59 PM, Matt Juszczak wrote: >> Sounds good, what is the second language? Perhaps you can use a bridge >> to prevent duplicating the code (have a single PHP implementation). > > Procedural PHP :) Ah, wut? So, you have one code base that uses OO MVC (or something like it) vs a second that uses Procedural (ie top to bottom) PHP? If thats the case then you only have to create a single implementation of My_Mailer class, the duplicate functionality will only be in object initialization and use, which would have to be duplicated anyway. - jake > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From matt at atopia.net Sun Jan 3 18:10:10 2010 From: matt at atopia.net (Matt Juszczak) Date: Sun, 3 Jan 2010 18:10:10 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: > Ah, wut? So, you have one code base that uses OO MVC (or something > like it) vs a second that uses Procedural (ie top to bottom) PHP? If > thats the case then you only have to create a single implementation of > My_Mailer class, the duplicate functionality will only be in object > initialization and use, which would have to be duplicated anyway. Correct. One is older than the other. From ramons at gmx.net Sun Jan 3 18:34:56 2010 From: ramons at gmx.net (David Krings) Date: Sun, 03 Jan 2010 18:34:56 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <00e801ca8cc5$f1159590$d340c0b0$@com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> Message-ID: <4B4129A0.8020709@gmx.net> On 1/3/2010 5:41 PM, Hans Zaunere wrote: > Oh my :) That applies to IIS, right? I just have to ask the question: can't you just use a real web server that actually works, like, let's say, Apache? I 'work' with IIS at work and it is a totally dysfunctional kludge. > 2. I need to handle 200mb+ file uploads. I'm aware of the all the caveats > to this, and have set what I've thought to be appropriate limits in php.ini. > I'm apparently hitting some other timeout/limit from IIS 7, though. After > roughly 60 seconds, I get a server 404 message. I've done some research and > have seen this error comes up with ASP developers, and so I don't think I'm > hitting a PHP limit/timeout (yet). I've looked at IIS setting > MaxAllowedContentLength, but it's default value is apparently at 2gb. Any > thoughts on how a resolution, or at least how to debug what limit is getting > hit? Well, circumventing an issue is also a valid approach. Does the upload have to happen via HTTP? Maybe uploading via FTP to the same box (or one on the same local network) may be a workaround. The script can then later 'upload' from that local resource or directly access the file, which should bring the final upload process close to local file copy speed. Using HTTP for uploading files of that size is very inefficient, but may be convenient. I did search around a bit and came across one comment in the PHP manual dealing with IIS having PHP installed as CGI. It is a bit older, but may still apply, load http://us2.php.net/features.file-upload and go to the comment from 2003-March-09...or just keep reading here, I copied verbatim: This took me a few days to find out: when uploading large files with a slow connection to my WIN2K/IIS5/PHP4 server the POST form kept timing out at exactly 5 minutes. All PHP.INI settings were large enough to accomodate huge file uploads. Searched like hell with keywords like "file upload php timeout script" until I realised that I installed PHP as CGI and added that as a keyword. This was the solution: To set the timeout value: 1. In the Internet Information Services snap-in, select the computer icon and open its property sheets. 2. Under Master Properties, select WWW Service, and then click the Edit button 3. Click the Home Directory tab. 4. Click the Configuration button. 5. Click the Process Options tab, and then type the timeout period in the CGI Script Timeout box. > > Of course, if I could figure out #1, I may be better able to debug #2 :) Can't help you with #1 other than to see what the IIS and system logs state. Good luck! David From lists at zaunere.com Sun Jan 3 19:03:58 2010 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 3 Jan 2010 19:03:58 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <4B4129A0.8020709@gmx.net> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> Message-ID: <00ef01ca8cd1$6a15d670$3e418350$@com> > > Oh my :) > > That applies to IIS, right? I just have to ask the question: can't you just > use a real web server that actually works, like, let's say, Apache? I 'work' > with IIS at work and it is a totally dysfunctional kludge. We're actually porting away from Apache to meet various requirements. > > 2. I need to handle 200mb+ file uploads. I'm aware of the all the caveats > > to this, and have set what I've thought to be appropriate limits in php.ini. > > I'm apparently hitting some other timeout/limit from IIS 7, though. After > > roughly 60 seconds, I get a server 404 message. I've done some research and > > have seen this error comes up with ASP developers, and so I don't think I'm > > hitting a PHP limit/timeout (yet). I've looked at IIS setting > > MaxAllowedContentLength, but it's default value is apparently at 2gb. Any > > thoughts on how a resolution, or at least how to debug what limit is getting > > hit? > > Well, circumventing an issue is also a valid approach. Does the upload have to > happen via HTTP? Maybe uploading via FTP to the same box (or one on the same > local network) may be a workaround. The script can then later 'upload' from > that local resource or directly access the file, which should bring the final > upload process close to local file copy speed. Using HTTP for uploading files > of that size is very inefficient, but may be convenient. I'm aware of other/better approaches, but unfortunately I have to play the hand I've been dealt for now. > I did search around a bit and came across one comment in the PHP manual > dealing with IIS having PHP installed as CGI. It is a bit older, but may still > apply, load http://us2.php.net/features.file-upload and go to the comment from > 2003-March-09...or just keep reading here, I copied verbatim: > > This took me a few days to find out: when uploading large files with a slow > connection to my WIN2K/IIS5/PHP4 server the POST form kept timing out at > exactly 5 minutes. All PHP.INI settings were large enough to accomodate huge > file uploads. Searched like hell with keywords like "file upload php timeout > script" until I realised that I installed PHP as CGI and added that as a > keyword. This was the solution: > > To set the timeout value: > 1. In the Internet Information Services snap-in, select the computer icon and > open its property sheets. > 2. Under Master Properties, select WWW Service, and then click the Edit button > 3. Click the Home Directory tab. > 4. Click the Configuration button. > 5. Click the Process Options tab, and then type the timeout period in the CGI > Script Timeout box. Saw this one, too - somehow my control panel doesn't look like this guy's. But, as far as I can tell, the FastCGI timeout is set to 600 seconds, which is far greater than the roughly 60 second timeout I'm seeing. Now I wouldn't bet the farm that that timeout is actually the one he's referring to, or that it's active for my "site", but I'm not able to troubleshoot things under IIS that well (yet). > > Of course, if I could figure out #1, I may be better able to debug #2 :) > > Can't help you with #1 other than to see what the IIS and system logs > state. They're not getting much of anything... bleh... Maybe I will just change the business requirements to use FTP :) H From garyamort at gmail.com Sun Jan 3 19:31:47 2010 From: garyamort at gmail.com (Gary Mort) Date: Sun, 3 Jan 2010 19:31:47 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> On Sun, Jan 3, 2010 at 4:42 PM, Tim Lieberman wrote: > > This seems a bit like overkill. After all, queueing email for delivery is > exactly the job that sendmail et al were designed to do. > > Your typical email message can be templated as a simple sprintf()-style > format string, which you can keep in the filesystem, or database, or > whatever. There are also plenty of libraries you can use for composition, > if you prefer (SwiftMailer and Zend_Mail come to mind). > > Then you'll want some code to generate email content, and some code to pass > it off for delivery. > > The last bit (passing it off for delivery) should probably be more than a > call to mail() -- but to start, just write a sensible abstraction that wraps > mail(). If you later find you need something more involved (for instance, > you want to use an external SMTP server, or you find some real need to write > your own queuing system as you described), you can swap out the > implementation pretty easily. > > You can use both PHPMail and SwiftMail to do user authenticated delivery of email. I highly recommend using Google Apps for business for email rather than hoping your web service provider is keeping up on keeping their servers out of blacklists. The downside of Google Apps though is you do have an hourly throttle of, I believe, 500 emails an account for free service, and 2000 for a paid account. As such, doing your own internal queuing process can be useful to stay within the throttle. Also use subdomains to identify mail and avoid blacklists. IE send your automated anouncements from site.mydomain.com, send your reminders from reminder.mydomain.com, if you ever let users forward stuff to each other, stick that on it's own domain, relay.mydomain.com or if you give them email accounts, members.mydomain.com Reserve @mydomain.com for internal use only, person to person communication. This way if any one system is subverted for a spammers purpose, your other email continues to flow. The free account is more than sufficient for a site that has yet to take off commercially, by the time you hit the limits you should have a plan in place that makes it worthwhile to spend $50/year for the business account. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edwardpotter at gmail.com Mon Jan 4 00:31:41 2010 From: edwardpotter at gmail.com (Edward Potter) Date: Mon, 4 Jan 2010 00:31:41 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> Message-ID: as above. think 2015. outsource everything. google sounds fine to me. use the cloud. php email is solid and simple enough to configure to do a myriad of things. store everything in a db. don't be too fussy about the design. you're just crunching emails. learn iPhone/Android with all that free time u have now. :-) On Sun, Jan 3, 2010 at 7:31 PM, Gary Mort wrote: > > > On Sun, Jan 3, 2010 at 4:42 PM, Tim Lieberman wrote: > >> >> This seems a bit like overkill. After all, queueing email for delivery is >> exactly the job that sendmail et al were designed to do. >> >> Your typical email message can be templated as a simple sprintf()-style >> format string, which you can keep in the filesystem, or database, or >> whatever. There are also plenty of libraries you can use for composition, >> if you prefer (SwiftMailer and Zend_Mail come to mind). >> >> Then you'll want some code to generate email content, and some code to >> pass it off for delivery. >> >> The last bit (passing it off for delivery) should probably be more than a >> call to mail() -- but to start, just write a sensible abstraction that wraps >> mail(). If you later find you need something more involved (for instance, >> you want to use an external SMTP server, or you find some real need to write >> your own queuing system as you described), you can swap out the >> implementation pretty easily. >> >> > You can use both PHPMail and SwiftMail to do user authenticated delivery of > email. > > I highly recommend using Google Apps for business for email rather than > hoping your web service provider is keeping up on keeping their servers out > of blacklists. The downside of Google Apps though is you do have an hourly > throttle of, I believe, 500 emails an account for free service, and 2000 for > a paid account. > > As such, doing your own internal queuing process can be useful to stay > within the throttle. > > Also use subdomains to identify mail and avoid blacklists. IE send your > automated anouncements from site.mydomain.com, send your reminders from > reminder.mydomain.com, if you ever let users forward stuff to each other, > stick that on it's own domain, relay.mydomain.com or if you give them > email accounts, members.mydomain.com > > Reserve @mydomain.com for internal use only, person to person > communication. > > This way if any one system is subverted for a spammers purpose, your other > email continues to flow. > > The free account is more than sufficient for a site that has yet to take > off commercially, by the time you hit the limits you should have a plan in > place that makes it worthwhile to spend $50/year for the business account. > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Jan 4 07:17:23 2010 From: ramons at gmx.net (David Krings) Date: Mon, 04 Jan 2010 07:17:23 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <00ef01ca8cd1$6a15d670$3e418350$@com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> Message-ID: <4B41DC53.6010200@gmx.net> On 1/3/2010 7:03 PM, Hans Zaunere wrote: >>> Oh my :) >> >> That applies to IIS, right? I just have to ask the question: can't you > just >> use a real web server that actually works, like, let's say, Apache? I > 'work' >> with IIS at work and it is a totally dysfunctional kludge. > > We're actually porting away from Apache to meet various requirements. Just being curious and sorry for digressing, but which requirements would that be? Running commodity tasks on the most expensive server OS with the worst web server available? David From lists at zaunere.com Mon Jan 4 08:57:02 2010 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 4 Jan 2010 08:57:02 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <4B41DC53.6010200@gmx.net> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> <4B41DC53.6010200@gmx.net> Message-ID: <019c01ca8d45$ca99d720$5fcd8560$@com> > >>> Oh my :) > >> > >> That applies to IIS, right? I just have to ask the question: can't you just > >> use a real web server that actually works, like, let's say, Apache? I 'work' > >> with IIS at work and it is a totally dysfunctional kludge. > > > > We're actually porting away from Apache to meet various requirements. > > Just being curious and sorry for digressing, but which requirements would that > be? Running commodity tasks on the most expensive server OS with the worst web > server available? Close - MSSQL Now while there are alternatives, there are business reasons (manageability, homogenous, other uses, etc) that make IIS a reasonable choice in this case. H From zippy1981 at gmail.com Mon Jan 4 09:05:33 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 4 Jan 2010 09:05:33 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <4B41DC53.6010200@gmx.net> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> <4B41DC53.6010200@gmx.net> Message-ID: <5458db3c1001040605x17343acdi97d4a4e304802fbf@mail.gmail.com> On Mon, Jan 4, 2010 at 7:17 AM, David Krings wrote: > Just being curious and sorry for digressing, but which requirements would >> that be? Running commodity tasks on the most expensive server OS with the >> worst web server available? > > > With an attitude like that, businesses must be busting down your door begging you to migrate them from ASP.NET on IIS to PHP. This is 2010, and windows doesn't suck like it used to. Yes I'll there is no "I will do all the work myself because I have no cash and plenty of time" option for windows, so you're paying $469 for your server OS minimum ( http://www.microsoft.com/windowsserver2008/en/us/pricing.aspx). However, unless you are a one man shop running one server and one workstation, you probably have some sort of Technet subscription, or the equivalent for your OS. Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmcgraw1 at gmail.com Mon Jan 4 09:40:31 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Mon, 4 Jan 2010 09:40:31 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <5458db3c1001040605x17343acdi97d4a4e304802fbf@mail.gmail.com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> <4B41DC53.6010200@gmx.net> <5458db3c1001040605x17343acdi97d4a4e304802fbf@mail.gmail.com> Message-ID: On Mon, Jan 4, 2010 at 9:05 AM, Justin Dearing wrote: > On Mon, Jan 4, 2010 at 7:17 AM, David Krings wrote: >>> >>> Just being curious and sorry for digressing, but which requirements would >>> that be? Running commodity tasks on the most expensive server OS with the >>> worst web server available? > > With an attitude like that, businesses must be busting down your door > begging you to migrate them from ASP.NET on IIS to PHP. > This is 2010, and windows doesn't suck like it used to. Yes I'll there is no > "I will do all the work myself because I have no cash and plenty of time" > option for windows, so you're paying $469 for your server OS minimum > (http://www.microsoft.com/windowsserver2008/en/us/pricing.aspx). However, > unless you are a one man shop running one server and one workstation, you > probably have some sort of Technet subscription, or the?equivalent?for your > OS. PHP on IIS will get better soon, see: http://www.theregister.co.uk/2009/05/25/dziuba_microsoft_php/ However, why anyone would choose any part of the MS stack to host their LAMP app is beyond me. Ubuntu Server w/ LAMP takes about 20 minutes to install and works wonderfully out of the box is free and incredibly well maintained. - jake > Justin > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From garyamort at gmail.com Mon Jan 4 09:50:34 2010 From: garyamort at gmail.com (Gary Mort) Date: Mon, 4 Jan 2010 09:50:34 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <00e801ca8cc5$f1159590$d340c0b0$@com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> Message-ID: <4bffc351001040650u5863225dl61a2ebbe7d0b0bf8@mail.gmail.com> On Sun, Jan 3, 2010 at 5:41 PM, Hans Zaunere wrote: > Oh my :) > > I'm developing an application running under IIS 7 using FastCGI and PHP > 5.3. > I've used the recommended installation procedures from MSFT for getting > things setup using their Web Platform installer. > > 1. When I call trigger_error, where does the error go? When I have > display_errors on, it's displayed to the browser, but I never see it in any > logs. There's a php-errors.log file that gets parse errors/etc from > scripts. However, my trigger_error calls never seem to reach any log file > - > where does it go? > Have you looked in the windows event logs? A lot of applications in windows route errors there instead of the "normal" spot because that is the "normal" spot for windows. Also check out LogParser, http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=enit's a great tool for querying the event log like a database and getting more reasonable data out of it. What I especially liked about it was that I could setup an ssh or telnet server on the windows box, tunnel into the machine and run it from a dos prompt - avoiding having to use a remote control desktop software and all the fun lag that entails! [And if your on a LAN, you can even map a network drive to the server and run it from your machine and access the logs on the remote machine] Lastly, as of...hm.....4/5 years ago when I was consulting at IBM I know IBM had ported Apache to windows...as I was constantly telling the group I was working with that they should migrate to Apache instead of using IIS. IIS at the time was quite problematic because you had windows file permissions AND then you also would specify IIS file permissions for web server users. So tracking down permission issues for a directory was overly complicated. There was also the added plus that the server was a dual use server, both web and file server. So if someone was logged on to the server for file access, and they used Internet Explorer IE would use NTLM to log on to the web server automatically, so users would not get prompted and would sometimes have the wrong web userid. Bottom line, I highly recommend trying to convince them to use Apache for Windows rather than IIS if at all possible. Even if it is just doing a weird proxy thing, where you use IIS as the frontend and proxy requests for the PHP stuff to localhost:88 and run Apache there, it is much less problematic in the long run. But that is based on my assumption that IBM is still porting Apache to windows. -- ---- Hudson Valley Sudbury School What GPL is for application users Our school is for students Help your children grow, change, and learn Let your child direct, control, amend Check out http://www.sudburyschool.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Mon Jan 4 10:02:40 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 4 Jan 2010 10:02:40 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> <4B41DC53.6010200@gmx.net> <5458db3c1001040605x17343acdi97d4a4e304802fbf@mail.gmail.com> Message-ID: <5458db3c1001040702h1249d003h1ab51e3164545af0@mail.gmail.com> For talking to MS SQL server, as Hans is, (which IMHO is superior to MySQL and Postgres for performance, but not postgres for features) it makes sense to use windows. While apache runs on windows easy enough, IIS "just works" on windows. On Mon, Jan 4, 2010 at 9:40 AM, Jake McGraw wrote: > On Mon, Jan 4, 2010 at 9:05 AM, Justin Dearing > wrote: > > On Mon, Jan 4, 2010 at 7:17 AM, David Krings wrote: > >>> > >>> Just being curious and sorry for digressing, but which requirements > would > >>> that be? Running commodity tasks on the most expensive server OS with > the > >>> worst web server available? > > > > With an attitude like that, businesses must be busting down your door > > begging you to migrate them from ASP.NET on IIS to PHP. > > This is 2010, and windows doesn't suck like it used to. Yes I'll there is > no > > "I will do all the work myself because I have no cash and plenty of time" > > option for windows, so you're paying $469 for your server OS minimum > > (http://www.microsoft.com/windowsserver2008/en/us/pricing.aspx). > However, > > unless you are a one man shop running one server and one workstation, you > > probably have some sort of Technet subscription, or the equivalent for > your > > OS. > > PHP on IIS will get better soon, see: > > http://www.theregister.co.uk/2009/05/25/dziuba_microsoft_php/ > > However, why anyone would choose any part of the MS stack to host > their LAMP app is beyond me. Ubuntu Server w/ LAMP takes about 20 > minutes to install and works wonderfully out of the box is free and > incredibly well maintained. > > - jake > > > Justin > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Mon Jan 4 10:04:17 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 4 Jan 2010 10:04:17 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <4bffc351001040650u5863225dl61a2ebbe7d0b0bf8@mail.gmail.com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4bffc351001040650u5863225dl61a2ebbe7d0b0bf8@mail.gmail.com> Message-ID: <5458db3c1001040704s6121ec89r43188fdae6550ca8@mail.gmail.com> On Mon, Jan 4, 2010 at 9:50 AM, Gary Mort wrote: > > > Also check out LogParser, > http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=enit's a great tool for querying the event log like a database and getting > more reasonable data out of it. What I especially liked about it was that I > could setup an ssh or telnet server on the windows box, tunnel into the > machine and run it from a dos prompt - avoiding having to use a remote > control desktop software and all the fun lag that entails! [And if your on a > LAN, you can even map a network drive to the server and run it from your > machine and access the logs on the remote machine] > > Thats useful I will check it out. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Jan 4 10:34:20 2010 From: ramons at gmx.net (David Krings) Date: Mon, 04 Jan 2010 10:34:20 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <5458db3c1001040702h1249d003h1ab51e3164545af0@mail.gmail.com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> <4B41DC53.6010200@gmx.net> <5458db3c1001040605x17343acdi97d4a4e304802fbf@mail.gmail.com> <5458db3c1001040702h1249d003h1ab51e3164545af0@mail.gmail.com> Message-ID: <4B420A7C.9030406@gmx.net> On 1/4/2010 10:02 AM, Justin Dearing wrote: > For talking to MS SQL server, as Hans is, (which IMHO is superior to > MySQL and Postgres for performance, but not postgres for features) it > makes sense to use windows. While apache runs on windows easy enough, > IIS "just works" on windows. > Well, my experience is exactly opposite. After enabling IIS on Windows the first thing usually is that nothing works. And if it works the 'nothing works' state will come soon for no reason. Aside from that, tests showed that the AMPP stack has the best performance on Windows. While I understand the reasons for choosing MSSQL (although there are plenty of huge users running MySQL) there really is no good reason I know of to pick IIS....unless it is a Microsoft only shop where best of breed is irrelevant unless it is from Microsoft. I just think that IIS is a cruddy product. Difficult to configure, flaky when running, and a dismal performer. Sorry for digressing from the actual issue. David From matt at atopia.net Mon Jan 4 10:37:09 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 10:37:09 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> Message-ID: > store everything in a db. don't be too fussy about the design. you're just crunching emails. That's the thing. I do want to store everything in the DB! Since we have so many front ends, I'd much rather control all the emailing with triggers and stored procedures (and a background running process) than inside the application. Would it really be so bad to do the following for say, a forgot password attempt: - Someone hits "Forgot password" on the site - Our front ends calls a stored procedure inside the DB that generates a hash, adds a pending email to a "emails" table - The background running process picks up the pending email, generates an email with the appropriate information, and sends it. Is that really a bad idea? It simplifies things on the front end. And the queue isn't storing email content, it would more be storing things like this: type: forgotpassword to: user_id status: 0 When the email is generated, status changes to 1, or something similar. -M From rolan at omnistep.com Mon Jan 4 11:08:05 2010 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 04 Jan 2010 11:08:05 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> Message-ID: <4B421265.9070108@omnistep.com> Matt Juszczak wrote: >> store everything in a db. don't be too fussy about the design. you're >> just crunching emails. > > That's the thing. I do want to store everything in the DB! Since we > have so many front ends, I'd much rather control all the emailing with > triggers and stored procedures (and a background running process) than > inside the application. > > Overall the DB method is a better design if you are anticipating any significant traffic. Some additional benefits off the top of my head: - If not using the db and the mailer daemon malfunctions on your web server, the http response could slow down while waiting for the mail() function to time out. - you could offload the mail functions to a separate or multiple machines - easier to query/generate reports to recognize the spam bot/requests. ~Rolan From garyamort at gmail.com Mon Jan 4 11:16:27 2010 From: garyamort at gmail.com (Gary Mort) Date: Mon, 4 Jan 2010 11:16:27 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4bffc351001031631k53455fbfl31f19b2b2aed5b3d@mail.gmail.com> Message-ID: <4bffc351001040816w95f96b2o1beeaf86a1fb2b0b@mail.gmail.com> On Mon, Jan 4, 2010 at 10:37 AM, Matt Juszczak wrote: > > Would it really be so bad to do the following for say, a forgot password > attempt: > > - Someone hits "Forgot password" on the site > - Our front ends calls a stored procedure inside the DB that generates a > hash, adds a pending email to a "emails" table > - The background running process picks up the pending email, generates an > email with the appropriate information, and sends it. > > Is that really a bad idea? It simplifies things on the front end. And the > queue isn't storing email content, it would more be storing things like > this: > > Actually, yes this particular one is a bad idea. :-) What you want here is a front end process that goes through this, and then a special queue for immediate deliveries. You follow the same process for both, but in the case where you have an immediate delivery situation you have the front end process kick off the backend process immediately and process that queue in reverse chronology. Basically, the idea here is you don't EVER want password and userid reset requests stuck in a queue with 1000 other emails. People want those IMMEDIATELY if not sooner. I would say do the process the way your thinking of, but be flexible to have exceptions or odd linkages at times. Also, I would say you DO want to store the content in the database so you know what is being sent out. Lastly, this queue should be a generic message queue, while you are thinking today "email" many of these notices would help to have OTHER ways of being sent. For example, lost password requests can be sent via SMS message as well as email, and it can be more convenient when someone has changed their email address but not their cell phone. By the same token, later you can extend it to send facebook messages, instant messages, etc. -- ---- Hudson Valley Sudbury School What GPL is for application users Our school is for students Help your children grow, change, and learn Let your child direct, control, amend Check out http://www.sudburyschool.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Mon Jan 4 11:33:28 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 04 Jan 2010 11:33:28 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: <4B421858.1090108@devonianfarm.com> Matt Juszczak wrote: > > So how about this: > > For things like password recovery, private message notifications, > welcome emails, etc. that are initiated by the user and are only sent > to one user, I'll do those in the code base (the negative being I have > to code that twice, in both front ends). > > For things like thread subscriptions, user subscriptions, alerts, > etc., which could potentially go to multiple users, I'll do those in > the background with a cron. > > Does this make sense? Sure, but I'd also send "high priority" and "low priority" emails through separate systems (sendmail/postfix/whatever instances.) It's highly desirable that people get email verification and password recovery messages as quickly as possible. If these get delayed, you run into all sorts of wetware problems, such as people losing their motivation to complete the registration process. If you've got, say, 250k outbound bulk messages in your queue, however, the delivery of messages could be delayed by minutes, hours, or even days. With two separate mail servers, you can avoid all of these headaches. Personally, I like running the "high priority" mail server on the same machine as the web server, and running bulk mail on a dedicated machine. You can go be a fashionable virtualization-head if you wish, but I'll warn you that heavily loaded mail servers use fsync() in a way that interacts very badly with database servers and web servers... From matt at atopia.net Mon Jan 4 11:40:17 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 11:40:17 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: <4B421858.1090108@devonianfarm.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4B421858.1090108@devonianfarm.com> Message-ID: Paul, > Sure, but I'd also send "high priority" and "low priority" emails through > separate systems (sendmail/postfix/whatever instances.) Well, what's to stop me from using the same database table for high priority and low priority, but having the high priority background process continuously loop to check for new items in the queue? Even if I have the webs send out high priority directly, like you said, that could cause some damage. Perhaps I could create a centralized relay server that the webs use for high priority, and have the webs send out high priority mail. But at that point, I unfortunately have to duplicate the high priority mail code =( -M From m.suterski at gmail.com Mon Jan 4 11:51:14 2010 From: m.suterski at gmail.com (Marcin Suterski) Date: Mon, 4 Jan 2010 11:51:14 -0500 Subject: [nycphp-talk] IIS 7, trigger_error, and Large File Uploads In-Reply-To: <00ef01ca8cd1$6a15d670$3e418350$@com> References: <00e801ca8cc5$f1159590$d340c0b0$@com> <4B4129A0.8020709@gmx.net> <00ef01ca8cd1$6a15d670$3e418350$@com> Message-ID: <253e28c41001040851w37ebaadbr61e1ca429850e048@mail.gmail.com> On Sun, Jan 3, 2010 at 7:03 PM, Hans Zaunere wrote: > Saw this one, too - somehow my control panel doesn't look like this guy's. > But, as far as I can tell, the FastCGI timeout is set to 600 seconds, which > is far greater than the roughly 60 second timeout I'm seeing. ?Now I > wouldn't bet the farm that that timeout is actually the one he's referring > to, or that it's active for my "site", but I'm not able to troubleshoot > things under IIS that well (yet). > In FastCGI settings in IIS7 there are about 3 different timeouts (ActivityTimeout, IdleTimeout, RequestTimeout). Did you play with all 3? If the PHP process takes more than ActivityTimeout or IdleTimeout (and they are smaller than RequestTimeout) and is not communicating back to IIS during that time, your request will expire before RequestTimeout. > > H > Have a happy new year, Marcin From peterbsemail at gmail.com Mon Jan 4 12:04:23 2010 From: peterbsemail at gmail.com (Peter Becker) Date: Mon, 04 Jan 2010 12:04:23 -0500 Subject: [nycphp-talk] Code Reviews In-Reply-To: <4B3A89F1.4060909@projectskyline.com> References: <5b20b5900912291430m686c4c1ai36ead3a2cd6eba0d@mail.gmail.com> <4B3A89F1.4060909@projectskyline.com> Message-ID: <4B421F97.8040500@gmail.com> Ben, David, Tom, Thanks for the insightful input.. Sorry for the delay in responding, but was gonnnnnnnnne over the holidays. My take away is that they can be useful if applied in a manner that avoids "pissing contests" between specific approaches, driven from above with specific objective(s) in mind. Variations on recurrence sounds somewhat variable based on what is being done ie if in Agile environment there might be one at end of iteration and/or minimally release. Unit testing is a "given" regardless of whether or not there are code reviews. We do have a style guide, defined and documented directory structure and naming convention. My objective(s) in the review is to ensure that conventions are being maintained (easy to get lax in and nothing that would ever show up in testing), and that coders (and testers) stay at least familiar with the other coders work (should back filling be required). And the point to keep it clean and well documented for future ease of outsourcing or bringing on new resources is dead on with where I was looking - even if there may be some additional time/costs up front, but think if done properly can easily pay off down the line. Thanks again, Peter Ben Sgro wrote: > Hello Peter, > > At my current company we do both peer reviews and group code reviews. > The group code reviews seem to have the best impact, as the peer > reviews have naturally ceased to happen. > > Our group code reviews happen bi-monthly and during the time (usually > an hour) developers working on different > clients within the company will show high level (run the code, > interact w/the UI, etc) and also walk through the source > code showing all the major components. > > The audience is typically programmers, but is open to anyone within > the company. > > In the past I've also worked in companies where a senior developer > will review junior developers major commits. What defines a "major > commit" differs within companies, but this was a great way to make > sure the new hires are obeying coding standards, not introducing new > bugs, and are > using appropriate libraries ("hey, we already solved that, see abc > lib..."). > > I think the reason that our current peer reviews died was because they > are time consuming and they were not manager driven, they were peer > driven, so people would either be too busy to schedule something with > a peer, or just forget. Plus, since management isn't' involved, > besides getting a peer to compliment your work, management wouldn't > directly hear of your accomplishments via this channel. > > > "On the one hand it seems like it'd be somewhat redundant since we > are a small team and the left hand does know what the right hand is > doing," > I don't think this is true - even on a small team I find most > developers are not that familiar with the work of their teammates. > > - Ben > > Peter Becker wrote: >> Looking to get some views (and best practices) on code reviews. I >> used to work at IBM on their early version of Websphere (as UI >> designer, not coder) where our group had code reviews on a regular >> basis. I'm now managing a small dev team working on a new web site >> using Zend PHP/MySql and am curious to know what current practices >> are for reviews in this sort of environment. On the one hand it >> seems like it'd be somewhat redundant since we are a small team and >> the left hand does know what the right hand is doing, but on the >> other, I could see it being very useful to ensure that everyone is on >> the straight and narrow to everyone's benefit (particularly as the >> team grows). Any good references as a starting point for >> approaches? Appreciate the direction - >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From paul at devonianfarm.com Mon Jan 4 12:16:11 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 04 Jan 2010 12:16:11 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4B421858.1090108@devonianfarm.com> Message-ID: <4B42225B.1010907@devonianfarm.com> Matt Juszczak wrote: > Paul, > >> Sure, but I'd also send "high priority" and "low priority" emails >> through separate systems (sendmail/postfix/whatever instances.) > > Well, what's to stop me from using the same database table for high > priority and low priority, but having the high priority background > process continuously loop to check for new items in the queue? > > Even if I have the webs send out high priority directly, like you > said, that could cause some damage. > > Perhaps I could create a centralized relay server that the webs use > for high priority, and have the webs send out high priority mail. But > at that point, I unfortunately have to duplicate the high priority > mail code =( > Ok, you're talking about two sorts of queue here. (i) there's the queue of an SMTP-compliant mailer (I assume), and (ii) there's a queue that you're maintaining of messages you want to send; this might be a set of database rows, one per message, and you're doing a "mail merge" process to fill in a template and push messages gradually into queue (i) Presumably you've got some rate control on (ii), and the mail merge process is watching the length of the queue in (i) (and maybe some other variables), so that you can control the load of the SMTP server. One trouble with this is that a certain fraction of mail takes a long time to deliver; an SMTP-compliant mailer will keep trying to deliver a message for seven days. If you're sending enough mail, you're eventually going to get a large "plug" of stuck messages that the mail server is going to try to keep delivering and re-delivering. Ultimately this is going to burn up resources on the mail server, which will impact other things running on that machine: such as high-priority mails you want to send. Now, process (ii) can certainly stop putting messages in (i) once the "plug" of stuck messages reaches a significant size, but that's going to really slow down the bulk mail. The main factor in mail server performance is the effect of fsync() calls on a mechanical disk: mail delivery events really ought to be transactional, since you don't want to deliver mail twice or fail to deliver it. Fsync() doesn't (honestly) return until a chunk of metal moves to a certain place; the bottleneck isn't so much like "you can do so many a second" but more like a systemwide lock, since there can be multiple processes trying to fsync(), such as syslogd or a database server that's committing a transaction. The traffic jam can get backed up, since other processes can be waiting for the the first process to complete, can be holding more locks and so forth... So you end up with a situation where the performance bottleneck is a real pain to understand... It might even take you 5 minutes to get to a shell prompt when you ssh in. If you're on a virtual server, you may (or may not) have somebody else doing a lot of fsync() calls, in which case your performance could be hosed for reasons outside your observation and control. Just as likely, the server will be programmmed to return from fsync() before the fsync is done, which means someday you're going to have a big database wreck... For $200 a month you can rent a server that will do a great job delivering email. Or you can spend 10-100x that trying to figure problems out. From matt at atopia.net Mon Jan 4 12:20:54 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 12:20:54 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: <4B42225B.1010907@devonianfarm.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4B421858.1090108@devonianfarm.com> <4B42225B.1010907@devonianfarm.com> Message-ID: Paul, I'm actually pretty confident I can keep the mail servers running efficiently - it was actually my primary task at my previous job. Removing the MTA out of the picture entirely, I'm simply trying to decide how to push messages into the mail queues on the mail server themselves. I've already decided that we'll have high priority and low priority mail queues or MTA instances. I'm more concerned at this point on how to get the messages there in the most standardized way. - Do I want to just use mail() inside PHP and push high priority mail directly to the relay hosts, and then have a separate two server setup - one to run the cron, and one to act as the MTA, for lower priority bulk mail? or - Do I want to setup a database table, where every message goes into (high or low priority), and have a process constantly reading from that queue and creating messages (and then, sending them to the appropriate relay host, depending on its priority) So really, this is a case of figuring out how to standardize email generation, not necesarilly sending. -Matt From zippy1981 at gmail.com Mon Jan 4 12:24:31 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 4 Jan 2010 12:24:31 -0500 Subject: [nycphp-talk] Code Reviews In-Reply-To: <117286890912300818v2cd929e2n3405ed020b305021@mail.gmail.com> References: <5b20b5900912291430m686c4c1ai36ead3a2cd6eba0d@mail.gmail.com> <117286890912300818v2cd929e2n3405ed020b305021@mail.gmail.com> Message-ID: <5458db3c1001040924r4177f716v84cdc884b9998d07@mail.gmail.com> On Wed, Dec 30, 2009 at 11:18 AM, Tom Melendez wrote: > > 2. You find something wrong, then what? And what if it is not > "really" wrong (Jones uses a selection sort but sould have used an > insertion sort, and no one told him beforehand). Do we hold up the > project until the engs figure out what is best, even though the code > "works"? Good luck explaining that to mgmt. And politically, it can > make Jones look bad unnecessarily, yet, as the new guy on the team, he > might not be familiar with the standards, practices, etc. of your > group. > > Most of the time you probably shouldn't make the change. However, a little //TODO (or @todo if you use a javadoc workalike) means when that routine needs to be optimized you will find it faster. Also, Jones now knows to use an insertion sort next time. The code review can be an educational opportunity for next time. If the code review makes Jones look bad then you either need to remove nontechnical management from the code review his peers need to have reasonable expectations. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Mon Jan 4 12:30:51 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 04 Jan 2010 12:30:51 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <4B421858.1090108@devonianfarm.com> <4B42225B.1010907@devonianfarm.com> Message-ID: <4B4225CB.50501@devonianfarm.com> Matt Juszczak wrote: > > So really, this is a case of figuring out how to standardize email > generation, not necesarilly sending. > It's definitely nice to be able to push a "STOP" button on putting messages into your MTA, both for operational issues, but also when you find out [just after starting your mail shot] that there's an error in the message you're sending out. With a good system on your end, you can hit "STOP", and then change the message for the people that haven't gotten it yet. That alone is a good reason to use a queue to control your mail generation... From jcampbell1 at gmail.com Mon Jan 4 14:16:56 2010 From: jcampbell1 at gmail.com (John Campbell) Date: Mon, 4 Jan 2010 14:16:56 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> Message-ID: <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> On Sun, Jan 3, 2010 at 4:24 PM, wrote: > Hi all, > > I'm working on a website right now and am in charge of implementing email functionality. What does that mean? What specifically are you in charge of implementing. Are you going to build and maintain an Emailor api that other developers will use? If so, designing a easy to use API should be your primary focus. > At first, I thought about keeping active emailing inside the web code, and passive emailing inside a cron, but that doesn't allow for much control. Specifically what kind of control do you need? It really sounds like you really have your mind set on building a fancy pants queue system, but cant really justify it. Frankly, I think you are doing some technical masturbation, want to build something far more complicated than is actually needed, and want to solve problems that don't really exist. At first, you described your problem as having dual codebases, and then it morphed into a performance discussion. Which is it? I think about code from the perspective, "would I want to maintain this?", and between, "hooks", "triggers", "multi threaded perl scripts", I think you are making sending email overly complicated. Your system may work, but you are running a really high risk that someone in the future is going to look at the system and curse your name. Personally, I'd focus on the API, and message generation more than the sending mechanism. The delivery implementation should be easy to change later. Regards, John Campbell From matt at atopia.net Mon Jan 4 14:32:50 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 14:32:50 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> Message-ID: Hi John, > It really sounds like you really have your mind set on building a > fancy pants queue system, but cant really justify it. Frankly, I > think you are doing some technical masturbation, want to build > something far more complicated than is actually needed, and want to > solve problems that don't really exist. At first, you described your > problem as having dual codebases, and then it morphed into a > performance discussion. Which is it? Thanks for your reply. Actually, it's the exact opposite. I want to make the system as simple and easy as possible. The problem is that right now, we have our front end code send emails. The developers are starting to get annoyed at writing all of the logic over and over again for each front end (for instance, we're in the middle of writing an iphone app as well, which is a more simpler implementation, but we need some sort of REST layer to facilitate communication with the database). I've been implementing stored procedures and triggers into our database, which removes much of the logic from the developers hands. Creating an account is done the same way, whether you're using our mobile front end, primary website, etc. The issue we're having is with emails. If all emails were bulk, I'd simply have a cron that ran, processed emails for subscriptions and such, and send them. But, as we've said in this thread, some emails need to be instantaneous. So drawing the line between what is done in the front end code vs. what is done in background processing is what I'm trying to decide. I'm using the terms "active" and "passive" to mean two different things. The "fancy" queue you speak of is actually my favorite idea right now, as it allows me to generate emails in a number of ways (triggers, stored procedure, a manual INSERT into the table if needed, etc.). If the developers need to do a forgot password email, they can call the forgot password stored procedure, with the user ID, which will generate a hash, generate an email in the queue, send the email, etc. Or, for more batched emails, I have a trigger setup that creates an email in the queue everytime a post or reply is made. The email queue won't be "one row per email" - it will more be "one row per task". The background script will know what to generate based on what's in the queue. I'm really not doing any "technical masturbation" or any of the sort. Promise. I'm just trying to make the system as flexible as possible. I really don't think it's that complicated. Thanks for your input! -Matt From paul at devonianfarm.com Mon Jan 4 14:52:52 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 04 Jan 2010 14:52:52 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> Message-ID: <4B424714.1040803@devonianfarm.com> Matt Juszczak wrote: > > Thanks for your reply. Actually, it's the exact opposite. I want to > make the system as simple and easy as possible. The problem is that > right now, we have our front end code send emails. The developers are > starting to get annoyed at writing all of the logic over and over > again for each front end (for instance, we're in the middle of writing > an iphone app as well, which is a more simpler implementation, but we > need some sort of REST layer to facilitate communication with the > database). I've been implementing stored procedures and triggers into > our database, which removes much of the logic from the developers > hands. Creating an account is done the same way, whether you're using > our mobile front end, primary website, etc. > The term "REST" is an early predictor for project failure a year or two down the road. More than once I've been the guy who cleans up the mess after somebody ignorantly blunders into using "REST" for something that it's not appropriate for. From matt at atopia.net Mon Jan 4 14:57:06 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 14:57:06 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: <4B424714.1040803@devonianfarm.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> <4B424714.1040803@devonianfarm.com> Message-ID: > The term "REST" is an early predictor for project failure a year or two > down the road. More than once I've been the guy who cleans up the mess after > somebody ignorantly blunders into using "REST" for something that it's not > appropriate for. Well, we didn't go that route. We had three choices: Put database logic inside the webserver code base, put it in the database, or put it somewhere in the middle. We decided on putting it in the database, which ties us to using MySQL, but allows us to write a lot more front ends a lot easier. Now, the question is where to put the email sending. That's where I'm at now. -Matt From peterbsemail at gmail.com Mon Jan 4 15:09:27 2010 From: peterbsemail at gmail.com (Peter Becker) Date: Mon, 04 Jan 2010 15:09:27 -0500 Subject: [nycphp-talk] Code Reviews In-Reply-To: <5458db3c1001040924r4177f716v84cdc884b9998d07@mail.gmail.com> References: <5b20b5900912291430m686c4c1ai36ead3a2cd6eba0d@mail.gmail.com> <117286890912300818v2cd929e2n3405ed020b305021@mail.gmail.com> <5458db3c1001040924r4177f716v84cdc884b9998d07@mail.gmail.com> Message-ID: <4B424AF7.4030901@gmail.com> An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Mon Jan 4 15:17:49 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 04 Jan 2010 15:17:49 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> <4B424714.1040803@devonianfarm.com> Message-ID: <4B424CED.5080700@devonianfarm.com> Matt Juszczak wrote: >> The term "REST" is an early predictor for project failure a year or >> two down the road. More than once I've been the guy who cleans up >> the mess after somebody ignorantly blunders into using "REST" for >> something that it's not appropriate for. > > Well, we didn't go that route. We had three choices: Put database > logic inside the webserver code base, put it in the database, or put > it somewhere in the middle. We decided on putting it in the database, > which ties us to using MySQL, but allows us to write a lot more front > ends a lot easier. > The architecture where "multiple processes communicate with a shared database" gets less credit than it deserves. In your case I think there's no reason you can't write your batch scripts in PHP: pretty commonly I write command line scripts that run as cron jobs... In that situation, you can use http://php.net/manual/en/function.pcntl-fork.php to fork the same way you would in Perl. I tend to do long-running tasks as cron jobs that are scheduled to run for a certain time (maybe 4 minutes) and that get respawned every so often (say 5 minutes.) You do need some logic to prevent them from getting stacked up when things go wrong, but this works pretty well. BTW, I've got no problem with an RPC-based architecture; there really are two ways REST is a danger sign: (i) 80% of the time it's a sign that people don't know what they're talking about... They really want to say "not SOAP" and they've never heard of POX (plain old XML) or POJ (plain old JSON.) In those cases it's easy to set people straight. The 20% of people (ii) who know what REST are actively dangerous. There are quite a few problems w/ REST, but the biggest is the lack of transactional semantics. It's easy to write a RPC that "transfers money from bank account A to bank account B" and handles all the transactional stuff on the server side. Now, it's certainly possible to build a REST system that posts a transfer slip, and the posting of the transfer slip causes the transfer to happen transactionally; that could be part of a great document-based architecture, but I've yet to see somebody using REST in the field think that far ahead. I suppose you could use REST together with a distributed transaction mechanism, but that's really asking for trouble. From rolan at omnistep.com Mon Jan 4 15:41:10 2010 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 04 Jan 2010 15:41:10 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: <4B424CED.5080700@devonianfarm.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> <4B424714.1040803@devonianfarm.com> <4B424CED.5080700@devonianfarm.com> Message-ID: <4B425266.6030207@omnistep.com> Paul A Houle wrote: > Matt Juszczak wrote: >>> The term "REST" is an early predictor for project failure a year >>> or two down the road. More than once I've been the guy who cleans >>> up the mess after somebody ignorantly blunders into using "REST" for >>> something that it's not appropriate for. >> >> Well, we didn't go that route. We had three choices: Put database >> logic inside the webserver code base, put it in the database, or put >> it somewhere in the middle. We decided on putting it in the >> database, which ties us to using MySQL, but allows us to write a lot >> more front ends a lot easier. >> > The architecture where "multiple processes communicate with a > shared database" gets less credit than it deserves. In your case I > think there's no reason you can't write your batch scripts in PHP: > pretty commonly I write command line scripts that run as cron jobs... > In that situation, you can use > > http://php.net/manual/en/function.pcntl-fork.php > > to fork the same way you would in Perl. I tend to do long-running > tasks as cron jobs that are scheduled to run for a certain time (maybe > 4 minutes) and that get respawned every so often (say 5 minutes.) You > do need some logic to prevent them from getting stacked up when things > go wrong, but this works pretty well. > > My initial approach used cron jobs, but then one day things did stack up under high volume and I ended up rewriting the mail engine to run under CLI using the Pear System_Daemon library. Works like a charm now. Sleep for one minute, then check for any new unsent emails in the queue and process. As a bonus, I was able to throw in some functions that manage events and triggers based on specific times or elapsed time periods. ~Rolan From jcampbell1 at gmail.com Mon Jan 4 15:48:40 2010 From: jcampbell1 at gmail.com (John Campbell) Date: Mon, 4 Jan 2010 15:48:40 -0500 Subject: [nycphp-talk] email system for website In-Reply-To: References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> <4B424714.1040803@devonianfarm.com> Message-ID: <8f0676b41001041248n246d0a1emb58cf301e5fa93f1@mail.gmail.com> On Mon, Jan 4, 2010 at 2:57 PM, Matt Juszczak wrote: >> ?The term "REST" is an early predictor for project failure a year or two >> down the road. ?More than once I've been the guy who cleans up the mess >> after somebody ignorantly blunders into using "REST" for something that it's >> not appropriate for. > > Well, we didn't go that route. ?We had three choices: Put database logic > inside the webserver code base, put it in the database, or put it somewhere > in the middle. ?We decided on putting it in the database, which ties us to > using MySQL, but allows us to write a lot more front ends a lot easier. The queue system seems reasonable given you are putting lots of logic in the database. I have no experience with such systems, but I do understand the appeal in a mixed language environment, or if you were incrementally migrating from one code base to another. Just looking through my own code, I have code like: $m = new Emailor(); $m->To($email) ->bind('user',$user) ->bind('order',$order) ->bind('payment_information',$payment_information) ->send('order_confirmation.tpl'); For my application, it is easier to generate the contents of the email in the front end. The email messages can get really complicated and change based on 10 parameters. It could get really messy if you have to save all 10 parameters in the queue. It is not always going to be as easy as the forgot password & user_id case. Regards, John Campbell From matt at atopia.net Mon Jan 4 22:51:33 2010 From: matt at atopia.net (Matt Juszczak) Date: Mon, 4 Jan 2010 22:51:33 -0500 (EST) Subject: [nycphp-talk] email system for website In-Reply-To: <4B425266.6030207@omnistep.com> References: <1165741373-1262553874-cardhu_decombobulator_blackberry.rim.net-628700127-@bda188.bisx.prod.on.blackberry> <8f0676b41001041116v79c6de9fw18892333eae19782@mail.gmail.com> <4B424714.1040803@devonianfarm.com> <4B424CED.5080700@devonianfarm.com> <4B425266.6030207@omnistep.com> Message-ID: >> The architecture where "multiple processes communicate with a shared >> database" gets less credit than it deserves. In your case I think there's >> no reason you can't write your batch scripts in PHP: pretty commonly I >> write command line scripts that run as cron jobs... In that situation, >> you can use >> >> http://php.net/manual/en/function.pcntl-fork.php >> >> to fork the same way you would in Perl. I tend to do long-running tasks >> as cron jobs that are scheduled to run for a certain time (maybe 4 minutes) >> and that get respawned every so often (say 5 minutes.) You do need some >> logic to prevent them from getting stacked up when things go wrong, but >> this works pretty well. I think this is the direction I want to head. Thanks!! From vtbludgeon at gmail.com Tue Jan 5 09:50:21 2010 From: vtbludgeon at gmail.com (David Mintz) Date: Tue, 5 Jan 2010 09:50:21 -0500 Subject: [nycphp-talk] define variables versus assigned variables In-Reply-To: <354761771.20100103204841@vbplusme.com> References: <769902134.20100103130234@vbplusme.com> <7173a2fc1001022122w35790320ke588974a1c869725@mail.gmail.com> <966663874.20100103135244@vbplusme.com> <68de37341001022325x384b2808l1049029ef6956be4@mail.gmail.com> <354761771.20100103204841@vbplusme.com> Message-ID: <721f1cc51001050650g3c5a581cnb5487db214920a8f@mail.gmail.com> On Sun, Jan 3, 2010 at 7:48 AM, wrote: > Hello Eddie, > > Sunday, January 3, 2010, 3:25:22 PM, you wrote: > > > The primary difference between a variable and a constant is > > mutability. If your database authorization details are not going to > > change, make them constants. If your database details DO change > > throughout the execution of a script, make them variables. In regards > > to the performance of constants in PHP, that's an incredibly minor > > improvement (a microoptimization, really) and it's my opinion that you > > ought to be writing software to be good code and not have to hack > > around considerations like how many microseconds your database > > username declaration takes.[...] > Though you might also want to consider loading the values from a config file, which is easy to change when you move your app from place to place, e.g., from development to production. Zend_Config makes this especially easy. You set a default configuration environment and define other flavors that inherit from it. http://framework.zend.com/manual/en/zend.config.html -- Support real health care reform: http://phimg.org/ -- David Mintz http://davidmintz.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Tue Jan 5 12:01:18 2010 From: tom at supertom.com (Tom Melendez) Date: Tue, 5 Jan 2010 09:01:18 -0800 Subject: [nycphp-talk] Code Reviews In-Reply-To: <4B421F97.8040500@gmail.com> References: <5b20b5900912291430m686c4c1ai36ead3a2cd6eba0d@mail.gmail.com> <4B3A89F1.4060909@projectskyline.com> <4B421F97.8040500@gmail.com> Message-ID: <117286891001050901m596bae52nd9517f847aa4020c@mail.gmail.com> Hi Folks, > We do have a style guide, defined and documented directory structure and > naming convention. ?My objective(s) in the review is to ensure that > conventions are being maintained (easy to get lax in and nothing that would > ever show up in testing), and that coders (and testers) stay at least > familiar with the other coders work (should back filling be required). > Just in case it wasn't clear in my earlier response and for those who aren't aware - you can build this stuff into codesniffer. We do this kind of thing for everything from tabs and curly brace placement to variable name case to input validation functions and the precise code we want used to see if a particular type of object is valid. You can then generate a checkstyle reports and you now have a metric to monitor, rather than a bunch of people in a room looking at a screen saying "that's not how we instantiate those objects" or whatever. You now have something (reusable) there to actually enforce it. And if you're not already, you can then spend that time on architecture/design sessions. The bigger flaw to fix is when it is wrong inherently by design. Design sessions and design reviews are when you want everyone around as that can't (easily) be represented in codesniffer analysis. Finally, as your process becomes more refined you can get into code generation, although ideally, through your design/review sessions you've abstracted so much that you really don't need to write much new code anymore to add new features. And by then, it will be time to rewrite the application again. :-) Not trying to be argumentative, just want to make sure you don't end up with bunch of people in a room for 3 hours and the end result being, "Yes, Jones will change all of his tabs to spaces". Those meetings suck for everyone involved. Thanks, Tom http://www.liphp.org From peterbsemail at gmail.com Tue Jan 5 13:45:35 2010 From: peterbsemail at gmail.com (Peter Becker) Date: Tue, 05 Jan 2010 13:45:35 -0500 Subject: [nycphp-talk] Code Reviews In-Reply-To: <117286891001050901m596bae52nd9517f847aa4020c@mail.gmail.com> References: <5b20b5900912291430m686c4c1ai36ead3a2cd6eba0d@mail.gmail.com> <4B3A89F1.4060909@projectskyline.com> <4B421F97.8040500@gmail.com> <117286891001050901m596bae52nd9517f847aa4020c@mail.gmail.com> Message-ID: <4B4388CF.3030305@gmail.com> Tom - Thanks for the clarification and not seen as argumentative (at least by me). Tom Melendez wrote: > Hi Folks, > > >> We do have a style guide, defined and documented directory structure and >> naming convention. My objective(s) in the review is to ensure that >> conventions are being maintained (easy to get lax in and nothing that would >> ever show up in testing), and that coders (and testers) stay at least >> familiar with the other coders work (should back filling be required). >> >> > > Just in case it wasn't clear in my earlier response and for those who > aren't aware - you can build this stuff into codesniffer. We do this > kind of thing for everything from tabs and curly brace placement to > variable name case to input validation functions and the precise code > we want used to see if a particular type of object is valid. You can > then generate a checkstyle reports and you now have a metric to > monitor, rather than a bunch of people in a room looking at a screen > saying "that's not how we instantiate those objects" or whatever. You > now have something (reusable) there to actually enforce it. > > And if you're not already, you can then spend that time on > architecture/design sessions. The bigger flaw to fix is when it is > wrong inherently by design. Design sessions and design reviews are > when you want everyone around as that can't (easily) be represented in > codesniffer analysis. > > Finally, as your process becomes more refined you can get into code > generation, although ideally, through your design/review sessions > you've abstracted so much that you really don't need to write much new > code anymore to add new features. And by then, it will be time to > rewrite the application again. :-) > > Not trying to be argumentative, just want to make sure you don't end > up with bunch of people in a room for 3 hours and the end result > being, "Yes, Jones will change all of his tabs to spaces". Those > meetings suck for everyone involved. > > Thanks, > > Tom > http://www.liphp.org > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > From tedd at sperling.com Wed Jan 6 11:40:34 2010 From: tedd at sperling.com (tedd) Date: Wed, 6 Jan 2010 11:40:34 -0500 Subject: [nycphp-talk] oh how good this list is In-Reply-To: <721f1cc50912290742r223f8189v4a5957f06115e5a5@mail.gmail.com> References: <721f1cc50912290742r223f8189v4a5957f06115e5a5@mail.gmail.com> Message-ID: At 10:42 AM -0500 12/29/09, David Mintz wrote: >Allow me to indulge a little frivolity during this slow year-end period. > >I wish I could count the times this list has helped me, not just by >providing answers, but by motivating me to think harder about the >question before posting. Twice in the past couple of weeks I have >actually been composing the message, preparing to cry out for help, >turning back to the problem in order to describe it succintly and >accurately and finish ruling out various hypotheses as to why "it >doesn't work....," when suddenly -- DING! > >-- >Demand health care for everyone: >http://mobilizeforhealthcare.org/ > >-- >David Mintz David: Of course -- you've hit upon a common aspect of problem solving. At least half the solution is defining the problem. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From leam at reuel.net Wed Jan 6 16:07:36 2010 From: leam at reuel.net (Leam Hall) Date: Wed, 06 Jan 2010 16:07:36 -0500 Subject: [nycphp-talk] Anyone familiar with CAC cards? Message-ID: <4B44FB98.5020100@reuel.net> I'd like to build a web page that does basic login to CAC enabled web sites. I have access to the pages, but would rather automate it. Any ideas? Leam From tpsailer at gmail.com Wed Jan 6 17:01:56 2010 From: tpsailer at gmail.com (Tim Sailer) Date: Wed, 6 Jan 2010 17:01:56 -0500 Subject: [nycphp-talk] Anyone familiar with CAC cards? In-Reply-To: <4B44FB98.5020100@reuel.net> References: <4B44FB98.5020100@reuel.net> Message-ID: <10787b4b1001061401o73169e61lfea90b5dfb1939a4@mail.gmail.com> There are a few types of CACs. The best way to figure it out is to 1) talk to the provider/encoder of the cards, and 2) get a reader and test card and write the bit of code to pull out the ID number and compare it against the backend DB Tim On Wed, Jan 6, 2010 at 4:07 PM, Leam Hall wrote: > I'd like to build a web page that does basic login to CAC enabled web > sites. I have access to the pages, but would rather automate it. Any ideas? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at freephile.com Sat Jan 9 18:14:59 2010 From: greg at freephile.com (Greg Rundlett (freephile)) Date: Sat, 9 Jan 2010 18:14:59 -0500 Subject: [nycphp-talk] Mythweb (php 5.2.10) doesn't work b/c of suhosin - canaries Message-ID: <5e2aaca41001091514u62a4967eh30f4914dcbf5efb0@mail.gmail.com> Anyone else have a problem with mythweb, suhosin or php5.2.10? I've recently upgraded my mythbuntu setup to 9.10 (karmic koala) and mythweb doesn't work b/c of a suhosin error. I get a big white screen. The error found in apache's log is ALERT - canary mismatch on efree() - heap overflow detected (attacker '::1', file '/usr/share/mythtv/mythweb/includes/errors.php', line 211 (generated by suhosin [1][2] ) line 211 is an innocuous $constant_list = get_defined_constants(true); Supposedly this is fixed upstream, or in newer versions of either apache or php5 [3] , but I don't see a lot of information about it. There was a somewhat related bug [4][5] with a workaround where you could turn off session encryption in the suhosin.ini but that doesn't work in my case (there's not even a suhosin.ini config file b/c suhosin is built in to php-common -- and if you create the config + setting and/or install the compiled add-on (php5-suhosin), the problem still manifests). Some other bugs involve segfaults in debian for php5.2.10 [6]. Still other problems have been reported that might be due to a conflict between suhosin and xdebug, but I've made sure that neither package is installed [7]. You can't uninstall suhosin because it's compiled into the php5-common package. I guess I could either build from source [8], or try to upgrade Lucid has PHP 5.2.11 [9] so I guess I can use pinning [10] to upgrade to that version, but I haven't done that yet. I did try installing xdebug, valgrind and kcachegrind to look for more details, but it doesn't reveal anything. == Details of my system == uname -a Linux hybrid 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686 GNU/Linux greg at hybrid:/var/www$ apache2 -v Server version: Apache/2.2.12 (Ubuntu) Server built: Nov 12 2009 22:49:46 greg at hybrid:/var/www$ sudo apt-cache policy apache2 apache2: Installed: (none) Candidate: 2.2.12-1ubuntu2.1 Version table: 2.2.12-1ubuntu2.1 0 500 http://us.archive.ubuntu.com karmic-updates/main Packages 500 http://security.ubuntu.com karmic-security/main Packages 2.2.12-1ubuntu2 0 500 http://us.archive.ubuntu.com karmic/main Packages greg at hybrid:/var/www$ apache2ctl -M apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_prefork_module (static) http_module (static) so_module (static) alias_module (shared) auth_basic_module (shared) auth_digest_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgi_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) mime_module (shared) negotiation_module (shared) php5_module (shared) rewrite_module (shared) setenvif_module (shared) status_module (shared) Syntax OK greg at hybrid:/var/www$ sudo apt-cache policy php5 php5: Installed: 5.2.10.dfsg.1-2ubuntu6.3 Candidate: 5.2.10.dfsg.1-2ubuntu6.3 Version table: *** 5.2.10.dfsg.1-2ubuntu6.3 0 500 http://us.archive.ubuntu.com karmic-updates/main Packages 500 http://security.ubuntu.com karmic-security/main Packages 100 /var/lib/dpkg/status 5.2.10.dfsg.1-2ubuntu6 0 500 http://us.archive.ubuntu.com karmic/main Packages greg at hybrid:/var/www$ php -v PHP 5.2.10-2ubuntu6.3 with Suhosin-Patch 0.9.7 (cli) (built: Nov 26 2009 14:42:49) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies php -m [PHP Modules] bcmath bz2 calendar ctype curl date dba dom exif filter ftp gd gettext hash iconv imap json libxml mbstring mcrypt mime_magic mysql mysqli ncurses openssl pcntl pcre PDO pdo_mysql pdo_pgsql pdo_sqlite pgsql posix readline Reflection session shmop SimpleXML soap sockets SPL SQLite standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] [1] http://ubuntuforums.org/showthread.php?t=1208437 [2] Stefan Esser's blog http://www.suspekt.org/2008/10/12/suhosin-canary-mismatch-on-efree-heap-overflow-detected/ [3] http://www.mail-archive.com/debian-bugs-rc at lists.debian.org/msg197763.html [4] https://bugs.launchpad.net/ubuntu/+source/php5/+bug/424789 [5] http://www.uluga.ubuntuforums.org/showthread.php?p=7896618 [6] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542514 [7] sudo apt-get remove php5-suhosin sudo apt-get remove php5-xdebug [8] http://chrisblunt.com/blog/2009/05/01/php-fixing-mismatched-canaries-how-to-remove-suhosin-from-debianubuntu-packages/ [9] http://packages.ubuntu.com/lucid/php5-common [10] http://superuser.com/questions/75052/how-do-i-get-apt-pinning-to-install-the-minimum-required-from-the-unstable-distri Greg Rundlett nbpt 978-225-8302 m. 978-764-4424 -skype/aim/irc/twitter freephile http://profiles.aim.com/freephile From yitzchak.schaffer at gmx.com Mon Jan 11 12:32:54 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Mon, 11 Jan 2010 12:32:54 -0500 Subject: [nycphp-talk] Suspending virtual machines with Samba shares Message-ID: <4B4B60C6.4020505@gmx.com> Hello all, For my dev environment, I have a Linux VM (VMware Server 2) running on a Win7 host laptop. I have a Samba share set up so's I can use my Win7-based editing tools. When I go from work to home, I hibernate the laptop, after I suspend the VM. Occasionally (read, almost every time) I forget to close some file in some app somewhere, and when I hit suspend, the app goes catatonic for an inordinately long time (at least it feels that way when I'm trying to pack out, perhaps 30 seconds). Has anyone discovered a way to break an app out of Samba shock, or avoid having it happen in the first place, without killing processes? Many thanks, -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From chsnyder at gmail.com Mon Jan 11 14:12:36 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 11 Jan 2010 14:12:36 -0500 Subject: [nycphp-talk] Suspending virtual machines with Samba shares In-Reply-To: <4B4B60C6.4020505@gmx.com> References: <4B4B60C6.4020505@gmx.com> Message-ID: On Mon, Jan 11, 2010 at 12:32 PM, Yitzchak Schaffer wrote: > For my dev environment, I have a Linux VM (VMware Server 2) running on a > Win7 host laptop. I have a Samba share set up so's I can use my > Win7-based editing tools. ... > Has anyone discovered a way to break an app out of Samba shock, or avoid > having it happen in the first place, without killing processes? > Why suspend the VM at all? Won't VMWare just put execution on hold at the same time as everything else on the laptop? If not, it sounds like you need a Windows 7 suspend script that cleanly disconnects the samba share before suspending the VM and then the whole system. Presumably you could also use a resume script to put it all back together again when you open the laptop later. From yitzchak.schaffer at gmx.com Mon Jan 11 15:38:07 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Mon, 11 Jan 2010 15:38:07 -0500 Subject: [nycphp-talk] Suspending virtual machines with Samba shares In-Reply-To: References: <4B4B60C6.4020505@gmx.com> Message-ID: <4B4B8C2F.6020105@gmx.com> On 1/11/2010 14:12, Chris Snyder wrote: > Why suspend the VM at all? Won't VMWare just put execution on hold at > the same time as everything else on the laptop? This is what led me to suspend first; I read this before I started using the new laptop, so I never tried just hibernating without suspending: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=586 -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From yitzchak.schaffer at gmx.com Tue Jan 12 11:58:55 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Tue, 12 Jan 2010 11:58:55 -0500 Subject: [nycphp-talk] Getter/setter best practices Message-ID: <4B4CAA4F.8040200@gmx.com> Hello all, What's BP for changing the values of protected properties within a class that also has public getter/setters? e.g. in Foo::doSomething() below: class Foo { protected $bar; public function getBar() { return $this->bar; } public function setBar( $baz ) { $this->bar = $baz; } // ... protected function doSomething() { $new_value = $this->getNewValue(); $this->bar = $new_value; // OR $this->setBar( $new_value ); } } Which is preferred, if either? Thanks! -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From rmarscher at beaffinitive.com Tue Jan 12 12:12:39 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue, 12 Jan 2010 12:12:39 -0500 Subject: [nycphp-talk] Getter/setter best practices In-Reply-To: <4B4CAA4F.8040200@gmx.com> References: <4B4CAA4F.8040200@gmx.com> Message-ID: On Jan 12, 2010, at 11:58 AM, Yitzchak Schaffer wrote: > What's BP for changing the values of protected properties within a class that also has public getter/setters? e.g. in Foo::doSomething() below: ... > protected function doSomething() > { > $new_value = $this->getNewValue(); > > $this->bar = $new_value; > > // OR > > $this->setBar( $new_value ); > } > } If you go through the effort to create getter/setter methods, you should always use them. Otherwise, you lose the benefit of having them - which is that more logic can easily be placed in the getter and setter methods to do something more than simply assign/retrieve the variable. -Rob From paul at devonianfarm.com Tue Jan 12 12:15:09 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Tue, 12 Jan 2010 12:15:09 -0500 Subject: [nycphp-talk] Getter/setter best practices In-Reply-To: <4B4CAA4F.8040200@gmx.com> References: <4B4CAA4F.8040200@gmx.com> Message-ID: <4B4CAE1D.2000906@devonianfarm.com> Yitzchak Schaffer wrote: > Hello all, > > What's BP for changing the values of protected properties within a > class that also has public getter/setters? e.g. in Foo::doSomething() > below: > I think you're better off making the "underlying" variable private, and then always access it through the getters and setters... The getters and setters aren't just there to make you type more characters, they give you the option to add behaviors to the get and set operators. There may be some special cases that you want to bypass these, but generally you want to go through them. Personally, I like the way that properties work in C#, and I've implemented a PHP class that offers really sweet syntax for properties: class bean { public function __get($parameter) { $getter_name="get_{$parameter}"; if(method_exists($this,$getter_name)) { return $this->$getter_name(); } if(method_exists($this,"_nails_get")) { return $this->_nails_get($parameter); } throw new Exception("Attempted to get unsupported property [$parameter]"); } public function __set($parameter,$value) { $setter_name="set_{$parameter}"; if(method_exists($this,$setter_name)) { $this->$setter_name($value); return; } if(method_exists($this,"_nails_set")) { return $this->_nails_set($parameter,$value); } throw new Exception("Attempted to set unsupported property [$parameter]"); } } This lets you write something like class myclass extends bean { function get_A() {...} function set_B($value) {...} } then you can write $instance=new myclass(); $a=$instance->A; $instance->B=$b; performance wise I wouldn't use this mechanism for something that's in an inner loop, but it makes code with getters and setters "feel like PHP" rather than "feel like Java." Note that this also has extension points: _nails_set() and _nails_get() are new "magic methods" that can catch properties that aren't defined in the standard way. If you like, you could write your own version that supports named exceptions and also supports TheIrrationalCamelCaseConventionThatNeverDies rather than the convention_that_doesnt_conflate_different_meanings_of_capitalization (i.e. supports_PHP versus SupportsPHP or SupportsPhp?) From chsnyder at gmail.com Tue Jan 12 14:49:13 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 12 Jan 2010 14:49:13 -0500 Subject: [nycphp-talk] Getter/setter best practices In-Reply-To: References: <4B4CAA4F.8040200@gmx.com> Message-ID: On Tue, Jan 12, 2010 at 12:12 PM, Rob Marscher wrote: > On Jan 12, 2010, at 11:58 AM, Yitzchak Schaffer wrote: >> What's BP for changing the values of protected properties within a class that also has public getter/setters? ?e.g. in Foo::doSomething() below: > ... >> ?protected function doSomething() >> ?{ >> ? ?$new_value = $this->getNewValue(); >> >> ? ?$this->bar = $new_value; >> >> ? ?// OR >> >> ? ?$this->setBar( $new_value ); >> ?} >> } > > If you go through the effort to create getter/setter methods, you should always use them. ?Otherwise, you lose the benefit of having them - which is that more logic can easily be placed in the getter and setter methods to do something more than simply assign/retrieve the variable. > Yeah, agreed. Also, if you think in terms of interfaces, there are only methods, not properties. It's a subtle thing (and most of us don't use interfaces in php) but it's a great way to ensure that you can swap out the underlying class later and not break anything. If the new class implements the same interface, there has to be a setBar() method, but there may not be a public or protected bar property. From jmcgraw1 at gmail.com Tue Jan 12 18:06:22 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Tue, 12 Jan 2010 18:06:22 -0500 Subject: [nycphp-talk] Zend Corp listing Local PHP Groups Message-ID: http://www.zend.com/en/community/local-php-groups Local PHP Groups We're building a PHP User Group directory on zend.com - get your User Group listed! You asked, we listened. Following requests from many PHPers, we will be dedicating an area on our website to PHP User Groups. As a first step, we are creating a directory listing User Groups worldwide. Want your User Group to be listed? Please send your User Group's name, location, contact information, website, logo and a short description to localphp at zend.com - jake From anoland at indigente.net Wed Jan 13 09:06:43 2010 From: anoland at indigente.net (Adrian Noland) Date: Wed, 13 Jan 2010 08:06:43 -0600 Subject: [nycphp-talk] Suspending virtual machines with Samba shares In-Reply-To: <4B4B8C2F.6020105@gmx.com> References: <4B4B60C6.4020505@gmx.com> <4B4B8C2F.6020105@gmx.com> Message-ID: <1d8a0e931001130606r5a9b407eo62d3b6885eaf812a@mail.gmail.com> I think you want to turn on synchronous writes. I had a similar situation with NFS running on a system that wasn't aways available. Turning it on ensures that the file gets saved and doesn't wind up in the cache while the laptop is in hibernate/suspend. http://www.mail-archive.com/samba at lists.samba.org/msg95987.html On Mon, Jan 11, 2010 at 2:38 PM, Yitzchak Schaffer < yitzchak.schaffer at gmx.com> wrote: > On 1/11/2010 14:12, Chris Snyder wrote: > >> Why suspend the VM at all? Won't VMWare just put execution on hold at >> the same time as everything else on the laptop? >> > > This is what led me to suspend first; I read this before I started using > the new laptop, so I never tried just hibernating without suspending: > > http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=586 > > > -- > Yitzchak Schaffer > Systems Manager > Touro College Libraries > 33 West 23rd Street > New York, NY 10010 > Tel (212) 463-0400 x5230 > Fax (212) 627-3197 > Email yitzchak.schaffer at tourolib.org > > Access Problems? Contact systems.library at touro.edu > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmarscher at beaffinitive.com Wed Jan 13 10:02:08 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 13 Jan 2010 10:02:08 -0500 Subject: [nycphp-talk] iterating through a multibyte string Message-ID: Hi all, I have a need to iterate through a multibyte string to process the string character by character. Hopefully in php6, this will work without any special work, but as we know we need to use special multibyte string functions in php5 to work with utf-8 characters. Here's an example that iterates my dilemma: The array notation for string is the normal way to do this with regular strings: $str[$i]. I assume this will work for multibyte strings in php6. -- Is using mb_substr($str, $i, 1) the only way to get this to work in php5? That's my question. It seems like it's going to be many times slower according to some of the comments I've seen on the multibyte functions in the php manual. Thanks!! -Rob From dcech at phpwerx.net Wed Jan 13 10:23:56 2010 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 13 Jan 2010 10:23:56 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: References: Message-ID: <4B4DE58C.9010304@phpwerx.net> Rob, > I have a need to iterate through a multibyte string to process the string character by character. > -- Is using mb_substr($str, $i, 1) the only way to get this to work in php5? That's my question. > > It seems like it's going to be many times slower according to some of the comments I've seen on the multibyte functions in the php manual. This might be a bit quicker: $str = "string with utf-8 chars ???"; $t = preg_split('//u',$str,-1,PREG_SPLIT_NO_EMPTY); var_dump($t); Dan From jcampbell1 at gmail.com Wed Jan 13 10:28:18 2010 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 13 Jan 2010 10:28:18 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: References: Message-ID: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> mb_substr is always going to be slow because you always have to iterate from the beginning get the count, thus the loop will run in O(N^2). In theory, it should be much faster if you just pull the first character. e.g.: while($rest) $char = mb_substr($rest,0,1); $rest = mb_substr($rest,1); This will at least be O(N) on the length of the string. I also like Dan's idea of using preg_split. Regards, John Campbell On Wed, Jan 13, 2010 at 10:02 AM, Rob Marscher wrote: > Hi all, > > I have a need to iterate through a multibyte string to process the string character by character. ?Hopefully in php6, this will work without any special work, but as we know we need to use special multibyte string functions in php5 to work with utf-8 characters. ?Here's an example that iterates my dilemma: > > mb_internal_encoding("UTF-8"); > > $str = "string with utf-8 chars ???"; > $length = mb_strlen($str); > $brokenStr = ""; > $preservedStr = ""; > > for ($i = 0; $i < $length; $i++) { > ?$brokenStr .= $str[$i]; > ?$preservedStr .= mb_substr($str, $i, 1); > } > echo "brokenStr = " . $brokenStr . "\n"; > echo "preservedStr = " . $preservedStr . "\n"; > ?> > > The array notation for string is the normal way to do this with regular strings: $str[$i]. ?I assume this will work for multibyte strings in php6. > > -- Is using mb_substr($str, $i, 1) the only way to get this to work in php5? ?That's my question. > > It seems like it's going to be many times slower according to some of the comments I've seen on the multibyte functions in the php manual. > > Thanks!! > -Rob > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From rmarscher at beaffinitive.com Wed Jan 13 10:51:48 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 13 Jan 2010 10:51:48 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> Message-ID: On Jan 13, 2010, at 10:28 AM, John Campbell wrote: > mb_substr is always going to be slow because you always have to > iterate from the beginning get the count, thus the loop will run in > O(N^2). > > In theory, it should be much faster if you just pull the first character. > e.g.: Good point. Thanks. On Jan 13, 2010, at 10:23 AM, Dan Cech wrote: > This might be a bit quicker: > > $str = "string with utf-8 chars ???"; > $t = preg_split('//u',$str,-1,PREG_SPLIT_NO_EMPTY); > var_dump($t); Yeah. This is nice. I think we'll use it. I suppose I could write a benchmark to try to compare. I'll post the results if I do. Thanks a lot to both of you for the quick response. Much appreciated. -Rob From rmarscher at beaffinitive.com Wed Jan 13 11:37:57 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 13 Jan 2010 11:37:57 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> Message-ID: <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> OK. Here are the results of my rough benchmark. Every time I ran it, the results were within about .025 seconds of each other so it seems accurate. Surprisingly, my original mb_substr method won, with preg_split taking just a little bit longer. John's method of grabbing the first character and then removing it from the string actually seems take almost exponentially more time based on how long the string is. I set $strSize to 1000 and had to kill it because I didn't want to wait so long. There must be something pretty inefficient going on in mb_substr to make that the case. I suppose we could look at the source to get to the bottom of it... but I think I've already spent as much time on this as I'm willing to. Thanks again to you guys. $ php mbtest.php normal iteration took 0.8041729927063 mb_substr method took 1.7228858470917 mb_substr method with shortening the string took 7.9840841293335 preg_split method took 2.1547298431396 $ cat mbtest.php References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> Message-ID: <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> You forgot mb_internal_encoding("UTF-8"); without that, mb_substr is just an alias for substr my results look like: normal iteration took 0.64724087715149 mb_substr method took 16.471849918365 mb_substr method with shortening the string took 21.613878965378 preg_split method took 1.927277803421 Dan is the winner. preg_split always runs in linear time. Both of the mb_substr are O(N^2), because the first step in mb_substr is splitting the string into array. It is not as intelligent as I initially assumed. Regards, John Campbell On Wed, Jan 13, 2010 at 11:37 AM, Rob Marscher wrote: > OK. ?Here are the results of my rough benchmark. ?Every time I ran it, the results were within about .025 seconds of each other so it seems accurate. ?Surprisingly, my original mb_substr method won, with preg_split taking just a little bit longer. ?John's method of grabbing the first character and then removing it from the string actually seems take almost exponentially more time based on how long the string is. ?I set $strSize to 1000 and had to kill it because I didn't want to wait so long. ?There must be something pretty inefficient going on in mb_substr to make that the case. ?I suppose we could look at the source to get to the bottom of it... but I think I've already spent as much time on this as I'm willing to. ?Thanks again to you guys. > > $ php mbtest.php > normal iteration took 0.8041729927063 > mb_substr method took 1.7228858470917 > mb_substr method with shortening the string took 7.9840841293335 > preg_split method took 2.1547298431396 > > $ cat mbtest.php > > $strSize = 100; > $repeats = 1000; > > // make the string somewhat large > $str = ''; > for ($i = 0; $i < $strSize; $i++) { > ? ? ? ?$str .= "string with utf-8 chars\n ? ???"; > } > > // non-multibyte iteration > $start = microtime(true); > for ($i = 0; $i < $repeats; $i++) { > ? ? ? ?$length = strlen($str); > ? ? ? ?$newStr = ''; > ? ? ? ?for ($j = 0; $j < $length; $j++) { > ? ? ? ? ? ? ? ?$newStr .= $str{$j}; > ? ? ? ?} > } > $end = microtime(true); > echo "normal iteration took " . ($end - $start) . "\n"; > > // mb_substr method > $start = microtime(true); > for ($i = 0; $i < $repeats; $i++) { > ? ? ? ?$length = mb_strlen($str); > ? ? ? ?$newStr = ''; > ? ? ? ?$rest = $str; > ? ? ? ?for ($j = 0; $j < $length; $j++) { > ? ? ? ? ? ? ? ?$newStr .= mb_substr($rest, $j, 1); > ? ? ? ?} > } > $end = microtime(true); > echo "mb_substr method took " . ($end - $start) . "\n"; > > // mb_substr method, shortening string > $start = microtime(true); > for ($i = 0; $i < $repeats; $i++) { > ? ? ? ?$length = mb_strlen($str); > ? ? ? ?$newStr = ''; > ? ? ? ?$rest = $str; > ? ? ? ?while ($rest) { > ? ? ? ? ? ? ? ?$newStr .= mb_substr($rest, 0, 1); > ? ? ? ? ? ? ? ?$rest = mb_substr($rest, 1); > ? ? ? ?} > } > $end = microtime(true); > echo "mb_substr method with shortening the string took " . ($end - $start) . "\n"; > > // preg_split method > $start = microtime(true); > for ($i = 0; $i < $repeats; $i++) { > ? ? ? ?$chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY); > ? ? ? ?$length = count($chars); > ? ? ? ?$newStr = ''; > ? ? ? ?for ($j = 0; $j < $length; $j++) { > ? ? ? ? ? ? ? ?$newStr += $chars[$j]; > ? ? ? ?} > } > $end = microtime(true); > echo "preg_split method took " . ($end - $start) . "\n"; > > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From rmarscher at beaffinitive.com Wed Jan 13 13:42:24 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 13 Jan 2010 13:42:24 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> Message-ID: <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> On Jan 13, 2010, at 12:44 PM, John Campbell wrote: > You forgot > mb_internal_encoding("UTF-8"); > > without that, mb_substr is just an alias for substr Thanks, John. I thought I had that set in my php.ini - but I must have overwritten my php.ini with a new install since then. > my results look like: > > normal iteration took 0.64724087715149 > mb_substr method took 16.471849918365 > mb_substr method with shortening the string took 21.613878965378 > preg_split method took 1.927277803421 > > Dan is the winner. preg_split always runs in linear time. Both of > the mb_substr are O(N^2), because the first step in mb_substr is > splitting the string into array. It is not as intelligent as I > initially assumed. Thanks for the analysis! I got similar results on the new run too. From dcech at phpwerx.net Wed Jan 13 13:54:33 2010 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 13 Jan 2010 13:54:33 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> Message-ID: <4B4E16E9.6030509@phpwerx.net> Rob Marscher wrote: > On Jan 13, 2010, at 12:44 PM, John Campbell wrote: >> You forgot >> mb_internal_encoding("UTF-8"); >> >> without that, mb_substr is just an alias for substr > > Thanks, John. I thought I had that set in my php.ini - but I must have overwritten my php.ini with a new install since then. Good catch! I missed that too... >> my results look like: >> >> normal iteration took 0.64724087715149 >> mb_substr method took 16.471849918365 >> mb_substr method with shortening the string took 21.613878965378 >> preg_split method took 1.927277803421 >> >> Dan is the winner. preg_split always runs in linear time. Both of >> the mb_substr are O(N^2), because the first step in mb_substr is >> splitting the string into array. It is not as intelligent as I >> initially assumed. > > Thanks for the analysis! I got similar results on the new run too. I worked up a quick alternative that avoided mb_substr for calculating $rest: for ($i = 0; $i < $repeats; $i++) { $length = mb_strlen($str); $newStr = ''; $rest = $str; while ($rest) { $c = mb_substr($rest, 0, 1); $newStr .= $c; $rest = substr($rest,strlen($c)); } } as long as you don't have mbstring.func_overload enabled it is much more efficient than shortening the string using mb_substr: normal iteration took 0.95997190475464 mb_substr method took 19.002305984497 mb_substr method with shortening the string took 25.623261928558 mb_substr method with shortening the string using substr took 6.5963559150696 preg_split method took 2.5313749313354 but still can't beat preg_split, most likely because of the overhead involved in overwriting $rest on every pass through the loop. Dan From chsnyder at gmail.com Wed Jan 13 14:24:10 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 13 Jan 2010 14:24:10 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: <4B4E16E9.6030509@phpwerx.net> References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> <4B4E16E9.6030509@phpwerx.net> Message-ID: On Wed, Jan 13, 2010 at 1:54 PM, Dan Cech wrote: > but still can't beat preg_split, most likely because of the overhead > involved in overwriting $rest on every pass through the loop. Regex wins a speed test. Nice thread! From tedd.sperling at gmail.com Thu Jan 14 09:30:27 2010 From: tedd.sperling at gmail.com (tedd) Date: Thu, 14 Jan 2010 09:30:27 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? Message-ID: At 6:34 PM -0500 1/3/10, David Krings wrote: >On 1/3/2010 5:41 PM, Hans Zaunere wrote: >>Oh my :) > >That applies to IIS, right? I just have to ask the question: can't >you just use a real web server that actually works, like, let's say, >Apache? I 'work' with IIS at work and it is a totally dysfunctional >kludge. I have a client who is setting up a server and is going the IIS route. What advice do you guys offer? Should he do it or change to Apache instead? Thanks in advance for your comments and advice. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From zippy1981 at gmail.com Thu Jan 14 09:43:05 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Thu, 14 Jan 2010 09:43:05 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: Message-ID: <5458db3c1001140643q6a57b53dleffb6fd5ba6403be@mail.gmail.com> On Thu, Jan 14, 2010 at 9:30 AM, tedd wrote: > > I have a client who is setting up a server and is going the IIS route. What > advice do you guys offer? Should he do it or change to Apache instead? > > Its kinda funny, but I am revisiting my "IIS on WIndows DUH" stance the past couple of days after having problems recently. First of all, what are their requirements? If it put PHP on windows, and not MSSQL server involved, then just install XAMPP. It works. That being said some considerations for PHP on IIS: - Microsoft is recommending a nonthreadsafe compile of PHPanf the FastCGI module. CGI/FastCGI doesn't need thread support, and you get a speed boot by not having the thread checking built in. - If you need MSSQL server, use the microsft supplied driver. - I've had lots of problems with the microsoft web platform installer on windows 7 ultimate. SOAP driver does not seem to work at all. The mssql driver requires msvcrt71.dll which is not distributed with the WPI. The MSIs from windows.php.net seem to work -------------- next part -------------- An HTML attachment was scrubbed... URL: From lhall at smartronix.com Thu Jan 14 09:46:49 2010 From: lhall at smartronix.com (Hall, Leam) Date: Thu, 14 Jan 2010 09:46:49 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: <5458db3c1001140643q6a57b53dleffb6fd5ba6403be@mail.gmail.com> References: , <5458db3c1001140643q6a57b53dleffb6fd5ba6403be@mail.gmail.com> Message-ID: <3A6D0CB1-5CE5-4E74-A6F6-9B80481C3C8F@mimectl> As long as security and cost aren't issues, IIS is fine. ;) Leam From: Justin Dearing Sent: Thu 14-Jan-10 09:43 To: NYPHP Talk Subject: Re: [nycphp-talk] IIS a dysfunctional kludge? On Thu, Jan 14, 2010 at 9:30 AM, tedd wrote: I have a client who is setting up a server and is going the IIS route. What advice do you guys offer? Should he do it or change to Apache instead? Its kinda funny, but I am revisiting my "IIS on WIndows DUH" stance the past couple of days after having problems recently. First of all, what are their requirements? If it put PHP on windows, and not MSSQL server involved, then just install XAMPP. It works. That being said some considerations for PHP on IIS: Microsoft is recommending a nonthreadsafe compile of PHPanf the FastCGI module. CGI/FastCGI doesn't need thread support, and you get a speed boot by not having the thread checking built in. If you need MSSQL server, use the microsft supplied driver. I've had lots of problems with the microsoft web platform installer on windows 7 ultimate. SOAP driver does not seem to work at all. The mssql driver requires msvcrt71.dll which is not distributed with the WPI. The MSIs from windows.php.net seem to work -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Thu Jan 14 09:48:08 2010 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 14 Jan 2010 09:48:08 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: Message-ID: <002101ca9528$96582530$c3086f90$@com> > >>Oh my :) > > > >That applies to IIS, right? I just have to ask the question: can't > >you just use a real web server that actually works, like, let's say, > >Apache? I 'work' with IIS at work and it is a totally dysfunctional > >kludge. > > I have a client who is setting up a server and is going the IIS > route. What advice do you guys offer? Should he do it or change to > Apache instead? > > Thanks in advance for your comments and advice. When in Rome... If on Windows, I'd say go with IIS, especially if you have someone familiar with it. And, if you'll be interacting with MSSQL/etc, then I'd recommend as well - the Web Platform Installer works well, aside from a couple of gotchas (which at some point I'll document). My issue was that I was so used to Apache. After working through some things, IIS has proved stable and useful. Another idiom: don't put all your eggs in one basket. H From m.suterski at gmail.com Thu Jan 14 11:20:08 2010 From: m.suterski at gmail.com (Marcin Suterski) Date: Thu, 14 Jan 2010 11:20:08 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: Message-ID: <253e28c41001140820g501003c0wb026254dbf8b5689@mail.gmail.com> If it's IIS7 than go for it. If it's IIS6 than make sure to run it through FastCGI. We are running IIS7 on Windows Server 2008 64bit boxes in production and we are very happy with it. Both, Zend and Microsoft, offer full stack installation packages. Just remember that not all PHP features are available in Windows releases. Regards, Marcin On Thu, Jan 14, 2010 at 9:30 AM, tedd wrote: > At 6:34 PM -0500 1/3/10, David Krings wrote: >> >> On 1/3/2010 5:41 PM, Hans Zaunere wrote: >>> >>> Oh my :) >> >> That applies to IIS, right? I just have to ask the question: can't you >> just use a real web server that actually works, like, let's say, Apache? I >> 'work' with IIS at work and it is a totally dysfunctional kludge. > > I have a client who is setting up a server and is going the IIS route. What > advice do you guys offer? Should he do it or change to Apache instead? > > Thanks in advance for your comments and advice. > > Cheers, > > tedd > -- > ------- > http://sperling.com ?http://ancientstones.com ?http://earthstones.com > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From paul at devonianfarm.com Thu Jan 14 11:54:02 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Thu, 14 Jan 2010 11:54:02 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: <253e28c41001140820g501003c0wb026254dbf8b5689@mail.gmail.com> References: <253e28c41001140820g501003c0wb026254dbf8b5689@mail.gmail.com> Message-ID: <4B4F4C2A.9000504@devonianfarm.com> Marcin Suterski wrote: > If it's IIS7 than go for it. > > If it's IIS6 than make sure to run it through FastCGI. > > We are running IIS7 on Windows Server 2008 64bit boxes in production > and we are very happy with it. > > Both, Zend and Microsoft, offer full stack installation packages. > > I've found that both Apache on Windows and IIS give acceptable performance w/ PHP on lightly loaded servers. (<10 hits/sec) My impression is, overall, that Apache serves static pages on Windows about an order of magnitude slower than it does on an equivalent machine running Linux... Still, I've seen Windows/Apache serve >100 static hits per second and I think that would please a lot of people. Personally I develop on Windows and deploy on Linux. I've been happy with XAMPP as a development environment. So long as you don't let windows let you get sloppy about the case of filenames, you'll do alright... Sometimes I think about configuring ext3 on my Linux machines to be case insensitive to clear that little problem up. From ioplex at gmail.com Thu Jan 14 12:03:56 2010 From: ioplex at gmail.com (Michael B Allen) Date: Thu, 14 Jan 2010 12:03:56 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> <4B4E16E9.6030509@phpwerx.net> Message-ID: <78c6bd861001140903j619a622ie6174b66bd061e0a@mail.gmail.com> On Wed, Jan 13, 2010 at 2:24 PM, Chris Snyder wrote: > On Wed, Jan 13, 2010 at 1:54 PM, Dan Cech wrote: > >> but still can't beat preg_split, most likely because of the overhead >> involved in overwriting $rest on every pass through the loop. > > Regex wins a speed test. Nice thread! The more work done in C the faster it will be. So even though there is the overhead of compiling the regex expression, it frequently turns out to be faster. This is way I always use regex for tokenizers when parsing complex data (I did this for a Creole Wiki markup interpreter). Note that you can also convert the string to something like UCS-2BE using iconv and then each character will occupy exactly 2 bytes in the resulting string allowing you to iterate over it in the mostly convential way. This might turn out to be faster but I'm not sure. Mike -- Michael B Allen PHP Active Directory Integration http://www.ioplex.com/plexcel.html From ramons at gmx.net Thu Jan 14 14:05:58 2010 From: ramons at gmx.net (David Krings) Date: Thu, 14 Jan 2010 14:05:58 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: Message-ID: <4B4F6B16.4040602@gmx.net> On 1/14/2010 9:30 AM, tedd wrote: > At 6:34 PM -0500 1/3/10, David Krings wrote: >> On 1/3/2010 5:41 PM, Hans Zaunere wrote: >>> Oh my :) >> >> That applies to IIS, right? I just have to ask the question: can't you >> just use a real web server that actually works, like, let's say, >> Apache? I 'work' with IIS at work and it is a totally dysfunctional >> kludge. > > I have a client who is setting up a server and is going the IIS route. > What advice do you guys offer? Should he do it or change to Apache instead? > > Thanks in advance for your comments and advice. I find Apache way easier to administer than IIS. You may also want to take a look at this article http://www.eweek.com/c/a/Application-Development/eWEEK-Labs-Bakeoff-Open-Source-Versus-Net-Stacks/ I know it is dated and things have changed, but in my experience dealing with the IIS/.NET and WAMPP stacks nothing changed in the core result of the test done. Performancewise WAMPP wipes the floor with IIS. I also don't share the viewpoint that if on Windows use MSSQL. I use MySQL on Windows and never ran into any problems because for the most part is just works. I can't say that about MSSQL, especially not MSSQL 2008 which is just a big ball of everything. Once configured and working MSSQL does do the job as good or as bad as any other of the 'big' SQL servers. In the end it depends for both stack and SQL server on what the customer wants, what they feel comfortable with, and what can be maintained. If you have free choice I recommend going WAMPP. That setup never failed me. David From rotsen at gmail.com Thu Jan 14 16:54:28 2010 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Thu, 14 Jan 2010 13:54:28 -0800 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: <4B4F6B16.4040602@gmx.net> References: <4B4F6B16.4040602@gmx.net> Message-ID: I believe that something like 60% of the market uses Apache, that is why I go with apache and the fact that also is easier to handle my windows and linux server with the same type of web server. Go with IIS if you have to run ASP or .net Otherwise, I prefer wamp when in the windows environment. :-) On Thu, Jan 14, 2010 at 11:05 AM, David Krings wrote: > On 1/14/2010 9:30 AM, tedd wrote: > >> At 6:34 PM -0500 1/3/10, David Krings wrote: >> >>> On 1/3/2010 5:41 PM, Hans Zaunere wrote: >>> >>>> Oh my :) >>>> >>> >>> That applies to IIS, right? I just have to ask the question: can't you >>> just use a real web server that actually works, like, let's say, >>> Apache? I 'work' with IIS at work and it is a totally dysfunctional >>> kludge. >>> >> >> I have a client who is setting up a server and is going the IIS route. >> What advice do you guys offer? Should he do it or change to Apache >> instead? >> >> Thanks in advance for your comments and advice. >> > > > I find Apache way easier to administer than IIS. You may also want to take > a look at this article > > http://www.eweek.com/c/a/Application-Development/eWEEK-Labs-Bakeoff-Open-Source-Versus-Net-Stacks/ > I know it is dated and things have changed, but in my experience dealing > with the IIS/.NET and WAMPP stacks nothing changed in the core result of the > test done. Performancewise WAMPP wipes the floor with IIS. > I also don't share the viewpoint that if on Windows use MSSQL. I use MySQL > on Windows and never ran into any problems because for the most part is just > works. I can't say that about MSSQL, especially not MSSQL 2008 which is just > a big ball of everything. Once configured and working MSSQL does do the job > as good or as bad as any other of the 'big' SQL servers. > In the end it depends for both stack and SQL server on what the customer > wants, what they feel comfortable with, and what can be maintained. If you > have free choice I recommend going WAMPP. That setup never failed me. > > David > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Thu Jan 14 16:58:11 2010 From: ben at projectskyline.com (Ben Sgro) Date: Thu, 14 Jan 2010 16:58:11 -0500 Subject: [nycphp-talk] iterating through a multibyte string In-Reply-To: <78c6bd861001140903j619a622ie6174b66bd061e0a@mail.gmail.com> References: <8f0676b41001130728h6ad4fe26uebf7dba1732c7fc8@mail.gmail.com> <680EE3C3-9B03-45AD-8089-02F159CDC5F9@beaffinitive.com> <8f0676b41001130944u372b5cu39bcacc7c037d4c7@mail.gmail.com> <5AA8362F-A58E-482D-A0CE-73430624950C@beaffinitive.com> <4B4E16E9.6030509@phpwerx.net> <78c6bd861001140903j619a622ie6174b66bd061e0a@mail.gmail.com> Message-ID: <4B4F9373.4090803@projectskyline.com> Mike, I've seen the exact opposite argument, that the family of functions str_* are faster than regex. And, um, PHP is implemented in C, so isn't all the work done in C at the end of the day? The str_* methods will be optimized, the (dynamic) regex will not. I'm confused by your logic ... - Ben Michael B Allen wrote: > On Wed, Jan 13, 2010 at 2:24 PM, Chris Snyder wrote: > >> On Wed, Jan 13, 2010 at 1:54 PM, Dan Cech wrote: >> >> >>> but still can't beat preg_split, most likely because of the overhead >>> involved in overwriting $rest on every pass through the loop. >>> >> Regex wins a speed test. Nice thread! >> > > The more work done in C the faster it will be. So even though there is > the overhead of compiling the regex expression, it frequently turns > out to be faster. This is way I always use regex for tokenizers when > parsing complex data (I did this for a Creole Wiki markup > interpreter). > > Note that you can also convert the string to something like UCS-2BE > using iconv and then each character will occupy exactly 2 bytes in the > resulting string allowing you to iterate over it in the mostly > convential way. This might turn out to be faster but I'm not sure. > > Mike > > From greg at freephile.com Thu Jan 14 20:57:36 2010 From: greg at freephile.com (Greg Rundlett (freephile)) Date: Thu, 14 Jan 2010 20:57:36 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: <4B4F6B16.4040602@gmx.net> Message-ID: <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> /me resisting all impulses to call IIS names... On Thu, Jan 14, 2010 at 4:54 PM, N?stor wrote: > I believe that? something like 60% of the market uses Apache, that is why I > go with apache Actually it's 54%, but who's counting ;-) [1] Still, that's twice the nearest competitor and so you're logic (go with the leader) stands. A patchy server [2] still leads the pack. I'm a proponent for freedom in technology, and so I'd always favor Linux / Apache and freedom software where choice is possible. Interestingly, the Netcraft survey shows nginx [3] gaining popularity. nginx and "lighty" certainly have been gaining popularity from where I stand. [1] http://news.netcraft.com/archives/web_server_survey.html These are only statistics. [2] http://www.wired.com/techbiz/media/news/2000/02/34302 [3] http://wiki.nginx.org/Main > > On Thu, Jan 14, 2010 at 11:05 AM, David Krings wrote: >> >> On 1/14/2010 9:30 AM, tedd wrote: >>> >>> At 6:34 PM -0500 1/3/10, David Krings wrote: >>>> >>>> On 1/3/2010 5:41 PM, Hans Zaunere wrote: >>>>> >>>>> Oh my :) >>>> >>>> That applies to IIS, right? I just have to ask the question: can't you >>>> just use a real web server that actually works, like, let's say, >>>> Apache? I 'work' with IIS at work and it is a totally dysfunctional >>>> kludge. >>> >>> I have a client who is setting up a server and is going the IIS route. >>> What advice do you guys offer? Should he do it or change to Apache >>> instead? >>> >>> Thanks in advance for your comments and advice. >> >> >> I find Apache way easier to administer than IIS. You may also want to take >> a look at this article >> >> http://www.eweek.com/c/a/Application-Development/eWEEK-Labs-Bakeoff-Open-Source-Versus-Net-Stacks/ >> I know it is dated and things have changed, but in my experience dealing >> with the IIS/.NET and WAMPP stacks nothing changed in the core result of the >> test done. Performancewise WAMPP wipes the floor with IIS. >> I also don't share the viewpoint that if on Windows use MSSQL. I use MySQL >> on Windows and never ran into any problems because for the most part is just >> works. I can't say that about MSSQL, especially not MSSQL 2008 which is just >> a big ball of everything. Once configured and working MSSQL does do the job >> as good or as bad as any other of the 'big' SQL servers. >> In the end it depends for both stack and SQL server on what the customer >> wants, what they feel comfortable with, and what can be maintained. If you >> have free choice I recommend going WAMPP. That setup never failed me. >> >> David >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From paul at devonianfarm.com Fri Jan 15 10:09:31 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Fri, 15 Jan 2010 10:09:31 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> References: <4B4F6B16.4040602@gmx.net> <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> Message-ID: <4B50852B.9090605@devonianfarm.com> Greg Rundlett (freephile) wrote: > > Actually it's 54%, but who's counting ;-) [1] Still, that's twice the > nearest competitor and so you're logic (go with the leader) stands. > A patchy server [2] still leads the pack. > > I think it comes down to platform choice. People who choose Unix tend to choose Apache; although it's not the fastest web server, it's mature and it's feature rich in many ways (you'll take URL rewriting of my cold dead hands.) If you're running Windows, you get IIS at no extra cost. Today you can get a good PHP implementation for it, and if you like ASP.NET (it has its charms) it integrates easily without a lot of trouble. IIS can certainly give you headaches involving file permissions, but it really isn't that bad; IIS 7 is moving more and more towards a configuration-file driven approach that works like Apache. When I'm paying for servers on my own dime, I use Linux and Apache; I still think it's easier to admin a Linux machine that's "hands off" than it is admin Windows. That said, Windows has come a ~long~ way in the last 10 years: I do some sysadmin work on Windows servers at work and it's not that bad. Looking back since 1993, when I built my first Linux box, I'm amazed at how much Windows has improved and at how, in many ways, Linux has stagnated and gotten worse. Linux finally has a decent kernel, the 2.6 line, that's reliable and scalable on multi-CPU machines, but "Linux on the desktop" seems to be going backwards. For instance, KDE was actually impressive when I first saw it in '97. They keep adding more features, but it seems to get slower and less usable. GNOME lost all credibility with me when they went with "Spatial Nautilus", which makes it entirely unusable for the way I want to use it. The same way General Motors has a captive audience of police departments and rental car companies that gives them no incentive to develop cars consumers want, Linux distro/desktop developers aren't making any serious effort to make a product that appeals to people who aren't already "true believers" in Linux already. From chsnyder at gmail.com Fri Jan 15 10:50:12 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 15 Jan 2010 10:50:12 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: <4B50852B.9090605@devonianfarm.com> References: <4B4F6B16.4040602@gmx.net> <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> <4B50852B.9090605@devonianfarm.com> Message-ID: One thing I haven't seen on this thread: for those of you who develop on Linux and deploy on Windows (or vice versa, more likely) how do you deal with the differences in file names, line endings, and $_SERVER vars? I try to match my dev and production environments as closely as possible to avoid portability bugs, but that means I have to jump through some hoops, like using a dev server rather than just installing xampp on my laptop. From yitzchak.schaffer at gmx.com Fri Jan 15 11:03:38 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Fri, 15 Jan 2010 11:03:38 -0500 Subject: [nycphp-talk] xdebug / socket_accept() on a virtual machine Message-ID: <4B5091DA.1000206@gmx.com> Hello all, I am trying to set up NetBeans with xdebug on a Win7 host and VMware/Ubuntu "remote" virtual server, and am not able to connect to xdebug via NetBeans. I see xdebug enabled via phpinfo() and php -v, and the xdebug functions like xdebug_call_file() work when called in the code. Based on some HOWTOs, it seems like the dbgp listener (?) isn't working. When I run the following test from the command line: References: <4B5091DA.1000206@gmx.com> Message-ID: <4B5096EE.4010905@gmx.com> On 1/15/2010 11:03, Yitzchak Schaffer wrote: > When I run the following test from the command line: Oops, I didn't read the instructions fully, mea culpa. Hold your tomatoes, please... back to testing. -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From paul at devonianfarm.com Fri Jan 15 13:00:58 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Fri, 15 Jan 2010 13:00:58 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: <4B4F6B16.4040602@gmx.net> <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> <4B50852B.9090605@devonianfarm.com> Message-ID: <4B50AD5A.2@devonianfarm.com> Chris Snyder wrote: > One thing I haven't seen on this thread: for those of you who develop > on Linux and deploy on Windows (or vice versa, more likely) how do you > deal with the differences in file names, line endings, and $_SERVER > vars? > > One little secret about Windows is that the WIN32 API accepts '/' as a path separator character. Even DOS accepted / from the very beginning, see http://blogs.msdn.com/larryosterman/archive/2005/06/24/432386.aspx for a really great story. For the most part you can always use '/' and not have trouble. The one exception is that you WILL have trouble if you pass a filename with a / in it to CMD.EXE batch script, since '/' plays a role similar to '-' in UNIX. Line endings typically aren't a big deal in web apps. (Browsers don't care) Apps on Windows aimed at developer (say the editor in Dreamweaver or Visual Studio) are designed to accept either UNIX style or Windows styles line endings and I think that's the way to do it. I think the worst trouble I had in this department was getting PHP on Windows to send mail through qmail on UNIX (which is tougher than most MTAs about line endings.) Most other problems can be smoothed over with compatibility functions: for instance, write your own function for appending to php_in_path that uses ';' on Windows and ':' on UNIX. You ought to have encapsulated $_GET, $_POST and all of that anyway since somebodu might have turned on magic_quotes_gpc on your server. > I try to match my dev and production environments as closely as > possible to avoid portability bugs, but that means I have to jump > through some hoops, like using a dev server rather than just > installing xampp on my laptop. > I do it both ways. One project I'm working on depends on a 20 GB semantic database so I do most of the development on my Linux server... Some people might mbe shocked, but I use Dreamweaver as an editor there since it's usable editor with the ability to work transparently over SFTP. From anoland at indigente.net Fri Jan 15 19:14:30 2010 From: anoland at indigente.net (Adrian Noland) Date: Fri, 15 Jan 2010 18:14:30 -0600 Subject: [nycphp-talk] I'd submit to dailywft if it wasn't so short. Message-ID: <1d8a0e931001151614y773dc1cew1b9c09d9b2587a38@mail.gmail.com> Hi all, I came across this gem today: > // lots of code > > @require('../very_important_file.php'); > > // more code > Have a good weekend. Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From yitzchak.schaffer at gmx.com Sat Jan 16 19:21:51 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Sat, 16 Jan 2010 19:21:51 -0500 Subject: [nycphp-talk] xdebug / socket_accept() In-Reply-To: <4B5096EE.4010905@gmx.com> References: <4B5091DA.1000206@gmx.com> <4B5096EE.4010905@gmx.com> Message-ID: <4B52581F.70607@gmx.com> Still working on my xdebug woes; I finished reading the instrux at http://wiki.netbeans.org/HowToConfigureXDebug but the test script still fails. The script: Each of the three var_dump()'s returns "resource(2, Socket)" but socket_accept() errors out with " Warning: socket_accept() [function.socket-accept]: unable to accept incoming connection [22]: Invalid argument in /www/websites/emeraldview/public/test.php on line 8" Any ideas? Many thanks, -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From anoland at indigente.net Sun Jan 17 11:28:27 2010 From: anoland at indigente.net (Adrian Noland) Date: Sun, 17 Jan 2010 10:28:27 -0600 Subject: [nycphp-talk] xdebug / socket_accept() In-Reply-To: <4B52581F.70607@gmx.com> References: <4B5091DA.1000206@gmx.com> <4B5096EE.4010905@gmx.com> <4B52581F.70607@gmx.com> Message-ID: <1d8a0e931001170828q24553052l5289f7267d4dac75@mail.gmail.com> Yitzchak, This isn't really a good way to go about testing the xdebug connection.I tried it on my machine and got the same errors you did. Depending on the configuration, the debugger opens port 9000 either during httpd start or the page runtime. Either way port 9000 is already in use by the time your socket tries to connect. Make sure that phpinfo shows the extension is loaded, and that the thread safety matches all three: httpd, php, and xdebug. If you are using WAMP make sure the VC versions match as well. Turn on error logging in httpd, php, and xdebug and make sure they don't have any problems. Also, try this to test instead. On Sat, Jan 16, 2010 at 6:21 PM, Yitzchak Schaffer < yitzchak.schaffer at gmx.com> wrote: > Still working on my xdebug woes; I finished reading the instrux at > http://wiki.netbeans.org/HowToConfigureXDebug > but the test script still fails. The script: > > $address = '127.0.0.1'; > $port = 9000; > > $sock = socket_create(AF_INET, SOCK_STREAM, 0); > var_dump($sock); > > socket_bind($sock, $address, $port) or die('Unable to bind'); > var_dump($sock); > > $client = socket_accept($sock); > > var_dump($sock); > ?> > > Each of the three var_dump()'s returns "resource(2, Socket)" but > socket_accept() errors out with " Warning: socket_accept() > [function.socket-accept]: unable to accept incoming connection [22]: Invalid > argument in /www/websites/emeraldview/public/test.php on line 8" > > Any ideas? > > Many thanks, > > -- > Yitzchak Schaffer > Systems Manager > Touro College Libraries > 33 West 23rd Street > New York, NY 10010 > Tel (212) 463-0400 x5230 > Fax (212) 627-3197 > Email yitzchak.schaffer at tourolib.org > > Access Problems? Contact systems.library at touro.edu > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Sun Jan 17 17:12:47 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Sun, 17 Jan 2010 17:12:47 -0500 Subject: [nycphp-talk] =?windows-1252?q?Microsoft_won=92t_tell_Zend_how_to_?= =?windows-1252?q?build_PHP_on_Windows?= Message-ID: <5458db3c1001171412t3520eda6v6b38a21ee71ab006@mail.gmail.com> Hey, It seems from the recent IIS thread that I am not the only one running PHP on windows on this list. Well I've recently been told by a PHP core developer that Microsoft does not approve of their attempted updates to the PHP documentation for building it on Windows. I wrote the details about it on my blog: http://www.justaprogrammer.net/2010/01/17/microsoft-wont-tell-zend-how-to-build-php/ Microsoft has spent a lot of effort recently making PHP play nice on Windows, including releasing a new caching module for windows so I'm a little surprised they can't update the readme file for PHP. Anyway, I am looking for suggestions on how to get the readme file updated in a way that Microsoft will not request Zend revert. Regards, Justin Dearing -------------- next part -------------- An HTML attachment was scrubbed... URL: From allen at TwoMiceAndAStrawberry.com Sun Jan 17 18:21:10 2010 From: allen at TwoMiceAndAStrawberry.com (Allen Shaw) Date: Sun, 17 Jan 2010 17:21:10 -0600 Subject: [nycphp-talk] =?windows-1252?q?Microsoft_won=92t_tell_Zend_how_to_?= =?windows-1252?q?build_PHP_on_Windows?= In-Reply-To: <5458db3c1001171412t3520eda6v6b38a21ee71ab006@mail.gmail.com> References: <5458db3c1001171412t3520eda6v6b38a21ee71ab006@mail.gmail.com> Message-ID: <4B539B66.1050000@TwoMiceAndAStrawberry.com> Justin Dearing wrote: > I wrote the details about it on my blog: > > http://www.justaprogrammer.net/2010/01/17/microsoft-wont-tell-zend-how-to-build-php/ Hi Justin, In the interest of continuing this conversation, I reference Zeev's comment on your blog post, in which he says, "The title (and some of the contents) is actually quite misleading as this whole incident has nothing to do with Zend, Microsoft or the relationship between the two companies. ... For the record, Zend builds PHP on Windows (as does php.net) on a regular basis." I suppose, depending on timezones, his comment may have been made after you sent your email. But I'm curious to hear what you make of it. - A. -- Allen Shaw TwoMiceAndAStrawberry.com "Data Management, Web Applications, and the Meaning of Life" From zippy1981 at gmail.com Sun Jan 17 18:39:23 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Sun, 17 Jan 2010 18:39:23 -0500 Subject: [nycphp-talk] =?windows-1252?q?Microsoft_won=92t_tell_Zend_how_to_?= =?windows-1252?q?build_PHP_on_Windows?= In-Reply-To: <4B539B66.1050000@TwoMiceAndAStrawberry.com> References: <5458db3c1001171412t3520eda6v6b38a21ee71ab006@mail.gmail.com> <4B539B66.1050000@TwoMiceAndAStrawberry.com> Message-ID: <5458db3c1001171539y3bd8da94y74986c218f59936f@mail.gmail.com> Allen, A few reactions: 1. I have responded to him with some questions and I am awaiting his response. 2. It seems that zend and the PHP community are not one and the same. I did not know this and I consider that bad journalism on my part. 3. I do want to update the article. I also want to make sure I get the facts right. His comment might have preceded my email. I did not see it before sending the email. On Sun, Jan 17, 2010 at 6:21 PM, Allen Shaw wrote: > Justin Dearing wrote: > >> I wrote the details about it on my blog: >> >> >> http://www.justaprogrammer.net/2010/01/17/microsoft-wont-tell-zend-how-to-build-php/ >> > Hi Justin, > > In the interest of continuing this conversation, I reference Zeev's comment > on your blog post, in which he says, "The title (and some of the contents) > is actually quite misleading as this whole incident has nothing to do with > Zend, Microsoft or the relationship between the two companies. ... For the > record, Zend builds PHP on Windows (as does php.net) on a regular basis." > > I suppose, depending on timezones, his comment may have been made after you > sent your email. But I'm curious to hear what you make of it. > > - A. > > -- > Allen Shaw > TwoMiceAndAStrawberry.com > > "Data Management, Web Applications, and the Meaning of Life" > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Sun Jan 17 19:20:40 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Sun, 17 Jan 2010 19:20:40 -0500 Subject: [nycphp-talk] =?windows-1252?q?Microsoft_won=92t_tell_Zend_how_to_?= =?windows-1252?q?build_PHP_on_Windows?= In-Reply-To: <5458db3c1001171539y3bd8da94y74986c218f59936f@mail.gmail.com> References: <5458db3c1001171412t3520eda6v6b38a21ee71ab006@mail.gmail.com> <4B539B66.1050000@TwoMiceAndAStrawberry.com> <5458db3c1001171539y3bd8da94y74986c218f59936f@mail.gmail.com> Message-ID: <5458db3c1001171620o5e10f372u9adfdbf4e7c82f38@mail.gmail.com> I've put up some interim updates and retitled the article. I've kept the url so nothing got broken. It was bad journalism on my part to assume that zend and php.net were one and the same. On Sun, Jan 17, 2010 at 6:39 PM, Justin Dearing wrote: > Allen, > > A few reactions: > > 1. I have responded to him with some questions and I am awaiting his > response. > 2. It seems that zend and the PHP community are not one and the same. I > did not know this and I consider that bad journalism on my part. > 3. I do want to update the article. I also want to make sure I get the > facts right. > > His comment might have preceded my email. I did not see it before sending > the email. > > > > On Sun, Jan 17, 2010 at 6:21 PM, Allen Shaw < > allen at twomiceandastrawberry.com> wrote: > >> Justin Dearing wrote: >> >>> I wrote the details about it on my blog: >>> >>> >>> http://www.justaprogrammer.net/2010/01/17/microsoft-wont-tell-zend-how-to-build-php/ >>> >> Hi Justin, >> >> In the interest of continuing this conversation, I reference Zeev's >> comment on your blog post, in which he says, "The title (and some of the >> contents) is actually quite misleading as this whole incident has nothing to >> do with Zend, Microsoft or the relationship between the two companies. ... >> For the record, Zend builds PHP on Windows (as does php.net) on a regular >> basis." >> >> I suppose, depending on timezones, his comment may have been made after >> you sent your email. But I'm curious to hear what you make of it. >> >> - A. >> >> -- >> Allen Shaw >> TwoMiceAndAStrawberry.com >> >> "Data Management, Web Applications, and the Meaning of Life" >> >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hypertextpreprocessor at dynamicink.com Mon Jan 18 03:53:27 2010 From: hypertextpreprocessor at dynamicink.com (I Dream in PHP) Date: Mon, 18 Jan 2010 03:53:27 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> Message-ID: <01f501ca981b$df9e4170$bf0aa8c0@e6300> Nobody else thought it was very revealing when someone shouted out "I like my job" (assumedly a DBA job) as a reason not to use NoSQL?! I love MySQL and NoSQL DBs certainly do not fit all projects, but in the ones where it does fit it saves a huge amount of development time and makes the dedicated-DBA position somewhat obsolete. On that note, all you PHP + MongoDB users should check out phpMoAdmin, a GUI tool to manage your Mongo data. It is open-source, AJAX-based, has nothing to configure and is self-contained in a single 75kb file! Begin using in 10-seconds: simply place the moadmin.php file anywhere on your web site and it just works! Learn more, download & use: http://www.phpMoAdmin.com Contribute your code to the phpMoAdmin project: http://github.com/MongoDB-Rox/phpMoAdmin-MongoDB-Admin-Tool-for-PHP ----- Original Message ----- From: "Konstantin K" To: "NYPHP Talk" Sent: Wednesday, December 09, 2009 11:53 PM Subject: Re: [nycphp-talk] MongoDB and others, convince me. :-) Funny, but some (valid? fair? not sure) points about NoSQL databases: http://highscalability.com/blog/2009/11/25/brian-akers-hilarious-nosql-stand-up-routine.html accompanying slides: http://www.slideshare.net/brianaker/no-sql-talk On Fri, Dec 4, 2009 at 10:36 AM, Peter Becker wrote: > Here here! I think that context is everything and the points you made are > spot on.....so why this huge interest in non-relational db's now? I'd say > it in 2 words Web 2.0 (well actually 1 word and 1integer). > > Could Facebook, Twitter and any of the others have any idea of what their > db > should look like or evolve to? I doubt it, and so for these cases where > the > industry is not mature the non-relational makes perfect sense. But for > mature industries, then organizing the data with clearly defined > attributes > and organization will give the biggest bang for the buck to the business > who's inevitably using it (and paying the bills). > It'll be interesting to see as these new industries mature and the next > generations have a better idea of what they'll be/need to do whether there > will be a migration away from the non-relational... > > Anyway, just my 2 cents from a neophyte who knows just enough to be > dangerous. > > Peter > > Gary Mort wrote: >> >> Ok, so since someone has been singing the praises of MongoDB, and others >> have been mentioned, I figured I'd provide a contrarian view and see if >> you >> can convince me otherwise. >> >> I'm a big fan of relational databases. Have been using them since I >> graduated from college in 1993, starting with DB2, followed with >> MySQL[and >> boy was THAT interesting. DB2 was always like 2 years behind all the neat >> features in other relational databases. Then I went to MySQL and not only >> did it lack those features, it lacked a lot of what solid, dependable DB2 >> had! And it was on purpose! They deliberately choose to keep MySQL lean >> and mean and avoid things like foreign keys, stored procedures, and >> such.] >> >> My experience is that almost any application can be broken up and thought >> of as tables. Especially in the business world, people naturally think in >> terms of spreadsheets since the spreadsheet is king there. And a >> spreadsheet is nothing but a table. >> >> And by putting everything in well documented[ha ha!] tables with >> consistent column and table naming schemes, even power users can use >> query >> tools such as Navicat to build their own queries and reports easily. So >> by >> keeping everything in a well understood industry standard format, we >> lower >> the skill level needed to access and create reports on the underlying >> data - >> always a good thing since I personally hate it when someone asks me to >> create a report on sales from last year "just like this other one except >> we >> need to include wholesale prices", There is no challenge there, no fun. >> Just pure grunt work. >> >> So all this talk of moving away from SQL makes me nervous. Will cluefull >> users still be able to envision the data so they can pull reports. Heck, >> are there even the user friendly point and click tools for them to do >> so?[Personally I never use the query builder in Navicat and find it >> tedious, >> but I know plenty of power users who CAN do that]. >> >> To me, it looks like migrating to this new method of storing data will >> end >> up "locking" the business data up in a format that raises the cost to >> access >> the data. It reminds me of the way Magentoo is designed, with those oh so >> cool tables for storing field values without creating new table fields. >> Sure, it may make it easier to expand/change the system, but having to do >> multiple joins to the same dang table to get different pieces of data >> makes >> the data harder to get to for non programmers! >> >> My feeling on business data is that business data belongs TO the business >> creating it. Not to some programmer who is the only one who can access >> it[or worse, to some company that stores it in a proprietary format and >> won't allow the data to be exported!] - so at the moment, I'm not seeing >> that sort of access for data in MongoDB. Command line pseodo queries is >> not enough, I want to know the data is easy to get out for a power user - >> not me. >> >> -- >> ---- >> Hudson Valley Sudbury School >> What GPL is for application users >> Our school is for students >> Help your children grow, change, and learn >> Let your child direct, control, amend >> Check out http://www.sudburyschool.org >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From garyamort at gmail.com Mon Jan 18 08:05:51 2010 From: garyamort at gmail.com (Gary Mort) Date: Mon, 18 Jan 2010 08:05:51 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <01f501ca981b$df9e4170$bf0aa8c0@e6300> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> Message-ID: <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> On Mon, Jan 18, 2010 at 3:53 AM, I Dream in PHP < hypertextpreprocessor at dynamicink.com> wrote: > Nobody else thought it was very revealing when someone shouted out "I like > my job" (assumedly a DBA job) as a reason not to use NoSQL?! I love MySQL > and NoSQL DBs certainly do not fit all projects, but in the ones where it > does fit it saves a huge amount of development time and makes the > dedicated-DBA position somewhat obsolete. > > I don't follow this one. How does it make the dedicated DBA job obsolete? Here is my experience withy the DBA world[fill disclosure, I started as a programmer, moved into Windows Admin and DB2 DBA, then moved to Lotus Notes Admin and Programming, before moving into PHP/Mysql programming] The role of the DBA is to keep the system running, to provide a check on the developers who tend to throw any old query together and blame the network, the os, or the database for their lousy performance choices, to recover the system when it inevitably has some weird failure, and to provide a central resource for all things data. Programmers who butt heads with DBA's would rather just have them out of the way so they can finish their work. Of course, chances are that programmer will be long gone when the crud hits the fan and so doesn't give a damn about recovering from stupid choices. Over the years, again and again I've seen the "this eliminates the DBA position" - MySQL......Lotus Notes.....everything. What they really mean is that you don't need a DBA to start throwing code up and together and rolling it out. Plus when you have a small team of programmers....one of them becomes the DBA in effect....doing the small bits of work for it in the initial phases and providing that central check. Where you store the data doesn't matter, you still need someone for all those functions once your system achieves a certain level of complexity and commercial value. When having the system down for more than an hour is a crisis. Whether you need someone full time for that, or a maintenance contract with a consulting team which built the system, is irrelevant - you need that person there. Monitoring, checking performance, catching problems BEFORE they occur. If all coders where like me...knowing a good bit of network admin, some amount of systems admin, database admin, and programming - sure you don't need that. But my experience is that this is rare, most people specialize in one of those skills.....which leads to a tendency for finger pointing when things go wrong[it's the network...no its the system...no it's the code....]. Of course, this always kept me busy with Lotus Notes troubleshooting problems and implementing solutions when they cross specialities[I especially would love the discussion where everyone thinks the "ideal" solution is to fix the problem involving days of effort by one person....when everyone also acknowledged that there were hour or so of work arounds they could use to make it work.....but that required THEM to do the work rather than pawn it off on someone else. So they were all too happy to cost the company days of manpower to avoid an hours work.] Sorry....hotbutton here. I suspect that the "wit" who responded that way was not a DBA but a programmer speaking as if they were the programmer stereotype of a DBA....and I have little patience for crap programmers who only care about their code and are willing to torpedo the business rather than follow a little process. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zippy1981 at gmail.com Mon Jan 18 08:57:56 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 18 Jan 2010 08:57:56 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> Message-ID: <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> Gary, A cross specialized dba will not be out of a job with mongo, but a sql admin will. Your perspective (shared by me) is hard to see for those who are married to their specialities. However, I will add one caveat to your statement. When a system gets to a certain size, it behooves the IT team to segregate dba developer and admin roles. From a change management perspective it creates barriers that simplify documentation and auditing. Justin On 1/18/10, Gary Mort wrote: > On Mon, Jan 18, 2010 at 3:53 AM, I Dream in PHP < > hypertextpreprocessor at dynamicink.com> wrote: > >> Nobody else thought it was very revealing when someone shouted out "I like >> my job" (assumedly a DBA job) as a reason not to use NoSQL?! I love MySQL >> and NoSQL DBs certainly do not fit all projects, but in the ones where it >> does fit it saves a huge amount of development time and makes the >> dedicated-DBA position somewhat obsolete. >> >> > I don't follow this one. How does it make the dedicated DBA job obsolete? > > Here is my experience withy the DBA world[fill disclosure, I started as a > programmer, moved into Windows Admin and DB2 DBA, then moved to Lotus Notes > Admin and Programming, before moving into PHP/Mysql programming] > > The role of the DBA is to keep the system running, to provide a check on the > developers who tend to throw any old query together and blame the network, > the os, or the database for their lousy performance choices, to recover the > system when it inevitably has some weird failure, and to provide a central > resource for all things data. > > Programmers who butt heads with DBA's would rather just have them out of the > way so they can finish their work. Of course, chances are that programmer > will be long gone when the crud hits the fan and so doesn't give a damn > about recovering from stupid choices. > > Over the years, again and again I've seen the "this eliminates the DBA > position" - MySQL......Lotus Notes.....everything. What they really mean > is that you don't need a DBA to start throwing code up and together and > rolling it out. > > Plus when you have a small team of programmers....one of them becomes the > DBA in effect....doing the small bits of work for it in the initial phases > and providing that central check. > > Where you store the data doesn't matter, you still need someone for all > those functions once your system achieves a certain level of complexity and > commercial value. When having the system down for more than an hour is a > crisis. > > Whether you need someone full time for that, or a maintenance contract with > a consulting team which built the system, is irrelevant - you need that > person there. Monitoring, checking performance, catching problems BEFORE > they occur. > > If all coders where like me...knowing a good bit of network admin, some > amount of systems admin, database admin, and programming - sure you don't > need that. But my experience is that this is rare, most people specialize > in one of those skills.....which leads to a tendency for finger pointing > when things go wrong[it's the network...no its the system...no it's the > code....]. Of course, this always kept me busy with Lotus Notes > troubleshooting problems and implementing solutions when they cross > specialities[I especially would love the discussion where everyone thinks > the "ideal" solution is to fix the problem involving days of effort by one > person....when everyone also acknowledged that there were hour or so of work > arounds they could use to make it work.....but that required THEM to do the > work rather than pawn it off on someone else. So they were all too happy to > cost the company days of manpower to avoid an hours work.] > > Sorry....hotbutton here. I suspect that the "wit" who responded that way > was not a DBA but a programmer speaking as if they were the programmer > stereotype of a DBA....and I have little patience for crap programmers who > only care about their code and are willing to torpedo the business rather > than follow a little process. > -- Sent from my mobile device From garyamort at gmail.com Mon Jan 18 10:03:34 2010 From: garyamort at gmail.com (Gary Mort) Date: Mon, 18 Jan 2010 10:03:34 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> Message-ID: <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> On Mon, Jan 18, 2010 at 8:57 AM, Justin Dearing wrote: > Gary, > > A cross specialized dba will not be out of a job with mongo, but a sql > admin will. > A database is a database...they all have similarities, and the SQL part is the least important part of being a DBA. Understanding about tuning, memory, file access, client configuration, backups, restores, backup strategies[do you want a specific point in time, do you need rolling logs], redudant strategies, etc. All of this is irrelevant to the underlying system, whether it is a file server, a DB2 database, or a MongoDB. Granted, I started this thread complaining that I want nice GUI tools to manage and explore my data...but that is my own sheer laziness since I am primarily a developer and not a DBA. If I was a DBA, I'd want a great command line api and I'd tend to script my own tools rather than relying on canned crud. At least that is what every DBA....and every SysAdmin outside of Windows admins do that I know of...[for some reason...Windows Admins don't have this tendency... wheras I would always throw perl on any windows box I was fiddling with and script stuff rather than count on a GUI tool. I dunno... I really read that comment as an ongoing of the Admin vs Programmer war...... a senseless war that destroys business productivity, in my opinion. Oh, and yes, I agree that at some level one needs a dedicated DBA..... the whole thing is it's not really based on the complexity of the systems, but rather it is a business decision. When you can afford it, you should have a half time DBA who can be on call at other times. Sure, we can all think of at what technical level a business should hire a DBA......but the truth is the world runs on money - so unless that DBA is working for free, the decision is more likely to be based on how much money is coming into the business rather than how complex the system is. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Jan 18 12:06:02 2010 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 18 Jan 2010 12:06:02 -0500 Subject: [nycphp-talk] IIS a dysfunctional kludge? In-Reply-To: References: <4B4F6B16.4040602@gmx.net> <5e2aaca41001141757o4cd6e7e9p6ac2364f62e3db7a@mail.gmail.com> <4B50852B.9090605@devonianfarm.com> Message-ID: <20100118170602.GA24025@panix.com> Heya: On Fri, Jan 15, 2010 at 10:50:12AM -0500, Chris Snyder wrote: > One thing I haven't seen on this thread: for those of you who develop > on Linux and deploy on Windows (or vice versa, more likely) how do you > deal with the differences in file names, line endings, and $_SERVER > vars? I develop on Windows and deploy on *nix. PHP is happy to use "/" on Windows for directories. Use PATH_SEPARATOR for include_path settings. Use Unix line endings for everything. It's rare to need a $_SERVER value that isn't the same on all platforms. Let alone, Apache runs on Windows, so that's what I run in my dev environments. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From mitch.pirtle at gmail.com Mon Jan 18 14:15:55 2010 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 18 Jan 2010 14:15:55 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> Message-ID: <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> On Mon, Jan 18, 2010 at 10:03 AM, Gary Mort wrote: > > > A database is a database...they all have similarities, and the SQL part is > the least important part of being a DBA. This becomes more of a systems administrator thing though, doesn't it? MongoDB is a great example, as you can run it without a configuration file - the only understanding anyone really needs is the development team using MongoDB, as they obviously need to know what works (and consequently what doesn't). There's no way I could justify a full salary for someone to just sit and watch MongoDB instances over on EC2 or the datacenter. That's basically all they would do. Part of the push to go non-relational is the desire to push away from overly complex and convoluted proprietary platforms. I look at it like this: 1) In the beginning, there were relational databases. They were big and full of features, and it was desired to put as much "business logic" in the database as possible - therefore a genuine need for specialized support staff. 2) Hello, World Wide Web! Scaling these relational databases was hard, and they were the main source of consternation and frustration for development teams of high-traffic sites. 3) Facebook (among others) learn that to really scale, you need to do your joins at the app layer, and everyone starts pulling all that logic out of the database and back into the application. 4) So why are we using a relational database again? Not saying this was a smart path to go, or even the right one; however it is where we are, and there are reasons we've started down the route to modern databases: They think like modern languages do (objects), they have additional features for scale as part and parcel of their base functionality (sharding, mapreduce), and take advantage of modern systems for minimal configuration needs and best performance (memory mapped files). -- Mitch From garyamort at gmail.com Mon Jan 18 15:07:29 2010 From: garyamort at gmail.com (Gary Mort) Date: Mon, 18 Jan 2010 15:07:29 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> Message-ID: <4bffc351001181207n7cdca4daj8b3e0e52abf4687c@mail.gmail.com> On Mon, Jan 18, 2010 at 2:15 PM, Mitch Pirtle wrote: > On Mon, Jan 18, 2010 at 10:03 AM, Gary Mort wrote: > > > > > > A database is a database...they all have similarities, and the SQL part > is > > the least important part of being a DBA. > > This becomes more of a systems administrator thing though, doesn't it? > Well...based on my background I don't see a difference between sys admin and DBA...... > MongoDB is a great example, as you can run it without a configuration > file - the only understanding anyone really needs is the development > team using MongoDB, as they obviously need to know what works (and > consequently what doesn't). > > I've seen any number of relational databases that run "without a config file"....all that meant was that they used all the defaults.... Is it any different with MongoDB? > There's no way I could justify a full salary for someone to just sit > and watch MongoDB instances over on EC2 or the datacenter. That's > basically all they would do. > Keeping an eye on memory usage, server load, network load....checking reports and ensuring that if you have a sharded system that everything is correctly loading to the right places and no changes need to be made.... checking file access and ensuring there are no problems there.... tuning any caches to ensure they work efficiently.... maintaining the documentation and data maps for the system so new apps which are going to use the user profile or make changes to it know what already exists. To me...a DBA is the central part of a project. He or that team is the one everyone should go to when adding things to ensure it isn't already done somewhere else. If the system crashes and the company is losing a quarter of a million dollars in revenue a day because the data became corrupted and no one is quite sure when the last good backup was taken[since it was the non existant DBA's job to simulate crashes and restore data from backups and ensure everything works]....I think that not having a DBA or Systems Admin or whatever you want to call him was foolish. Now....if your losing 1000 dollars a day...well then a DBA isn't justified. It's a business cost benefit analysis. Not a technical one. Can the company afford a complete crash and startover from some random point in time...and if not do they have the money to pay for an admin to keep everything running smoothly? Sometimes you live with the risk.....especially when everything is bright, shiny and new and the developers who set everything up know it all like the backs of their hands and are interested in it. But years down the line...when you have hundreds of cobbled little sub projects on it...the original developers have moved on to the next big thing and don't want to touch that old dinosaur? Dang straight you get a DBA. > > Part of the push to go non-relational is the desire to push away from > overly complex and convoluted proprietary platforms. I look at it like > this: > > 1) In the beginning, there were relational databases. They were big > and full of features, and it was desired to put as much "business > logic" in the database as possible - therefore a genuine need for > specialized support staff. > 2) Hello, World Wide Web! Scaling these relational databases was hard, > and they were the main source of consternation and frustration for > development teams of high-traffic sites. > 3) Facebook (among others) learn that to really scale, you need to do > your joins at the app layer, and everyone starts pulling all that > logic out of the database and back into the application. > 4) So why are we using a relational database again? > > Not saying this was a smart path to go, or even the right one; however > it is where we are, and there are reasons we've started down the route > to modern databases: They think like modern languages do (objects), > they have additional features for scale as part and parcel of their > base functionality (sharding, mapreduce), and take advantage of modern > systems for minimal configuration needs and best performance (memory > mapped files). > > -- Mitch > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---- Hudson Valley Sudbury School What GPL is for application users Our school is for students Help your children grow, change, and learn Let your child direct, control, amend Check out http://www.sudburyschool.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Mon Jan 18 15:12:44 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 18 Jan 2010 15:12:44 -0500 (EST) Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> Message-ID: On Mon, 18 Jan 2010, Mitch Pirtle wrote: > 1) In the beginning, there were relational databases. They were big > and full of features, and it was desired to put as much "business > logic" in the database as possible - therefore a genuine need for > specialized support staff. > 2) Hello, World Wide Web! Scaling these relational databases was hard, > and they were the main source of consternation and frustration for > development teams of high-traffic sites. > 3) Facebook (among others) learn that to really scale, you need to do > your joins at the app layer, and everyone starts pulling all that > logic out of the database and back into the application. > 4) So why are we using a relational database again? For me, this parallels processor development (i.e. CISC vs RISC). -- Aj. From zippy1981 at gmail.com Mon Jan 18 15:31:32 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 18 Jan 2010 15:31:32 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> Message-ID: <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> Mitch, Dba is a hybrid dev/admin role, and can be a sysadmin's second hat. However, even if you dumb down your database, you still need someone to tune your data/index model. It is certainly possible to create an ineffecient mongo cluster. It is also possible to incorrectly back it up, especially if there is no master node set. If you have a lot of data in mongo, you should make sure you have some mongo expertise on your operations team and your dev team. Justin On 1/18/10, Mitch Pirtle wrote: > On Mon, Jan 18, 2010 at 10:03 AM, Gary Mort wrote: >> >> >> A database is a database...they all have similarities, and the SQL part is >> the least important part of being a DBA. > > This becomes more of a systems administrator thing though, doesn't it? > MongoDB is a great example, as you can run it without a configuration > file - the only understanding anyone really needs is the development > team using MongoDB, as they obviously need to know what works (and > consequently what doesn't). > > There's no way I could justify a full salary for someone to just sit > and watch MongoDB instances over on EC2 or the datacenter. That's > basically all they would do. > > Part of the push to go non-relational is the desire to push away from > overly complex and convoluted proprietary platforms. I look at it like > this: > > 1) In the beginning, there were relational databases. They were big > and full of features, and it was desired to put as much "business > logic" in the database as possible - therefore a genuine need for > specialized support staff. > 2) Hello, World Wide Web! Scaling these relational databases was hard, > and they were the main source of consternation and frustration for > development teams of high-traffic sites. > 3) Facebook (among others) learn that to really scale, you need to do > your joins at the app layer, and everyone starts pulling all that > logic out of the database and back into the application. > 4) So why are we using a relational database again? > > Not saying this was a smart path to go, or even the right one; however > it is where we are, and there are reasons we've started down the route > to modern databases: They think like modern languages do (objects), > they have additional features for scale as part and parcel of their > base functionality (sharding, mapreduce), and take advantage of modern > systems for minimal configuration needs and best performance (memory > mapped files). > > -- Mitch > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- Sent from my mobile device From mitch.pirtle at gmail.com Mon Jan 18 21:41:59 2010 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 18 Jan 2010 21:41:59 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> Message-ID: <330532b61001181841q5cfa5086x7fb6407c99a6d74e@mail.gmail.com> On Mon, Jan 18, 2010 at 3:31 PM, Justin Dearing wrote: > Mitch, > Dba is a hybrid dev/admin role, and can be a sysadmin's second hat. > However, even if you dumb down your database, you still need someone > to tune your data/index model. It is certainly possible to create an > ineffecient mongo cluster. It is also possible to incorrectly back it > up, especially if there is no master node set. > > If you have a lot of data in mongo, you should make sure you have some > mongo expertise on your operations team and your dev team. That doesn't mean you need a dedicated DBA, like you would with a heavyweight like Oracle, DB2 or even MySQL. This *does* mean your developers need to be competent in the technologies that they use, which unfortunately doesn't seem like a standard practice. Actually, regardless of what database you use, your developers need to be competent. As well, your operations team needs competence in the technologies that they are supposed to support, but again that won't require a dedicated specialist for just the database portion of your architecture. That's the crux of my points, which I think are either misunderstood or I failed to be clear, and I apologize for that. As to the "can run without a config file" comment, you need to try MongoDB for yourself to understand what I mean. MongoDB does not have the need for preallocation of RAM, disk, etc. Unlike relational databases that need all kinds of tweaking to make run well in your particular scenario, databases like MongoDB simply don't need all that additional help to be extremely fast. This actually points back at my above sentiment that using a modern database like MongoDB does mean there's zero justification for a dedicated database person. Yes of course you still need operations folks, but the need for a one-trick-pony should obviously be diminished. -- Mitch From mitch.pirtle at gmail.com Mon Jan 18 21:46:57 2010 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 18 Jan 2010 21:46:57 -0500 Subject: [nycphp-talk] MongoDB and others, convince me. :-) In-Reply-To: <330532b61001181841q5cfa5086x7fb6407c99a6d74e@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> <330532b61001181841q5cfa5086x7fb6407c99a6d74e@mail.gmail.com> Message-ID: <330532b61001181846n6d802f44yd657015a1094003@mail.gmail.com> Memcache is another great example, even if it is not persistent it is still a data store. Have you ever heard of a company hiring a "Memcache Administrator"? I mean, other than Facebook? :-) Looking around the others and feeling the same - CouchDB, hBase, MemcacheDB... These systems are expecting the bulk of computation to live in the application layer, and they are focused on storing data... Hence the low administration requirements. And please note that I'm a certified Oracle DBA - went through certification back in the 8i years. I've spent the last 15 years really getting good at this, and should be the last guy calling for change ;-) -- Mitch From garyamort at gmail.com Tue Jan 19 03:14:38 2010 From: garyamort at gmail.com (Gary Mort) Date: Tue, 19 Jan 2010 03:14:38 -0500 Subject: [nycphp-talk] Color Scheme picker Message-ID: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> Anyone know of a tool like: http://colorschemedesigner.com/ Where you can actually get the css/html for the sample? On that website, after you have your color pallet you can click on dark or light example and it will give you a sample of what can be done with the colors. I'd like to be able to take the css/html that would be used to form that page and save it. So far...for the weird image my friend likes, http://www.degraeve.com/color-palette/index.php seems to give me a good initial selection of color choices..but I find it easier to have a program distribute them on a page like the sample in color schemer.....and then tweak slightly than to do it all myself. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leam at reuel.net Tue Jan 19 04:47:48 2010 From: leam at reuel.net (Leam Hall) Date: Tue, 19 Jan 2010 04:47:48 -0500 Subject: [nycphp-talk] To dBa or not to dBa,.. In-Reply-To: <330532b61001181846n6d802f44yd657015a1094003@mail.gmail.com> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <4B192C86.3080900@gmail.com> <7173a2fc0912092053m71d8df2dh26999920d3318d3e@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> <330532b61001181841q5cfa5086x7fb6407c99a6d74e@mail.gmail.com> <330532b61001181846n6d802f44yd657015a1094003@mail.gmail.com> Message-ID: <4B557FC4.4090707@reuel.net> I am personally aware of a situation where developers were given freedom to run the Oracle database. Now that an upgrade is needed the developers are either gone or expecting the Operations DBA team to fix things. Three different failures, based on the poor organization of the application, have cost jobs. Whether or not MongoDB and the like changes this, I do not know. But if I were going to interview at a place with a large relational DB in production and no DBAs, I'd certainly look elsewhere. Leam From ant92083 at gmail.com Tue Jan 19 10:14:06 2010 From: ant92083 at gmail.com (Anthony Wlodarski) Date: Tue, 19 Jan 2010 10:14:06 -0500 Subject: [nycphp-talk] To dBa or not to dBa,.. In-Reply-To: <4B557FC4.4090707@reuel.net> References: <4bffc350912040456j1440934aidcfdb8089aee0a05@mail.gmail.com> <01f501ca981b$df9e4170$bf0aa8c0@e6300> <4bffc351001180505kf336248s79c5f73a39c22d88@mail.gmail.com> <5458db3c1001180557g2653c1c7q34f7eecfd1b3f8d7@mail.gmail.com> <4bffc351001180703g5c462679saf5088dc41fc5b91@mail.gmail.com> <330532b61001181115t39becd4n28141c7b64acf562@mail.gmail.com> <5458db3c1001181231j7ba71d78ne5d26d90bb2a4c1f@mail.gmail.com> <330532b61001181841q5cfa5086x7fb6407c99a6d74e@mail.gmail.com> <330532b61001181846n6d802f44yd657015a1094003@mail.gmail.com> <4B557FC4.4090707@reuel.net> Message-ID: <43bc541c1001190714r2bb60422ha844b9d7c9d732b7@mail.gmail.com> If management allows the developers to run the show up until the point of when it really counts I think there is an issue with the management here and not the DBAs or Developers. Any organization will try and meld the two positions together when it benefits them. Once something does break though then it becomes and ugly game of finger pointing and that what leads to either someone leaving the organization or being let go. I would have to agree with Leam, if you are in a heavy development cycle there should be a full time DBA that is the gatekeeper to the database. If not I would look elsewhere as well. -- Anthony W. ant92083 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yitzchak.schaffer at gmx.com Tue Jan 19 10:26:36 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Tue, 19 Jan 2010 10:26:36 -0500 Subject: [nycphp-talk] xdebug / socket_accept() In-Reply-To: <4B52581F.70607@gmx.com> References: <4B5091DA.1000206@gmx.com> <4B5096EE.4010905@gmx.com> <4B52581F.70607@gmx.com> Message-ID: <4B55CF2C.4070105@gmx.com> On 1/16/2010 19:21, Yitzchak Schaffer wrote: > Still working on my xdebug woes; I finished reading the instrux at > http://wiki.netbeans.org/HowToConfigureXDebug > but the test script still fails. How embarrassing. After consulting with the xdebug docs, I found the problem: xdebug.remote_host Type: string, Default value: localhost Selects the host where the debug client is running, you can either use a host name or an IP address. Debug /client/ is the key phrase here - I was using the server host. *palm meets forehead* My setup's working now. Thanks to all who used any cranial processor cycles on this one. -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From yogesh.agashe at gmail.com Tue Jan 19 17:03:57 2010 From: yogesh.agashe at gmail.com (Yogesh Agashe) Date: Tue, 19 Jan 2010 14:03:57 -0800 Subject: [nycphp-talk] Color Scheme picker In-Reply-To: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> References: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> Message-ID: <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> Hello Gary, The Export tab on top menu has HTML+CSS option. Click on that and see view source on newly opened page. Hope this helps. Regards, Yogesh On Tue, Jan 19, 2010 at 12:14 AM, Gary Mort wrote: > Anyone know of a tool like: > http://colorschemedesigner.com/ > > Where you can actually get the css/html for the sample? > > On that website, after you have your color pallet you can click on dark or > light example and it will give you a sample of what can be done with the > colors. I'd like to be able to take the css/html that would be used to form > that page and save it. > > So far...for the weird image my friend likes, > http://www.degraeve.com/color-palette/index.php seems to give me a good > initial selection of color choices..but I find it easier to have a program > distribute them on a page like the sample in color schemer.....and then > tweak slightly than to do it all myself. > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From garyamort at gmail.com Tue Jan 19 17:39:20 2010 From: garyamort at gmail.com (Gary Mort) Date: Tue, 19 Jan 2010 17:39:20 -0500 Subject: [nycphp-talk] Color Scheme picker In-Reply-To: <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> References: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> Message-ID: <4bffc351001191439w6737bfcbw5d0ae0d7b2390190@mail.gmail.com> Yeah, that gives the HTML color codes, but no usage for them. The problem is I'm a great fiddler/incremental changer. I hate making 20 decisions though, I'd rather make 40 adjustments to 20 changes on a blank sheet of paper. So I have 6 colors and 12 shades I want to use. Now I want a program which takes them all and generates either a dark or light sample page for me, and then allows me to export the css definitions for that. So on that page, when you click on the example, it pops up a lightbox example of what a page might look like with those colors assigned based on some algorythm,. It is that example page I want the definitions for[or some app which will automatically assign things for me and then let me modify] On Tue, Jan 19, 2010 at 5:03 PM, Yogesh Agashe wrote: > Hello Gary, > > The Export tab on top menu has HTML+CSS option. Click on that and see view > source on newly opened page. > > Hope this helps. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd.sperling at gmail.com Wed Jan 20 09:28:46 2010 From: tedd.sperling at gmail.com (tedd) Date: Wed, 20 Jan 2010 09:28:46 -0500 Subject: [nycphp-talk] Color Scheme picker In-Reply-To: <4bffc351001191439w6737bfcbw5d0ae0d7b2390190@mail.gmail.com> References: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> <4bffc351001191439w6737bfcbw5d0ae0d7b2390190@mail.gmail.com> Message-ID: At 5:39 PM -0500 1/19/10, Gary Mort wrote: >Yeah, that gives the HTML color codes, but no usage for them. > >The problem is I'm a great fiddler/incremental changer. I hate >making 20 decisions though, I'd rather make 40 adjustments to 20 >changes on a blank sheet of paper. > >So I have 6 colors and 12 shades I want to use. Now I want a >program which takes them all and generates either a dark or light >sample page for me, and then allows me to export the css definitions >for that. > >So on that page, when you click on the example, it pops up a >lightbox example of what a page might look like with those colors >assigned based on some algorythm,. It is that example page I want >the definitions for[or some app which will automatically assign >things for me and then let me modify] Gary: I work with colors all the time and use several tools. For general colors: http://www.colorschemer.com/online.html http://www.ficml.org/jemimap/style/color/wheel.html If I need to find complimentary colors to match a picture, I use this: http://www.degraeve.com/color-palette/ To address accessibility concerns, I use: http://webbytedd.com/c/access-color/ http://gmazzocato.altervista.org/colorwheel/wheel.php http://www.lighthouse.org/accessibility/design/accessible-print-design/effective-color-contrast To find palettes: http://slayeroffice.com/tools/color_palette/ http://www.colourlovers.com/blog/2008/01/16/free-advanced-dhtml-color-picker For background colors and color ideas: http://www.qgm.com/bgcolor.html http://krazydad.com/colrpickr/ http://www.qgm.com/bgcolor.html And finally, I don't know what system you're using, but I use Art Director's Tool Kit application, namely; http://www.code-line.com/software/artdirectorstoolkit5/ It's a great tool for picking up colors off the web (eyedropper). HTH's tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From yitzchak.schaffer at gmx.com Wed Jan 20 09:39:38 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Wed, 20 Jan 2010 09:39:38 -0500 Subject: [nycphp-talk] OOP noob - general best practices Message-ID: <4B5715AA.30603@gmx.com> Hello all, As I work on refactoring an app I'm working on and getting more of a feel for OOP, I wonder if folks can recommend any best-practices guides for general OOP principles. I read most of the Zandstra book, and found it very helpful for understanding the fundamentals of the OOP approach, and patterns in particular. Now I'm looking for something a bit more nuts-and-bolts rigorous; as an example of couple questions I had recently: When should one use a factory method $foo = Foo::factory( $this ) as opposed to using the constructor in the client code $foo = new Foo( $this ) ? And as corollary, what belongs in a constructor and what doesn't? In http://www.slideshare.net/sebastian_bergmann/introduction-to-phpunit-best-practices slides 19-22, Sebastian Bergmann of PHPUnit alludes to this question, but in that presentation is apparently assuming the audience is familiar with the answer, and doesn't go into it; his tagline is "don't do work in the constructor," but rather do something like the following. I don't know what does and does not constitute "work." $foo = new Foo( $this ); $foo->build(); Based on Amazon reviews, I just bought a copy of the 1994 ed of Object-Oriented Software Construction : Bertrand Meyer on Half.com; any further recommendations? Thanks, -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From ajai at bitblit.net Wed Jan 20 10:33:08 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 20 Jan 2010 10:33:08 -0500 (EST) Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B5715AA.30603@gmx.com> Message-ID: On Wed, 20 Jan 2010, Yitzchak Schaffer wrote: > Based on Amazon reviews, I just bought a copy of the 1994 ed of > Object-Oriented Software Construction : Bertrand Meyer on Half.com; any > further recommendations? I would recommend a book on Design Patterns. The classic text on this is the Gang of Four book on the subject, however I found 'Design Patterns in Ruby' to be much more readable text (neither books use PHP for the code examples but Ruby is easier to read for me). -- Aj. From chsnyder at gmail.com Wed Jan 20 11:05:32 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 20 Jan 2010 11:05:32 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B5715AA.30603@gmx.com> References: <4B5715AA.30603@gmx.com> Message-ID: On Wed, Jan 20, 2010 at 9:39 AM, Yitzchak Schaffer wrote: > > When should one use a factory method > $foo = Foo::factory( $this ) > as opposed to using the constructor in the client code > $foo = new Foo( $this ) > ? The static factory pattern has always bugged me. I suspect it is much more useful in other languages than in PHP. There is sometimes a need for a factory class, which can make instances of class that all share one or more resources: $fooFactory = new fooFactory( $resource ); $foo1 = $fooFactory->newFoo(); $foo2 = $fooFactory->newFoo(); > And as corollary, what belongs in a constructor and what doesn't? ?In > http://www.slideshare.net/sebastian_bergmann/introduction-to-phpunit-best-practices > slides 19-22, Sebastian Bergmann of PHPUnit alludes to this question, but in > that presentation is apparently assuming the audience is familiar with the > answer, and doesn't go into it; his tagline is "don't do work in the > constructor," but rather do something like the following. ?I don't know what > does and does not constitute "work." > > $foo = new Foo( $this ); > $foo->build(); I think the advantage you get is that you can call build() at other times to "rebuild" the object, and if you extend the class you could do something else before the build() method is called. In PHP it has the extra advantage that if you have no constructor you don't need to decide what to name it (Foo() or __construct() ?). But it also means that you have to add an additional line to your operational code every time you want a new Foo, which could get annoying if you use that class a lot. From oorza2k5 at gmail.com Wed Jan 20 11:11:57 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Wed, 20 Jan 2010 11:11:57 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B5715AA.30603@gmx.com> References: <4B5715AA.30603@gmx.com> Message-ID: <68de37341001200811r4a29afaewbd2fd203976b5f66@mail.gmail.com> On Wed, Jan 20, 2010 at 9:39 AM, Yitzchak Schaffer wrote: > Hello all, > > As I work on refactoring an app I'm working on and getting more of a feel > for OOP, I wonder if folks can recommend any best-practices guides for > general OOP principles. ?I read most of the Zandstra book, and found it very > helpful for understanding the fundamentals of the OOP approach, and patterns > in particular. > > Now I'm looking for something a bit more nuts-and-bolts rigorous; as an > example of couple questions I had recently: > > When should one use a factory method > $foo = Foo::factory( $this ) > as opposed to using the constructor in the client code > $foo = new Foo( $this ) > ? > > And as corollary, what belongs in a constructor and what doesn't? ?In > http://www.slideshare.net/sebastian_bergmann/introduction-to-phpunit-best-practices > slides 19-22, Sebastian Bergmann of PHPUnit alludes to this question, but in > that presentation is apparently assuming the audience is familiar with the > answer, and doesn't go into it; his tagline is "don't do work in the > constructor," but rather do something like the following. ?I don't know what > does and does not constitute "work." > > $foo = new Foo( $this ); > $foo->build(); > > Based on Amazon reviews, I just bought a copy of the 1994 ed of > Object-Oriented Software Construction : Bertrand Meyer on Half.com; any > further recommendations? > > Thanks, > > -- > Yitzchak Schaffer > Systems Manager > Touro College Libraries > 33 West 23rd Street > New York, NY 10010 > Tel (212) 463-0400 x5230 > Fax (212) 627-3197 > Email yitzchak.schaffer at tourolib.org > > Access Problems? Contact systems.library at touro.edu > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > I suppose this might be a little taboo on a PHP list, but Thinking In Java is hands down the best OOP guide I've ever seen, let alone read. As a positive side-effect, you get to learn Java, but there's no better place IMHO to learn object orientation. And it's free[1]! [1]: http://www.mindview.net/Books/TIJ/ From paul at devonianfarm.com Wed Jan 20 11:34:08 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Wed, 20 Jan 2010 11:34:08 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B5715AA.30603@gmx.com> References: <4B5715AA.30603@gmx.com> Message-ID: <4B573080.1050801@devonianfarm.com> Yitzchak Schaffer wrote: > > When should one use a factory method > $foo = Foo::factory( $this ) > as opposed to using the constructor in the client code > $foo = new Foo( $this ) There are multiple reasons, but one of the best reasons to write something like $foo=Foo::create($arg1,$arg2); is that Foo:create() can choose a subtype of Foo to instantiate and return. Based on the arguments, it can return FooA, FooB, FooC or whatever. This can come in handy. Another one is that Foo::create() can return false or null rather than throwing an Exception; that said, much of the time throwing an Exception is a better error handling mechanism than returning "nothing". Depending on the language, the chaining of constructors can be awkward. The issue in PHP is that superclass constructors only get called if you want to call them, which means that (i) you can do whatever you like, but (ii) you might forget to to initialize your superclasses. Java and C# both force you to call the superclass constructor before you do any substantiative work in the constructor; it gets awkward if you have to do a lot of work to calculate the arguments of the superclass constructor. > > > And as corollary, what belongs in a constructor and what doesn't? In > http://www.slideshare.net/sebastian_bergmann/introduction-to-phpunit-best-practices > > slides 19-22, Sebastian Bergmann of PHPUnit alludes to this question, > but in that presentation is apparently assuming the audience is > familiar with the answer, and doesn't go into it; his tagline is > "don't do work in the constructor," but rather do something like the > following. I don't know what does and does not constitute "work." > > $foo = new Foo( $this ); > $foo->build(); > There are a lot of opinions here, but the general funkiness of constructors leads a lot of people to this conclusion. In the Scala language, you've very limited in what you can do in constructors -- constructors really just assign values to variables. One trouble is components that have a large number of optional initialization parameters, for instance, $serversocket=new ServerSocket($portNumber); $serversocket->AttachCallback($socketCallback); $serversocket->DenyIP("all"); $serversocket->AcceptIP("192.168.*.*"); $serversocket->bind(); Constructors get awkward when there are a lot of parameters. On the other hand, there's something nice when you call the constructors and you ~know~ you've got an object that's completely initialized. using private or protected constructors and a public "create" method lets you strike a balance in this department. One way or another you need to be concious of the lifecycle of your objects. In many apps there are in-memory objects that correspond to objects in a persistent store, say an RDBMS and that leads to another set of conceptual problems. For instance, say we've got a Person object that represents information about a person... you might call $person=Person::FetchById(517); and that would call the constructor and "create" a Person object in RAM populated with data from the database. Now, there might be another time you want to create a "Person", so then you might call $person=Person::Create("paul_houle"); and that actually 'creates' a record in the back end database. Or, on the other hand, you might do something like $person=new Person(); $person->Username="paul_houle"; $person->FirstName="Paul"; ... $person->insert(); the tricky thing here is that the word "create" that people toss around careless actually can mean some very different things. It's important to keep these apart. > Based on Amazon reviews, I just bought a copy of the 1994 ed of > Object-Oriented Software Construction : Bertrand Meyer on Half.com; > any further recommendations? > > I got a copy of that for a buck a few years ago. It's got some insight but it's definitely an older book from the C++ and Smalltalk era. From yitzchak.schaffer at gmx.com Wed Jan 20 11:45:39 2010 From: yitzchak.schaffer at gmx.com (Yitzchak Schaffer) Date: Wed, 20 Jan 2010 11:45:39 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B573080.1050801@devonianfarm.com> References: <4B5715AA.30603@gmx.com> <4B573080.1050801@devonianfarm.com> Message-ID: <4B573333.4060103@gmx.com> On 1/20/2010 11:34, Paul A Houle wrote: > Another one is that Foo::create() can return false or null rather than > throwing an Exception; that said, much of the time throwing an Exception > is a better error handling mechanism than returning "nothing". That's actually one way I've used the static factory - to handle a situation where there is no Bar that can be created from Foo, but this is expected: $foo = new Foo(); $bar = Bar::factory( $foo ); // false if ($bar) { // do stuff with $bar } Is this good practice? I think my question of client-calls-constructor vs. factory came out of the fact that so many of my classes fall into this category. -- Yitzchak Schaffer Systems Manager Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 Email yitzchak.schaffer at tourolib.org Access Problems? Contact systems.library at touro.edu From paul at devonianfarm.com Wed Jan 20 11:58:27 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Wed, 20 Jan 2010 11:58:27 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B573333.4060103@gmx.com> References: <4B5715AA.30603@gmx.com> <4B573080.1050801@devonianfarm.com> <4B573333.4060103@gmx.com> Message-ID: <4B573632.30605@devonianfarm.com> Yitzchak Schaffer wrote: > > That's actually one way I've used the static factory - to handle a > situation where there is no Bar that can be created from Foo, but this > is expected: > > $foo = new Foo(); > $bar = Bar::factory( $foo ); // false > if ($bar) { > // do stuff with $bar > } > > Is this good practice? I think my question of > client-calls-constructor vs. factory came out of the fact that so many > of my classes fall into this category. > It's really up to you. Your code is simple and clear... In the exact use case you've given, where the implications of Bar::factory() failing can be handled correctly and locally at the place you call it. If, on the other hand, you're going to pass the error condition back up to the caller of the function that just called Bar::factory() and then pass the error condition back to the caller of the function that called that function, you're either: (i) writing a lot of if-then-else ladders to handle errors (like you see in old-style C code), or (ii) not writing the code to handle errors, which means you're not handling errors correctly. Some of my thoughts about error handling are written about in these two articles: http://gen5.info/q/2008/07/31/stop-catching-exceptions/ and http://gen5.info/q/2008/08/27/what-do-you-do-when-youve-caught-an-exception/ There's really no "right" answer in questions like this; you're trading one bunch of problems for a different bunch of problems. From garyamort at gmail.com Wed Jan 20 12:30:59 2010 From: garyamort at gmail.com (Gary Mort) Date: Wed, 20 Jan 2010 12:30:59 -0500 Subject: [nycphp-talk] Color Scheme picker In-Reply-To: References: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> <4bffc351001191439w6737bfcbw5d0ae0d7b2390190@mail.gmail.com> Message-ID: <4bffc351001200930y5d34371fg95b5c80da3c611f0@mail.gmail.com> On Wed, Jan 20, 2010 at 9:28 AM, tedd wrote: > At 5:39 PM -0500 1/19/10, Gary Mort wrote: > >> Yeah, that gives the HTML color codes, but no usage for them. >> >> I work with colors all the time and use several tools. > > Well, those are fun and cool tools, and I can see using them from time to time. But I keep coming back to my complete lack of an artistic eye. I can find a "pallet" of colors I like from those tools. My problem is I then need some sort of rule on how to apply those colors, which ones to make the background, or a menu background, or a sidebar background....which to use as text colors, heading colors, etc. Truly, I am that inept. :-) -- ---- Hudson Valley Sudbury School What GPL is for application users Our school is for students Help your children grow, change, and learn Let your child direct, control, amend Check out http://www.sudburyschool.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Wed Jan 20 13:42:27 2010 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 20 Jan 2010 13:42:27 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <4B5715AA.30603@gmx.com> References: <4B5715AA.30603@gmx.com> Message-ID: <78c6bd861001201042r3b0a549dw8739fd77dd54a5bc@mail.gmail.com> On Wed, Jan 20, 2010 at 9:39 AM, Yitzchak Schaffer wrote: > Hello all, > > As I work on refactoring an app I'm working on and getting more of a feel > for OOP, I wonder if folks can recommend any best-practices guides for > general OOP principles. A broad description of "OOP principals and best-practices" is far too involved for anyone to reasonably answer in an email. However I will contribute one opinion on the topic: Do not be sucked into OOP hype. I use OOP quite a bit. If you need polymorphism, it is very powerful. But for some reason many people seem to think OOP is somehow inherently good and that it should be used wherever possible. That is a belief I do not support. Unless you need polymorphic behavior where extending a type so that it inherits the behavior of another is clearly better, it is very likely that you can achieve the same objective more efficiently without using objects at all. This is particularly true in PHP because of the array type. The array type in PHP is a builtin type and a generic ordered but hashed container. So if you just need a context to maintain some state with only one reference - an array is a good option. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From oorza2k5 at gmail.com Wed Jan 20 13:48:09 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Wed, 20 Jan 2010 13:48:09 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <78c6bd861001201042r3b0a549dw8739fd77dd54a5bc@mail.gmail.com> References: <4B5715AA.30603@gmx.com> <78c6bd861001201042r3b0a549dw8739fd77dd54a5bc@mail.gmail.com> Message-ID: <68de37341001201048n670fc819sb6bf2cf2409709c@mail.gmail.com> On Wed, Jan 20, 2010 at 1:42 PM, Michael B Allen wrote: > > Unless you need polymorphic behavior where extending a type so that it > inherits the behavior of another is clearly better, it is very likely > that you can achieve the same objective more efficiently without using > objects at all. This is particularly true in PHP because of the array > type. The array type in PHP is a builtin type and a generic ordered > but hashed container. So if you just need a context to maintain some > state with only one reference - an array is a good option. An array and an object are almost identical in PHP. Other than syntactically, as far as resource usage, there's no difference between: $a->foo = $bar; //well, you get an E_STRICT here, but you can $a = new stdClass() to prevent that. $a['foo'] = $bar; Internally, PHP objects are hashes as well, so there's no really good argument to using arrays over objects. As far as your other argument, the primary advantage to OOP is modular state tracking. When you have a lot of procedural code, you either wind up emulating OOP state tracking (C structs that keep track of themselves, for example, or huge PHP arrays) or having a big pile of spaghetti. And as much as I love spaghetti, I'd rather have it for dinner than in my source code. That's not to say that you can't have global state tracking and do it right, but it's certainly more difficult and IMO completely unnecessary. From chsnyder at gmail.com Wed Jan 20 13:51:48 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 20 Jan 2010 13:51:48 -0500 Subject: [nycphp-talk] Color Scheme picker In-Reply-To: <4bffc351001200930y5d34371fg95b5c80da3c611f0@mail.gmail.com> References: <4bffc351001190014wd481f52s735e2ee20338b107@mail.gmail.com> <8833e50b1001191403j71ff5ebmd175d566511973a1@mail.gmail.com> <4bffc351001191439w6737bfcbw5d0ae0d7b2390190@mail.gmail.com> <4bffc351001200930y5d34371fg95b5c80da3c611f0@mail.gmail.com> Message-ID: Give kuler a try? http://kuler.adobe.com/ From ant92083 at gmail.com Wed Jan 20 15:08:54 2010 From: ant92083 at gmail.com (Anthony Wlodarski) Date: Wed, 20 Jan 2010 15:08:54 -0500 Subject: [nycphp-talk] Inspiration for projects. Message-ID: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> I have a large amount of free time on my hand and was sitting around the house trying to come up with an idea for a piece of software that people would actually use. Unfortunately the blank canvas that is my mind is still blank. I guess it would be called "coders block" akin to writers block. How do you counter measure this? I have been trying to think of a unique cool idea for about four hours now and have not come up with anything. Another alternative to using my free time is to work on an open source project but nothing seems stimulating/interesting right now. -Anthony -- Anthony W. ant92083 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lhall at smartronix.com Wed Jan 20 15:15:11 2010 From: lhall at smartronix.com (Hall, Leam) Date: Wed, 20 Jan 2010 15:15:11 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <9F17F70C-B1F2-4C82-97B1-6526046C3F01@mimectl> MongoDB based PHP tool that gathers news on Haiti and publishes it to interested parties. Then you can expand it later. Leam From: Anthony Wlodarski Sent: Wed 20-Jan-10 15:08 To: NYPHP Talk Subject: [nycphp-talk] Inspiration for projects. I have a large amount of free time on my hand and was sitting around the house trying to come up with an idea for a piece of software that people would actually use. Unfortunately the blank canvas that is my mind is still blank. I guess it would be called "coders block" akin to writers block. How do you counter measure this? I have been trying to think of a unique cool idea for about four hours now and have not come up with anything. Another alternative to using my free time is to work on an open source project but nothing seems stimulating/interesting right now. -Anthony -- Anthony W. ant92083 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Wed Jan 20 15:15:16 2010 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 20 Jan 2010 15:15:16 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <4B576454.3090509@projectskyline.com> I try to think about things that are a PITA - and how software can fix that. Maybe its simply automating a process for myself - or something larger, like a full blown site for this or that. I think the best ideas come when your not really trying - but also, if your attempting to brainstorm, the key is to get ideas out - you want to prime the idea pump, so you need to just put pen to paper and start writing - don't stop. If your sheet is blank, trying brainstorming with someone else, so you can feed off each others ideas. - Ben Anthony Wlodarski wrote: > I have a large amount of free time on my hand and was sitting around > the house trying to come up with an idea for a piece of software that > people would actually use. Unfortunately the blank canvas that is my > mind is still blank. I guess it would be called "coders block" akin > to writers block. How do you counter measure this? I have been > trying to think of a unique cool idea for about four hours now and > have not come up with anything. > > Another alternative to using my free time is to work on an open source > project but nothing seems stimulating/interesting right now. > > -Anthony > > -- > Anthony W. > ant92083 at gmail.com > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation From chsnyder at gmail.com Wed Jan 20 15:16:10 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 20 Jan 2010 15:16:10 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: On Wed, Jan 20, 2010 at 3:08 PM, Anthony Wlodarski wrote: > I have a large amount of free time on my hand and was sitting around the > house trying to come up with an idea for a piece of software that people > would actually use.? Unfortunately the blank canvas that is my mind is still > blank.? I guess it would be called "coders block" akin to writers block. > How do you counter measure this?? I have been trying to think of a unique > cool idea for about four hours now and have not come up with anything. > > Another alternative to using my free time is to work on an open source > project but nothing seems stimulating/interesting right now. > > -Anthony How about a phpMyAdmin clone for MongoDB? Chris Snyder http://chxor.chxo.com/ From hans at cyberxdesigns.com Wed Jan 20 15:19:25 2010 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Wed, 20 Jan 2010 15:19:25 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <013501ca9a0d$de0fcbf0$9a2f63d0$@com> > > How about a phpMyAdmin clone for MongoDB? > +1 Hans K From zippy1981 at gmail.com Wed Jan 20 15:21:26 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Wed, 20 Jan 2010 15:21:26 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <5458db3c1001201221t66022bddh761245c9901b71fa@mail.gmail.com> If you know C, care about soap and interacting with .NET, you might want to hack at the PHP soapclient. http://bugs.php.net/bug.php?id=50698 That code code use a bit of a cleanup. I've been trying to hack at it for a while. On Wed, Jan 20, 2010 at 3:08 PM, Anthony Wlodarski wrote: > I have a large amount of free time on my hand and was sitting around the > house trying to come up with an idea for a piece of software that people > would actually use. Unfortunately the blank canvas that is my mind is still > blank. I guess it would be called "coders block" akin to writers block. > How do you counter measure this? I have been trying to think of a unique > cool idea for about four hours now and have not come up with anything. > > Another alternative to using my free time is to work on an open source > project but nothing seems stimulating/interesting right now. > > -Anthony > > -- > Anthony W. > ant92083 at gmail.com > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From php at lynxtdc.com Wed Jan 20 15:59:59 2010 From: php at lynxtdc.com (Paul McGrane) Date: Wed, 20 Jan 2010 15:59:59 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <5458db3c1001201221t66022bddh761245c9901b71fa@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <5458db3c1001201221t66022bddh761245c9901b71fa@mail.gmail.com> Message-ID: <84450b6d1001201259h1a98bb7ej534548ac24482c12@mail.gmail.com> You can always try to solve or improve an internal work flow issue...like how you handle invoicing, or tracking time for your billable tasks...you may come up with a solution that not only streamlines your workflow, but can benefit others as well. On Wed, Jan 20, 2010 at 3:21 PM, Justin Dearing wrote: > If you know C, care about soap and interacting with .NET, you might want > to hack at the PHP soapclient. > > http://bugs.php.net/bug.php?id=50698 > > That code code use a bit of a cleanup. I've been trying to hack at it for a > while. > > > On Wed, Jan 20, 2010 at 3:08 PM, Anthony Wlodarski wrote: > >> I have a large amount of free time on my hand and was sitting around the >> house trying to come up with an idea for a piece of software that people >> would actually use. Unfortunately the blank canvas that is my mind is still >> blank. I guess it would be called "coders block" akin to writers block. >> How do you counter measure this? I have been trying to think of a unique >> cool idea for about four hours now and have not come up with anything. >> >> Another alternative to using my free time is to work on an open source >> project but nothing seems stimulating/interesting right now. >> >> -Anthony >> >> -- >> Anthony W. >> ant92083 at gmail.com >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- __________________________ lynxtdc at gmail.com 513.373.4200 -------------- next part -------------- An HTML attachment was scrubbed... URL: From oorza2k5 at gmail.com Wed Jan 20 16:02:20 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Wed, 20 Jan 2010 16:02:20 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> On Wed, Jan 20, 2010 at 3:16 PM, Chris Snyder wrote: > On Wed, Jan 20, 2010 at 3:08 PM, Anthony Wlodarski wrote: >> I have a large amount of free time on my hand and was sitting around the >> house trying to come up with an idea for a piece of software that people >> would actually use.? Unfortunately the blank canvas that is my mind is still >> blank.? I guess it would be called "coders block" akin to writers block. >> How do you counter measure this?? I have been trying to think of a unique >> cool idea for about four hours now and have not come up with anything. >> >> Another alternative to using my free time is to work on an open source >> project but nothing seems stimulating/interesting right now. >> >> -Anthony > > How about a phpMyAdmin clone for MongoDB? > > Chris Snyder > http://chxor.chxo.com/ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation Like this? http://www.phpmoadmin.com/ From chsnyder at gmail.com Wed Jan 20 16:17:23 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 20 Jan 2010 16:17:23 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> Message-ID: On Wed, Jan 20, 2010 at 4:02 PM, Eddie Drapkin wrote: > On Wed, Jan 20, 2010 at 3:16 PM, Chris Snyder wrote: >> >> How about a phpMyAdmin clone for MongoDB? > > > Like this? http://www.phpmoadmin.com/ Wow, that was quick! ;-) Oh well, Anthony, keep looking. From fgabrieli at gmail.com Wed Jan 20 16:19:52 2010 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Wed, 20 Jan 2010 18:19:52 -0300 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> Message-ID: What about Selenium/PHPUnit? you might be able to extend it to include new test features, i'm running it around 0.5 times per new method :) some others might help in telling "todo" features On Wed, Jan 20, 2010 at 6:02 PM, Eddie Drapkin wrote: > On Wed, Jan 20, 2010 at 3:16 PM, Chris Snyder wrote: > > On Wed, Jan 20, 2010 at 3:08 PM, Anthony Wlodarski > wrote: > >> I have a large amount of free time on my hand and was sitting around the > >> house trying to come up with an idea for a piece of software that people > >> would actually use. Unfortunately the blank canvas that is my mind is > still > >> blank. I guess it would be called "coders block" akin to writers block. > >> How do you counter measure this? I have been trying to think of a > unique > >> cool idea for about four hours now and have not come up with anything. > >> > >> Another alternative to using my free time is to work on an open source > >> project but nothing seems stimulating/interesting right now. > >> > >> -Anthony > > > > How about a phpMyAdmin clone for MongoDB? > > > > Chris Snyder > > http://chxor.chxo.com/ > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > Like this? http://www.phpmoadmin.com/ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ant92083 at gmail.com Wed Jan 20 16:20:00 2010 From: ant92083 at gmail.com (Anthony Wlodarski) Date: Wed, 20 Jan 2010 16:20:00 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> Message-ID: <43bc541c1001201320p73e8f69dxbfacf13992a91ca3@mail.gmail.com> Yeah I know I just found that link myself while doing research and talking with fellow developers. Back to the drawing board. -Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitch.pirtle at gmail.com Wed Jan 20 16:42:01 2010 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 20 Jan 2010 16:42:01 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <330532b61001201342m39618e9eme9af1ffc75f12b0a@mail.gmail.com> On Wed, Jan 20, 2010 at 3:16 PM, Chris Snyder wrote: > > How about a phpMyAdmin clone for MongoDB? Already have two underway: http://www.phpmoadmin.com/ http://rad-dev.org/lithium_mongo -- Mitch From ioplex at gmail.com Wed Jan 20 16:46:30 2010 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 20 Jan 2010 16:46:30 -0500 Subject: [nycphp-talk] OOP noob - general best practices In-Reply-To: <68de37341001201048n670fc819sb6bf2cf2409709c@mail.gmail.com> References: <4B5715AA.30603@gmx.com> <78c6bd861001201042r3b0a549dw8739fd77dd54a5bc@mail.gmail.com> <68de37341001201048n670fc819sb6bf2cf2409709c@mail.gmail.com> Message-ID: <78c6bd861001201346i603f0855gcd4f7b07fc2f2f16@mail.gmail.com> On Wed, Jan 20, 2010 at 1:48 PM, Eddie Drapkin wrote: > On Wed, Jan 20, 2010 at 1:42 PM, Michael B Allen wrote: >> >> Unless you need polymorphic behavior where extending a type so that it >> inherits the behavior of another is clearly better, it is very likely >> that you can achieve the same objective more efficiently without using >> objects at all. This is particularly true in PHP because of the array >> type. The array type in PHP is a builtin type and a generic ordered >> but hashed container. So if you just need a context to maintain some >> state with only one reference - an array is a good option. > > > An array and an object are almost identical in PHP. ?Other than > syntactically, as far as resource usage, there's no difference > between: > $a->foo = $bar; //well, you get an E_STRICT here, but you can $a = new > stdClass() to prevent that. > $a['foo'] = $bar; > > Internally, PHP objects are hashes as well, so there's no really good > argument to using arrays over objects. Fact: In PHP, creating and using an object requires more resources than creating and using an array. There are a variety of reasons for this but the two most significant that spring to mind are because creating an object requires loading the class definition and because the codepaths for the object are unique as opposed to an array which is virtually guaranteed to be hot in the cache (meaning the array will exhibit better cache locality). Also $a->foo = could trigger code in a couple of ways so to say there is "no difference" between that and $a['foo'] = is largely false. As for the advantages of OOP, that is a highly subjective topic for which I have stated my opinion and have no interest in getting into a long discussion about. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From ramons at gmx.net Wed Jan 20 17:32:57 2010 From: ramons at gmx.net (David Krings) Date: Wed, 20 Jan 2010 17:32:57 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <4B578499.9080500@gmx.net> On 1/20/2010 3:08 PM, Anthony Wlodarski wrote: > I have a large amount of free time on my hand and was sitting around the > house trying to come up with an idea for a piece of software that people > would actually use. Unfortunately the blank canvas that is my mind is > still blank. I guess it would be called "coders block" akin to writers > block. How do you counter measure this? I have been trying to think of > a unique cool idea for about four hours now and have not come up with > anything. Hmmm, a nice and easy to use PHP based GIS client would be nice. Should pull from public map sources and allow for layers to be drawn in a simple editor. Or a workflow management app for documentation teams. That is not the same as a CMS, but surely borrows ideas from it. It is more a mix between bug tracker and CMS without focus on publishing anything through that system. The only other thing that comes to mind is programming games. People love games. David From hypertextpreprocessor at dynamicink.com Wed Jan 20 22:39:47 2010 From: hypertextpreprocessor at dynamicink.com (I Dream in PHP) Date: Wed, 20 Jan 2010 22:39:47 -0500 Subject: [nycphp-talk] Inspiration for projects. References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com><68de37341001201302g7058547fpb473fcff875d2c55@mail.gmail.com> Message-ID: <008e01ca9a4b$86796d90$bf0aa8c0@e6300> Hi Anthony, phpMoAdmin needs code-contributors, if you have time to develop then please see if there is something within your expertise on the ToDo list at the bottom of: http://wiki.github.com/MongoDB-Rox/phpMoAdmin-MongoDB-Admin-Tool-for-PHP/ You can check-out & commit code via GIT from the project page at: http://github.com/MongoDB-Rox/phpMoAdmin-MongoDB-Admin-Tool-for-PHP If you are new to GIT, the GITHUB guides are really helpful: http://help.github.com/ All the best! ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Wednesday, January 20, 2010 4:17 PM Subject: Re: [nycphp-talk] Inspiration for projects. > On Wed, Jan 20, 2010 at 4:02 PM, Eddie Drapkin wrote: >> On Wed, Jan 20, 2010 at 3:16 PM, Chris Snyder wrote: >>> >>> How about a phpMyAdmin clone for MongoDB? >> >> >> Like this? http://www.phpmoadmin.com/ > > Wow, that was quick! ;-) > > Oh well, Anthony, keep looking. > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation From garyamort at gmail.com Thu Jan 21 03:54:41 2010 From: garyamort at gmail.com (Gary Mort) Date: Thu, 21 Jan 2010 03:54:41 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <4bffc351001210054h1ebc5fa5i75a81b6e0e21a1e1@mail.gmail.com> Here are my backburner ideas: A jobs seeker's database to store leads[think organizing all those craigslist, monster, etc job postings], track followups and rate quotes, and also rate jobs search companies[there are some recruiters that never follow up with you.....others that work in the same company but don't communicate so you get 3 or 4 contacts from the same company when the jobs are under your rate, and others who follow up initially and then don't let you know your over/under qualified, your rate is too high, or whatnot...basically leave you hanging]. A Stockphoto meta-website management structure. Ie a lot of stock photo sites have API's, so a central hub site where photographers can manage their photo's on the master website and push them up to stock photo sites, track sales, etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From garyamort at gmail.com Thu Jan 21 06:31:19 2010 From: garyamort at gmail.com (Gary Mort) Date: Thu, 21 Jan 2010 06:31:19 -0500 Subject: [nycphp-talk] Oddball tool recomendations Message-ID: <4bffc351001210331j23463b16hbc23514bbf339906@mail.gmail.com> First off, thanks to everyone for the image colorscheme recomendations. None of them provide precisely what I'm looking for, but there was a lot of interesting tools I hadn't looked at before, and I think with my wife's help I'm getting closer to understanding theming. Second off, I thought I'd throw out a couple oddball tools of my own I've started using. The first, and most important, is Evernote: https://www.evernote.com Now, I've seen a lot of tools like this one's bookmarklet before, where you can hit the bookmarklet and your data goes up and is stored on the server along with the url. So, nothing new here[very basic fieldset: notebook to put it in, some text on the note, some tags, a title, and an option to take a snapshot of the page). But what I like about evernote is that it has an actual CLIENT for offline use. They have a client for the Mac, for Windows, and for my G1 Android phone. And they have a powerful API so the few things I want it to do but can't, I can probably code myself! So all my notes are not only organized on the web, they get synced to my laptop, my wifes laptop[a mac and a pc] and my phone. Now, give it a few months and I'll see if IO'm really organizing things or just stuffing them all in the evernote closet. The second tool I'm not as gung ho on at the moment, mainly because they promised an API over a year ago and have yet to deliver. That one is Reqall [http://www.reqall.com] It's a task scheduling/calendar app with a decent set of bells and whistles. Integrates to your Google Calendar....can search through your evernote trove of files and show you documents related to keywords in your task...can send you reminders by instant message, sms, email, etc. You can add/change/interrogate it by instant message. You can call in a note/reminder and it will transcribe it into text. All in all....pretty good. I think if they had the same app they have for the IPhone for the G1 I'd be hooked[a GPS aware scheduler, so when your at the grocery store getting milk, it can remind you to pick up your RX from the pharmacy in the same plaza] And for the guy looking for something to do with his freetime...as for ideas, combine evernote with reqall and add a few extra features and I think that could be a killer app. :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd.sperling at gmail.com Thu Jan 21 08:59:49 2010 From: tedd.sperling at gmail.com (tedd) Date: Thu, 21 Jan 2010 08:59:49 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: At 3:08 PM -0500 1/20/10, Anthony Wlodarski wrote: >I have a large amount of free time on my hand and was sitting around >the house trying to come up with an idea for a piece of software >that people would actually use. Unfortunately the blank canvas that >is my mind is still blank. I guess it would be called "coders >block" akin to writers block. How do you counter measure this? I >have been trying to think of a unique cool idea for about four hours >now and have not come up with anything. > >Another alternative to using my free time is to work on an open >source project but nothing seems stimulating/interesting right now. > >-Anthony -Anthony: There's a solution for that, you can do like the rest of us have, namely get so far in debt that you can't sit around doing nothing, but instead are forced to work. I find that clients bring more than just inspiration for my work. :-) Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From zippy1981 at gmail.com Thu Jan 21 12:04:57 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Thu, 21 Jan 2010 12:04:57 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <5458db3c1001210904q6efc824kfe3adbefe5ade76f@mail.gmail.com> > There's a solution for that, you can do like the rest of us have, namely > get so far in debt that you can't sit around doing nothing, but instead are > forced to work. > > I find that clients bring more than just inspiration for my work. :-) > I think we all realize that clients pay for projects. For some people, that is inspiration enough. For others, it is not. Maybe their clients don't have projects they find interesting. Maybe they are looking for a diversion. To put it anther way, we work for others to enable us to do what we want to do. If some programmer really wants to do something that no one wants to pay him, whats the harm. If I was independently wealthy I'd read more and I'd travel more, but I probably would still program. There probably would be a period of "ok what do I program" after I finished whatever hobby projects I had at the time. However, I'd soon find myself programming again. Regards, Justin Dearing -------------- next part -------------- An HTML attachment was scrubbed... URL: From lester.bleong at gmail.com Thu Jan 21 12:55:13 2010 From: lester.bleong at gmail.com (Lester Leong) Date: Thu, 21 Jan 2010 12:55:13 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB Message-ID: I'm sure we've all heard one version or another of which was faster. Among the people I've spoken to in person the consensus was MyISAM. But I recently came across a Falcon benchmark online that showed InnoDB being the fastest. I'm sure the real answer is "it depends on your application", but... anyone care to share their thoughts on this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From oorza2k5 at gmail.com Thu Jan 21 12:57:39 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Thu, 21 Jan 2010 12:57:39 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: Message-ID: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> The bottom line is InnoDB is transactional, (configured properly) ACiD compliant, doesn't write-lock entire tables and supports foreign keys. Performance, next to these "features," isn't really a concern, IMO. On Thu, Jan 21, 2010 at 12:55 PM, Lester Leong wrote: > I'm sure we've all heard one version or another of which was faster. Among > the people I've spoken to in person the consensus was MyISAM. But I recently > came across a Falcon benchmark online that showed InnoDB being the fastest. > I'm sure the real answer is "it depends on your application", but... anyone > care to share their thoughts on this? > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From ka at kacomputerconsulting.com Thu Jan 21 12:59:01 2010 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Thu, 21 Jan 2010 09:59:01 -0800 Subject: [nycphp-talk] Inspiration for projects. Message-ID: <1264096741.25753@coral.he.net> > > I think we all realize that clients pay for projects. For some people, that > is inspiration enough. For others, it is not. Maybe their clients don't have > projects they find interesting. Maybe they are looking for a diversion. > > To put it anther way, we work for others to enable us to do what we want to > do. If some programmer really wants to do something that no one wants to pay > him, whats the harm. > > If I was independently wealthy I'd read more and I'd travel more, but I > probably would still program. There probably would be a period of "ok what > do I program" after I finished whatever hobby projects I had at the time. > However, I'd soon find myself programming again. > > Regards, > > Justin Dearing > > While I have no doubt that Tedd was slightly tongue-in-cheek with his statements, Justin, it's also undoubtedly true that over the years, one's enthusiasm for programming can be significantly blunted by endless dealing with unrealistic deadlines, hostile clients, clueless managers, worries about paying bills, and etc... That said, I think ALL of us on this list do have a love for programming and probably would continue to do it even if we did not have to, in whatever capacity, albeit maybe some of us for only a few hours a week! :) Kristina From jmcgraw1 at gmail.com Thu Jan 21 13:03:27 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Thu, 21 Jan 2010 13:03:27 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: On Thu, Jan 21, 2010 at 12:57 PM, Eddie Drapkin wrote: > The bottom line is InnoDB is transactional, (configured properly) ACiD > compliant, doesn't write-lock entire tables and supports foreign keys. > ?Performance, next to these "features," isn't really a concern, IMO. > > On Thu, Jan 21, 2010 at 12:55 PM, Lester Leong wrote: >> I'm sure we've all heard one version or another of which was faster. Among >> the people I've spoken to in person the consensus was MyISAM. But I recently >> came across a Falcon benchmark online that showed InnoDB being the fastest. >> I'm sure the real answer is "it depends on your application", but... anyone >> care to share their thoughts on this? InnoDB for everything but tables that require fulltext search, which is not yet supported on InnoDB. >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From gatzby3jr at gmail.com Thu Jan 21 13:04:09 2010 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Thu, 21 Jan 2010 13:04:09 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <5458db3c1001210904q6efc824kfe3adbefe5ade76f@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <5458db3c1001210904q6efc824kfe3adbefe5ade76f@mail.gmail.com> Message-ID: <29da5d151001211004s3141d56aq3e940534ee691e6a@mail.gmail.com> A few years ago, I was in the exact same situation, and I did something similar, I posted on this very group: http://marc.info/?l=nyphp-talk&m=116460542719740&w=2 There were a lot of great suggestsions then that still hold great value today. I've accomplished, and learned a whole lot since I posted that message, I graduated from a top rate university with a degree in c.s., work for a fortune 100 company doing embedded c / c++, however it all started right when I posted that message. If you're doing this from a learning perspective, pick a product you like, and go one of two routes: recreate it or start contributing to it. What I ultimately did was created my own CMS/blog for my site that was awful. It wasn't nearly as robust as Wordpress, nearly as powerful, or nearly as useful, but I learned a lot as I did it. Then I created some programs to try and tie into my current fixation with WoW, which didn't work great either. Then I made a calendaring system, which worked okay. I then redid my calendaring project which worked pretty damn well, but that's about when Google released their calendar product, so I dropped interest in mine. The point here is you're obviously interested in PHP / programming for a reason, so even if something is already done, there's no harm in redoing it from a learning perspective. If that doesn't suit your fancy, well, then I'd recommend learning new languages and frameworks. I'm currently reading a Ruby on Rails book, even though I really don't have a specific reason to - I just want to learn it. I hope that helps. Brian On Thu, Jan 21, 2010 at 12:04 PM, Justin Dearing wrote: > > There's a solution for that, you can do like the rest of us have, namely >> get so far in debt that you can't sit around doing nothing, but instead are >> forced to work. >> >> I find that clients bring more than just inspiration for my work. :-) >> > > I think we all realize that clients pay for projects. For some people, that > is inspiration enough. For others, it is not. Maybe their clients don't have > projects they find interesting. Maybe they are looking for a diversion. > > To put it anther way, we work for others to enable us to do what we want to > do. If some programmer really wants to do something that no one wants to pay > him, whats the harm. > > If I was independently wealthy I'd read more and I'd travel more, but I > probably would still program. There probably would be a period of "ok what > do I program" after I finished whatever hobby projects I had at the time. > However, I'd soon find myself programming again. > > Regards, > > Justin Dearing > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at atopia.net Thu Jan 21 13:05:20 2010 From: matt at atopia.net (Matt Juszczak) Date: Thu, 21 Jan 2010 13:05:20 -0500 (EST) Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: > InnoDB for everything but tables that require fulltext search, which > is not yet supported on InnoDB. Can always use something like lucene for this. -Matt From oorza2k5 at gmail.com Thu Jan 21 13:05:47 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Thu, 21 Jan 2010 13:05:47 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: <68de37341001211005u2e73d20aqe5bf61a9023d8fc2@mail.gmail.com> On Thu, Jan 21, 2010 at 1:03 PM, Jake McGraw wrote: > On Thu, Jan 21, 2010 at 12:57 PM, Eddie Drapkin wrote: >> The bottom line is InnoDB is transactional, (configured properly) ACiD >> compliant, doesn't write-lock entire tables and supports foreign keys. >> ?Performance, next to these "features," isn't really a concern, IMO. >> >> On Thu, Jan 21, 2010 at 12:55 PM, Lester Leong wrote: >>> I'm sure we've all heard one version or another of which was faster. Among >>> the people I've spoken to in person the consensus was MyISAM. But I recently >>> came across a Falcon benchmark online that showed InnoDB being the fastest. >>> I'm sure the real answer is "it depends on your application", but... anyone >>> care to share their thoughts on this? > > InnoDB for everything but tables that require fulltext search, which > is not yet supported on InnoDB. > That's what Solr (or Sphinx) is for ;) From jmcgraw1 at gmail.com Thu Jan 21 13:09:44 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Thu, 21 Jan 2010 13:09:44 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: On Thu, Jan 21, 2010 at 1:05 PM, Matt Juszczak wrote: >> InnoDB for everything but tables that require fulltext search, which >> is not yet supported on InnoDB. > > Can always use something like lucene for this. Yea, but then you've got to keep a Tomcat instance up and know Java or use a PHP implementation which can be slow. MySQL Fulltext works really well in most instances. > > -Matt > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From rmarscher at beaffinitive.com Thu Jan 21 13:15:45 2010 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Thu, 21 Jan 2010 13:15:45 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: On Jan 21, 2010, at 1:03 PM, Jake McGraw wrote: > InnoDB for everything but tables that require fulltext search, which > is not yet supported on InnoDB. +1. Another use for MyISAM is a log table that you never delete from and rarely read from. But definitely go with InnoDB for everything - the row level (innodb) vs table level locking (myisam) on writes is the main reason InnoDB is almost always going to perform better for web applications regardless of whether you need transactions or foreign key support. I also recommend setting innodb_file_per_table in your my.cnf which can help with the problem of disk usage after deleting data (innodb doesn't shrink the data file after a delete). And throw a lot of memory at innodb_buffer_pool_size. mysqltuner is a nice tool for getting recommendations on your server's settings (requires that you run your application for a while on the server so it can collect stats). From oorza2k5 at gmail.com Thu Jan 21 13:19:18 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Thu, 21 Jan 2010 13:19:18 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> Message-ID: <68de37341001211019s6472abf8t94ab1457d6d08b4f@mail.gmail.com> On Thu, Jan 21, 2010 at 1:09 PM, Jake McGraw wrote: > On Thu, Jan 21, 2010 at 1:05 PM, Matt Juszczak wrote: >>> InnoDB for everything but tables that require fulltext search, which >>> is not yet supported on InnoDB. >> >> Can always use something like lucene for this. > > Yea, but then you've got to keep a Tomcat instance up and know Java or > use a PHP implementation which can be slow. MySQL Fulltext works > really well in most instances. > That's just a little bit inaccurate. While it certainly helps to know Java, running a Solr instance requires only the ability to start a java process and read some documentation. The entire thing is communicated to / from a REST API and it's configured with (over|very well) documented XML files. There's no knowledge of Java or lucene or tokenizing or anything other than how to read documentation required. It will almost always work out better than MySQL FULLTEXT because Solr has some niceties built into it, like search suggestions, spelling corrections, stemming, etc. There's a lot of other cool stuff built into it now, like document importing (I think they support PDF, MS Word, OO.o formats, etc. but I'm not too sure as I don't use that feature myself), multi-core searching, there's a bundled tool for indexing out of SQL and a lot more I'm sure that I'm forgetting. You can go from "no search" to "well implemented, professional feeling search" in two or three days, with no prior experience in Java or advanced text searching. From paul at devonianfarm.com Thu Jan 21 13:43:40 2010 From: paul at devonianfarm.com (Paul A Houle) Date: Thu, 21 Jan 2010 13:43:40 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <4bffc351001210054h1ebc5fa5i75a81b6e0e21a1e1@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <4bffc351001210054h1ebc5fa5i75a81b6e0e21a1e1@mail.gmail.com> Message-ID: <4B58A05C.3080305@devonianfarm.com> Gary Mort wrote: > Here are my backburner ideas: > > A jobs seeker's database to store leads[think organizing all those > craigslist, monster, etc job postings], track followups and rate > quotes, and also rate jobs search companies[there are some recruiters > that never follow up with you.....others that work in the same company > but don't communicate so you get 3 or 4 contacts from the same company > when the jobs are under your rate, and others who follow up initially > and then don't let you know your over/under qualified, your rate is > too high, or whatnot...basically leave you hanging]. I want a "CRM" system that's fundamentally organized around social media and the web. I think a modern job search is centered pretty much around online job listings, LinkedIn, people you meet on twitter, or who send you an email; that's true if you're looking for an FT gig or if you're looking for contract work. And I suspect that that's true for more and more of the hustling that other kinds of salespeople are doing too. From ant92083 at gmail.com Thu Jan 21 14:09:32 2010 From: ant92083 at gmail.com (Anthony Wlodarski) Date: Thu, 21 Jan 2010 14:09:32 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <4B58A05C.3080305@devonianfarm.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> <4bffc351001210054h1ebc5fa5i75a81b6e0e21a1e1@mail.gmail.com> <4B58A05C.3080305@devonianfarm.com> Message-ID: <43bc541c1001211109w70d36f92r576897ba22181515@mail.gmail.com> Well I got bored and built Ubuntu/Deb packages for MongoDB as I am exploring it more with PHP. I have the 32/64 bit versions hosted on my site at: http://anthonyw.net/mongodb-deb-package. It was quite interesting learning dpkg. Also if you encounter any errors during install please let me know as I was quite shocked that Ubuntu didn't have any packages in their repos yet. -Anthony P.S. direct links: *http://hash.anthonyw.net/mongodb/mongodb_1.3.1_i386.deb http://hash.anthonyw.net/mongodb/mongodb_1.3.1_amd64.deb * On Thu, Jan 21, 2010 at 1:43 PM, Paul A Houle wrote: > Gary Mort wrote: > >> Here are my backburner ideas: >> >> A jobs seeker's database to store leads[think organizing all those >> craigslist, monster, etc job postings], track followups and rate quotes, and >> also rate jobs search companies[there are some recruiters that never follow >> up with you.....others that work in the same company but don't communicate >> so you get 3 or 4 contacts from the same company when the jobs are under >> your rate, and others who follow up initially and then don't let you know >> your over/under qualified, your rate is too high, or whatnot...basically >> leave you hanging]. >> > I want a "CRM" system that's fundamentally organized around social media > and the web. I think a modern job search is centered pretty much around > online job listings, LinkedIn, people you meet on twitter, or who send > you an email; that's true if you're looking for an FT gig or if you're > looking for contract work. And I suspect that that's true for more and more > of the hustling that other kinds of salespeople are doing too. > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- Anthony W. ant92083 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Thu Jan 21 15:45:26 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 21 Jan 2010 15:45:26 -0500 (EST) Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <1264096741.25753@coral.he.net> Message-ID: On Thu, 21 Jan 2010, Kristina Anderson wrote: > That said, I think ALL of us on this list do have a love for programming > and probably would continue to do it even if we did not have to, in > whatever capacity, albeit maybe some of us for only a few hours a week! :) Yeah, but I suspect we'd be writing software in languages and systems that we find interesting rather than what clients want. One day Ill get back to that interrupt-driven sprite routine written in 6502 assembly code :-) -- Aj. From glenn310b at mac.com Thu Jan 21 16:00:06 2010 From: glenn310b at mac.com (Glenn Powell) Date: Thu, 21 Jan 2010 16:00:06 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <463B937D-6FE5-4F4D-B279-0B0B3D3253A4@mac.com> Some of the time, some of the coders code the clients ideas and dreams. Some of the time, some of the coders code their own ideas and dreams. Here's to the dreamers and inventers, clients and coders alike. :) Glenn On Jan 20, 2010, at 3:08 PM, Anthony Wlodarski wrote: > I have a large amount of free time on my hand and was sitting around > the house trying to come up with an idea for a piece of software > that people would actually use. Unfortunately the blank canvas that > is my mind is still blank. I guess it would be called "coders > block" akin to writers block. How do you counter measure this? I > have been trying to think of a unique cool idea for about four hours > now and have not come up with anything. > > Another alternative to using my free time is to work on an open > source project but nothing seems stimulating/interesting right now. > > -Anthony > > -- > Anthony W. > ant92083 at gmail.com > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmcgraw1 at gmail.com Fri Jan 22 00:29:41 2010 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Fri, 22 Jan 2010 00:29:41 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: <68de37341001211019s6472abf8t94ab1457d6d08b4f@mail.gmail.com> References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> <68de37341001211019s6472abf8t94ab1457d6d08b4f@mail.gmail.com> Message-ID: On Thu, Jan 21, 2010 at 1:19 PM, Eddie Drapkin wrote: > On Thu, Jan 21, 2010 at 1:09 PM, Jake McGraw wrote: >> On Thu, Jan 21, 2010 at 1:05 PM, Matt Juszczak wrote: >>>> InnoDB for everything but tables that require fulltext search, which >>>> is not yet supported on InnoDB. >>> >>> Can always use something like lucene for this. >> >> Yea, but then you've got to keep a Tomcat instance up and know Java or >> use a PHP implementation which can be slow. MySQL Fulltext works >> really well in most instances. >> > > That's just a little bit inaccurate. ?While it certainly helps to know > Java, running a Solr instance requires only the ability to start a > java process and read some documentation. ?The entire thing is > communicated to / from a REST API and it's configured with (over|very > well) documented XML files. ?There's no knowledge of Java or lucene or > tokenizing or anything other than how to read documentation required. > It will almost always work out better than MySQL FULLTEXT because Solr > has some niceties built into it, like search suggestions, spelling > corrections, stemming, etc. ?There's a lot of other cool stuff built > into it now, like document importing (I think they support PDF, MS > Word, OO.o formats, etc. but I'm not too sure as I don't use that > feature myself), multi-core searching, there's a bundled tool for > indexing out of SQL and a lot more I'm sure that I'm forgetting. You > can go from "no search" to "well implemented, professional feeling > search" in two or three days, with no prior experience in Java or > advanced text searching. This best sums up my feelings: http://jakemcgraw.com/imgs/nyphp-solr.jpg It wasn't to say that deploying Lucene is some insurmountable task, just that, if MySQL fulltext works for your use case then why go through the pain of supporting another application stack. - jake > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From zippy1981 at gmail.com Fri Jan 22 09:21:26 2010 From: zippy1981 at gmail.com (Justin Dearing) Date: Fri, 22 Jan 2010 09:21:26 -0500 Subject: [nycphp-talk] Fwd: LIPHP Meeting Monday January 25th 8pm Topic: MongoDB In-Reply-To: <5458db3c1001220617ua915cfem74f1d280f70889b0@mail.gmail.com> References: <5458db3c1001220617ua915cfem74f1d280f70889b0@mail.gmail.com> Message-ID: <5458db3c1001220621v159f05eap2e83db8f0cb262f2@mail.gmail.com> Hey guys, Since there has been a lot of mongo interest on this list as of late, I wanted to let everyone know that Kristina Chodorow, who spoke at NYPHP in October, will be at LIPHP this Monday January 25th. If you missed her October talk, or want a repeat performance, come on down. We meet at mindShift (formerly InVision) in Happuage. The address is 47 Mall Drive Commackm NY. If people need help with transportation, contact me off list and I will see what can be arranged. Regards, Justin Dearing, ZCE President LIPHP User Group ---------- Forwarded message ---------- From: Justin Dearing Date: Fri, Jan 22, 2010 at 9:17 AM Subject: LIPHP Meeting Monday January 25th 8pm Topic: MongoDB To: announce Folks, A reminder that this Monday January 25th is the first Long Island PHP User Group meeting of the year. I'm very excited about our topic, MongoDB presented by Kristina Chodorow. I've heard Kristina speak at NYPHP and LILUG and both were great presentations. Looking forward to seeing all of you there. MongoDB is a non relational database that has gotten quite popular recently. Its a departure from the relational model, but it brings an interesting scalability to the table. Regards, Justin Dearing -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri Jan 22 11:58:34 2010 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 22 Jan 2010 11:58:34 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 Message-ID: <008701ca9b84$224165a0$66c430e0$@com> Very interesting - http://royal.pingdom.com/2010/01/22/internet-2009-in-numbers/ What would be great is a decade analysis... H From chsnyder at gmail.com Fri Jan 22 12:53:13 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 22 Jan 2010 12:53:13 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <008701ca9b84$224165a0$66c430e0$@com> References: <008701ca9b84$224165a0$66c430e0$@com> Message-ID: On Fri, Jan 22, 2010 at 11:58 AM, Hans Zaunere wrote: > Very interesting - > > http://royal.pingdom.com/2010/01/22/internet-2009-in-numbers/ > > What would be great is a decade analysis... > 30 Billion photos to Facebook in a year. That's going to be my new bar for scalability. From ajai at bitblit.net Fri Jan 22 13:12:43 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 22 Jan 2010 13:12:43 -0500 (EST) Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <008701ca9b84$224165a0$66c430e0$@com> Message-ID: And the 80% spam rate is depressing. -- Aj. From oorza2k5 at gmail.com Fri Jan 22 13:26:45 2010 From: oorza2k5 at gmail.com (Eddie Drapkin) Date: Fri, 22 Jan 2010 13:26:45 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: References: <008701ca9b84$224165a0$66c430e0$@com> Message-ID: <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> s/depressing/surprisingly low/ On Fri, Jan 22, 2010 at 1:12 PM, Ajai Khattri wrote: > > And the 80% spam rate is depressing. > > > -- > Aj. > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From chsnyder at gmail.com Fri Jan 22 17:28:53 2010 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 22 Jan 2010 17:28:53 -0500 Subject: [nycphp-talk] MyISAM vs InnoDB In-Reply-To: References: <68de37341001210957t1cd48734r40522f567d5b7595@mail.gmail.com> <68de37341001211019s6472abf8t94ab1457d6d08b4f@mail.gmail.com> Message-ID: On Fri, Jan 22, 2010 at 12:29 AM, Jake McGraw wrote: > This best sums up my feelings: > > http://jakemcgraw.com/imgs/nyphp-solr.jpg > This post should win some kind of prize! Thanks for the laugh. From garyamort at gmail.com Sat Jan 23 07:48:35 2010 From: garyamort at gmail.com (Gary Mort) Date: Sat, 23 Jan 2010 07:48:35 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <008701ca9b84$224165a0$66c430e0$@com> References: <008701ca9b84$224165a0$66c430e0$@com> Message-ID: <4bffc351001230448y2bcb1964ha60c2a4d3d908aa9@mail.gmail.com> On Fri, Jan 22, 2010 at 11:58 AM, Hans Zaunere wrote: > Very interesting - > > http://royal.pingdom.com/2010/01/22/internet-2009-in-numbers/ > > What would be great is a decade analysis... > > Interesting breakdown by pulling Google's customized server out of the Apache mix. It got me to thinking, what does Amazon use for it's server? -- ---- Hudson Valley Sudbury School What GPL is for application users Our school is for students Help your children grow, change, and learn Let your child direct, control, amend Check out http://www.sudburyschool.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Sat Jan 23 11:17:13 2010 From: lists at zaunere.com (Hans Zaunere) Date: Sat, 23 Jan 2010 11:17:13 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> References: <008701ca9b84$224165a0$66c430e0$@com> <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> Message-ID: <018301ca9c47$85bda5d0$9138f170$@com> > > > Very interesting - > > > > > > http://royal.pingdom.com/2010/01/22/internet-2009-in-numbers/ > > > > > > What would be great is a decade analysis... > > > > And the 80% spam rate is depressing. > > s/depressing/surprisingly low/ Interesting you should mention that: http://www.net-security.org/secworld.php?id=8755 H From mutazmusa at gmail.com Sat Jan 23 20:20:12 2010 From: mutazmusa at gmail.com (Mutaz Musa) Date: Sat, 23 Jan 2010 20:20:12 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <018301ca9c47$85bda5d0$9138f170$@com> References: <008701ca9b84$224165a0$66c430e0$@com> <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> <018301ca9c47$85bda5d0$9138f170$@com> Message-ID: <602c8ac1001231720m5f675d5bg2fe7431beb865dbe@mail.gmail.com> Far more depressing is the fact that IE users are 60+ % of the market. On Sat, Jan 23, 2010 at 11:17 AM, Hans Zaunere wrote: > > > > Very interesting - > > > > > > > > http://royal.pingdom.com/2010/01/22/internet-2009-in-numbers/ > > > > > > > > What would be great is a decade analysis... > > > > > > And the 80% spam rate is depressing. > > > > s/depressing/surprisingly low/ > > Interesting you should mention that: > > http://www.net-security.org/secworld.php?id=8755 > > H > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Sat Jan 23 21:25:11 2010 From: ramons at gmx.net (David Krings) Date: Sat, 23 Jan 2010 21:25:11 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <602c8ac1001231720m5f675d5bg2fe7431beb865dbe@mail.gmail.com> References: <008701ca9b84$224165a0$66c430e0$@com> <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> <018301ca9c47$85bda5d0$9138f170$@com> <602c8ac1001231720m5f675d5bg2fe7431beb865dbe@mail.gmail.com> Message-ID: <4B5BAF87.2030309@gmx.net> On 1/23/2010 8:20 PM, Mutaz Musa wrote: > Far more depressing is the fact that IE users are 60+ % of the market. > Even worse, the same amount of web developers code broken pages that only work in IE. The 60% IE varies drastically depending on where you go in the world. In Europe IE has no longer a majority share and in a few years will be demoted to the tool you have to use to get Windows patches. A development that comes 10 years too late. Dvaid From danielc at analysisandsolutions.com Sun Jan 24 01:30:31 2010 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 24 Jan 2010 01:30:31 -0500 Subject: [nycphp-talk] Inspiration for projects. In-Reply-To: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> References: <43bc541c1001201208r273da3dbh927c9ac2387d3bda@mail.gmail.com> Message-ID: <20100124063031.GB18768@panix.com> Hi Anthony: In addition to what others said... Write unit tests for PHP. Fix bugs in PHP's C source code. Knock out documentation bugs for PHP. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From tedd.sperling at gmail.com Sun Jan 24 09:18:09 2010 From: tedd.sperling at gmail.com (tedd) Date: Sun, 24 Jan 2010 09:18:09 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <602c8ac1001231720m5f675d5bg2fe7431beb865dbe@mail.gmail.com> References: <008701ca9b84$224165a0$66c430e0$@com> <68de37341001221026h498b8659i6070b00d60446250@mail.gmail.com> <018301ca9c47$85bda5d0$9138f170$@com> <602c8ac1001231720m5f675d5bg2fe7431beb865dbe@mail.gmail.com> Message-ID: At 8:20 PM -0500 1/23/10, Mutaz Musa wrote: >Far more depressing is the fact that IE users are 60+ % of the market. Mutaz: While Windozes holds the major share of the PC market, folks are wising up to browsers. I think the following is more in keeping with the "market": http://www.w3schools.com/browsers/browsers_stats.asp Granted, such stats are dependant upon the web site sampled. For example, I have one web site that is frequented by only Mac users. For example in the last two years, it's seen over 90k Mac visitors with less than 2k Windozes. As such, that web site shows that IE users are less than 2 percent of that market. So stats are relative. You can tell people that having a tack in their shoe is a good thing, but after a while they tend to listen to people who are not limping. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From ajai at bitblit.net Mon Jan 25 19:02:23 2010 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 25 Jan 2010 19:02:23 -0500 (EST) Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: <018301ca9c47$85bda5d0$9138f170$@com> Message-ID: On Sat, 23 Jan 2010, Hans Zaunere wrote: > Interesting you should mention that: > > http://www.net-security.org/secworld.php?id=8755 The cat-n-mpuse game continues: http://www.newscientist.com/article/mg20527446.000-to-beat-spam-turn-its-own-weapons-against-it.html?haasFormId=46aa9eea-8158-4b87-8d70-3994c2a1bd64&haasPage=0 -- Aj. From fgabrieli at gmail.com Tue Jan 26 08:34:49 2010 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Tue, 26 Jan 2010 10:34:49 -0300 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: References: <018301ca9c47$85bda5d0$9138f170$@com> Message-ID: a question that i ask myself each time i find something that's not working in IE is: how is it possible that a company like Microsoft can't make a browser like Firefox? is it just a problem of the development itself or is it something else? and if it's something else, what is that something else? On Mon, Jan 25, 2010 at 9:02 PM, Ajai Khattri wrote: > On Sat, 23 Jan 2010, Hans Zaunere wrote: > > > Interesting you should mention that: > > > > http://www.net-security.org/secworld.php?id=8755 > > The cat-n-mpuse game continues: > > http://www.newscientist.com/article/mg20527446.000-to-beat-spam-turn-its-own-weapons-against-it.html?haasFormId=46aa9eea-8158-4b87-8d70-3994c2a1bd64&haasPage=0 > > > -- > Aj. > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Tue Jan 26 09:13:02 2010 From: ramons at gmx.net (David Krings) Date: Tue, 26 Jan 2010 09:13:02 -0500 Subject: [nycphp-talk] Internet by Numbers 2009 In-Reply-To: References: <018301ca9c47$85bda5d0$9138f170$@com> Message-ID: <4B5EF86E.9030208@gmx.net> On 1/26/2010 8:34 AM, Fernando Gabrieli wrote: > a question that i ask myself each time i find something that's not > working in IE is: how is it possible that a company like Microsoft can't > make a browser like Firefox? is it just a problem of the development > itself or is it something else? and if it's something else, what is that > something else? It is arrogance and managerial ineptitude. With a monopoly command and millions of lemmings blindly following it is just too convenient to ignore standards, trends, and reality. Just look at the overpriced crapware that Microsoft puts out yet being hopelessly behind in virtualization and cloud technology. As long as people keep buying the stuff and the number of Microsoft-only shops grows there isn't much incentive to change anything. If you want Microsoft to shape up you need to get a lot of people to stop buying their cruddy products, especially in the enterprise arena. Good luck! David From hypertextpreprocessor at dynamicink.com Tue Jan 26 17:47:35 2010 From: hypertextpreprocessor at dynamicink.com (I Dream in PHP) Date: Tue, 26 Jan 2010 17:47:35 -0500 Subject: [nycphp-talk] Win a Free 2-Day MySQL Training in NYC! $765.00 value! MySQL Developer Day + MySQL DBA Day taught by Percona's world-renowned MySQL Expert Morgan Tocker! Message-ID: <00b001ca9ed9$abcaffe0$bf0aa8c0@e6300> Hi All, You can win a free 2-Day MySQL Training in NYC taught by Percona's world-renowned MySQL Expert Morgan Tocker ($765.00 value). The first day is "tuned" for developers using MySQL and the second day is focused on database administration. Course info and contest signup at: http://www.Avinu.org/contest Good luck! Also, this is the last few hours to RSVP for a Meetup by the CIO of NYC Dept. of Finance & former-Microsoft CIO Jane Landon on: So you want to become a CIO? Be careful what you wish for! RSVP at http://www.meetup.com/mysqlnyc/calendar/12280520 TOMMOROW (WEDNESDAY) at 6:30pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Fri Jan 29 09:48:20 2010 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 29 Jan 2010 09:48:20 -0500 Subject: [nycphp-talk] error log monitor, git, github Message-ID: <20100129144820.GA13436@panix.com> Hey Folks: I recently started working with Git for version control. The learning curve was a bit awkward due to Git using command names from CVS and Subversion but having them do different things. Plus it's a slightly different work flow and there are several new commands/configurations to figure out. But now that I'm getting the hang of it, I like it. One notable difference: in general practice, don't keep uncommitted changes and unmanaged files in your working directories when you perform pulls (updates), merges or commits. You either commit them or "git stash" them. Stashing puts the files and diffs into the repository, but without really committing them. It's kind of a temporary storage area. Then once you've updated/merged/whatever, you "git stash apply" them back to their original location. Anyway, I wanted to have this first project's repository be publicly accessible, making it easier to manage updating multiple installations with their various settings and customizations. So I figured it was time to sign up for a GitHub account. Again, so far, so good. The signup process, user interface and documentation were all pretty decent -- though some bits of the user interface require JavaScript without really indicating so. Then I figured, "now that I have this account, what else can I host there?" This inspired me to finish something I've had on the back burner for about a year now... a Perl script to monitor my PHP error logs. This approach is necessary for two reasons. First, while user-defined error handlers are excellent, if PHP goes fatal, so does the error handler. Second, if the PHP install is really broken, a log observer written in PHP won't do much good. http://www.analysisandsolutions.com/software/log_monitoring_solution/ http://github.com/convissor/log_monitoring_solution Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409