From david at davidmintz.org Wed Mar 4 10:49:01 2009 From: david at davidmintz.org (David Mintz) Date: Wed, 4 Mar 2009 10:49:01 -0500 Subject: [nycphp-talk] the stale V in MVC web apps Message-ID: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> I've got users working collaboratively all day long on a set of database records. The view in front of them is frequently stale. A common old Web 1.0 approach to solve this was to reload the page automatically every n seconds with a meta refresh. Nowadays we have xhr. Either way, my concern is as the W3C points out, an unexpected refresh can disorient users. I have thought of displaying a thingy at page load time that says "reloading automatically in 5 minutes" and then updating via Javscript it to count down 4, 3, 2 and after maybe 30 seconds start counting off seconds, then update via ajax. The upside is they won't get (or at least shouldn't be) surprised. The downside is more clutter, potentially annoying and/or distracting. But I think you could put a discrete little timer thingy that ought not be too irritating. I understand the problem is so common that someone has coined "Asynchronous MVC." What do YOU do about this sort of thing? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From brenttech at gmail.com Wed Mar 4 11:34:46 2009 From: brenttech at gmail.com (Brent Baisley) Date: Wed, 4 Mar 2009 11:34:46 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> Use AJAX instead to refresh just the part of the page that needs refreshing. If it's a fair chunk of information, you set a "version" on the server so the AJAX call just checks the current version vs it's version. If it's different, then you refresh the content. If it's not different, no need to refresh anything and you only did a light weight server call, so you could do it every 15 seconds. Brent Baisley On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote: > > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. A common old Web 1.0 > approach to solve this was to reload the page automatically every n seconds > with a meta refresh. Nowadays we have xhr. Either way, my concern is as the > W3C points out, an unexpected refresh can disorient users. > > I have thought of displaying a thingy at page load time that says "reloading > automatically in 5 minutes" and then updating via Javscript it to count > down? 4, 3, 2 and after maybe 30 seconds start counting off seconds, then > update via ajax. The upside is they won't get (or at least shouldn't be) > surprised. The downside is more clutter, potentially annoying and/or > distracting. But I think you could put a discrete little timer thingy that > ought not be too irritating. > > I understand the problem is so common that someone has coined "Asynchronous > MVC." > > What do YOU do about this sort of thing? > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From jmcgraw1 at gmail.com Wed Mar 4 11:35:33 2009 From: jmcgraw1 at gmail.com (Jake McGraw) Date: Wed, 4 Mar 2009 11:35:33 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote: > > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. A common old Web 1.0 > approach to solve this was to reload the page automatically every n seconds > with a meta refresh. Nowadays we have xhr. Either way, my concern is as the > W3C points out, an unexpected refresh can disorient users. What the W3C recommendations fail to take into account, is that you're developing a web application, not a static text reference. Since you're presenting information that will be meaningless after five minutes, the "web page as a permanent reference" paradigm can be thrown out the window. Feel free to employ any method to solve the problem. > > I have thought of displaying a thingy at page load time that says "reloading > automatically in 5 minutes" and then updating via Javscript it to count > down? 4, 3, 2 and after maybe 30 seconds start counting off seconds, then > update via ajax. The upside is they won't get (or at least shouldn't be) > surprised. The downside is more clutter, potentially annoying and/or > distracting. But I think you could put a discrete little timer thingy that > ought not be too irritating. > > I understand the problem is so common that someone has coined "Asynchronous > MVC." Really depends on the interval at which the information becomes stale. I would probably go with the timer idea, but provide a text description for how old the data is: Information is X minutes old. Implementing a feature like this is trivial, so, I suggest setting up a stripped down version and see what the end user response is. - jake > > What do YOU do about this sort of thing? > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From jcampbell1 at gmail.com Wed Mar 4 11:50:34 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 4 Mar 2009 11:50:34 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> I use AJAX polling loops to check if the data is actually stale, and then do something about it. It can be complicated as auto updating the sections of the page that have changed, and then doing the "yellow-fade". If you don't want to get fancy, you could just show a dialogue that let's the user know the data is stale, and give them the option to refresh. Writing an ajax polling loop is really quite simple... just make sure you use tail recursion, rather than an interval. I have made that mistake in the past, and it hurts. Dont do: setInterval(checkStatus,3000); Do: // checkStatus must have a callback parameter when complete. (function() { var this_function = arguments.callee; checkStatus(function(){ setTimeout(this_function,3000); }); })(); On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote: > > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. A common old Web 1.0 > approach to solve this was to reload the page automatically every n seconds > with a meta refresh. Nowadays we have xhr. Either way, my concern is as the > W3C points out, an unexpected refresh can disorient users. > > I have thought of displaying a thingy at page load time that says "reloading > automatically in 5 minutes" and then updating via Javscript it to count > down? 4, 3, 2 and after maybe 30 seconds start counting off seconds, then > update via ajax. The upside is they won't get (or at least shouldn't be) > surprised. The downside is more clutter, potentially annoying and/or > distracting. But I think you could put a discrete little timer thingy that > ought not be too irritating. > > > What do YOU do about this sort of thing? > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From ioplex at gmail.com Wed Mar 4 11:51:51 2009 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 4 Mar 2009 11:51:51 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: <78c6bd860903040851o14e7394k263ac658937c9371@mail.gmail.com> On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote: > > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. A common old Web 1.0 > approach to solve this was to reload the page automatically every n seconds > with a meta refresh. Nowadays we have xhr. Either way, my concern is as the > W3C points out, an unexpected refresh can disorient users. IMO the W3C doesn't know much about dynamic web content. The W3C specifications are designed around displaying "documents" and not "interactive applications". So if you want a site that looks something like say, mmmm .... the W3C website, then you're gold. If not, you need to look elsewhere for help. > I have thought of displaying a thingy at page load time that says "reloading > automatically in 5 minutes" and then updating via Javscript it to count > down? 4, 3, 2 and after maybe 30 seconds start counting off seconds, then > update via ajax. The upside is they won't get (or at least shouldn't be) > surprised. The downside is more clutter, potentially annoying and/or > distracting. But I think you could put a discrete little timer thingy that > ought not be too irritating. > > I understand the problem is so common that someone has coined "Asynchronous > MVC." IMO I don't think MVC really even applies to the web. V is supposed to watch M which is updated by C thereby causing V to update only the part of the display affected. So with HTTP being stateless, V can't actively "watch" M and react independently to updates by C. I think people wanted MVC to apply to the web so much they simply declared it so and "poof" ... it was. > What do YOU do about this sort of thing? I think asynchronous JavaScript requests are used way too much but it might be applicable in this case. The litmus test in this case I think is to imagine that you just use a "Refresh" button. Then imagine people working and think about how frequently the display will update just in the course of doing that work and if those updates will be sufficient to keep the wheels of workflow turning. If you do not think it will be sufficient and you think that users will ultimately just sit there literally hitting "Refresh" every 30 seconds all day long, then you should think about adding asynchronous JavaScript to assist with updating the records in the display. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From vtbludgeon at gmail.com Wed Mar 4 11:53:16 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 11:53:16 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> Message-ID: <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote: > Use AJAX instead to refresh just the part of the page that needs > refreshing. If it's a fair chunk of information, you set a "version" > on the server so the AJAX call just checks the current version vs it's > version. If it's different, then you refresh the content. If it's not > different, no need to refresh anything and you only did a light weight > server call, so you could do it every 15 seconds. Forgive me, I don't quite understand *how* you would set the version information on the server in order to compare. The Prototype library has an Ajax periodical updater ( http://prototypejs.org/api/ajax/periodicalUpdater) that takes a "decay" option which "controls the rate at which the request interval grows when the response is unchanged." The longer the server data stays unchanged, the less frequently it fetches. Clever and elegant. Something like that would do nicely, but I have other reasons for tending to prefer JQuery, which doesn't seem to have a counterpart. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtbludgeon at gmail.com Wed Mar 4 12:01:47 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 12:01:47 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> Message-ID: <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> On Wed, Mar 4, 2009 at 11:50 AM, John Campbell wrote: > I use AJAX polling loops to check if the data is actually stale, and > then do something about it. Again, sorry for being dense but I am not sure I understand how this checking should be performed. I can imagine possibilities, some of which seem like as much work and expense as just reloading the data unconditionally. > > Writing an ajax polling loop is really quite simple... just make sure > you use tail recursion, rather than an interval. I have made that > mistake in the past, and it hurts. > > Dont do: > > setInterval(checkStatus,3000); > > Do: > > // checkStatus must have a callback parameter when complete. > (function() { > var this_function = arguments.callee; > checkStatus(function(){ > setTimeout(this_function,3000); > }); > })(); > Thanks for the tip, but... why is this so? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtbludgeon at gmail.com Wed Mar 4 12:10:47 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 12:10:47 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> Message-ID: <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> On Wed, Mar 4, 2009 at 12:01 PM, David Mintz wrote: > Writing an ajax polling loop is really quite simple... just make sure >> you use tail recursion, rather than an interval. I have made that >> mistake in the past, and it hurts. >> > > > Thanks for the tip, but... why is this so? > > Cancel that, I think http://blog.paulbonser.com/2007/11/18/extending-javascript-tail-recursion/is trying to help me out on this one. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcampbell1 at gmail.com Wed Mar 4 12:17:28 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 4 Mar 2009 12:17:28 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> Message-ID: <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> On Wed, Mar 4, 2009 at 11:53 AM, David Mintz wrote: > > > On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote: >> >> Use AJAX instead to refresh just the part of the page that needs >> refreshing. If it's a fair chunk of information, you set a "version" >> on the server so the AJAX call just checks the current version vs it's >> version. If it's different, then you refresh the content. If it's not >> different, no need to refresh anything and you only did a light weight >> server call, so you could do it every 15 seconds. > > Forgive me, I don't quite understand *how* you would set the version > information on the server in order to compare. In many cases, you can get away with using timestamps. If you have update_at columns, then you can compare the timestamps. In theory, there are problems with this method (such as updates that happen during the same second), but in practice, it works quite well. From bonsaime at gmail.com Wed Mar 4 12:12:33 2009 From: bonsaime at gmail.com (Jesse Callaway) Date: Wed, 4 Mar 2009 12:12:33 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> Message-ID: On Wed, Mar 4, 2009 at 11:53 AM, David Mintz wrote: > > > On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote: >> >> Use AJAX instead to refresh just the part of the page that needs >> refreshing. If it's a fair chunk of information, you set a "version" >> on the server so the AJAX call just checks the current version vs it's >> version. If it's different, then you refresh the content. If it's not >> different, no need to refresh anything and you only did a light weight >> server call, so you could do it every 15 seconds. > > Forgive me, I don't quite understand *how* you would set the version > information on the server in order to compare. > > The Prototype library has an Ajax periodical updater > (http://prototypejs.org/api/ajax/periodicalUpdater) that takes a "decay" > option which "controls the rate at which the request interval grows when the > response is unchanged." The longer the server data stays unchanged, the less > frequently it fetches. Clever and elegant. Something like that would do > nicely, but I have other reasons for tending to prefer JQuery, which doesn't > seem to have a counterpart. > > > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > You could md5 the data returned on the last update. This decay stuff looks cool! -jesse From jcampbell1 at gmail.com Wed Mar 4 12:26:23 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 4 Mar 2009 12:26:23 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> Message-ID: <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote: > > On Wed, Mar 4, 2009 at 12:01 PM, David Mintz wrote: >>> >> Thanks for the tip, but... why is this so? >> > > Cancel that, I think > http://blog.paulbonser.com/2007/11/18/extending-javascript-tail-recursion/ > is trying to help me out on this one. The problem is with intervals, is that if someone's connection flakes out for a minute or two, you end up doing tons of ajax calls that all overlap causing wacky behavior. The point of tail recursion is to wait for the ajax call to complete, before starting the timer to do a new request. From ajai at bitblit.net Wed Mar 4 12:35:19 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 4 Mar 2009 12:35:19 -0500 (EST) Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: On Wed, 4 Mar 2009, David Mintz wrote: > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. A common old Web 1.0 > approach to solve this was to reload the page automatically every n seconds > with a meta refresh. Nowadays we have xhr. Either way, my concern is as the > W3C points out, an unexpected refresh can disorient users. > > I have thought of displaying a thingy at page load time that says "reloading > automatically in 5 minutes" and then updating via Javscript it to count > down 4, 3, 2 and after maybe 30 seconds start counting off seconds, then > update via ajax. The upside is they won't get (or at least shouldn't be) > surprised. The downside is more clutter, potentially annoying and/or > distracting. But I think you could put a discrete little timer thingy that > ought not be too irritating. > > I understand the problem is so common that someone has coined "Asynchronous > MVC." > > What do YOU do about this sort of thing? In the future, this might be addressed by Comet. http://en.wikipedia.org/wiki/Comet_(programming) -- Aj. From rolan at omnistep.com Wed Mar 4 12:45:31 2009 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 04 Mar 2009 12:45:31 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> Message-ID: <49AEBE3B.10708@omnistep.com> John Campbell wrote: > On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote: > > The problem is with intervals, is that if someone's connection flakes > out for a minute or two, you end up doing tons of ajax calls that all > overlap causing wacky behavior. The point of tail recursion is to > wait for the ajax call to complete, before starting the timer to do a > new request. I've written a few ajax page periodic updaters. If the connection flakes and the ajax request fails, I usually pop up an alert error message so the user is aware that things are currently broken. Too keep things simple, I send a query to the server, get back a timestamp. If that timestamp is newer than the current one in memory, then it refreshes the entire page. The downside to this is that if someone is actively editing fields, they will lose their data. To circumvent this problem, I have a "do not refresh" flag which is set when a user clicks onto any input box. The flag is unset with events like onBlur or after a timeout period of keyboard/mouse inactivity so the page can refresh (if necessary) when idle. ~Rolan From vtbludgeon at gmail.com Wed Mar 4 12:48:57 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 12:48:57 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> Message-ID: <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> On Wed, Mar 4, 2009 at 12:26 PM, John Campbell wrote: > On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote: > > > > On Wed, Mar 4, 2009 at 12:01 PM, David Mintz > wrote: > >>> > >> Thanks for the tip, but... why is this so? > >> > > > > Cancel that, I think > > > http://blog.paulbonser.com/2007/11/18/extending-javascript-tail-recursion/ > > is trying to help me out on this one. > > The problem is with intervals, is that if someone's connection flakes > out for a minute or two, you end up doing tons of ajax calls that all > overlap causing wacky behavior. The point of tail recursion is to > wait for the ajax call to complete, before starting the timer to do a > new request. Aaah, thank you. Very clearly stated. I have a page where I *think* I am doing that albeit in a roundabout way. When the document loads initially I set the timer. When the xhr completes, my xhr callback resets the timer. The interval is five minutes. The following is with Prototype. // on load window.updater = window.setInterval(submitForm,updateInterval); // and... submitForm = function(){ $('searchForm').request({ onCreate:function(response){$('formSubmit').value="Processing..."}, onComplete:function(xhr){ // reset timer window.clearInterval(updater); window.updater = window.setInterval(submitForm,updateInterval); $('formSubmit').value="Search" // reset button's value // etc } }); }; -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtbludgeon at gmail.com Wed Mar 4 13:07:17 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 13:07:17 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> Message-ID: <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> On Wed, Mar 4, 2009 at 12:17 PM, John Campbell wrote: > >> Use AJAX instead to refresh just the part of the page that needs > >> refreshing. If it's a fair chunk of information, you set a "version" > >> on the server so the AJAX call just checks the current version vs it's > >> version. If it's different, then you refresh the content. If it's not > >> different, no need to refresh anything and you only did a light weight > >> server call, so you could do it every 15 seconds. > > > > Forgive me, I don't quite understand *how* you would set the version > > information on the server in order to compare. > > In many cases, you can get away with using timestamps. If you have > update_at columns, then you can compare the timestamps. In theory, > there are problems with this method (such as updates that happen > during the same second), but in practice, it works quite well. > Still not sure I get it -- I am competing the for Slowest Mind of the Year Award. The users are looking at a set of database rows. The table does have last-modified and creation-datetime columns. Saving the current set's maximum last-update and/or created value in the client, and then checking against the server by running an Ajax request to a server-side script that in turn queries the db to see if anything has changed... seems like almost as much overhead as just reloading unconditionally. Indeed more in those instances where you query to check if something changed, then do another query to load the data because something did change. And by "change" I mean in the dataset they are looking at, a row may have been either created, updated or deleted since they last loaded the view. So last-modified values would not inform you about deletions. I don't understand the md5() technique either. I mean, I know about md5() but don't see how you would use it efficiently for this purpose. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Wed Mar 4 13:09:55 2009 From: ashaw at polymerdb.org (Allen Shaw) Date: Wed, 04 Mar 2009 12:09:55 -0600 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> Message-ID: <49AEC3F3.4050005@polymerdb.org> David Mintz wrote: > I have a page where I *think* I am doing that albeit in a roundabout > way. When the document loads initially I set the timer. When the xhr > completes, my xhr callback resets the timer. Yes, that's what I was thinking (and what I'm doing). If the connection fails, the xhr callback is never run, so the next timer interval is never set. This should be a stable solution -- right? - Allen -- Allen Shaw slidePresenter (http://slides.sourceforge.net) From vtbludgeon at gmail.com Wed Mar 4 13:10:35 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 13:10:35 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <49AEBE3B.10708@omnistep.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <49AEBE3B.10708@omnistep.com> Message-ID: <721f1cc50903041010o6c0e6bb4k49ec2e3898db94fd@mail.gmail.com> On Wed, Mar 4, 2009 at 12:45 PM, Rolan Yang wrote: > John Campbell wrote: > >> On Wed, Mar 4, 2009 at 12:10 PM, David Mintz >> wrote: >> The problem is with intervals, is that if someone's connection flakes >> out for a minute or two, you end up doing tons of ajax calls that all >> overlap causing wacky behavior. The point of tail recursion is to >> wait for the ajax call to complete, before starting the timer to do a >> new request. >> > > I've written a few ajax page periodic updaters. If the connection flakes > and the ajax request fails, I usually pop up an alert error message so the > user is aware that things are currently broken. Too keep things simple, I > send a query to the server, get back a timestamp. If that timestamp is newer > than the current one in memory, then it refreshes the entire page. The > downside to this is that if someone is actively editing fields, they will > lose their data. To circumvent this problem, I have a "do not refresh" flag > which is set when a user clicks onto any input box. The flag is unset with > events like onBlur or after a timeout period of keyboard/mouse inactivity so > the page can refresh (if necessary) when idle. > > I can relate. I have my thing to stop the timer when I detect that they are in the middle of doing something -- they clicked a row to open a context menu/tooltip, for example. It's hard work writing polite and thoughtful UIs isn't it. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Wed Mar 4 13:12:03 2009 From: ashaw at polymerdb.org (Allen Shaw) Date: Wed, 04 Mar 2009 12:12:03 -0600 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> Message-ID: <49AEC473.3010303@polymerdb.org> David Mintz wrote: > The users are looking at a set of database rows. The table does have > last-modified and creation-datetime columns. Saving the current set's > maximum last-update and/or created value in the client, and then > checking against the server by running an Ajax request to a > server-side script that in turn queries the db to see if anything has > changed... seems like almost as much overhead as just reloading > unconditionally. Processing overhead maybe, but you save a big chunk on bandwidth and reload time in the user experience. - A. -- Allen Shaw slidePresenter (http://slides.sourceforge.net) From jcampbell1 at gmail.com Wed Mar 4 13:30:05 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 4 Mar 2009 13:30:05 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> Message-ID: <8f0676b40903041030n422417b9ucb15c877a9f9d611@mail.gmail.com> On Wed, Mar 4, 2009 at 12:48 PM, David Mintz wrote: > // on load > > window.updater = window.setInterval(submitForm,updateInterval); > > // and... > > submitForm = function(){ > > $('searchForm').request({ > onCreate:function(response){$('formSubmit').value="Processing..."}, > > onComplete:function(xhr){ > // reset timer > window.clearInterval(updater); > window.updater = window.setInterval(submitForm,updateInterval); > $('formSubmit').value="Search" // reset button's value > > // etc > > } > }); > > }; I don't think your code is quite right. To validate polling code, just add "sleep(2)" to your php code, and set the updateInterval to 1 second. If it doesn't work under these conditions, then the code is not quite right. The problem with your code is that you clear the interval onComplete, rather than onCreate. It is possible that the interval keeps firing while onComplete has not been run because the ajax requests are taking a long time due to a network issue. To fix it... just change setInterval to setTimeout everywhere, and get rid if the clearInterval code. From vtbludgeon at gmail.com Wed Mar 4 14:42:49 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 14:42:49 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <8f0676b40903041030n422417b9ucb15c877a9f9d611@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> <8f0676b40903041030n422417b9ucb15c877a9f9d611@mail.gmail.com> Message-ID: <721f1cc50903041142q4d4a8396ufebc5fc833ca3de1@mail.gmail.com> On Wed, Mar 4, 2009 at 1:30 PM, John Campbell wrote: > On Wed, Mar 4, 2009 at 12:48 PM, David Mintz wrote: > > // on load > > > > window.updater = window.setInterval(submitForm,updateInterval); > > > > // and... > > > > submitForm = function(){ > > > > $('searchForm').request({ > > > onCreate:function(response){$('formSubmit').value="Processing..."}, > > > > onComplete:function(xhr){ > > // reset timer > > window.clearInterval(updater); > > window.updater = > window.setInterval(submitForm,updateInterval); > > $('formSubmit').value="Search" // reset button's > value > > > > // etc > > > > } > > }); > > > > }; > > I don't think your code is quite right. To validate polling code, > just add "sleep(2)" to your php code, and set the updateInterval to 1 > second. If it doesn't work under these conditions, then the code is > not quite right. Why would you want to sleep() on the server side? In any case, the updateInterval is currently 5000 milliseconds. I just want to make sure their snapshot never gets more than five minutes old. For this application I don't think it's essential to update every 3 seconds. > > > The problem with your code is that you clear the interval onComplete, > rather than onCreate. It is possible that the interval keeps firing > while onComplete has not been run because the ajax requests are taking > a long time due to a network issue. Got it. > > To fix it... just change setInterval to setTimeout everywhere, and get > rid if the clearInterval code. Right... thank you very much. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From bonsaime at gmail.com Wed Mar 4 14:53:21 2009 From: bonsaime at gmail.com (Jesse Callaway) Date: Wed, 4 Mar 2009 14:53:21 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> Message-ID: On Wed, Mar 4, 2009 at 1:07 PM, David Mintz wrote: > > On Wed, Mar 4, 2009 at 12:17 PM, John Campbell wrote: >> >> >> Use AJAX instead to refresh just the part of the page that needs >> >> refreshing. If it's a fair chunk of information, you set a "version" >> >> on the server so the AJAX call just checks the current version vs it's >> >> version. If it's different, then you refresh the content. If it's not >> >> different, no need to refresh anything and you only did a light weight >> >> server call, so you could do it every 15 seconds. >> > >> > Forgive me, I don't quite understand *how* you would set the version >> > information on the server in order to compare. >> >> In many cases, you can get away with using timestamps. ?If you have >> update_at columns, then you can compare the timestamps. ?In theory, >> there are problems with this method (such as updates that happen >> during the same second), but in practice, it works quite well. > > > Still not sure I get it -- I am competing the for Slowest Mind of the Year > Award. > > The users are looking at a set of database rows. The table does have > last-modified and creation-datetime columns. Saving the current set's > maximum last-update and/or created value in the client, and then checking > against the server by running an Ajax request to a server-side script that > in turn queries the db to see if anything has changed... seems like almost > as much overhead as just reloading unconditionally. Indeed more in those > instances where you query to check if something changed, then do another > query to load the data because something did change. > > And by "change" I mean in the dataset they are looking at, a row may have > been either created, updated or deleted since they last loaded the view. So > last-modified values would not inform you about deletions. > > I don't understand the md5() technique either. I mean, I know about md5() > but don't see how you would use it efficiently for this purpose. > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > Get a hash of the data returned from your remote request and remember it at the client. If you choose you can remember it on the server-side as well. But you might not have control over that, say if you are grabbing the weather from a provider. Anyway next time you get a response back check it against the remembered md5. If there's a match then don't update the document. I don't know if it's efficient or not, but it would cut down on redrawing the screen. -jesse From vtbludgeon at gmail.com Wed Mar 4 15:16:03 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 15:16:03 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <5d515c620903040834p6cea4e12l72087bce44deeed8@mail.gmail.com> <721f1cc50903040853u812149by6325e90c506fa8d9@mail.gmail.com> <8f0676b40903040917x5f67fdcbjad8024a1a77a1198@mail.gmail.com> <721f1cc50903041007w6d303812lbcd707b73cb5fa93@mail.gmail.com> Message-ID: <721f1cc50903041216l11a619c8u4c9ac1bacc477881@mail.gmail.com> On Wed, Mar 4, 2009 at 2:53 PM, Jesse Callaway wrote: > On Wed, Mar 4, 2009 at 1:07 PM, David Mintz wrote: > > > > On Wed, Mar 4, 2009 at 12:17 PM, John Campbell > wrote: > >> > >> >> Use AJAX instead to refresh just the part of the page that needs > >> >> refreshing. If it's a fair chunk of information, you set a "version" > >> >> on the server so the AJAX call just checks the current version vs > it's > >> >> version. If it's different, then you refresh the content. If it's not > >> >> different, no need to refresh anything and you only did a light > weight > >> >> server call, so you could do it every 15 seconds. > >> > > >> > Forgive me, I don't quite understand *how* you would set the version > >> > information on the server in order to compare. > >> > >> In many cases, you can get away with using timestamps. If you have > >> update_at columns, then you can compare the timestamps. In theory, > >> there are problems with this method (such as updates that happen > >> during the same second), but in practice, it works quite well. > > > > > > Still not sure I get it -- I am competing the for Slowest Mind of the > Year > > Award. > > > > The users are looking at a set of database rows. The table does have > > last-modified and creation-datetime columns. Saving the current set's > > maximum last-update and/or created value in the client, and then checking > > against the server by running an Ajax request to a server-side script > that > > in turn queries the db to see if anything has changed... seems like > almost > > as much overhead as just reloading unconditionally. Indeed more in those > > instances where you query to check if something changed, then do another > > query to load the data because something did change. > > > > And by "change" I mean in the dataset they are looking at, a row may have > > been either created, updated or deleted since they last loaded the view. > So > > last-modified values would not inform you about deletions. > > > > I don't understand the md5() technique either. I mean, I know about md5() > > but don't see how you would use it efficiently for this purpose. > > > > -- > > David Mintz > > http://davidmintz.org/ > > > > The subtle source is clear and bright > > The tributary streams flow through the darkness > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/show_participation.php > > > > Get a hash of the data returned from your remote request and remember > it at the client. If you choose you can remember it on the server-side > as well. But you might not have control over that, say if you are > grabbing the weather from a provider. > Anyway next time you get a response back check it against the > remembered md5. If there's a match then don't update the document. I > don't know if it's efficient or not, but it would cut down on > redrawing the screen. > Understood. Thanks! -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Wed Mar 4 16:06:45 2009 From: david at davidmintz.org (David Mintz) Date: Wed, 4 Mar 2009 16:06:45 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903041142q4d4a8396ufebc5fc833ca3de1@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> <8f0676b40903041030n422417b9ucb15c877a9f9d611@mail.gmail.com> <721f1cc50903041142q4d4a8396ufebc5fc833ca3de1@mail.gmail.com> Message-ID: <721f1cc50903041306l3424088fp62e47383f5738bbf@mail.gmail.com> On Wed, Mar 4, 2009 at 2:42 PM, David Mintz wrote: > > > > > In any case, the updateInterval is currently 5000 milliseconds. I just want > to make sure their snapshot never gets more than five minutes old. > Ouch, did I say 5000 when I meant 300000 ? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Wed Mar 4 17:44:40 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 4 Mar 2009 17:44:40 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> Message-ID: <20090304224439.GA24466@panix.com> Hola David: On Wed, Mar 04, 2009 at 10:49:01AM -0500, David Mintz wrote: > I've got users working collaboratively all day long on a set of database > records. The view in front of them is frequently stale. There are many ways to do this, as this thread shows. The best option depends on exactly what you need to do. That said, here's an outline of what I'd do, in theory. Server has two methods. First is "get_records()" which outputs the record set and has an optional parameter "edited_since." Second is "get_latest_time()" and it outputs the result of "COALESCE(MAX(modification_time), MAX(creation_time)) AS latest_time." When the front end first loads the page, it get all of the results and puts the latest_time aside for future reference. The front end has a radio button with three options to the question "What do you want to do if these results get updated on the server?" * automatically refresh * ask me what to do * ignore If the user has chosen auto or ask, run a poller at some interval. The poller can work in several ways... a) You can call get_latest_time() and check it against the latest_time you set aside earlier. If there was a change and the user wants the latest data, you can then either get all records or just get the records that have changed. b) You can pass latest_time to get_records() and if anything comes back, update/add those rows in the display if the user wants to. This option seems a bit sweeter since it does everything in one shot. To the folks who suggested using an MD5 hash: sure, that will work. But that has a lot of overhead, since you need to go through the entire result set to calculate the hash. --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 vtbludgeon at gmail.com Wed Mar 4 19:51:04 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 4 Mar 2009 19:51:04 -0500 Subject: [nycphp-talk] the stale V in MVC web apps In-Reply-To: <721f1cc50903041142q4d4a8396ufebc5fc833ca3de1@mail.gmail.com> References: <721f1cc50903040749s327b2a1fh55caccb5386db238@mail.gmail.com> <8f0676b40903040850o6a5209f4i4d2bfe7c750a0cbd@mail.gmail.com> <721f1cc50903040901v8c751c2t6136e71189d0bcd1@mail.gmail.com> <721f1cc50903040910x3b9702a1i689386ea2304e702@mail.gmail.com> <8f0676b40903040926x78e2a188w6f30386aee8cad0d@mail.gmail.com> <721f1cc50903040948v11f2661foaa2d25a19468242b@mail.gmail.com> <8f0676b40903041030n422417b9ucb15c877a9f9d611@mail.gmail.com> <721f1cc50903041142q4d4a8396ufebc5fc833ca3de1@mail.gmail.com> Message-ID: <721f1cc50903041651i10c946d6q31aa9f4c9a54d069@mail.gmail.com> On Wed, Mar 4, 2009 at 2:42 PM, David Mintz wrote: > > > > >> >> >> I don't think your code is quite right. To validate polling code, >> just add "sleep(2)" to your php code, and set the updateInterval to 1 >> second. If it doesn't work under these conditions, then the code is >> not quite right. > > > > Why would you want to sleep() on the server side? > It's for test purposes, fool [it occurred to him 4 hours later as he was walking down the street] -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Mon Mar 9 11:12:55 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Mon, 9 Mar 2009 07:12:55 -0800 Subject: [nycphp-talk] Changing your site look - What is the norm Message-ID: Hi people, I was wondering if there is a norm of how often a corporate or goverment site should be redone. Is there such rule? Thanks, Nestor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at blu-studio.com Mon Mar 9 14:44:03 2009 From: ps at blu-studio.com (Peter Sawczynec) Date: Mon, 9 Mar 2009 14:44:03 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: Message-ID: <008301c9a0e7$055d4d20$1017e760$@com> I have never read any exact rule on how often to update a website look. But, here is my opinion from my experience. First, it is important to keep in mind, that most all web sites get technologically stale every single year. Updates < 1 Year Very commercial websites and youth oriented sites (MTV, TV shows, shampoo, fast food, bands, high-profile politicians) update at least every year. Many aggressive commercial sites change 2 or 3X a year. 1.5 - 2 Years Is Sensible, Proactive Time to Update If you want to keep the website looking like it is ahead of the curve or at least right on the curve; the website could use to be updated by 1.5 years. Up to 2 years update time is still Okay. 3 Years Is Far End of Time to Update Most standard web sites (govt., high end retail, associations, accountants, lawyers, real estate, furniture, car dealer, local radio station, local politician) start to get totally visually stale at about 3 years. And, of course, I feel even a 2-year old web site design is showing its age. 5 Years Is Death It is common though for these types of above noted business entities to try to take a website design out to 5 years. At 5 years the old design is absolutely expired and is hurting the company image, not enhancing. Even a great clean corporate-look web site rigidly conformed to a classic design grid and using virtually no graphic dingbats of any kind would still need a refresh at about 5 years max, I think. The site width and height proportions get stale. Color scheme gets stale, font choices get stale. Even the widths of the columnar layout can get stale. Warmest regards, Peter Sawczynec Technology Dir. bl?studio 941.893.0396 ps at blu-studio.com www.blu-studio.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From corey at gelform.com Mon Mar 9 15:03:35 2009 From: corey at gelform.com (Corey H Maass - gelform.com) Date: Mon, 09 Mar 2009 15:03:35 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <008301c9a0e7$055d4d20$1017e760$@com> References: <008301c9a0e7$055d4d20$1017e760$@com> Message-ID: <1236625415.20070.1304468571@webmail.messagingengine.com> If you follow Amazon's model then small, constant updates is key. Less jarring to the user and better and safer for adapting/integrating new technologies. Fewer days of panic for you, "OMG! The whole nav doesn't work on safari 3?! But we can't roll back because the new db won't work!" Corey On Mon, 9 Mar 2009 14:44:03 -0400, "Peter Sawczynec" said: > I have never read any exact rule on how often to update > > a website look. But, here is my opinion from my experience. > > > > First, it is important to keep in mind, that most all web sites > > get technologically stale every single year. > > > > Updates < 1 Year > > Very commercial websites and youth oriented sites (MTV, > > TV shows, shampoo, fast food, bands, high-profile politicians) > > update at least every year. Many aggressive commercial sites > > change 2 or 3X a year. > > > > 1.5 - 2 Years Is Sensible, Proactive Time to Update > > If you want to keep the website looking like it is ahead > > of the curve or at least right on the curve; the website > > could use to be updated by 1.5 years. Up to 2 years > > update time is still Okay. > > > > 3 Years Is Far End of Time to Update > > Most standard web sites (govt., high end retail, > > associations, accountants, lawyers, real estate, furniture, > > car dealer, local radio station, local politician) start to get > > totally visually stale at about 3 years. And, of course, > > I feel even a 2-year old web site design > > is showing its age. > > > > 5 Years Is Death > > It is common though for these types of above noted > > business entities to try to take a website design out > > to 5 years. At 5 years the old design is absolutely expired > > and is hurting the company image, not enhancing. > > > > Even a great clean corporate-look web site rigidly > > conformed to a classic design grid and using virtually no > > graphic dingbats of any kind would still need a refresh > > at about 5 years max, I think. > > > > The site width and height proportions get stale. > > Color scheme gets stale, font choices get stale. > > Even the widths of the columnar layout > > can get stale. > > > > Warmest regards, > > > > Peter Sawczynec > > Technology Dir. > > blūstudio > > 941.893.0396 > > ps at blu-studio.com > > www.blu-studio.com > > > // Corey H Maass Gelform Design Brooklyn, NY Web design and development for art and business em corey at gelform.com ww http://www.gelform.com ph 646/228.5048 fx 866/502.4861 IM gelform From artur at marnik.net Mon Mar 9 17:12:21 2009 From: artur at marnik.net (Artur Marnik) Date: Mon, 09 Mar 2009 17:12:21 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <008301c9a0e7$055d4d20$1017e760$@com> References: <008301c9a0e7$055d4d20$1017e760$@com> Message-ID: <49B58635.5040709@marnik.net> According to this craigslist is already dead I think that if you have dynamic content (updated/added by webmaster or users) then you are fine for longer than few years if you just deliver some information to the user (like most corporate pages) then you don't have to change them for years - unless you want to introduce new or more fancy technology - like ajax, web2.0 etc and I am sure that government doesn't have any rule for that - I have seen pages 10 or more years old that run perfectly on NN 4.0 :) Artur Peter Sawczynec wrote: > I have never read any exact rule on how often to update > > a website look. But, here is my opinion from my experience. > > > > First, it is important to keep in mind, that most all web sites > > get technologically stale every single year. > > > > *Updates < 1 Year* > > Very commercial websites and youth oriented sites (MTV, > > TV shows, shampoo, fast food, bands, high-profile politicians) > > update at least every year. Many aggressive commercial sites > > change 2 or 3X a year. > > > > *1.5 - 2 Years Is Sensible, Proactive Time to Update * > > If you want to keep the website looking like it is ahead > > of the curve or at least right on the curve; the website > > could use to be updated by 1.5 years. Up to 2 years > > update time is still Okay. > > > > *3 Years Is Far End of Time to Update* > > Most standard web sites (govt., high end retail, > > associations, accountants, lawyers, real estate, furniture, > > car dealer, local radio station, local politician) start to get > > totally visually stale at about 3 years. And, of course, > > I feel even a 2-year old web site design > > is showing its age. > > > > *5 Years Is Death* > > It is common though for these types of above noted > > business entities to try to take a website design out > > to 5 years. At 5 years the old design is absolutely expired > > and is hurting the company image, not enhancing. > > > > Even a great clean corporate-look web site rigidly > > conformed to a classic design grid and using virtually no > > graphic dingbats of any kind would still need a refresh > > at about 5 years max, I think. > > > > The site width and height proportions get stale. > > Color scheme gets stale, font choices get stale. > > Even the widths of the columnar layout > > can get stale. > > > > Warmest regards, > > > > Peter Sawczynec > > Technology Dir. > > bl?studio > > 941.893.0396 > > ps at blu-studio.com > > www.blu-studio.com > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From rotsen at gmail.com Mon Mar 9 20:30:21 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Mon, 9 Mar 2009 17:30:21 -0700 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <49B58635.5040709@marnik.net> References: <008301c9a0e7$055d4d20$1017e760$@com> <49B58635.5040709@marnik.net> Message-ID: Thanks for all of your replies. Nestor :-) 2009/3/9 Artur Marnik > According to this craigslist is already dead > > I think that if you have dynamic content (updated/added by webmaster or > users) then you are fine for longer than few years > if you just deliver some information to the user (like most corporate > pages) then you don't have to change them for years - unless you want to > introduce new or more fancy technology - like ajax, web2.0 etc > > and I am sure that government doesn't have any rule for that - I have seen > pages 10 or more years old that run perfectly on NN 4.0 :) > > Artur > > > > Peter Sawczynec wrote: > >> I have never read any exact rule on how often to update >> >> a website look. But, here is my opinion from my experience. >> >> >> First, it is important to keep in mind, that most all web sites >> >> get technologically stale every single year. >> >> >> *Updates < 1 Year* >> >> Very commercial websites and youth oriented sites (MTV, >> >> TV shows, shampoo, fast food, bands, high-profile politicians) >> >> update at least every year. Many aggressive commercial sites >> >> change 2 or 3X a year. >> >> >> *1.5 - 2 Years Is Sensible, Proactive Time to Update * >> >> If you want to keep the website looking like it is ahead >> >> of the curve or at least right on the curve; the website >> >> could use to be updated by 1.5 years. Up to 2 years >> >> update time is still Okay. >> >> >> *3 Years Is Far End of Time to Update* >> >> Most standard web sites (govt., high end retail, >> >> associations, accountants, lawyers, real estate, furniture, >> >> car dealer, local radio station, local politician) start to get >> >> totally visually stale at about 3 years. And, of course, >> >> I feel even a 2-year old web site design >> >> is showing its age. >> >> >> *5 Years Is Death* >> >> It is common though for these types of above noted >> >> business entities to try to take a website design out >> >> to 5 years. At 5 years the old design is absolutely expired >> >> and is hurting the company image, not enhancing. >> >> >> Even a great clean corporate-look web site rigidly >> >> conformed to a classic design grid and using virtually no >> >> graphic dingbats of any kind would still need a refresh >> >> at about 5 years max, I think. >> >> >> The site width and height proportions get stale. >> >> Color scheme gets stale, font choices get stale. >> >> Even the widths of the columnar layout >> >> can get stale. >> >> >> Warmest regards, >> >> >> Peter Sawczynec >> >> Technology Dir. >> >> bl?studio >> >> 941.893.0396 >> >> ps at blu-studio.com >> >> www.blu-studio.com >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From edwardpotter at gmail.com Mon Mar 9 21:48:25 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Mon, 9 Mar 2009 21:48:25 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <008301c9a0e7$055d4d20$1017e760$@com> References: <008301c9a0e7$055d4d20$1017e760$@com> Message-ID: >>> *5 Years Is Death Craigslist Drudgereport Google Still alive and kicking! * 2009/3/9 Peter Sawczynec > I have never read any exact rule on how often to update > > a website look. But, here is my opinion from my experience. > > > > First, it is important to keep in mind, that most all web sites > > get technologically stale every single year. > > > > *Updates < 1 Year* > > Very commercial websites and youth oriented sites (MTV, > > TV shows, shampoo, fast food, bands, high-profile politicians) > > update at least every year. Many aggressive commercial sites > > change 2 or 3X a year. > > > > *1.5 - 2 Years Is Sensible, Proactive Time to Update * > > If you want to keep the website looking like it is ahead > > of the curve or at least right on the curve; the website > > could use to be updated by 1.5 years. Up to 2 years > > update time is still Okay. > > > > *3 Years Is Far End of Time to Update* > > Most standard web sites (govt., high end retail, > > associations, accountants, lawyers, real estate, furniture, > > car dealer, local radio station, local politician) start to get > > totally visually stale at about 3 years. And, of course, > > I feel even a 2-year old web site design > > is showing its age. > > > > *5 Years Is Death* > > It is common though for these types of above noted > > business entities to try to take a website design out > > to 5 years. At 5 years the old design is absolutely expired > > and is hurting the company image, not enhancing. > > > > Even a great clean corporate-look web site rigidly > > conformed to a classic design grid and using virtually no > > graphic dingbats of any kind would still need a refresh > > at about 5 years max, I think. > > > > The site width and height proportions get stale. > > Color scheme gets stale, font choices get stale. > > Even the widths of the columnar layout > > can get stale. > > > > Warmest regards, > > > > Peter Sawczynec > > Technology Dir. > > bl?studio > > 941.893.0396 > > ps at blu-studio.com > > www.blu-studio.com > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com/blog Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nynj.tech at hotmail.com Mon Mar 9 21:56:43 2009 From: nynj.tech at hotmail.com (chad qian) Date: Mon, 9 Mar 2009 21:56:43 -0400 Subject: [nycphp-talk] generate random unique 8-digit number Message-ID: Hi, I need to generate random 8-digit numbers continuously.And no duplication among all those numbers.In other word,every single 8-digit number must be unique.How to do php programming? Thanks a lots! chad _________________________________________________________________ Express your personality in color! Preview and select themes for Hotmail?. http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Mar 9 22:32:11 2009 From: ramons at gmx.net (David Krings) Date: Mon, 09 Mar 2009 22:32:11 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <49B5D12B.7050801@gmx.net> chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique.How to do php programming? > > Thanks a lots! > > chad How random are you aiming for? As far as I know none of the programming languages and computer systems have true random number generators. They all follow some algorithm that provides sufficiently random numbers, but some are generated more often then others. Another question is also how many of these numbers do you need in the given context? What you can always do is use PHP's random number generator mt_rand with the min and max value set so that you always get an 8 digit number. So that would be $random = mt_rand(10000000,99999999). What you can do is write the numbers to a table that has that field keyed or even an array. That way you get an error if it is already in the table or array. And if you get an error you go ahead and try again. I recommend to add a counter in and eitehr give up after 20 tries or wipe the table and start from scratch. Otherwise you have PHP crunching random numbers for five hours just to find the one that is still missing. Which brings me back to the question about the amount of numbers you need. Is that what you are looking for? I got most of that from Google and the PHP manual..... David From cmerlo at ncc.edu Tue Mar 10 01:52:34 2009 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Tue, 10 Mar 2009 01:52:34 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <946586480903092252r6efa0d80pfbb082226484453f@mail.gmail.com> On Mon, Mar 9, 2009 at 9:56 PM, chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique. > It is not mathematically feasible to continuously generate unique random numbers with any upper bound. They will repeat at some point. Why don't you tell us more about the problem you're trying to solve, because there's probably a much simpler solution. > How to do php programming? > That question requires a much longer answer. -c -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgabrieli at gmail.com Tue Mar 10 07:22:27 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Tue, 10 Mar 2009 08:22:27 -0300 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: the easiest: $isInUse = 0 ; while ($isInUse == 0) { $yourNumber = rand(0,9) . rand(0,9) . rand(0,9) .... (8 times) /* check here if $yourNumber is already in use and save the value in $isInUse */ } without saving the previous you will never be sure if you have duplicates best, fernando On Mon, Mar 9, 2009 at 10:56 PM, chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique.How to do php programming? > > Thanks a lots! > > chad > > ------------------------------ > Express your personality in color! Preview and select themes for Hotmail?. See > how. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Tue Mar 10 08:48:15 2009 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 10 Mar 2009 08:48:15 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <49B6618F.4020705@tgaconnect.com> chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique.How to do php programming? Change your specification to 13 characters and use the function uniqid Uniqid is driven by the system clock -- so it's granularity is a microsecond. From fgabrieli at gmail.com Tue Mar 10 09:18:09 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Tue, 10 Mar 2009 10:18:09 -0300 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B6618F.4020705@tgaconnect.com> References: <49B6618F.4020705@tgaconnect.com> Message-ID: using tim's idea: get a uniqid, convert it to numbers and shift the difference :) - get a uniqid - convert the chars to numbers using php.net/ord - use the 8 first numbers (would be an alternative to rand() for 8-digits) On Tue, Mar 10, 2009 at 9:48 AM, Tim Gales wrote: > chad qian wrote: > >> Hi, >> I need to generate random 8-digit numbers continuously.And no duplication >> among all those numbers.In other word,every single 8-digit number must be >> unique.How to do php programming? >> > Change your specification to 13 characters and use the function uniqid > > Uniqid is driven by the system clock -- so it's granularity is a > microsecond. > > > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From edwardpotter at gmail.com Tue Mar 10 11:15:35 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Tue, 10 Mar 2009 11:15:35 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: Well, it's easy. Go down to Prince & Broadway, stop the first model that walks by, then the next, etc. Ask them for a random number. Believe me you will NEVER get the same number twice. And they will never repeat! All laws of Physics go straight out the window. Even Einstein gave in. Just my 2 rupee's :-) On Mon, Mar 9, 2009 at 9:56 PM, chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique.How to do php programming? > > Thanks a lots! > > chad > > ------------------------------ > Express your personality in color! Preview and select themes for Hotmail?. See > how. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com/blog Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Tue Mar 10 11:26:52 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 10 Mar 2009 11:26:52 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: On Tue, Mar 10, 2009 at 11:15 AM, Edward Potter wrote: > > Go down to Prince & Broadway, stop the first model that walks by, then the > next, etc.? Ask them for a random number.? Believe me you will NEVER get the > same number twice. And they will never repeat! All laws of Physics go > straight out the window. Even Einstein gave in. > > Just my 2 rupee's > I asked a model how he did it, and he said he just looks at his watch and then converts to unix micro time. I said, "That's not random!" The model replied, "Yeah, but the kind of software developer who asks a model for randomness is unable to tell the difference." Add a random number to a sufficiently deep timestamp (microseconds) and you will have a non-repeating random number. But you can't shorten it to 8 characters or whatever -- you have to keep the full timestamp in order to maintain non-repeatability. From dcech at phpwerx.net Tue Mar 10 11:54:22 2009 From: dcech at phpwerx.net (Dan Cech) Date: Tue, 10 Mar 2009 11:54:22 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <49B68D2E.40803@phpwerx.net> Chris Snyder wrote: > Add a random number to a sufficiently deep timestamp (microseconds) > and you will have a non-repeating random number. But you can't shorten > it to 8 characters or whatever -- you have to keep the full timestamp > in order to maintain non-repeatability. Not really, if you add a random number then you can easily end up with 2 results that are the same unless the frequency with which you generate numbers is less than the variation you're introducing, and at that point why bother with the random number at all... It is not possible to produce a fixed-length number/string which will _never_ repeat, simply because you will run out of combinations eventually. Using 'random' values just means that you can't take the previous number and add one to determine the next unused number. If you're trying to generate relatively short pseudo-random IDs to thwart guesses, then the simplest method is going to be the previously-recommended approach of generating a random number and checking if it has already been used, rinse and repeat until you find one that has not. This will get progressively slower as the number of IDs generated grows, but is the only way you can be 100% sure of a truly random ID which will never conflict. If you go with a scheme like uuids then you can be sufficiently confident (but never 100% sure) that they are not going to repeat. However, if you try using some scheme to hash them down to 8 digits all bets are off as you're going from 16^32 down to 10^8 combinations. Dan From edwardpotter at gmail.com Tue Mar 10 12:31:59 2009 From: edwardpotter at gmail.com (Edward Potter) Date: Tue, 10 Mar 2009 12:31:59 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B68D2E.40803@phpwerx.net> References: <49B68D2E.40803@phpwerx.net> Message-ID: Even the numbers game is not random. Some lotto numbers have come up 10X then others. It's the ink on the ball. Shifts the weight. But back to reality, you can get a pretty decent random number, for all practical purposes using the tips covers in this discussion. On Tue, Mar 10, 2009 at 11:54 AM, Dan Cech wrote: > Chris Snyder wrote: > > Add a random number to a sufficiently deep timestamp (microseconds) > > and you will have a non-repeating random number. But you can't shorten > > it to 8 characters or whatever -- you have to keep the full timestamp > > in order to maintain non-repeatability. > > Not really, if you add a random number then you can easily end up with 2 > results that are the same unless the frequency with which you generate > numbers is less than the variation you're introducing, and at that point > why bother with the random number at all... > > It is not possible to produce a fixed-length number/string which will > _never_ repeat, simply because you will run out of combinations > eventually. Using 'random' values just means that you can't take the > previous number and add one to determine the next unused number. > > If you're trying to generate relatively short pseudo-random IDs to > thwart guesses, then the simplest method is going to be the > previously-recommended approach of generating a random number and > checking if it has already been used, rinse and repeat until you find > one that has not. This will get progressively slower as the number of > IDs generated grows, but is the only way you can be 100% sure of a truly > random ID which will never conflict. > > If you go with a scheme like uuids then you can be sufficiently > confident (but never 100% sure) that they are not going to repeat. > However, if you try using some scheme to hash them down to 8 digits all > bets are off as you're going from 16^32 down to 10^8 combinations. > > Dan > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com/blog Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rolan at omnistep.com Tue Mar 10 13:04:06 2009 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 10 Mar 2009 13:04:06 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B68D2E.40803@phpwerx.net> References: <49B68D2E.40803@phpwerx.net> Message-ID: <49B69D86.9050008@omnistep.com> Dan Cech wrote: > ... > > If you're trying to generate relatively short pseudo-random IDs to > thwart guesses, then the simplest method is going to be the > previously-recommended approach of generating a random number and > checking if it has already been used, rinse and repeat until you find > one that has not. This will get progressively slower as the number of > IDs generated grows, but is the only way you can be 100% sure of a truly > random ID which will never conflict. > > ... > Depending on the number of results needed, building an array of all possible combinations and then removing each when randomly selected is another option. For an 8 digit base-10 pool, the memory required would be huge. Sample code below. Can anyone calculate the break-even point at which it is faster to use this vs the random guess method mentioned above? :) ~Rolan From chsnyder at gmail.com Tue Mar 10 13:57:42 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 10 Mar 2009 13:57:42 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B68D2E.40803@phpwerx.net> References: <49B68D2E.40803@phpwerx.net> Message-ID: On Tue, Mar 10, 2009 at 11:54 AM, Dan Cech wrote: > Chris Snyder wrote: >> Add a random number to a sufficiently deep timestamp (microseconds) >> and you will have a non-repeating random number. But you can't shorten >> it to 8 characters or whatever -- you have to keep the full timestamp >> in order to maintain non-repeatability. > > Not really, if you add a random number then you can easily end up with 2 > results that are the same unless the frequency with which you generate > numbers is less than the variation you're introducing, and at that point > why bother with the random number at all... Oh yeah, I meant "concatenate" not "add". Doing something like $random = $microtime . "_" . rand( 0, 256 ); gives you non-repeating pseudo-randomness. Whether that's random enough for some applications is another issue, but it won't repeat as long as the timestamp used for $microtime doesn't roll over to 0. From ps at blu-studio.com Tue Mar 10 14:39:32 2009 From: ps at blu-studio.com (Peter Sawczynec) Date: Tue, 10 Mar 2009 14:39:32 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: <008301c9a0e7$055d4d20$1017e760$@com> Message-ID: <008201c9a1af$8f63a230$ae2ae690$@com> Google. Has undergone numerous updates to their style. Changing the logo, the favicon and adding artwork across the top 2 inches. Google allows users to customize too. Craigslist. Looks dated. Drudgereport. Looks dated. Amazon. Has made many updates to their look. Modernizing buttons, product display, text colors, column widths, etc. To follow well-timed and in tune with trends commercial updating in action. watch global corp. sites like: Sony, VW, Bugati. Look at Las Vegas casino sites. Major hotels, cruise lines, Club Med. Even never-changing websites likes Microsoft, Apple, NYTimes have undergone constant tuning to meet the shifting market tastes and style. I would pose it is still better to stay updated than to see just how long a site can look timeless. (Very few, almost none. But you could look at Tiffany.) Warmest regards, Peter Sawczynec Technology Dir. bl?studio 941.893.0396 ps at blu-studio.com www.blu-studio.com From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Edward Potter Sent: Monday, March 09, 2009 9:48 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Changing your site look - What is the norm >>> 5 Years Is Death Craigslist Drudgereport Google Still alive and kicking! 2009/3/9 Peter Sawczynec I have never read any exact rule on how often to update a website look. But, here is my opinion from my experience. First, it is important to keep in mind, that most all web sites get technologically stale every single year. Updates < 1 Year Very commercial websites and youth oriented sites (MTV, TV shows, shampoo, fast food, bands, high-profile politicians) update at least every year. Many aggressive commercial sites change 2 or 3X a year. 1.5 - 2 Years Is Sensible, Proactive Time to Update If you want to keep the website looking like it is ahead of the curve or at least right on the curve; the website could use to be updated by 1.5 years. Up to 2 years update time is still Okay. 3 Years Is Far End of Time to Update Most standard web sites (govt., high end retail, associations, accountants, lawyers, real estate, furniture, car dealer, local radio station, local politician) start to get totally visually stale at about 3 years. And, of course, I feel even a 2-year old web site design is showing its age. 5 Years Is Death It is common though for these types of above noted business entities to try to take a website design out to 5 years. At 5 years the old design is absolutely expired and is hurting the company image, not enhancing. Even a great clean corporate-look web site rigidly conformed to a classic design grid and using virtually no graphic dingbats of any kind would still need a refresh at about 5 years max, I think. The site width and height proportions get stale. Color scheme gets stale, font choices get stale. Even the widths of the columnar layout can get stale. Warmest regards, Peter Sawczynec Technology Dir. bl?studio 941.893.0396 ps at blu-studio.com www.blu-studio.com _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -- IM/iChat: ejpusa Links: http://del.icio.us/ejpusa Blog: http://www.preceptress.com/blog Follow me: http://www.twitter.com/ejpusa Karma: http://www.coderswithconscience.com Projects: http://flickr.com/photos/86842405 at N00/ Store: http://astore.amazon.com/httpwwwutopic-20 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Tue Mar 10 18:32:49 2009 From: ben at projectskyline.com (Ben Sgro) Date: Tue, 10 Mar 2009 18:32:49 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) Message-ID: <49B6EA91.90701@projectskyline.com> Hello, My PHP code is: --------------------- $xml = new DOMDocument; $xml->load($this->_payload); $xsltProcessor = new XsltProcessor(); $xsl = new DomDocument; $xsl->load('../lib/Transformations/text.xsl'); $xsltProcessor->importStylesheet($xsl); $result = $xsltProcessor->transformToXml($xml); return $result; My XSL is: -------------- And my XML is: --------------------- The $result is: ----------------- So, as you can see the AccountNumber is missing. This XSL/XML works fine in Author (XML Tool). Any ideas why this would fail? Also, the Xpath (//DataItem[@name='AccountNumber']/@value) works if I make the XML a simpleXML object and call xpath on it. Thanks for your help! - Ben From tgales at tgaconnect.com Tue Mar 10 19:23:56 2009 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 10 Mar 2009 19:23:56 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: <49B68D2E.40803@phpwerx.net> Message-ID: <49B6F68C.7070208@tgaconnect.com> Chris Snyder wrote: > > Doing something like $random = $microtime . "_" . rand( 0, 256 ); > gives you non-repeating pseudo-randomness. md5(uniqid(rand(), true)) // as suggested in the manual is harder to guess -- but now you're talkin' 32 chars. (as usual it depends on what you're tryin' to do) -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From JoeyD473 at nyc.rr.com Tue Mar 10 23:39:04 2009 From: JoeyD473 at nyc.rr.com (Joey Derrico) Date: Tue, 10 Mar 2009 23:39:04 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <49B73258.1070105@nyc.rr.com> One possibility would be to make a DB table with 2 columns. One where each row has a value from 00000000 through 99999999, and the other column marked as for used. When you need to generate the random number you can query the database for each # not currently used and select randomly from the values not in use and just update the DB to mark it as used so it won't come up again. You won't have repeating numbers then. However it will slow down your application because that is a lot of rows to go through. Joey Derrico chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication among all those numbers.In other word,every single 8-digit > number must be unique.How to do php programming? > > Thanks a lots! > > chad > > ------------------------------------------------------------------------ > Express your personality in color! Preview and select themes for > Hotmail?. See how. > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From artur at marnik.net Wed Mar 11 04:12:04 2009 From: artur at marnik.net (Artur Marnik) Date: Wed, 11 Mar 2009 04:12:04 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B73258.1070105@nyc.rr.com> References: <49B73258.1070105@nyc.rr.com> Message-ID: <49B77254.7010102@marnik.net> Joey Derrico wrote: > One possibility would be to make a DB table with 2 columns. One where > each row has a value from 00000000 through 99999999, and the other > column marked as for used. When you need to generate the random number > you can query the database for each # not currently used and select > randomly from the values not in use and just update the DB to mark it > as used so it won't come up again. You won't have repeating numbers > then. However it will slow down your application because that is a lot > of rows to go through. > > Joey Derrico actually query like: select id, rand_number from rand_numbers where used = '0' limit 1; and then: update rand_numbers set used = '1' where id = '$row['id']' will be very fast even if table has millions of entries only generating the numbers will be slow but you have to run it only once also make sure to lock the table before and unlock after so you don't have two users selecting the same entry this solution is good only if you know how many random number you will need another way is to use two tables - prefix and then rand_numbers prefix has only one entry and you concat it with value selected from second table after you run out of random numbers you just have to empty random_numbers table and regenerate values and change prefix to something else but it is all complicated and I will just use old good md5(uniqid(rand(), true)) if possible Artur From ioplex at gmail.com Wed Mar 11 02:25:35 2009 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 11 Mar 2009 02:25:35 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: Message-ID: <78c6bd860903102325x502017bbjddae8d151db9177e@mail.gmail.com> On Mon, Mar 9, 2009 at 9:56 PM, chad qian wrote: > Hi, > I need to generate random 8-digit numbers continuously.And no > duplication?among?all those numbers.In other word,every single 8-digit > number?must be?unique.How to do php programming? Just to give a little different answer from what people are suggesting you could use a sequence number and then apply a routine that just rotates and move bits around in constant way. This will guarantee that the number is unique without using a database (although I guess you still need a source of the sequence number so you need to store that somewhere). For example, you could do something like this: function reverse_bits($v) { $t = $v << 1; $v >>= 1; $v &= 0x7FFFFFFF; for ($i = 30; $i > 0; $i--) { $t |= $v & 1; $t <<= 1; $v >>= 1; } $t |= $v; return $t; } function scramble($num) { $num = reverse_bits($num); return $num ^ 0xFEEDB0A5; } So you feed the scramble function a sequence of numbers like 10, 11, 12, ... etc and get out a number that looks random. Of course it's not random. It only looks random. In fact, if you feed the scrambled number back through the scramble routine you'll get back the original sequence number. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From ps at blu-studio.com Wed Mar 11 05:30:57 2009 From: ps at blu-studio.com (Peter Sawczynec) Date: Wed, 11 Mar 2009 05:30:57 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B6EA91.90701@projectskyline.com> References: <49B6EA91.90701@projectskyline.com> Message-ID: <001a01c9a22c$160ef6f0$422ce4d0$@com> In your XSL styleshhet looks to me like you are matching on an element called "Data" while the XML has an element called "DataItem". And in your XPATH sample that gets a result you check for the element "DataItem". Warmest regards, ? Peter Sawczynec Technology Dir. bl?studio 941.893.0396 ps at blu-studio.com www.blu-studio.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro Sent: Tuesday, March 10, 2009 6:33 PM To: NYPHP Talk Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) Hello, My PHP code is: --------------------- $xml = new DOMDocument; $xml->load($this->_payload); $xsltProcessor = new XsltProcessor(); $xsl = new DomDocument; $xsl->load('../lib/Transformations/text.xsl'); $xsltProcessor->importStylesheet($xsl); $result = $xsltProcessor->transformToXml($xml); return $result; My XSL is: -------------- And my XML is: --------------------- The $result is: ----------------- So, as you can see the AccountNumber is missing. This XSL/XML works fine in Author (XML Tool). Any ideas why this would fail? Also, the Xpath (//DataItem[@name='AccountNumber']/@value) works if I make the XML a simpleXML object and call xpath on it. Thanks for your help! - Ben _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From jcampbell1 at gmail.com Wed Mar 11 10:28:28 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 11 Mar 2009 10:28:28 -0400 Subject: [nycphp-talk] Apache is killing me. Message-ID: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> I am having an intermittent issue where Apache just craps out. It seems to happen in the middle of the night for no reason. It crapped out twice in December, and again last night. I have no idea what the issue is. There is nothing in the error log. Restarting apache fixes the problem. Does anyone have any ideas or suggestions? Regards, John Campbell From yitzchas at touro.edu Wed Mar 11 10:49:30 2009 From: yitzchas at touro.edu (Yitzchak Schaffer) Date: Wed, 11 Mar 2009 10:49:30 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> Message-ID: <49B7CF7A.5050106@touro.edu> John Campbell wrote: > I am having an intermittent issue where Apache just craps out. It > seems to happen in the middle of the night for no reason. It crapped > out twice in December, and again last night. I have no idea what the > issue is. There is nothing in the error log. Restarting apache fixes > the problem. Hrmm, did you check the server's log files from the time of the crash/shutdown? What's the OS? Perhaps also try posting to http://httpd.apache.org/userslist.html -- Yitzchak Schaffer Systems Librarian Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x5230 Fax (212) 627-3197 yitzchas at touro.edu From rmarscher at beaffinitive.com Wed Mar 11 11:13:44 2009 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Wed, 11 Mar 2009 11:13:44 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <49B7CF7A.5050106@touro.edu> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> Message-ID: <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> John Campbell wrote: > I am having an intermittent issue where Apache just craps out. It > seems to happen in the middle of the night for no reason. It crapped > out twice in December, and again last night. I have no idea what the > issue is. There is nothing in the error log. Restarting apache fixes > the problem. Is it running but not processing requests? Or is it no longer running? Maybe it's rotating log files but doesn't start back up properly? Otherwise, maybe some type of odd segmentation fault? On Mar 11, 2009, at 10:49 AM, Yitzchak Schaffer wrote: > Hrmm, did you check the server's log files from the time of the > crash/shutdown? What's the OS? Yeah, syslog might have something. From tom at supertom.com Wed Mar 11 11:08:04 2009 From: tom at supertom.com (Tom Melendez) Date: Wed, 11 Mar 2009 08:08:04 -0700 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <49B7CF7A.5050106@touro.edu> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> Message-ID: <117286890903110808w6e2ac73u458624ab8f051bc3@mail.gmail.com> > John Campbell wrote: >> >> I am having an intermittent issue where Apache just craps out. ?It >> seems to happen in the middle of the night for no reason. ?It crapped >> out twice in December, and again last night. ?I have no idea what the >> issue is. ?There is nothing in the error log. ?Restarting apache fixes >> the problem. Any cron jobs/backup running at that time? How about log rotation? Is the process still running and the ports just aren't accessible? Tom http://www.liphp.org From ben at projectskyline.com Wed Mar 11 11:16:52 2009 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 11 Mar 2009 11:16:52 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <001a01c9a22c$160ef6f0$422ce4d0$@com> References: <49B6EA91.90701@projectskyline.com> <001a01c9a22c$160ef6f0$422ce4d0$@com> Message-ID: <49B7D5E4.5000100@projectskyline.com> Hey Peter, The Data you are speaking about is what is created - not what is being xpathed. see: Thanks, - Ben Peter Sawczynec wrote: > In your XSL styleshhet looks to me like you are matching on an element > called "Data" while the XML has an element called "DataItem". And in > your XPATH sample that gets a result you check for the element > "DataItem". > > Warmest regards, > > Peter Sawczynec > Technology Dir. > bl?studio > 941.893.0396 > ps at blu-studio.com > www.blu-studio.com > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Ben Sgro > Sent: Tuesday, March 10, 2009 6:33 PM > To: NYPHP Talk > Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) > > Hello, > > My PHP code is: > --------------------- > > $xml = new DOMDocument; > $xml->load($this->_payload); > > $xsltProcessor = new XsltProcessor(); > $xsl = new DomDocument; > $xsl->load('../lib/Transformations/text.xsl'); > > $xsltProcessor->importStylesheet($xsl); > $result = $xsltProcessor->transformToXml($xml); > > return $result; > > > My XSL is: > -------------- > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > xmlns="http://www.w3.org/1999/xhtml" > > > > > select="//DataItem[@name='AccountNumber']/@value"/> > > > > > > > And my XML is: > --------------------- > > submitDateTime="2009-01-12T17:32:46"> > > > > > > The $result is: > ----------------- > > > xmlns="http://www.w3.org/1999/xhtml"> ta> > > So, as you can see the AccountNumber is missing. This XSL/XML works fine > > in Author (XML Tool). > Any ideas why this would fail? Also, the Xpath > (//DataItem[@name='AccountNumber']/@value) works > if I make the XML a simpleXML object and call xpath on it. > > Thanks for your help! > > - Ben > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From anthony at thrillist.com Wed Mar 11 11:25:48 2009 From: anthony at thrillist.com (Anthony Wlodarski) Date: Wed, 11 Mar 2009 08:25:48 -0700 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> Message-ID: When I am dealing with Apache issues I execute "apachectl status". Here is an example of the output: ash-3.00# ./apachectl status Apache Server Status for localhost Server Version: Apache/2 Server Built: Feb 14 2008 00:53:14 _________________________________________________________________ Current Time: Wednesday, 11-Mar-2009 11:19:24 EDT Restart Time: Wednesday, 11-Mar-2009 00:14:05 EDT Parent Server Generation: 0 Server uptime: 11 hours 5 minutes 18 seconds Total accesses: 722 - Total Traffic: 8.1 MB CPU Usage: u2.68 s1.13 cu.91 cs0 - .0118% CPU load .0181 requests/sec - 211 B/second - 11.4 kB/request 1 requests currently being processed, 14 idle workers W_________._____................................................ ................................................................ ................................................................ ................................................................ Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process So you can see what is going if it restarted on its own in addition to what it is currently processing. (apachectl is usually in /usr/sbin). In addition to syslog if Apache is just faulting I would check "error_log" (usually located in "/var/log/httpd"). Hope this helps. -- Anthony Wlodarski www.thrillist.com Web Applications Developer 568 Broadway Ste. 605 New York, NY, 10012 (o) 646.786.1944 ________________________________ From: John Campbell Reply-To: NYPHP Talk Date: Wed, 11 Mar 2009 07:28:28 -0700 To: Subject: [nycphp-talk] Apache is killing me. I am having an intermittent issue where Apache just craps out. It seems to happen in the middle of the night for no reason. It crapped out twice in December, and again last night. I have no idea what the issue is. There is nothing in the error log. Restarting apache fixes the problem. Does anyone have any ideas or suggestions? Regards, John Campbell _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Wed Mar 11 11:36:31 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 11 Mar 2009 11:36:31 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> Message-ID: On Wed, Mar 11, 2009 at 10:28 AM, John Campbell wrote: > I am having an intermittent issue where Apache just craps out. ?It > seems to happen in the middle of the night for no reason. ?It crapped > out twice in December, and again last night. ?I have no idea what the > issue is. ?There is nothing in the error log. ?Restarting apache fixes > the problem. > > Does anyone have any ideas or suggestions? > > Regards, > John Campbell Definitely check the logs to see what was being requested at the time. Sometimes a search bot finds it's way into dynamic pages and goes crazy, but you could also have something that is being exploited to crash Apache and create a denial of service or worse. If you are running an out-of-date version of Apache or PHP or anything else that is being handled by Apache, it's probably time to upgrade. You might also have a memory leak somewhere in your code, or a "forever" loop that traps the server process in an unending cycle. Do you have some way of watching/logging memory usage? Setting MaxRequestsPerChild to a low value can be a temporary workaround for memory-related issues, at the expense of overall performance. Chris Snyder http://chxor.chxo.com/ From jcampbell1 at gmail.com Wed Mar 11 11:58:50 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 11 Mar 2009 11:58:50 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> Message-ID: <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> On Wed, Mar 11, 2009 at 11:13 AM, Rob Marscher wrote: > Is it running but not processing requests? ?Or is it no longer running? > ?Maybe it's rotating log files but doesn't start back up properly? > ?Otherwise, maybe some type of odd segmentation fault? I am pretty sure it is running, but as soon as I found the issue, I restarted it immediately, so I can't say for sure. There is nothing in either the syslog or apache logs that is illuminating. The only thing that is obvious is the lack anything in the logs during the time apache was not working. I rotate the logs manually (probably not the best idea), but it can't be a log rotate issue. Any advice on what I should do before restarting apache the next time it happens? > On Mar 11, 2009, at 10:49 AM, Yitzchak Schaffer wrote: >> >> Hrmm, did you check the server's log files from the time of the >> crash/shutdown? ?What's the OS? > > Yeah, syslog might have something. Nothing unusual there. From ajai at bitblit.net Wed Mar 11 12:59:42 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 11 Mar 2009 12:59:42 -0400 (EDT) Subject: [nycphp-talk] Apache is killing me. In-Reply-To: Message-ID: On Wed, 11 Mar 2009, Anthony Wlodarski wrote: > When I am dealing with Apache issues I execute "apachectl status". I believe that only works if you have server-info enabled, right? -- Aj. From ajai at bitblit.net Wed Mar 11 13:12:22 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 11 Mar 2009 13:12:22 -0400 (EDT) Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> Message-ID: On Wed, 11 Mar 2009, John Campbell wrote: > I rotate the logs manually (probably not the best idea), but it can't > be a log rotate issue. Do you have your error logs separate from your access logs? For each vhost? -- Aj. From ioplex at gmail.com Wed Mar 11 13:26:15 2009 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 11 Mar 2009 13:26:15 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> Message-ID: <78c6bd860903111026o4351f8dej9b8ed46ee56c426e@mail.gmail.com> On Wed, Mar 11, 2009 at 11:58 AM, John Campbell wrote: > On Wed, Mar 11, 2009 at 11:13 AM, Rob Marscher > wrote: > >> Is it running but not processing requests? ?Or is it no longer running? >> ?Maybe it's rotating log files but doesn't start back up properly? >> ?Otherwise, maybe some type of odd segmentation fault? > > I am pretty sure it is running, but as soon as I found the issue, I > restarted it immediately, so I can't say for sure. ?There is nothing > in either the syslog or apache logs that is illuminating. ?The only > thing that is obvious is the lack anything in the logs during the time > apache was not working. > > I rotate the logs manually (probably not the best idea), but it can't > be a log rotate issue. What is the platform? Is it Linux? Are workers dying? Run: # ps fax | grep httpd before and during and after the problem to see if workers are actually running. If they are running (as opposed to crashing) then use tcpdump and WireShark to find out what port the browser is using. Can the browser even establish a socket? If yes, note the port number. Then (quickly) use lsof to determine which process the socket is connected to like: # lsof | grep Then run gdb on that pid like: # gdb /usr/sbin/httpd This will load symbols and give you a prompt. Then type 'bt' for a backtrace. If you don't know how to interpret the backtrace, post it here. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From tegwe002 at umn.edu Wed Mar 11 14:17:22 2009 From: tegwe002 at umn.edu (Joelle Tegwen) Date: Wed, 11 Mar 2009 13:17:22 -0500 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B6EA91.90701@projectskyline.com> References: <49B6EA91.90701@projectskyline.com> Message-ID: <49B80032.6010409@umn.edu> This worked for me. PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 $xml =<< XML; $xsl =<< XSL; Ben Sgro wrote: > Hello, > > My PHP code is: > --------------------- > > $xml = new DOMDocument; > $xml->load($this->_payload); > $xsltProcessor = new XsltProcessor(); > $xsl = new DomDocument; > $xsl->load('../lib/Transformations/text.xsl'); > $xsltProcessor->importStylesheet($xsl); > $result = $xsltProcessor->transformToXml($xml); > return $result; > > > My XSL is: > -------------- > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > xmlns="http://www.w3.org/1999/xhtml" > > > > > select="//DataItem[@name='AccountNumber']/@value"/> > > > > > > > And my XML is: > --------------------- > > submitDateTime="2009-01-12T17:32:46"> > > > > > > The $result is: > ----------------- > > > xmlns="http://www.w3.org/1999/xhtml"> > > > So, as you can see the AccountNumber is missing. This XSL/XML works > fine in Author (XML Tool). > Any ideas why this would fail? Also, the Xpath > (//DataItem[@name='AccountNumber']/@value) works > if I make the XML a simpleXML object and call xpath on it. > > Thanks for your help! > > - Ben > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From y2rob at aol.com Wed Mar 11 14:33:32 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Wed, 11 Mar 2009 14:33:32 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <78c6bd860903111026o4351f8dej9b8ed46ee56c426e@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com><49B7CF7A.5050106@touro.edu><12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com><8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> <78c6bd860903111026o4351f8dej9b8ed46ee56c426e@mail.gmail.com> Message-ID: <8CB708F03811B8D-2E8-F09@WEBMAIL-MB10.sysops.aol.com> hello, i might suggest using: http://mmonit.com/monit/ or http://god.rubyforge.org/ - though this requires having ruby on your server so monit might be better :) to help with the server monitoring and trigger notifications if you want. ~rob -----Original Message----- From: Michael B Allen To: NYPHP Talk Sent: Wed, 11 Mar 2009 1:26 pm Subject: Re: [nycphp-talk] Apache is killing me. On Wed, Mar 11, 2009 at 11:58 AM, John Campbell wrote: > On Wed, Mar 11, 2009 at 11:13 AM, Rob Marscher > wrote: > >> Is it running but not processing requests? ?Or is it no longer running? >> ?Maybe it's rotating log files but doesn't start back up properly? >> ?Otherwise, maybe some type of odd segmentation fault? > > I am pretty sure it is running, but as soon as I found the issue, I > restarted it immediately, so I can't say for sure. ?There is nothing > in either the syslog or apache logs that is illuminating. ?The only > thing that is obvious is the lack anything in the logs during the time > apache was not working. > > I rotate the logs manually (probably not the best idea), but it can't > be a log rotate issue. What is the platform? Is it Linux? Are workers dying? Run: # ps fax | grep httpd before and during and after the problem to see if workers are actually running. If they are running (as opposed to crashing) then use tcpdump and WireShark to find out what port the browser is using. Can the browser even establish a socket? If yes, note the port number. Then (quickly) use lsof to determine which process the socket is connected to like: # lsof | grep Then run gdb on that pid like: # gdb /usr/sbin/httpd This will load symbols and give you a prompt. Then type 'bt' for a backtrace. If you don't know how to interpret the backtrace, post it here. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at projectskyline.com Wed Mar 11 14:40:46 2009 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 11 Mar 2009 14:40:46 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B80032.6010409@umn.edu> References: <49B6EA91.90701@projectskyline.com> <49B80032.6010409@umn.edu> Message-ID: <49B805AE.4000608@projectskyline.com> Thanks for the feedback The error was super simple: $xml = new DOMDocument; $xml->loadXML($this->_payload); $xsl = new DOMDocument; $xsl->load($this->_filePath); $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); return $proc->transformToXML($xml); I was calling load(STRING) vs loadXML(STRING), so when it attempting to transform the XML, it (the dom doc) was empty - it didn't load the xml string data. Too bad it doesn't throw an error or exception if an argument is incorrect. - Ben Joelle Tegwen wrote: > This worked for me. PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 > > $xml =<< submitDateTime="2009-01-12T17:32:46"> > > > XML; > > $xsl =<< xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > xmlns="http://www.w3.org/1999/xhtml"> > > > > > > > > > XSL; > > > Ben Sgro wrote: >> Hello, >> >> My PHP code is: >> --------------------- >> >> $xml = new DOMDocument; >> $xml->load($this->_payload); $xsltProcessor = >> new XsltProcessor(); >> $xsl = new DomDocument; >> $xsl->load('../lib/Transformations/text.xsl'); >> $xsltProcessor->importStylesheet($xsl); >> $result = $xsltProcessor->transformToXml($xml); >> return $result; >> >> >> My XSL is: >> -------------- >> >> >> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >> xmlns="http://www.w3.org/1999/xhtml" >> > >> >> >> > select="//DataItem[@name='AccountNumber']/@value"/> >> >> >> >> >> >> >> And my XML is: >> --------------------- >> >> > submitDateTime="2009-01-12T17:32:46"> >> >> >> >> >> >> The $result is: >> ----------------- >> >> >> > xmlns="http://www.w3.org/1999/xhtml"> >> >> >> So, as you can see the AccountNumber is missing. This XSL/XML works >> fine in Author (XML Tool). >> Any ideas why this would fail? Also, the Xpath >> (//DataItem[@name='AccountNumber']/@value) works >> if I make the XML a simpleXML object and call xpath on it. >> >> Thanks for your help! >> >> - Ben >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From tegwe002 at umn.edu Wed Mar 11 14:57:15 2009 From: tegwe002 at umn.edu (Joelle Tegwen) Date: Wed, 11 Mar 2009 13:57:15 -0500 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B805AE.4000608@projectskyline.com> References: <49B6EA91.90701@projectskyline.com> <49B80032.6010409@umn.edu> <49B805AE.4000608@projectskyline.com> Message-ID: <49B8098B.3080808@umn.edu> Yeah, I've found this to be fairly cumbersome. I use it a lot so I wrote a class that wraps this functionality. I can pass in any kind of xml (DomDocument, SimpleXMLElement, string, file locaiton, etc) and it just handles it all for me. BTW - unless you need it // is relatively expensive in xslt. You should use relative paths whenever possible. Glad you figured it out. Joelle Ben Sgro wrote: > Thanks for the feedback > > The error was super simple: > > $xml = new DOMDocument; > $xml->loadXML($this->_payload); > > $xsl = new DOMDocument; > $xsl->load($this->_filePath); > > $proc = new XSLTProcessor; > $proc->importStyleSheet($xsl); > return $proc->transformToXML($xml); > I was calling load(STRING) vs loadXML(STRING), so when it attempting > to transform the XML, it (the dom doc) was empty - it didn't load the > xml string data. > Too bad it doesn't throw an error or exception if an argument is > incorrect. > > - Ben > > Joelle Tegwen wrote: >> This worked for me. PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 >> >> $xml =<<> > submitDateTime="2009-01-12T17:32:46"> >> >> >> XML; >> >> $xsl =<<> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >> xmlns="http://www.w3.org/1999/xhtml"> >> >> >> >> >> >> >> >> >> XSL; >> >> >> Ben Sgro wrote: >>> Hello, >>> >>> My PHP code is: >>> --------------------- >>> >>> $xml = new DOMDocument; >>> $xml->load($this->_payload); $xsltProcessor = >>> new XsltProcessor(); >>> $xsl = new DomDocument; >>> $xsl->load('../lib/Transformations/text.xsl'); >>> $xsltProcessor->importStylesheet($xsl); >>> $result = $xsltProcessor->transformToXml($xml); >>> return $result; >>> >>> >>> My XSL is: >>> -------------- >>> >>> >>> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >>> xmlns="http://www.w3.org/1999/xhtml" >>> > >>> >>> >>> >> select="//DataItem[@name='AccountNumber']/@value"/> >>> >>> >>> >>> >>> >>> >>> And my XML is: >>> --------------------- >>> >>> >> submitDateTime="2009-01-12T17:32:46"> >>> >>> >>> >>> >>> >>> The $result is: >>> ----------------- >>> >>> >>> >> xmlns="http://www.w3.org/1999/xhtml"> >>> >>> >>> So, as you can see the AccountNumber is missing. This XSL/XML works >>> fine in Author (XML Tool). >>> Any ideas why this would fail? Also, the Xpath >>> (//DataItem[@name='AccountNumber']/@value) works >>> if I make the XML a simpleXML object and call xpath on it. >>> >>> Thanks for your help! >>> >>> - Ben >>> _______________________________________________ >>> New York PHP User Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/show_participation.php >>> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From ben at projectskyline.com Wed Mar 11 15:13:54 2009 From: ben at projectskyline.com (Ben Sgro) Date: Wed, 11 Mar 2009 15:13:54 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B8098B.3080808@umn.edu> References: <49B6EA91.90701@projectskyline.com> <49B80032.6010409@umn.edu> <49B805AE.4000608@projectskyline.com> <49B8098B.3080808@umn.edu> Message-ID: <49B80D72.6010900@projectskyline.com> Hey Joelle, Thanks - care to share the class? I'll reconsider the XSL - thanks. - Ben Joelle Tegwen wrote: > Yeah, I've found this to be fairly cumbersome. I use it a lot so I > wrote a class that wraps this functionality. I can pass in any kind of > xml (DomDocument, SimpleXMLElement, string, file locaiton, etc) and it > just handles it all for me. > > BTW - unless you need it // is relatively expensive in xslt. You > should use relative paths whenever possible. > > Glad you figured it out. > Joelle > > Ben Sgro wrote: >> Thanks for the feedback >> >> The error was super simple: >> >> $xml = new DOMDocument; >> $xml->loadXML($this->_payload); >> >> $xsl = new DOMDocument; >> $xsl->load($this->_filePath); >> >> $proc = new XSLTProcessor; >> $proc->importStyleSheet($xsl); >> return $proc->transformToXML($xml); I was calling >> load(STRING) vs loadXML(STRING), so when it attempting to transform >> the XML, it (the dom doc) was empty - it didn't load the xml string >> data. >> Too bad it doesn't throw an error or exception if an argument is >> incorrect. >> >> - Ben >> >> Joelle Tegwen wrote: >>> This worked for me. PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 >>> >>> $xml =<<>> >> submitDateTime="2009-01-12T17:32:46"> >>> >>> >>> XML; >>> >>> $xsl =<<>> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >>> xmlns="http://www.w3.org/1999/xhtml"> >>> >>> >>> >>> >>> >>> >>> >>> >>> XSL; >>> >>> >>> Ben Sgro wrote: >>>> Hello, >>>> >>>> My PHP code is: >>>> --------------------- >>>> >>>> $xml = new DOMDocument; >>>> $xml->load($this->_payload); $xsltProcessor = >>>> new XsltProcessor(); >>>> $xsl = new DomDocument; >>>> $xsl->load('../lib/Transformations/text.xsl'); >>>> $xsltProcessor->importStylesheet($xsl); >>>> $result = $xsltProcessor->transformToXml($xml); >>>> return $result; >>>> >>>> >>>> My XSL is: >>>> -------------- >>>> >>>> >>>> >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> > >>>> >>>> >>>> >>> select="//DataItem[@name='AccountNumber']/@value"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> And my XML is: >>>> --------------------- >>>> >>>> >>> submitDateTime="2009-01-12T17:32:46"> >>>> >>>> >>>> >>>> >>>> >>>> The $result is: >>>> ----------------- >>>> >>>> >>>> >>> xmlns="http://www.w3.org/1999/xhtml"> >>>> >>>> >>>> So, as you can see the AccountNumber is missing. This XSL/XML works >>>> fine in Author (XML Tool). >>>> Any ideas why this would fail? Also, the Xpath >>>> (//DataItem[@name='AccountNumber']/@value) works >>>> if I make the XML a simpleXML object and call xpath on it. >>>> >>>> Thanks for your help! >>>> >>>> - Ben >>>> _______________________________________________ >>>> New York PHP User Group Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> >>>> http://www.nyphp.org/show_participation.php >>>> >>> _______________________________________________ >>> New York PHP User Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/show_participation.php >>> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From tegwe002 at umn.edu Wed Mar 11 15:31:42 2009 From: tegwe002 at umn.edu (Joelle Tegwen) Date: Wed, 11 Mar 2009 14:31:42 -0500 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B80D72.6010900@projectskyline.com> References: <49B6EA91.90701@projectskyline.com> <49B80032.6010409@umn.edu> <49B805AE.4000608@projectskyline.com> <49B8098B.3080808@umn.edu> <49B80D72.6010900@projectskyline.com> Message-ID: <49B8119E.1070802@umn.edu> It's not quite where I would like it to be, but here it is. I included my custom Exception class, but it extends another, which I did not include. So you'll want to do something with that first. Improvements welcome. :) Hope this helps. Joelle Ben Sgro wrote: > Hey Joelle, > > Thanks - care to share the class? > > I'll reconsider the XSL - thanks. > > - Ben > > Joelle Tegwen wrote: >> Yeah, I've found this to be fairly cumbersome. I use it a lot so I >> wrote a class that wraps this functionality. I can pass in any kind >> of xml (DomDocument, SimpleXMLElement, string, file locaiton, etc) >> and it just handles it all for me. >> >> BTW - unless you need it // is relatively expensive in xslt. You >> should use relative paths whenever possible. >> >> Glad you figured it out. >> Joelle >> >> Ben Sgro wrote: >>> Thanks for the feedback >>> >>> The error was super simple: >>> >>> $xml = new DOMDocument; >>> $xml->loadXML($this->_payload); >>> >>> $xsl = new DOMDocument; >>> $xsl->load($this->_filePath); >>> >>> $proc = new XSLTProcessor; >>> $proc->importStyleSheet($xsl); >>> return $proc->transformToXML($xml); I was calling >>> load(STRING) vs loadXML(STRING), so when it attempting to transform >>> the XML, it (the dom doc) was empty - it didn't load the xml string >>> data. >>> Too bad it doesn't throw an error or exception if an argument is >>> incorrect. >>> >>> - Ben >>> >>> Joelle Tegwen wrote: >>>> This worked for me. PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 >>>> >>>> $xml =<<>>> >>> submitDateTime="2009-01-12T17:32:46"> >>>> >>>> >>>> XML; >>>> >>>> $xsl =<<>>> >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >>>> xmlns="http://www.w3.org/1999/xhtml"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> XSL; >>>> >>>> >>>> Ben Sgro wrote: >>>>> Hello, >>>>> >>>>> My PHP code is: >>>>> --------------------- >>>>> >>>>> $xml = new DOMDocument; >>>>> $xml->load($this->_payload); $xsltProcessor >>>>> = new XsltProcessor(); >>>>> $xsl = new DomDocument; >>>>> $xsl->load('../lib/Transformations/text.xsl'); >>>>> $xsltProcessor->importStylesheet($xsl); >>>>> $result = $xsltProcessor->transformToXml($xml); >>>>> return $result; >>>>> >>>>> >>>>> My XSL is: >>>>> -------------- >>>>> >>>>> >>>>> >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>> > >>>>> >>>>> >>>>> >>>> select="//DataItem[@name='AccountNumber']/@value"/> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> And my XML is: >>>>> --------------------- >>>>> >>>>> >>>> submitDateTime="2009-01-12T17:32:46"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> The $result is: >>>>> ----------------- >>>>> >>>>> >>>>> >>>> xmlns="http://www.w3.org/1999/xhtml"> >>>>> >>>>> >>>>> So, as you can see the AccountNumber is missing. This XSL/XML >>>>> works fine in Author (XML Tool). >>>>> Any ideas why this would fail? Also, the Xpath >>>>> (//DataItem[@name='AccountNumber']/@value) works >>>>> if I make the XML a simpleXML object and call xpath on it. >>>>> >>>>> Thanks for your help! >>>>> >>>>> - Ben >>>>> _______________________________________________ >>>>> New York PHP User Group Community Talk Mailing List >>>>> http://lists.nyphp.org/mailman/listinfo/talk >>>>> >>>>> http://www.nyphp.org/show_participation.php >>>>> >>>> _______________________________________________ >>>> New York PHP User Group Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> >>>> http://www.nyphp.org/show_participation.php >>>> >>> _______________________________________________ >>> New York PHP User Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/show_participation.php >>> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- A non-text attachment was scrubbed... Name: XMLTransformation.zip Type: application/zip Size: 2323 bytes Desc: not available URL: From vtbludgeon at gmail.com Wed Mar 11 15:46:09 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Wed, 11 Mar 2009 15:46:09 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <008201c9a1af$8f63a230$ae2ae690$@com> References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> Message-ID: <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> Cragislist has got to be considered a special case. They clearly pride themselves on looking as ugly and boring as possible. 2009/3/10 Peter Sawczynec > [...] > > *Craigslist.* Looks dated. > > > -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From jstevison at me.com Wed Mar 11 15:52:07 2009 From: jstevison at me.com (Jeffrey Stevison) Date: Wed, 11 Mar 2009 13:52:07 -0600 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> Message-ID: <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> On Mar 11, 2009, at 1:46 PM, David Mintz wrote: > Cragislist has got to be considered a special case. They clearly > pride themselves on looking as ugly and boring as possible. > > 2009/3/10 Peter Sawczynec > [...] > Craigslist. Looks dated. > Amen. I think Craigslist is pretty bad design and could use better navigation for sure. They are not so popular because of their design. They are so popular because it's a free place to sell items for most people. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgabrieli at gmail.com Wed Mar 11 16:51:33 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Wed, 11 Mar 2009 17:51:33 -0300 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> Message-ID: its probably a new topic, why a site is successful where others dont event get 1 comment posted...why craiglist was successful? On Wed, Mar 11, 2009 at 4:52 PM, Jeffrey Stevison wrote: > > On Mar 11, 2009, at 1:46 PM, David Mintz wrote: > > Cragislist has got to be considered a special case. They clearly pride > themselves on looking as ugly and boring as possible. > > 2009/3/10 Peter Sawczynec > >> [...] >> >> *Craigslist.* Looks dated. >> > Amen. I think Craigslist is pretty bad design and could use better > navigation for sure. They are not so popular because of their design. They > are so popular because it's a free place to sell items for most people. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgabrieli at gmail.com Wed Mar 11 16:54:31 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Wed, 11 Mar 2009 17:54:31 -0300 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: Message-ID: it depends, for web 2.0 sites the tendency is to update changes very fast and see what happens with the community other sites are updated periodically (defined by the admin) whenever there are important changes news sections are updated very often, contact sections may never be updated it depends on the client/public and the information best, fernando On Mon, Mar 9, 2009 at 12:12 PM, N?stor wrote: > Hi people, > > I was wondering if there is a norm of how often a corporate or goverment > site should be redone. > Is there such rule? > > Thanks, > > Nestor :-) > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgabrieli at gmail.com Wed Mar 11 17:01:17 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Wed, 11 Mar 2009 18:01:17 -0300 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B77254.7010102@marnik.net> References: <49B73258.1070105@nyc.rr.com> <49B77254.7010102@marnik.net> Message-ID: dont forget that md5($anyString) can return two hashes with the same value (if you have a db with 1,000,000 entries using this, it may happen) best, fernando On Wed, Mar 11, 2009 at 5:12 AM, Artur Marnik wrote: > Joey Derrico wrote: > >> One possibility would be to make a DB table with 2 columns. One where each >> row has a value from 00000000 through 99999999, and the other column marked >> as for used. When you need to generate the random number you can query the >> database for each # not currently used and select randomly from the values >> not in use and just update the DB to mark it as used so it won't come up >> again. You won't have repeating numbers then. However it will slow down your >> application because that is a lot of rows to go through. >> >> Joey Derrico >> > > actually query like: > select id, rand_number from rand_numbers where used = '0' limit 1; > and then: > update rand_numbers set used = '1' where id = '$row['id']' > > will be very fast even if table has millions of entries > only generating the numbers will be slow but you have to run it only once > > also make sure to lock the table before and unlock after so you don't have > two users selecting the same entry > > this solution is good only if you know how many random number you will need > another way is to use two tables - prefix and then rand_numbers > prefix has only one entry and you concat it with value selected from second > table > after you run out of random numbers you just have to empty random_numbers > table and regenerate values and change prefix to something else > > but it is all complicated and I will just use old good md5(uniqid(rand(), > true)) if possible > > Artur > > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Wed Mar 11 17:26:25 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Wed, 11 Mar 2009 17:26:25 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> Message-ID: <49B82C81.2010201@devonianfarm.com> Fernando Gabrieli wrote: > its probably a new topic, why a site is successful where others dont > event get 1 comment posted...why craiglist was successful? > That's a big question. Many successful sites have bodies buried somewhere. Up until 2002 or so, it was possible to launch new community sites with e-mail spam campaigns. If you tried to do that today you'd have servers, ip addresses, really anything associated with the operation burned pretty quick. (Not like I'd know or anything...) Community sites tend to be two-sided makets: for instance, people posting personal ads and people reading personal ads. It's very hard to dislodge an established competitor in this kind of market. Amazon, Yahoo and other sites with big user lists tried adding auctions after Ebay was successful, but it was always a flop -- why try to buy something in a place where nobody is selling? why try to sell something in a place where nobody is buying? In early phases, 2-sided markets grow according to a differential equation where dx/dt is proportional to x^2. This equation gives you slower-than-exponential growth in the early phases (site that never gets established) and crosses over to super-exponential growth before hitting a singularity and going infinite at a finite time. Of course, limiting terms make the singularity go away in real life. It helps, therefore, to be the first person in a market with a "good enough" product... There are some cases where products that aren't "good enough" fail until something successful comes along: for instance, a number of del.icio.us-type sites were created in the 1990's, and they just didn't go anywhere. del.icio.us got the user interface right for putting content in, and nobody ever seemed to notice that the interface for getting content out is entirely deficient. Some sites connect with a community and some don't. There are some subjects that people are interested in talking about and others that they aren't -- sometimes the people that talk don't know and the people that know don't talk. From jcampbell1 at gmail.com Wed Mar 11 18:16:59 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 11 Mar 2009 18:16:59 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: References: <49B73258.1070105@nyc.rr.com> <49B77254.7010102@marnik.net> Message-ID: <8f0676b40903111516i200d0c9es4fe8749e9a8ef619@mail.gmail.com> On Wed, Mar 11, 2009 at 5:01 PM, Fernando Gabrieli wrote: > dont forget that md5($anyString) can return two hashes with the same value > (if you have a db with 1,000,000 entries using this, it may happen) The odds of an MD5 collision with 1,000,000 entries is 0.0000000000000000000000000001% That is a risk I am willing to take. Regards, John Campbell From ramons at gmx.net Wed Mar 11 18:33:55 2009 From: ramons at gmx.net (David Krings) Date: Wed, 11 Mar 2009 18:33:55 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> Message-ID: <49B83C53.5050104@gmx.net> John Campbell wrote: > Any advice on what I should do before restarting apache the next time > it happens? Maybe Apache failing is just a symptom? Check the hardware, mainly memory, hard drive, and power supply. Maybe something is on its way out or in case of the power supply couldn't handle a voltage dip. Does anything else run on the sever? Database? FTP? David From ramons at gmx.net Wed Mar 11 18:35:53 2009 From: ramons at gmx.net (David Krings) Date: Wed, 11 Mar 2009 18:35:53 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> Message-ID: <49B83CC9.4000709@gmx.net> David Mintz wrote: > Cragislist has got to be considered a special case. They clearly pride > themselves on looking as ugly and boring as possible. Yea, but it is one of these web sites that a) work and b) render quickly. All these ?berpowered graphics loaden sites are plain horrible. Just my 2 cents that don't add up to anything. David From ramons at gmx.net Wed Mar 11 18:37:11 2009 From: ramons at gmx.net (David Krings) Date: Wed, 11 Mar 2009 18:37:11 -0400 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> Message-ID: <49B83D17.20200@gmx.net> Fernando Gabrieli wrote: > its probably a new topic, why a site is successful where others dont > event get 1 comment posted...why craiglist was successful? They offer a good service for free. People love free stuff. And it is gosh darn easy to use. People love easy. David From ioplex at gmail.com Wed Mar 11 19:03:55 2009 From: ioplex at gmail.com (Michael B Allen) Date: Wed, 11 Mar 2009 19:03:55 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <8f0676b40903111516i200d0c9es4fe8749e9a8ef619@mail.gmail.com> References: <49B73258.1070105@nyc.rr.com> <49B77254.7010102@marnik.net> <8f0676b40903111516i200d0c9es4fe8749e9a8ef619@mail.gmail.com> Message-ID: <78c6bd860903111603x26b4a887p640ce38a61f0f5c2@mail.gmail.com> On Wed, Mar 11, 2009 at 6:16 PM, John Campbell wrote: > On Wed, Mar 11, 2009 at 5:01 PM, Fernando Gabrieli wrote: >> dont forget that md5($anyString) can return two hashes with the same value >> (if you have a db with 1,000,000 entries using this, it may happen) > > The odds of an MD5 collision with 1,000,000 entries is > 0.0000000000000000000000000001% > > That is a risk I am willing to take. What if the number is used in a filename to store scanned financial documents for a large bank? Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ From artur at marnik.net Thu Mar 12 02:24:30 2009 From: artur at marnik.net (Artur Marnik) Date: Wed, 11 Mar 2009 22:24:30 -0800 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> Message-ID: <49B8AA9E.7080900@marnik.net> Fernando Gabrieli wrote: > its probably a new topic, why a site is successful where others dont > event get 1 comment posted...why craiglist was successful? > > just to add to the topic if you want your site to be successful in 2009 take a look: http://www.smashingmagazine.com/2009/01/14/web-design-trends-for-2009/ Artur From fgabrieli at gmail.com Thu Mar 12 09:50:05 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Thu, 12 Mar 2009 10:50:05 -0300 Subject: [nycphp-talk] Changing your site look - What is the norm In-Reply-To: <49B8AA9E.7080900@marnik.net> References: <008301c9a0e7$055d4d20$1017e760$@com> <008201c9a1af$8f63a230$ae2ae690$@com> <721f1cc50903111246w3fa105edg32fcad1ab2abbed8@mail.gmail.com> <3F0953A6-15F4-4DC4-99AD-50B9354463D5@me.com> <49B8AA9E.7080900@marnik.net> Message-ID: - free - easy to use - helpful for people i agree with all of these i agree also that spam is not a good tool anymore and could cause a very very fast ban in google servers but we are missing something yet, where do the 1,000,000 impressions (if they have that amount, which i guess they have or had) come from? 1. do they come from a growing site in time ? if that is the case i think the only answer to this is: craiglist was finished in the -correct- time and space. I dont believe they were able to predict this 2. if not, how did they get so many visitors ? best fernando On Thu, Mar 12, 2009 at 3:24 AM, Artur Marnik wrote: > Fernando Gabrieli wrote: > >> its probably a new topic, why a site is successful where others dont event >> get 1 comment posted...why craiglist was successful? >> >> >> > just to add to the topic > if you want your site to be successful in 2009 take a look: > http://www.smashingmagazine.com/2009/01/14/web-design-trends-for-2009/ > > Artur > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Thu Mar 12 21:44:08 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 12 Mar 2009 21:44:08 -0400 (EDT) Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <49B805AE.4000608@projectskyline.com> Message-ID: On Wed, 11 Mar 2009, Ben Sgro wrote: > Too bad it doesn't throw an error or exception if an argument is incorrect. I have to say, the error reporting for the XML and XSLT functions are terrible. There's a long standing ticket open on a project Im working on from our content folks to provide better reporting of XML. Its probably not going to be closed for a long time. -- Aj. From danielc at analysisandsolutions.com Thu Mar 12 23:20:10 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 12 Mar 2009 23:20:10 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: References: <49B805AE.4000608@projectskyline.com> Message-ID: <20090313032009.GA5655@panix.com> Hey Folks: On Thu, Mar 12, 2009 at 09:44:08PM -0400, Ajai Khattri wrote: > > I have to say, the error reporting for the XML and XSLT functions are > terrible. Here's how I load XML. Requres track_errors to be on. Sorry about the line wrapping. $xml_string = ''; $schema_file = ''; if (($dom = @DOMDocument::loadXML($xml_string)) == false) { $error = 'Malformed XML: ' . $php_errormsg; } elseif ((@$dom->schemaValidate($schema_file)) == false) { $error = 'XML violates schema ' . $schema_file . ': ' . format_schemavalidate_error($php_errormsg); } else { if (($sxml = @simplexml_import_dom($dom)) === false) { $error = 'Malformed XML (SimpleXML): ' . $php_errormsg; } } if (!empty($error)) { // process... } /** * Boils down XML schema validation error messages into something * humans can easily comprehend * * @param string $error the $php_errormsg produced by DOM * schemaValidate() * * @return string */ function format_schemavalidate_error($error) { $error = preg_replace('/\s+/', ' ', $error); if (preg_match("/The element: '([^']+)'/", $error, $match)) { $error = $match[1] . ' has invalid value . '; } elseif (preg_match("/Element '([^']+)', attribute '([^']+)'/", $error, $match)) { $error = $match[2] . ' attribute of ' . $match[1] . ' has invalid value . '; } elseif (preg_match("/Element '([^']+)': The attribute '([^']+)' is required/", $error, $match)) { $error = $match[2] . ' attribute of ' . $match[1] . ' is missing . '; } elseif (preg_match("/is not a valid value of the atomic type '({.*})?([^']+)'/", $error, $match)) { $error = $match[2] . ' has invalid value . '; } elseif (preg_match('/Expecting: ([^.]+)/', $error, $match)) { $error = $match[1] . ' is missing . '; } elseif (preg_match('/(Expected is|Expected is one of) \( ({.*})?([^.]+) \)/', $error, $match)) { $error = $match[3] . ' is missing . '; } return $error; } Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From david at davidmintz.org Fri Mar 13 11:24:14 2009 From: david at davidmintz.org (David Mintz) Date: Fri, 13 Mar 2009 11:24:14 -0400 Subject: [nycphp-talk] Zend Server CE...? Message-ID: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> Anybody have any thoughts or experience with "Zend Server Community Edition: Production-ready, Integrated PHP Stack for Non-critical Applications?" http://www.zend.com/en/community/zend-server-ce I have to wonder what a non-critical application is, and why this is for that. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianw1975 at gmail.com Fri Mar 13 11:31:20 2009 From: brianw1975 at gmail.com (Brian Williams) Date: Fri, 13 Mar 2009 10:31:20 -0500 Subject: [nycphp-talk] Zend Server CE...? In-Reply-To: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> References: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> Message-ID: To use an over-generalization: $non_critical = new Beta(); //Don't use this for e-commerce functionality that your company relies on to make money On Fri, Mar 13, 2009 at 10:24 AM, David Mintz wrote: > Anybody have any thoughts or experience with "Zend Server Community > Edition: Production-ready, Integrated PHP Stack for Non-critical > Applications?" > > http://www.zend.com/en/community/zend-server-ce > > I have to wonder what a non-critical application is, and why this is for > that. > > > -- > David Mintz > http://davidmintz.org/ > > The subtle source is clear and bright > The tributary streams flow through the darkness > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Fri Mar 13 11:47:41 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 13 Mar 2009 11:47:41 -0400 Subject: [nycphp-talk] generate random unique 8-digit number In-Reply-To: <49B6F68C.7070208@tgaconnect.com> References: <49B68D2E.40803@phpwerx.net> <49B6F68C.7070208@tgaconnect.com> Message-ID: <20090313154740.GA27968@panix.com> On Tue, Mar 10, 2009 at 07:23:56PM -0400, Tim Gales wrote: > md5(uniqid(rand(), true)) Though MD5 collisions are possible, so I wouldn't count on that always resulting in a unique id. --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 ben at projectskyline.com Fri Mar 13 14:29:55 2009 From: ben at projectskyline.com (Ben Sgro) Date: Fri, 13 Mar 2009 14:29:55 -0400 Subject: [nycphp-talk] Transforming XML with XSL (XsltProcessor problems) In-Reply-To: <20090313032009.GA5655@panix.com> References: <49B805AE.4000608@projectskyline.com> <20090313032009.GA5655@panix.com> Message-ID: <49BAA623.4040009@projectskyline.com> Hey, Thanks for the feedback and the sample code. I'm going to look over this in more detail today. Thanks again everyone! - Ben Daniel Convissor wrote: > Hey Folks: > > On Thu, Mar 12, 2009 at 09:44:08PM -0400, Ajai Khattri wrote: > >> I have to say, the error reporting for the XML and XSLT functions are >> terrible. >> > > Here's how I load XML. Requres track_errors to be on. Sorry about the > line wrapping. > > > $xml_string = ''; > $schema_file = ''; > > if (($dom = @DOMDocument::loadXML($xml_string)) == false) { > $error = 'Malformed XML: ' . $php_errormsg; > } elseif ((@$dom->schemaValidate($schema_file)) == false) { > $error = 'XML violates schema ' . $schema_file . ': ' > . format_schemavalidate_error($php_errormsg); > } else { > if (($sxml = @simplexml_import_dom($dom)) === false) { > $error = 'Malformed XML (SimpleXML): ' . $php_errormsg; > } > } > > if (!empty($error)) { > // process... > } > > > > /** > * Boils down XML schema validation error messages into something > * humans can easily comprehend > * > * @param string $error the $php_errormsg produced by DOM > * schemaValidate() > * > * @return string > */ > function format_schemavalidate_error($error) { > $error = preg_replace('/\s+/', ' ', $error); > > if (preg_match("/The element: '([^']+)'/", $error, $match)) { > $error = $match[1] . ' has invalid value . '; > } elseif (preg_match("/Element '([^']+)', attribute '([^']+)'/", > $error, $match)) { > $error = $match[2] . ' attribute of ' . $match[1] . ' has invalid > value . '; > } elseif (preg_match("/Element '([^']+)': The attribute '([^']+)' is > required/", $error, $match)) { > $error = $match[2] . ' attribute of ' . $match[1] . ' is missing > . '; > } elseif (preg_match("/is not a valid value of the atomic type > '({.*})?([^']+)'/", $error, $match)) { > $error = $match[2] . ' has invalid value . '; > } elseif (preg_match('/Expecting: ([^.]+)/', $error, $match)) { > $error = $match[1] . ' is missing . '; > } elseif (preg_match('/(Expected is|Expected is one of) \( > ({.*})?([^.]+) \)/', $error, $match)) { > $error = $match[3] . ' is missing . '; > } > > return $error; > } > > > Enjoy, > > --Dan > > From chsnyder at gmail.com Fri Mar 13 15:17:00 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Fri, 13 Mar 2009 15:17:00 -0400 Subject: [nycphp-talk] Zend Server CE...? In-Reply-To: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> References: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> Message-ID: On Fri, Mar 13, 2009 at 11:24 AM, David Mintz wrote: > Anybody have any thoughts or experience with "Zend Server Community Edition: > Production-ready, Integrated PHP Stack for Non-critical Applications?" Not open source, despite being free and bundling open source technologies. Phhbbbt. From paul at devonianfarm.com Fri Mar 13 15:38:27 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Fri, 13 Mar 2009 15:38:27 -0400 Subject: [nycphp-talk] Zend Server CE...? In-Reply-To: References: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> Message-ID: <49BAB633.8000709@devonianfarm.com> Chris Snyder wrote: > On Fri, Mar 13, 2009 at 11:24 AM, David Mintz wrote: > >> Anybody have any thoughts or experience with "Zend Server Community Edition: >> Production-ready, Integrated PHP Stack for Non-critical Applications?" >> It would be pretty tough to make a PHP environment that's more reliable and maintainable than good 'old mod_php running on Apache. From jcampbell1 at gmail.com Mon Mar 16 11:36:27 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Mon, 16 Mar 2009 11:36:27 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <49B83C53.5050104@gmx.net> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> <49B83C53.5050104@gmx.net> Message-ID: <8f0676b40903160836q42d839ch447ce1ca47dc6a43@mail.gmail.com> I would like to thank everyone for their help and advice. I don't think it is impossible to figure out what the underlying issue is, but I made a bunch of changes based on the recommendations here. 1) I switched the hardware (pretty easy, since it's just a Xen instance) 2) I upgraded Apache and PHP 3) I changed max requests per child to a sensible number rather than unlimited. I think log rotate would achieve a similar effect by restarting the webserver every day and I'll eventually go that route. 4) I set up monitoring scripts that will dump the output of `ps` and `apache2ctl fullstatus` to a log in the event the apache craps out again, and I'll be sure to get a gdb dump if it happens again. 5) For other reasons, I reduced the Keep-Alive time and moved most of the static content to Amazon's CDN. Thanks for the help. Regards, John Campbell From chsnyder at gmail.com Mon Mar 16 11:39:36 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 16 Mar 2009 11:39:36 -0400 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903160836q42d839ch447ce1ca47dc6a43@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> <49B83C53.5050104@gmx.net> <8f0676b40903160836q42d839ch447ce1ca47dc6a43@mail.gmail.com> Message-ID: On Mon, Mar 16, 2009 at 11:36 AM, John Campbell wrote: > I would like to thank everyone for their help and advice. ?I don't > think it is impossible to figure out what the underlying issue is, but > I made a bunch of changes based on the recommendations here. > > 1) I switched the hardware (pretty easy, since it's just a Xen instance) > 2) I upgraded Apache and PHP > 3) I changed max requests per child to a sensible number rather than > unlimited. ?I think log rotate would achieve a similar effect by > restarting the webserver every day and I'll eventually go that route. > 4) I set up monitoring scripts that will dump the output of `ps` and > `apache2ctl fullstatus` to a log in the event the apache craps out > again, and I'll be sure to get a gdb dump if it happens again. > 5) For other reasons, I reduced the Keep-Alive time and moved most of > the static content to Amazon's CDN. > > Thanks for the help. > > Regards, > John Campbell Wow, good thing it crashed. It sounds like you have a much more robust rig now! From sukritd at sevenacross.com Mon Mar 16 12:46:35 2009 From: sukritd at sevenacross.com (Sukrit D) Date: Mon, 16 Mar 2009 22:16:35 +0530 Subject: [nycphp-talk] Apache is killing me. In-Reply-To: <8f0676b40903160836q42d839ch447ce1ca47dc6a43@mail.gmail.com> References: <8f0676b40903110728j30c92c22y2ad1ef62308b427f@mail.gmail.com> <49B7CF7A.5050106@touro.edu> <12D5742A-143B-44BE-818E-DAE56AEB947F@beaffinitive.com> <8f0676b40903110858v54896ef4nd23d1b6992bd3114@mail.gmail.com> <49B83C53.5050104@gmx.net> <8f0676b40903160836q42d839ch447ce1ca47dc6a43@mail.gmail.com> Message-ID: <5A2C348D-EE4B-47D8-A47D-D44EE8C3963F@sevenacross.com> In such a case you should give rightscale+ec2 a serious consideration. It scales beautifully and is pretty easy to get going with and maintain, plus monitoring is more-or-less built-in. Sukrit On 16-Mar-09, at 9:06 PM, John Campbell wrote: > I would like to thank everyone for their help and advice. I don't > think it is impossible to figure out what the underlying issue is, but > I made a bunch of changes based on the recommendations here. > > 1) I switched the hardware (pretty easy, since it's just a Xen > instance) > 2) I upgraded Apache and PHP > 3) I changed max requests per child to a sensible number rather than > unlimited. I think log rotate would achieve a similar effect by > restarting the webserver every day and I'll eventually go that route. > 4) I set up monitoring scripts that will dump the output of `ps` and > `apache2ctl fullstatus` to a log in the event the apache craps out > again, and I'll be sure to get a gdb dump if it happens again. > 5) For other reasons, I reduced the Keep-Alive time and moved most of > the static content to Amazon's CDN. > > Thanks for the help. > > Regards, > John Campbell > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From vtbludgeon at gmail.com Mon Mar 16 14:57:22 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Mon, 16 Mar 2009 14:57:22 -0400 Subject: [nycphp-talk] Zend Server CE...? In-Reply-To: <49BAB633.8000709@devonianfarm.com> References: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> <49BAB633.8000709@devonianfarm.com> Message-ID: <721f1cc50903161157y3e88522bw1f1d954722327c98@mail.gmail.com> On Fri, Mar 13, 2009 at 3:38 PM, Paul A Houle wrote: > > On Fri, Mar 13, 2009 at 11:24 AM, David Mintz >> wrote: >> >> >>> Anybody have any thoughts or experience with "Zend Server Community >>> Edition: >>> Production-ready, Integrated PHP Stack for Non-critical Applications?" >>> >>> >> It would be pretty tough to make a PHP environment that's more reliable > and maintainable than good 'old mod_php running on Apache. I guess that's what kinda has me scratching my head. Bundle together the latest greatest production-quality releases of all these venerable OS products and then say "here, take your chances." I notice the Windows edition is bundled with MySQL but the Linux flavor is not. Some legal nuance happening there no doubt. I downloaded and installed out of curiosity. It sports a sexy "dashboard." -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Tue Mar 17 00:59:10 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Tue, 17 Mar 2009 00:59:10 -0400 Subject: [nycphp-talk] Zend Server CE...? In-Reply-To: <721f1cc50903161157y3e88522bw1f1d954722327c98@mail.gmail.com> References: <721f1cc50903130824q45cbf3e0j3965be1f44e45c07@mail.gmail.com> <49BAB633.8000709@devonianfarm.com> <721f1cc50903161157y3e88522bw1f1d954722327c98@mail.gmail.com> Message-ID: <001f01c9a6bd$1c7fb110$557f1330$@horning@planetnoc.com> But the real question is - for dev work - what are the advantages over using xampp (since you can run most every debugger in xampp as well)? -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Monday, March 16, 2009 2:57 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend Server CE...? On Fri, Mar 13, 2009 at 3:38 PM, Paul A Houle wrote: On Fri, Mar 13, 2009 at 11:24 AM, David Mintz wrote: Anybody have any thoughts or experience with "Zend Server Community Edition: Production-ready, Integrated PHP Stack for Non-critical Applications?" It would be pretty tough to make a PHP environment that's more reliable and maintainable than good 'old mod_php running on Apache. I guess that's what kinda has me scratching my head. Bundle together the latest greatest production-quality releases of all these venerable OS products and then say "here, take your chances." I notice the Windows edition is bundled with MySQL but the Linux flavor is not. Some legal nuance happening there no doubt. I downloaded and installed out of curiosity. It sports a sexy "dashboard." -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Tue Mar 17 11:59:27 2009 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 17 Mar 2009 11:59:27 -0400 Subject: [nycphp-talk] PHP Security Scripts Message-ID: <003001c9a719$5997c770$0cc75650$@com> Hello, I've come across these script suite: http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerab le-php-owasp-top-10 And wanted to pass it on as it might be useful for some. Has anyone looked at these before? H From chsnyder at gmail.com Tue Mar 17 13:11:55 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 17 Mar 2009 13:11:55 -0400 Subject: [nycphp-talk] PHP Security Scripts In-Reply-To: <003001c9a719$5997c770$0cc75650$@com> References: <003001c9a719$5997c770$0cc75650$@com> Message-ID: On Tue, Mar 17, 2009 at 11:59 AM, Hans Zaunere wrote: > Hello, > > I've come across these script suite: > > http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerab > le-php-owasp-top-10 > > And wanted to pass it on as it might be useful for some. ?Has anyone looked > at these before? > Hey, that looks pretty neat. It's definitely a great idea, producing a series of "teachable moments" in code. Chris Snyder http://chxor.chxo.com/ From lists at zaunere.com Wed Mar 18 15:35:22 2009 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 18 Mar 2009 15:35:22 -0400 Subject: [nycphp-talk] MySQL and PHP - State of the Union Message-ID: <01a501c9a800$b3f9f8e0$1bedeaa0$@com> Hello, This morning I spoke at CommunityOne East on MySQL and PHP. The presentation as well as an interview and some other stuff is in our archives: http://www.nyphp.org/content/presentations/ They should have a web cast ready at some point to I think. --- Hans Zaunere / Managing Member / New York PHP www.nyphp.org / www.nyphp.com From mmwaldman at nyc.rr.com Thu Mar 19 08:59:04 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Thu, 19 Mar 2009 08:59:04 -0400 Subject: [nycphp-talk] Cookie Message-ID: <20090319125903.WEQK26578.hrndva-omta05.mail.rr.com@DeJaVu> I tried to set cookie from a subdirectory for the whole domain, but it didn't work. >From http://domain/accout/login.php, if did setcookie('logged_in", "1", $path="/");, like the documentation said too. But it still set it for the entire domain. I also tried: setcookie('logged_in", "1", $path=".."); setcookie('logged_in", "1", $path="/.."); and setcookie('logged_in", "1", $path="/../") Does anyone know what I'm doing wrong here? Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at crisscott.com Thu Mar 19 09:05:37 2009 From: scott at crisscott.com (Scott Mattocks) Date: Thu, 19 Mar 2009 09:05:37 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <20090319125903.WEQK26578.hrndva-omta05.mail.rr.com@DeJaVu> References: <20090319125903.WEQK26578.hrndva-omta05.mail.rr.com@DeJaVu> Message-ID: <49C24321.10902@crisscott.com> Michele Waldman wrote: >>From http://domain/accout/login.php, if did setcookie('logged_in", "1", > $path="/");, like the documentation said too. > > Does anyone know what I'm doing wrong here? You mean other than relying on that cookie to tell you if the user is logged in? Yeah, you are missing the expire parameter and assigning a variable where you should just be setting the value (I know it will work, but it isn't a good idea). Try: setcookie('logged_in', 1, 0, '/'); -- Scott Mattocks Author: Pro PHP-GTK http://www.crisscott.com From mmwaldman at nyc.rr.com Thu Mar 19 09:11:16 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Thu, 19 Mar 2009 09:11:16 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <49C24321.10902@crisscott.com> Message-ID: <20090319131115.UHYA18800.hrndva-omta06.mail.rr.com@DeJaVu> I was defined in the subdirectory, but not the root directory. So, I don't think it was an expiration problem. Michele -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Scott Mattocks Sent: Thursday, March 19, 2009 9:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cookie Michele Waldman wrote: >>From http://domain/accout/login.php, if did setcookie('logged_in", "1", > $path="/");, like the documentation said too. > > Does anyone know what I'm doing wrong here? You mean other than relying on that cookie to tell you if the user is logged in? Yeah, you are missing the expire parameter and assigning a variable where you should just be setting the value (I know it will work, but it isn't a good idea). Try: setcookie('logged_in', 1, 0, '/'); -- Scott Mattocks Author: Pro PHP-GTK http://www.crisscott.com _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From scott at crisscott.com Thu Mar 19 09:18:23 2009 From: scott at crisscott.com (Scott Mattocks) Date: Thu, 19 Mar 2009 09:18:23 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <20090319131115.UHYA18800.hrndva-omta06.mail.rr.com@DeJaVu> References: <20090319131115.UHYA18800.hrndva-omta06.mail.rr.com@DeJaVu> Message-ID: <49C2461F.8090501@crisscott.com> Michele Waldman wrote: > I was defined in the subdirectory, but not the root directory. > > So, I don't think it was an expiration problem. It isn't that the cookie is expired already. It is that you are setting the path as the expiration. You can't just leave it out and hope that the function figures out you really meant / to be the path. You have to put something where the expiration value goes. -- Scott Mattocks Author: Pro PHP-GTK http://www.crisscott.com From nynj.tech at hotmail.com Thu Mar 19 09:47:08 2009 From: nynj.tech at hotmail.com (chad qian) Date: Thu, 19 Mar 2009 09:47:08 -0400 Subject: [nycphp-talk] look for CTO / Sr PHP Developer Message-ID: Hi, Please feel free to contact my friend directly if you have interest. Thanks! chad Hands on CTO / Sr PHP Developer for Award Winning Real Estate Platform CEO of a small, established real estate services company seeks high stamina PHP guru who wants to take ownership of the development process of a next generation real estate services platform in a sane but urgent manner. (OK ? so our platform isn?t built yet and hasn?t won awards, but we have been recognized as thought leaders in our field, and with your development talents, we expect to build an award winning platform.) You will be working with one other developer. REQUIREMENTS: - Minimum three years in database design. - Highly proficient in LAMP development (Linux, Apache, MySQL5, PHP5). - Knowledge in OOP, Ajax/JavaScript and JavaScript framework experience (i.e. jQuery). - Knowledge of XML and XSLT is a plus - Knowledge of Cold Fusion (our legacy system which we will export our information) is a plus - Real estate experience and/or social networking is a plus - Excellent written and spoken communication skills. We are looking for a candidate who wants to throw himself/herself into this works, has a desire to build something that makes an impact, is comfortable putting in long hours. You should be quick to grasp business model concepts, be resourceful, take initiative and have a get the job done attitude. This is a full time inhouse position. Please describe your previous experience very specifically, and provide links to former work and code samples. Compensation is salary plus bonus. Cheers, LaLa Wang MLX 11 W. 25th Street New York, NY 10010 212.328.0444 work 917.603.6224 cell 212.989.6552 fax llw212 at skype.com _________________________________________________________________ Windows Live? Contacts: Organize your contact list. http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtbludgeon at gmail.com Thu Mar 19 09:48:19 2009 From: vtbludgeon at gmail.com (David Mintz) Date: Thu, 19 Mar 2009 09:48:19 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <49C2461F.8090501@crisscott.com> References: <20090319131115.UHYA18800.hrndva-omta06.mail.rr.com@DeJaVu> <49C2461F.8090501@crisscott.com> Message-ID: <721f1cc50903190648m2d8f51c9k999ddf4d37e9e95a@mail.gmail.com> On Thu, Mar 19, 2009 at 9:18 AM, Scott Mattocks wrote: > Michele Waldman wrote: > >> I was defined in the subdirectory, but not the root directory. >> >> So, I don't think it was an expiration problem. >> > > It isn't that the cookie is expired already. It is that you are setting the > path as the expiration. You can't just leave it out and hope that the > function figures out you really meant / to be the path. You have to put > something where the expiration value goes. Moreover, are you sure you want to rely on cookies for testing whether a user is authenticated? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Thu Mar 19 09:53:53 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Thu, 19 Mar 2009 09:53:53 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <49C2461F.8090501@crisscott.com> Message-ID: <20090319135352.VPXP18800.hrndva-omta06.mail.rr.com@DeJaVu> Ok. Thanks. I thought if I specified $path = it would resolve. Michele -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Scott Mattocks Sent: Thursday, March 19, 2009 9:18 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cookie Michele Waldman wrote: > I was defined in the subdirectory, but not the root directory. > > So, I don't think it was an expiration problem. It isn't that the cookie is expired already. It is that you are setting the path as the expiration. You can't just leave it out and hope that the function figures out you really meant / to be the path. You have to put something where the expiration value goes. -- Scott Mattocks Author: Pro PHP-GTK http://www.crisscott.com _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From mmwaldman at nyc.rr.com Thu Mar 19 10:19:04 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Thu, 19 Mar 2009 10:19:04 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <721f1cc50903190648m2d8f51c9k999ddf4d37e9e95a@mail.gmail.com> Message-ID: <20090319141903.SKZK15479.hrndva-omta01.mail.rr.com@DeJaVu> Don't worry, I don't use the cookie for login authentication. My client wanted a link "back to account" on the public pages when the user is logged in. Since $REMOTE_USER wasn't available in the public realm, I was only going to use the cookie for that link. I wound up using a session variable instead, but was wondering what I had done wrong. Michele _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Thursday, March 19, 2009 9:48 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cookie On Thu, Mar 19, 2009 at 9:18 AM, Scott Mattocks wrote: Michele Waldman wrote: I was defined in the subdirectory, but not the root directory. So, I don't think it was an expiration problem. It isn't that the cookie is expired already. It is that you are setting the path as the expiration. You can't just leave it out and hope that the function figures out you really meant / to be the path. You have to put something where the expiration value goes. Moreover, are you sure you want to rely on cookies for testing whether a user is authenticated? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Thu Mar 19 10:29:43 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Thu, 19 Mar 2009 10:29:43 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <721f1cc50903190648m2d8f51c9k999ddf4d37e9e95a@mail.gmail.com> References: <20090319131115.UHYA18800.hrndva-omta06.mail.rr.com@DeJaVu> <49C2461F.8090501@crisscott.com> <721f1cc50903190648m2d8f51c9k999ddf4d37e9e95a@mail.gmail.com> Message-ID: <49C256D7.9030806@devonianfarm.com> David Mintz wrote: > > Moreover, are you sure you want to rely on cookies for testing whether > a user is authenticated? Uh, don't Google, Facebook, Yahoo, and most of the other top-1000 sites use cookies to tell if users are authenticated? When's the last time you logged onto a public-facing site using http basic? The trouble with what Michelle is doing is that her cookies are easily forged. If, for instance, the cookie says isLoggedInAs: michelle somebody can try logging in as somebody else by just changing the text of the cookie. You'd do a little better if you did usernameAndPassword: michelle:somepasswordIpicked in that case, you'd need to know somebody's password to forge a token. Both of these schemes have the problem that somebody with a packet sniffer or token sniffer could steal tokens. You can make a system ~resistant~ to that using the methods in the following paper: http://pdos.csail.mit.edu/papers/webauth:sec10.pdf (it seems to be the greatest CS paper that nobody has ever read) Note that I say ~resistant~ because somebody can steal a token, however, a timeout value built into the cookie means that an attacker has to act fast. The cookie also contains a session id which can be invalidated, which also limits the range of the attack. Packet sniffing attacks on web authentication systems don't seem to be that common in the wild. If you're worried about them, the right answer is to use SSL. It can be a pain to get an SSL certificate and install it, but you'd spend more on engineering time to build a system that looks secure (but probably isn't,) even if you were hiring Oompa-Loompas to do your design and coding. From mmwaldman at nyc.rr.com Thu Mar 19 14:12:45 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Thu, 19 Mar 2009 14:12:45 -0400 Subject: [nycphp-talk] Cookie In-Reply-To: <49C256D7.9030806@devonianfarm.com> Message-ID: <20090319181244.DQZO18800.hrndva-omta06.mail.rr.com@DeJaVu> I don't use cookies to authenticate. I'm using ht_access mod_auth_digest/msyql. I made like a million posts about this. I just use the cookies to determine if I display a link. If they haven't already authenticated and forge the cookies to display the link, they'll get "access denied". But thanks anyway. Michele -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Paul A Houle Sent: Thursday, March 19, 2009 10:30 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cookie David Mintz wrote: > > Moreover, are you sure you want to rely on cookies for testing whether > a user is authenticated? Uh, don't Google, Facebook, Yahoo, and most of the other top-1000 sites use cookies to tell if users are authenticated? When's the last time you logged onto a public-facing site using http basic? The trouble with what Michelle is doing is that her cookies are easily forged. If, for instance, the cookie says isLoggedInAs: michelle somebody can try logging in as somebody else by just changing the text of the cookie. You'd do a little better if you did usernameAndPassword: michelle:somepasswordIpicked in that case, you'd need to know somebody's password to forge a token. Both of these schemes have the problem that somebody with a packet sniffer or token sniffer could steal tokens. You can make a system ~resistant~ to that using the methods in the following paper: http://pdos.csail.mit.edu/papers/webauth:sec10.pdf (it seems to be the greatest CS paper that nobody has ever read) Note that I say ~resistant~ because somebody can steal a token, however, a timeout value built into the cookie means that an attacker has to act fast. The cookie also contains a session id which can be invalidated, which also limits the range of the attack. Packet sniffing attacks on web authentication systems don't seem to be that common in the wild. If you're worried about them, the right answer is to use SSL. It can be a pain to get an SSL certificate and install it, but you'd spend more on engineering time to build a system that looks secure (but probably isn't,) even if you were hiring Oompa-Loompas to do your design and coding. _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From nynj.tech at hotmail.com Mon Mar 23 10:42:41 2009 From: nynj.tech at hotmail.com (chad qian) Date: Mon, 23 Mar 2009 10:42:41 -0400 Subject: [nycphp-talk] Help with generation of unique transaction ID Message-ID: Hi, I am programming shopping cart in php/mysql. I need to generate unique 8-digit transaction ID like 12356780.How to get it for each transaction?Absolutely no duplication. Any idea?No clue here. Thanks! chad _________________________________________________________________ Express your personality in color! Preview and select themes for Hotmail?. http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcech at phpwerx.net Mon Mar 23 10:53:07 2009 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 23 Mar 2009 10:53:07 -0400 Subject: [nycphp-talk] Help with generation of unique transaction ID In-Reply-To: References: Message-ID: <49C7A253.5080706@phpwerx.net> Chad, Do you even read the replies to your threads? This was covered in exhaustive detail 2 weeks ago. Dan chad qian wrote: > I need to generate unique 8-digit transaction ID like 12356780.How to get it for each transaction?Absolutely no duplication. From nynj.tech at hotmail.com Mon Mar 23 11:05:54 2009 From: nynj.tech at hotmail.com (chad qian) Date: Mon, 23 Mar 2009 11:05:54 -0400 Subject: [nycphp-talk] Help with generation of unique transaction ID In-Reply-To: <49C7A253.5080706@phpwerx.net> References: <49C7A253.5080706@phpwerx.net> Message-ID: Sorry,I find them after I post here. Apologize for any bother chad > Date: Mon, 23 Mar 2009 10:53:07 -0400 > From: dcech at phpwerx.net > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Help with generation of unique transaction ID > > Chad, > > Do you even read the replies to your threads? This was covered in > exhaustive detail 2 weeks ago. > > Dan > > chad qian wrote: > > I need to generate unique 8-digit transaction ID like 12356780.How to get it for each transaction?Absolutely no duplication. > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php _________________________________________________________________ Internet Explorer 8 ? Now Available. Faster, safer, easier. http://clk.atdmt.com/MRT/go/141323790/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Mon Mar 23 20:53:56 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Mon, 23 Mar 2009 20:53:56 -0400 Subject: [nycphp-talk] Remote php call Message-ID: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> Sorry for this posting. I may seem lazy but everyone wants me to do everything right now and my daughter had 104 fever today. I'm pressed for time and I've got a baby to tend to right now. If I want to call a remote php script from a php file in a different domain? Curl it? Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomsartain at gmail.com Mon Mar 23 21:17:31 2009 From: tomsartain at gmail.com (Tom Sartain) Date: Mon, 23 Mar 2009 21:17:31 -0400 Subject: [nycphp-talk] Remote php call In-Reply-To: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> Message-ID: <20190d950903231817g29be54e9te077d565716a55de@mail.gmail.com> If you mean execute the script as if you'd opened it up in the browser, then yes, cURL is your friend. ( http://us.php.net/manual/en/curl.examples-basic.php if you want a starting point) If you're looking to actually include the PHP code from other-domain.com and execute it on your-domain.com, the code would have to be served up as plain text (so going to other-domain.com/script.php in your browser would return regular old PHP code), then you can just include it. But there are probably more reasons to not do this than there are members on this list. -Tom On 3/23/09, Michele Waldman wrote: > Sorry for this posting. I may seem lazy but everyone wants me to do > everything right now and my daughter had 104 fever today. > > > > I'm pressed for time and I've got a baby to tend to right now. > > > > If I want to call a remote php script from a php file in a different domain? > Curl it? > > > > Michele > > > > From rmarscher at beaffinitive.com Mon Mar 23 21:22:57 2009 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Mon, 23 Mar 2009 21:22:57 -0400 Subject: [nycphp-talk] Remote php call In-Reply-To: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> Message-ID: Curl sounds good assuming the other script is accessible over http. That's the most common way I've seen it done. If you don't have the curl php extension available, you can still invoke it on the command line via the backtick operator or shell_exec. Hope it's painless and the family feels better Sorry for the top posting, team... I'm on a phone. On Mar 23, 2009, at 8:53 PM, "Michele Waldman" wrote: > If I want to call a remote php script from a php file in a different > domain? Curl it? > > > > Michele > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From artur at marnik.net Tue Mar 24 11:48:04 2009 From: artur at marnik.net (Artur Marnik) Date: Tue, 24 Mar 2009 11:48:04 -0400 Subject: [nycphp-talk] Remote php call In-Reply-To: References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> Message-ID: <49C900B4.7040705@marnik.net> If you don't need to POST anything you can as well do fopen() http://us3.php.net/manual/en/function.fopen.php but with safe_mode or allow_url_fopen disabled on the server it won't work Artur > > On Mar 23, 2009, at 8:53 PM, "Michele Waldman" > wrote: >> >> If I want to call a remote php script from a php file in a different >> domain? Curl it? >> >> >> >> Michele >> >> >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From brenttech at gmail.com Tue Mar 24 12:47:13 2009 From: brenttech at gmail.com (Brent Baisley) Date: Tue, 24 Mar 2009 12:47:13 -0400 Subject: [nycphp-talk] Remote php call In-Reply-To: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> Message-ID: <5d515c620903240947l38681411md2ac22f251540808@mail.gmail.com> Curl is the better way to go, but if you just need to hit a page on another server you can use file_get_contents("http://domain.com/script.php?param=a"); file_get_contents doesn't handle errors, failures, redirects, timeouts, etc. very well, which is why curl is better. But in a pinch, file_get_contents works. Brent 2009/3/23 Michele Waldman : > Sorry for this posting.? I may seem lazy but everyone wants me to do > everything right now and my daughter had 104 fever today. > > > > I?m pressed for time and I?ve got a baby to tend to right now. > > > > If I want to call a remote php script from a php file in a different > domain?? Curl it? > > > > Michele > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From y2rob at aol.com Tue Mar 24 13:42:31 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Tue, 24 Mar 2009 13:42:31 -0400 Subject: [nycphp-talk] Remote php call In-Reply-To: <5d515c620903240947l38681411md2ac22f251540808@mail.gmail.com> References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> <5d515c620903240947l38681411md2ac22f251540808@mail.gmail.com> Message-ID: <8CB7ABF0A7BBDD0-710-E1C@webmail-mh46.sysops.aol.com> yeah i think curl is probably the best way.? plus i'm not sure if you have control over the service your calling, but if you do you can make it only reply to post requests, set authentification to the post request and other stuff to prevent malicious attacks.? there are options for ssl authentification, i had to use curl for a wsdl with user authentification and? just recently i created a quick curl call to a ruby webservice i created.? it's quick, easy and gets the job done. ~rob -----Original Message----- From: Brent Baisley To: NYPHP Talk Sent: Tue, 24 Mar 2009 12:47 pm Subject: Re: [nycphp-talk] Remote php call Curl is the better way to go, but if you just need to hit a page on another server you can use file_get_contents("http://domain.com/script.php?param=a"); file_get_contents doesn't handle errors, failures, redirects, timeouts, etc. very well, which is why curl is better. But in a pinch, file_get_contents works. Brent 2009/3/23 Michele Waldman : > Sorry for this posting.? I may seem lazy but everyone wants me to do > everything right now and my daughter had 104 fever today. > > > > I?m pressed for time and I?ve got a baby to tend to right now. > > > > If I want to call a remote php script from a php file in a different > domain?? Curl it? > > > > Michele > > > > _______________________________________________ > New York PHP User Group Community Talk Maili ng List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Tue Mar 24 14:31:06 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Tue, 24 Mar 2009 11:31:06 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB Message-ID: Hi, System = W2K / apache 2.055 / php 5.25 / mysql 5.0.18-nt I am trying to connect to an Oracle Database and when using the oci_connect() function, I get an error on my apache error_log file: PHP Warning: PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_oci8.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 I have my extension _dir="C:\php\ext" I have my extension= php_oci8.dll uncommented I have re-started my apache. Can anyone out there in the cloud help me? Thanks, Nestor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Tue Mar 24 15:08:45 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Tue, 24 Mar 2009 12:08:45 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: Oracle 10G On Tue, Mar 24, 2009 at 11:31 AM, N?stor wrote: > Hi, > > System = W2K / apache 2.055 / php 5.25 / mysql 5.0.18-nt > > I am trying to connect to an Oracle Database and when using the > oci_connect() > function, I get an error on my apache error_log file: > PHP Warning: PHP Startup: Unable to load dynamic library > 'c:\\php\\ext\\php_oci8.dll' - The specified > procedure could not be found.\r\n in Unknown on line 0 > > I have my extension _dir="C:\php\ext" > I have my extension= php_oci8.dll uncommented > > I have re-started my apache. > > Can anyone out there in the cloud help me? > > Thanks, > > Nestor :-) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgabrieli at gmail.com Tue Mar 24 16:04:30 2009 From: fgabrieli at gmail.com (Fernando Gabrieli) Date: Tue, 24 Mar 2009 17:04:30 -0300 Subject: [nycphp-talk] Remote php call In-Reply-To: <8CB7ABF0A7BBDD0-710-E1C@webmail-mh46.sysops.aol.com> References: <20090324005356.TTQZ17632.hrndva-omta03.mail.rr.com@DeJaVu> <5d515c620903240947l38681411md2ac22f251540808@mail.gmail.com> <8CB7ABF0A7BBDD0-710-E1C@webmail-mh46.sysops.aol.com> Message-ID: dont forget the SSL options for cURL if you are using HTTPS best fernando 2009/3/24 > yeah i think curl is probably the best way. plus i'm not sure if you > have control over the service your calling, but if you do you can make it > only reply to post requests, set authentification to the post request and > other stuff to prevent malicious attacks. there are options for ssl > authentification, i had to use curl for a wsdl with user authentification > and just recently i created a quick curl call to a ruby webservice i > created. it's quick, easy and gets the job done. > > ~rob > -----Original Message----- > From: Brent Baisley > To: NYPHP Talk > Sent: Tue, 24 Mar 2009 12:47 pm > Subject: Re: [nycphp-talk] Remote php call > > Curl is the better way to go, but if you just need to hit a page on > > another server you can use > > file_get_contents("http://domain.com/script.php?param=a"); > > > file_get_contents doesn't handle errors, failures, redirects, > > timeouts, etc. very well, which is why curl is better. But in a pinch, > > file_get_contents works. > > > Brent > > > 2009/3/23 Michele Waldman : > > > Sorry for this posting. I may20seem lazy but everyone wants me to do > > > everything right now and my daughter had 104 fever today. > > > > > > > > > > > > I?m pressed for time and I?ve got a baby to tend to right now. > > > > > > > > > > > > If I want to call a remote php script from a php file in a different > > > domain? Curl it? > > > > > > > > > > > > Michele > > > > > > > > > > > > _______________________________________________ > > > New York PHP User Group Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > http://www.nyphp.org/show_participation.php > > > > > _______________________________________________ > > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > > ------------------------------ > *The Average US Credit Score is 692. See Yours in Just 2 Easy Steps! > * > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Tue Mar 24 17:00:15 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Tue, 24 Mar 2009 17:00:15 -0400 (EDT) Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: Message-ID: On Tue, 24 Mar 2009, N?stor wrote: > I am trying to connect to an Oracle Database and when using the > oci_connect() > function, I get an error on my apache error_log file: > PHP Warning: PHP Startup: Unable to load dynamic library > 'c:\\php\\ext\\php_oci8.dll' - The specified > procedure could not be found.\r\n in Unknown on line 0 > > I have my extension _dir="C:\php\ext" > I have my extension= php_oci8.dll uncommented Is it listed in he output from phpinfo() ? -- Aj. From rotsen at gmail.com Tue Mar 24 18:19:18 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Tue, 24 Mar 2009 15:19:18 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: NO! On Tue, Mar 24, 2009 at 2:00 PM, Ajai Khattri wrote: > On Tue, 24 Mar 2009, N?stor wrote: > > > I am trying to connect to an Oracle Database and when using the > > oci_connect() > > function, I get an error on my apache error_log file: > > PHP Warning: PHP Startup: Unable to load dynamic library > > 'c:\\php\\ext\\php_oci8.dll' - The specified > > procedure could not be found.\r\n in Unknown on line 0 > > > > I have my extension _dir="C:\php\ext" > > I have my extension= php_oci8.dll uncommented > > Is it listed in he output from phpinfo() ? > > > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Tue Mar 24 18:56:36 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Tue, 24 Mar 2009 18:56:36 -0400 (EDT) Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: Message-ID: On Tue, 24 Mar 2009, N?stor wrote: > NO! Yeah, there's your problem :-) -- Aj. From rotsen at gmail.com Tue Mar 24 19:02:24 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Tue, 24 Mar 2009 16:02:24 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: Ajai, I do not get it? YOu mean I have to install oci8.dll? from where? Pear? Thanks, :-) 2009/3/24 Ajai Khattri > On Tue, 24 Mar 2009, N?stor wrote: > > > NO! > > Yeah, there's your problem :-) > > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Tue Mar 24 19:37:12 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Tue, 24 Mar 2009 19:37:12 -0400 (EDT) Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: Message-ID: On Tue, 24 Mar 2009, N?stor wrote: > I do not get it? > > YOu mean I have to install oci8.dll? from where? Pear? Im assuming since its not shown in phpinfo() output then you either don't have it installed or PHP doesn't see it. Are you using OCI8 functions? Or using PDO..? -- Aj. From rotsen at gmail.com Tue Mar 24 19:40:51 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Tue, 24 Mar 2009 16:40:51 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: oci8 I am trying to figure out where t downloaded from for php 5.2.5 On Tue, Mar 24, 2009 at 4:37 PM, Ajai Khattri wrote: > On Tue, 24 Mar 2009, N?stor wrote: > > > I do not get it? > > > > YOu mean I have to install oci8.dll? from where? Pear? > > Im assuming since its not shown in phpinfo() output then you either don't > have it installed or PHP doesn't see it. > > Are you using OCI8 functions? Or using PDO..? > > > > -- > Aj. > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mutazmusa at gmail.com Tue Mar 24 21:05:06 2009 From: mutazmusa at gmail.com (Mutaz Musa) Date: Tue, 24 Mar 2009 17:05:06 -0800 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> Check the configuration file path on phpinfo() and make sure you uncommented the right one. 2009/3/24 N?stor > oci8 > > I am trying to figure out where t downloaded from for php 5.2.5 > > > > > On Tue, Mar 24, 2009 at 4:37 PM, Ajai Khattri wrote: > >> On Tue, 24 Mar 2009, N?stor wrote: >> >> > I do not get it? >> > >> > YOu mean I have to install oci8.dll? from where? Pear? >> >> Im assuming since its not shown in phpinfo() output then you either don't >> have it installed or PHP doesn't see it. >> >> Are you using OCI8 functions? Or using PDO..? >> >> >> >> -- >> Aj. >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smanes at magpie.com Tue Mar 24 23:26:07 2009 From: smanes at magpie.com (Steve Manes) Date: Tue, 24 Mar 2009 23:26:07 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler Message-ID: <49C9A44F.9050603@magpie.com> Has anyone done this? I know that memcached can be used as an alternative data store for PHP sessions but I don't recall anyone trying this with APC. From lists at zaunere.com Tue Mar 24 23:43:58 2009 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 24 Mar 2009 23:43:58 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler In-Reply-To: <49C9A44F.9050603@magpie.com> References: <49C9A44F.9050603@magpie.com> Message-ID: <056001c9acfb$ee12ad60$ca380820$@com> > Has anyone done this? I know that memcached can be used as an > alternative data store for PHP sessions but I don't recall anyone > trying this with APC. either works - memcached of course giving you distributed multi-server shared data easier than APC. H From jcampbell1 at gmail.com Tue Mar 24 23:44:38 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Tue, 24 Mar 2009 23:44:38 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler In-Reply-To: <49C9A44F.9050603@magpie.com> References: <49C9A44F.9050603@magpie.com> Message-ID: <8f0676b40903242044j27c60035hb51c1146a2b83c68@mail.gmail.com> Don't do it. It is either a solution to a problem you don't have, or the wrong solution. APC has one datastore per server, which will be a disaster once you have more than 1 front end machine, or if you have to restart the webserver then all your users will get logged out. What do you store in sessions? The most performant solution is tamper-proof cookies, but that only works if the amount of data you are storing is always less than ~3k, and you must write the session before any output is sent. The second best is database or database+memcache. On Tue, Mar 24, 2009 at 11:26 PM, Steve Manes wrote: > Has anyone done this? ?I know that memcached can be used as an alternative > data store for PHP sessions but I don't recall anyone trying this with APC. > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From smanes at magpie.com Wed Mar 25 00:03:11 2009 From: smanes at magpie.com (Steve Manes) Date: Wed, 25 Mar 2009 00:03:11 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler In-Reply-To: <8f0676b40903242044j27c60035hb51c1146a2b83c68@mail.gmail.com> References: <49C9A44F.9050603@magpie.com> <8f0676b40903242044j27c60035hb51c1146a2b83c68@mail.gmail.com> Message-ID: <49C9ACFF.3020708@magpie.com> John Campbell wrote: > Don't do it. It is either a solution to a problem you don't have, or > the wrong solution. APC has one datastore per server, which will be a > disaster once you have more than 1 front end machine, or if you have > to restart the webserver then all your users will get logged out. I'm aware that it's a single server solution. So is the stock /tmp session storage. However most web sites are single server and are unlikely ever to be clustered so there's definitely a "market" for it. Worst case, since PHP's session support is so well partitioned, if you should need to cluster later you can always return to a database solution for session support without affecting your application code. I'm just floating an idea here. If you're already employing APC, using its user cache space for session data store would save one round trip to the database per session-targeted page request, which isn't insignificant. I'm just wondering if there are some other reasons for not using APC for this. From jcampbell1 at gmail.com Wed Mar 25 02:41:43 2009 From: jcampbell1 at gmail.com (John Campbell) Date: Wed, 25 Mar 2009 02:41:43 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler In-Reply-To: <49C9ACFF.3020708@magpie.com> References: <49C9A44F.9050603@magpie.com> <8f0676b40903242044j27c60035hb51c1146a2b83c68@mail.gmail.com> <49C9ACFF.3020708@magpie.com> Message-ID: <8f0676b40903242341m13ef1eb6g94fda52811f7cd85@mail.gmail.com> On Wed, Mar 25, 2009 at 12:03 AM, Steve Manes wrote: > John Campbell wrote: >> >> Don't do it. ?It is either a solution to a problem you don't have, or >> the wrong solution. ?APC has one datastore per server, which will be a >> disaster once you have more than 1 front end machine, or if you have >> to restart the webserver then all your users will get logged out. > > I'm aware that it's a single server solution. ?So is the stock /tmp session > storage. ?However most web sites are single server and are unlikely ever to > be clustered so there's definitely a "market" for it. Worst case, since > PHP's session support is so well partitioned, if you should need to cluster > later you can always return to a database solution for session support > without affecting your application code. > > I'm just floating an idea here. ?If you're already employing APC, using its > user cache space for session data store would save one round trip to the > database per session-targeted page request, which isn't insignificant. > > I'm just wondering if there are some other reasons for not using APC for > this. Assuming a single server solution, you are trading persistence for performance. IMO, the performance gain is trivial unless you are constantly modifying your sessions. I use a trick that eliminates 95% of session related disk I/O, and relies on two principles: 1) Only write the session data if it has actually changed. 2) Update the access time on read, but allow for a window (e.g. Sessions last 5 hours, but are only extended if they are accessed when 0-2 hours remains on the session) Below is some pseudo code: $sh = new Custom_Session_Handler($db_link,$min_lifetime,$max_lifetime) class Custom_Session_Handler { function _read($id) { // normal read stuff if($valid_until < time() - $this->min_lifetime ) { UPDATE sessions SET valid_until = NOW() + $this->max_lifetime } $this->_data = $data; return $data; } function _write($data) { if ($data != $this->_data) { // update sql } } } Regards, John Campbell From ps at blu-studio.com Wed Mar 25 06:01:16 2009 From: ps at blu-studio.com (Peter Sawczynec) Date: Wed, 25 Mar 2009 06:01:16 -0400 Subject: [nycphp-talk] Parse HTML Files as PHP In-Reply-To: <8f0676b40902221313o1812a4d2t29d4881737218dd7@mail.gmail.com> References: <000701c9951a$39044800$ab0cd800$@com> <8f0676b40902221313o1812a4d2t29d4881737218dd7@mail.gmail.com> Message-ID: <000901c9ad30$a3b7ffb0$eb27ff10$@com> For reference regarding this topic, I tried many kinds of single directives with no success. Only after using these combined directive(s) in an .htaccess file at the top level folder caused my HTML files to get parsed by PHP immediately: AddType application/x-httpd-php .htm .html AddHandler x-httpd-php .htm .html Further it was this post, that wrapped up the variations on this technique very nicely and gave me answers: http://www.velvetblues.com/web-development-blog/how-to-parse-html-files- as-php/ Warmest regards, ? Peter Sawczynec Technology Dir. bl?studio 941.893.0396 ps at blu-studio.com www.blu-studio.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Campbell Sent: Sunday, February 22, 2009 4:14 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Parse HTML Files as PHP 2009/2/22 Peter Sawczynec : > So now if anyone with some SEO/search background can weigh in on the > page name change issue > that would be great. You are on the right track. You could do a bazillion 301 redirects from .html to .php , but that is a waste of your time, will slow down page loads, and 301 redirects don't always pass 100% of the link juice. Why bother? _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From tgales at tgaconnect.com Wed Mar 25 07:38:58 2009 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 25 Mar 2009 07:38:58 -0400 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: Message-ID: <49CA17D2.6040502@tgaconnect.com> N?stor wrote: > Hi, > > System = W2K / apache 2.055 / php 5.25 / mysql 5.0.18-nt > > I am trying to connect to an Oracle Database and when using the > oci_connect() > Oracle 10g uses a different 'dll' than 11g does. (php_oci8 versus php_oci8_11g.dll) You can use the 10g version of the dll to connect to an 11.1g database or so it is claimed at: http://pecl.php.net/package/oci8 I am guessing that you would have reduced functionality if you used the older dll. (I never connect to anything higher than 10g) -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From danielc at analysisandsolutions.com Wed Mar 25 10:01:37 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 25 Mar 2009 10:01:37 -0400 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> Message-ID: <20090325140137.GA7052@panix.com> Nestor: On Tue, Mar 24, 2009 at 05:05:06PM -0800, Mutaz Musa wrote: > Check the configuration file path on phpinfo() and make sure you uncommented > the right one. Mutaz is correct. The extension dll ships with PHP, so you don't need to download anything. Just double check all of your settings shown in phpinfo() (such as Loaded Configuration File and other additional ini files, extension_dir). --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 brian at realm3.com Wed Mar 25 10:17:39 2009 From: brian at realm3.com (Brian D.) Date: Wed, 25 Mar 2009 10:17:39 -0400 Subject: [nycphp-talk] "Becoming A Bash Ninja" Slides Message-ID: I just put the slides online here: http://realm3.com/articles/nyphp_presentation_-_become_a_bash_ninja Hopefully later we'll have a video to put up with this, too, but for now the slides contain all of the links from the presentation. Thanks, - Brian D. realm3 web applications [realm3.com] Information architecture, application development. From rotsen at gmail.com Wed Mar 25 10:20:22 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Wed, 25 Mar 2009 07:20:22 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: <20090325140137.GA7052@panix.com> References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> <20090325140137.GA7052@panix.com> Message-ID: People, I have done all of the above and still phpinfo() doea not show the oci8. Yes, I do have the php_oci8.dll in the ext directory. I even copied it to the system32 directory to the C:\php directory and to apache's bin directory and phpinfo still does not see the oci8. I am even looking in the Oracle world to see what could be the reason that the oci8 is not recognized because the error messages says "Unable to load the dynamic library C:\php\ext\php_oci8.dll" Thnaks for your replies, :-) On Wed, Mar 25, 2009 at 7:01 AM, Daniel Convissor < danielc at analysisandsolutions.com> wrote: > Nestor: > > On Tue, Mar 24, 2009 at 05:05:06PM -0800, Mutaz Musa wrote: > > Check the configuration file path on phpinfo() and make sure you > uncommented > > the right one. > > Mutaz is correct. The extension dll ships with PHP, so you don't need to > download anything. Just double check all of your settings shown in > phpinfo() (such as Loaded Configuration File and other additional ini > files, extension_dir). > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From afischer at email.smith.edu Wed Mar 25 10:49:42 2009 From: afischer at email.smith.edu (Aaron Fischer) Date: Wed, 25 Mar 2009 10:49:42 -0400 Subject: [nycphp-talk] Chat software Message-ID: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> Heya, does anyone have any experience or recommendations for chat software? I'm looking for something to host a group of chatters in a room, probably around 20-40 chatters at a time. I had something a year or so ago, I think it was called FlashChat, and it was a php/flash combination. It was pretty nice but our server admins removed it due to security concerns. So, any recommendations? Thanks, -Aaron From danielc at analysisandsolutions.com Wed Mar 25 11:02:52 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 25 Mar 2009 11:02:52 -0400 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> <20090325140137.GA7052@panix.com> Message-ID: <20090325150252.GA20408@panix.com> Nestor: On Wed, Mar 25, 2009 at 07:20:22AM -0700, N?stor wrote: > "Unable to load the dynamic library C:\php\ext\php_oci8.dll" All I can say is I've run oci8 on windows without incident in the past. Perhaps you have a problem with your file permissions? Also, are other extensions loading? Try uncommenting and commenting out some extensions in your in file and see what happens to phpinfo(). Which version of PHP are you using? Perhaps try reinstalling? Get a fresh download from php.net, move your old installation aside, put the new version in place. --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 rolan at omnistep.com Wed Mar 25 11:09:44 2009 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 25 Mar 2009 11:09:44 -0400 Subject: [nycphp-talk] Chat software In-Reply-To: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> References: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> Message-ID: <49CA4938.3050307@omnistep.com> Aaron Fischer wrote: > Heya, does anyone have any experience or recommendations for chat > software? I'm looking for something to host a group of chatters in a > room, probably around 20-40 chatters at a time. > > I had something a year or so ago, I think it was called FlashChat, and > it was a php/flash combination. It was pretty nice but our server > admins removed it due to security concerns. > > So, any recommendations? > 1) meebo.com rooms 2) gabbly.com - (has ads) 3) zoho meeting (used to work stand alone, but now I think you have to have an account and be logged in for the chat to be enabled). ~Rolan From tom at supertom.com Wed Mar 25 11:21:07 2009 From: tom at supertom.com (Tom Melendez) Date: Wed, 25 Mar 2009 08:21:07 -0700 Subject: [nycphp-talk] "Becoming A Bash Ninja" Slides In-Reply-To: References: Message-ID: <117286890903250821x3948393bs7b87109a9a2be852@mail.gmail.com> On Wed, Mar 25, 2009 at 7:17 AM, Brian D. wrote: > I just put the slides online here: > > http://realm3.com/articles/nyphp_presentation_-_become_a_bash_ninja > I wasn't familiar with "siege" - I'm going to check it out! Thanks. Tom http://www.liphp.org From rotsen at gmail.com Wed Mar 25 12:01:46 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Wed, 25 Mar 2009 09:01:46 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: <20090325150252.GA20408@panix.com> References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> <20090325140137.GA7052@panix.com> <20090325150252.GA20408@panix.com> Message-ID: I am using php 5.2.5 php_mysql.dll is loading and I can access my mysql databse with some of my php programs php_ldap.dll is loading Yes, I might have to download and install php 5.2.9 which is the latest Thanks, Again!!! On Wed, Mar 25, 2009 at 8:02 AM, Daniel Convissor < danielc at analysisandsolutions.com> wrote: > Nestor: > > On Wed, Mar 25, 2009 at 07:20:22AM -0700, N?stor wrote: > > > "Unable to load the dynamic library C:\php\ext\php_oci8.dll" > > All I can say is I've run oci8 on windows without incident in the past. > Perhaps you have a problem with your file permissions? > > Also, are other extensions loading? Try uncommenting and commenting out > some extensions in your in file and see what happens to phpinfo(). > > Which version of PHP are you using? > > Perhaps try reinstalling? Get a fresh download from php.net, move your > old installation aside, put the new version in place. > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From corey at gelform.com Wed Mar 25 12:13:07 2009 From: corey at gelform.com (Corey H Maass - gelform.com) Date: Wed, 25 Mar 2009 12:13:07 -0400 Subject: [nycphp-talk] Chat software In-Reply-To: <49CA4938.3050307@omnistep.com> References: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> <49CA4938.3050307@omnistep.com> Message-ID: <1237997587.19127.1307263215@webmail.messagingengine.com> Campfire. On Wed, 25 Mar 2009 11:09:44 -0400, "Rolan Yang" said: > Aaron Fischer wrote: > > Heya, does anyone have any experience or recommendations for chat > > software? I'm looking for something to host a group of chatters in a > > room, probably around 20-40 chatters at a time. > > > > I had something a year or so ago, I think it was called FlashChat, and > > it was a php/flash combination. It was pretty nice but our server > > admins removed it due to security concerns. > > > > So, any recommendations? > > > > 1) meebo.com rooms > 2) gabbly.com - (has ads) > 3) zoho meeting (used to work stand alone, but now I think you have to > have an account and be logged in for the chat to be enabled). > > ~Rolan > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php // Corey H Maass Gelform Design Brooklyn, NY Web design and development for art and business em corey at gelform.com ww http://www.gelform.com ph 646/228.5048 fx 866/502.4861 IM gelform From smanes at magpie.com Wed Mar 25 12:31:02 2009 From: smanes at magpie.com (Steve Manes) Date: Wed, 25 Mar 2009 12:31:02 -0400 Subject: [nycphp-talk] APC for a custom PHP session handler In-Reply-To: <8f0676b40903242341m13ef1eb6g94fda52811f7cd85@mail.gmail.com> References: <49C9A44F.9050603@magpie.com> <8f0676b40903242044j27c60035hb51c1146a2b83c68@mail.gmail.com> <49C9ACFF.3020708@magpie.com> <8f0676b40903242341m13ef1eb6g94fda52811f7cd85@mail.gmail.com> Message-ID: <49CA5C46.7050201@magpie.com> John Campbell wrote: > Assuming a single server solution, you are trading persistence for > performance. IMO, the performance gain is trivial unless you are > constantly modifying your sessions. > > I use a trick that eliminates 95% of session related disk I/O, and > relies on two principles: > 1) Only write the session data if it has actually changed. > 2) Update the access time on read, but allow for a window (e.g. > Sessions last 5 hours, but are only extended if they are accessed when > 0-2 hours remains on the session) I already know the relative merits of database vs shared memory data stores. I want to see if there are any issues with using APC for PHP session storage. I've been testing a Drupal module I wrote to use APC user cache and it's worked well for several months. But I don't know if there are any curve balls in using APC for session storage. From ajai at bitblit.net Wed Mar 25 12:57:00 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 25 Mar 2009 12:57:00 -0400 (EDT) Subject: [nycphp-talk] Chat software In-Reply-To: <49CA4938.3050307@omnistep.com> Message-ID: On Wed, 25 Mar 2009, Rolan Yang wrote: > 1) meebo.com rooms +1 Ive used meebo rooms from inside symfony. API is easy to use. -- Aj. From leeeyerman at aol.com Wed Mar 25 13:00:55 2009 From: leeeyerman at aol.com (leeeyerman at aol.com) Date: Wed, 25 Mar 2009 13:00:55 -0400 Subject: [nycphp-talk] Chat software In-Reply-To: Message-ID: <8CB7B82658AF265-CA4-15BB@FWM-D26.sysops.aol.com> 123flashchat.com integrates into php/mysql really well, have powerful java server, with nice flash front end... and complete php compt... I have used it a lot, and I like it. lee -----Original Message----- From: Ajai Khattri To: NYPHP Talk Sent: Wed, 25 Mar 2009 10:57 am Subject: Re: [nycphp-talk] Chat software On Wed, 25 Mar 2009, Rolan Yang wrote: > 1) meebo.com rooms +1 Ive used meebo rooms from inside symfony. API is easy to use. -- Aj. _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From leam at reuel.net Wed Mar 25 13:45:57 2009 From: leam at reuel.net (Leam Hall) Date: Wed, 25 Mar 2009 13:45:57 -0400 Subject: [nycphp-talk] "Becoming A Bash Ninja" Slides In-Reply-To: References: Message-ID: <49CA6DD5.1070005@reuel.net> Good stuff, I have to take some notes! My personal favorite is using find with a grep -i for when people mix case in filenames. find . | grep -i Leam From mike at michaelpjohnson.com Wed Mar 25 13:48:48 2009 From: mike at michaelpjohnson.com (Michael Johnson) Date: Wed, 25 Mar 2009 13:48:48 -0400 Subject: [nycphp-talk] "Becoming A Bash Ninja" Slides In-Reply-To: <49CA6DD5.1070005@reuel.net> References: <49CA6DD5.1070005@reuel.net> Message-ID: <49CA6E80.1040408@michaelpjohnson.com> Leam Hall wrote: > Good stuff, I have to take some notes! > > My personal favorite is using find with a grep -i for when people mix > case in filenames. > > find . | grep -i > > Leam > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php Or... find . -iname Love the presentation, I'm going to refer a few new bash users over to it. From sequethin at gmail.com Wed Mar 25 13:55:17 2009 From: sequethin at gmail.com (Michael Hernandez) Date: Wed, 25 Mar 2009 13:55:17 -0400 Subject: [nycphp-talk] "Becoming A Bash Ninja" Slides In-Reply-To: <49CA6E80.1040408@michaelpjohnson.com> References: <49CA6DD5.1070005@reuel.net> <49CA6E80.1040408@michaelpjohnson.com> Message-ID: On Mar 25, 2009, at 1:48 PM, Michael Johnson wrote: > Leam Hall wrote: >> Good stuff, I have to take some notes! >> >> My personal favorite is using find with a grep -i for when people >> mix case in filenames. >> >> find . | grep -i >> >> Leam >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php > Or... > find . -iname > > Love the presentation, I'm going to refer a few new bash users over > to it. and don't forget vimtutor and.... for the daring.... zsh :) --Mike H From ajai at bitblit.net Wed Mar 25 16:03:44 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 25 Mar 2009 16:03:44 -0400 (EDT) Subject: [nycphp-talk] Chat software In-Reply-To: <8CB7B82658AF265-CA4-15BB@FWM-D26.sysops.aol.com> Message-ID: On Wed, 25 Mar 2009, leeeyerman at aol.com wrote: > 123flashchat.com > > integrates into php/mysql really well, have powerful java server, with nice flash front end... and complete php compt... I have used it a lot, and I like it. The meebo chat is Flash-based and uses their proven server infrastructure not yours. No fancy Java server needed. -- Aj. From justin at justinhileman.info Wed Mar 25 19:09:18 2009 From: justin at justinhileman.info (justin) Date: Wed, 25 Mar 2009 19:09:18 -0400 Subject: [nycphp-talk] Chat software In-Reply-To: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> References: <27F5FE9A-BF61-4AE9-8CB6-D9DE1F78F22F@email.smith.edu> Message-ID: <1dc0e7e00903251609s58f4ea14qa6874778d1067f85@mail.gmail.com> http://tinychat.com/ :) On Wed, Mar 25, 2009 at 10:49 AM, Aaron Fischer wrote: > Heya, does anyone have any experience or recommendations for chat software? > ?I'm looking for something to host a group of chatters in a room, probably > around 20-40 chatters at a time. > > I had something a year or so ago, I think it was called FlashChat, and it > was a php/flash combination. ?It was pretty nice but our server admins > removed it due to security concerns. > > So, any recommendations? > > Thanks, > > -Aaron > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -- justin http://justinhileman.com From tgales at tgaconnect.com Thu Mar 26 02:28:03 2009 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 26 Mar 2009 02:28:03 -0400 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> <20090325140137.GA7052@panix.com> <20090325150252.GA20408@panix.com> Message-ID: <49CB2073.5020306@tgaconnect.com> N?stor wrote: > I am using php 5.2.5 > php_mysql.dll is loading and I can access my mysql databse with some > of my php programs > php_ldap.dll is loading > > Yes, I might have to download and install php 5.2.9 which is the latest First download a copy of dependency walker from: http://www.dependencywalker.com/ Make sure that you have a copy of of php_oci8.dll in the ext directory (as defined in your php.ini) Run dependency walker on the php_oci8.dll Chances are that you will see an error about not being able to open OCI.DLL This means that your windows os cannot find the client connect software. You should change your path to point to the client software -- or somehow get dependency walker to run clean. The most probable cause of not being able to load the client software is that no client is installed Perhaps you should read http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf "THE UNDERGROUND PHP AND ORACLE? MANUAL CHRISTOPHER" A word of advice: don't let dll's resolve to your system directory That is, erase php_oci8.dll from the system32 directory (and anywhere else you may have thought it should go -- and use 'path' resolving instead) -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From david at davidmintz.org Fri Mar 27 09:12:18 2009 From: david at davidmintz.org (David Mintz) Date: Fri, 27 Mar 2009 09:12:18 -0400 Subject: [nycphp-talk] .... speaking of Drupal Message-ID: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri Mar 27 09:19:38 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 27 Mar 2009 09:19:38 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> Message-ID: <011201c9aede$ae3d5e80$0ab81b80$@com> Hi, > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? I think this is a good idea, so long as there is interest. Any other yays? I can have it setup today. H From kenrbnsn at rbnsn.com Fri Mar 27 09:24:01 2009 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Fri, 27 Mar 2009 09:24:01 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: <004901c9aedf$4cbc7910$e6356b30$@com> Yay. I've been learning Drupal on the job for the last year, so another way of answering questions would be welcome. Ken -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: Friday, March 27, 2009 9:20 AM To: 'NYPHP Talk' Subject: Re: [nycphp-talk] .... speaking of Drupal Hi, > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? I think this is a good idea, so long as there is interest. Any other yays? I can have it setup today. H _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From compustretch at gmail.com Fri Mar 27 09:29:13 2009 From: compustretch at gmail.com (Compi) Date: Fri, 27 Mar 2009 09:29:13 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: drupal is so cool it doesn't neeeed an email list?! j/k, please add me. /? -- "In theory, theory and practice are exactly the same. In practice, they're completely different." On Fri, Mar 27, 2009 at 9:19 AM, Hans Zaunere wrote: > Hi, > > > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? > > I think this is a good idea, so long as there is interest. > > Any other yays? I can have it setup today. > > H > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yitzchas at touro.edu Fri Mar 27 10:05:03 2009 From: yitzchas at touro.edu (Yitzchak Schaffer) Date: Fri, 27 Mar 2009 10:05:03 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: <49CCDD0F.2010301@touro.edu> Hans Zaunere wrote: > I think this is a good idea, so long as there is interest. > > Any other yays? I can have it setup today. ++ -- 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 yitzchas at touro.edu Twitter /torahsyslib From d at ingk.com Fri Mar 27 10:11:58 2009 From: d at ingk.com (Damion Hankejh (ingk)) Date: Fri, 27 Mar 2009 10:11:58 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> Message-ID: <017701c9aee5$feadb2f0$fc0918d0$@com> Double-plus good. __________________________________ Damion H?nkejh | d at ingk.com From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Friday, March 27, 2009 9:12 AM Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Fri Mar 27 10:29:59 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 27 Mar 2009 10:29:59 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: <017c01c9aee8$8235f630$86a1e290$@com> > > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? > > I think this is a good idea, so long as there is interest. > > Any other yays? I can have it setup today. Ok, that's enough feedback for me... http://lists.nyphp.org/mailman/listinfo/drupal I'll get an announce out as well. H From lists at zaunere.com Fri Mar 27 11:29:11 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 27 Mar 2009 11:29:11 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <017c01c9aee8$8235f630$86a1e290$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> <017c01c9aee8$8235f630$86a1e290$@com> Message-ID: <01bb01c9aef0$c7086510$55192f30$@com> > > > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? > > > > I think this is a good idea, so long as there is interest. > > > > Any other yays? I can have it setup today. > > Ok, that's enough feedback for me... > > http://lists.nyphp.org/mailman/listinfo/drupal > > I'll get an announce out as well. Ok, this is all set - let me know if anyone runs into any problems with the list. Who's going to make the first post? :) And while on this topic, I'll remind everyone that we're happy to form other project related SIGs. Wordpress b2evolution CakePHP others...? If anyone is part of an existing meet-up/group and would like to work together, or would like to see a new SIG created, just let us know. H From rotsen at gmail.com Fri Mar 27 12:05:37 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Fri, 27 Mar 2009 09:05:37 -0700 Subject: [nycphp-talk] Connecting to an Oracle DB In-Reply-To: <49CB2073.5020306@tgaconnect.com> References: <602c8ac0903241805m60701cd0rfc1fe1537294dffa@mail.gmail.com> <20090325140137.GA7052@panix.com> <20090325150252.GA20408@panix.com> <49CB2073.5020306@tgaconnect.com> Message-ID: This is the error I am getting: [Fri Mar 27 08:34:31 2009] [error] [client 127.0.0.1] PHP Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\oracle_php\\adodb5\\drivers\\adodb-oci8.inc.php on line 235 [Fri Mar 27 08:34:31 2009] [error] [client 127.0.0.1] PHP Fatal error: Call to a member function FetchRow() on a non-object in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\oracle_php\\adodb.php on line 9 I have research it in the internet and you find a lot of messages about this type of problem but there is not a real solution to the problem. I have tried everything I have read in this forum and others and nothing. I will give up for now, but I will try something else in the future. One of the threads I read mentions that the way to do it is to use the zend php package that somehow that package has the correct compatability dlls. I will try that in the future but for the moment I need to concetrate on other things. Thanks all for your help. :-) On Wed, Mar 25, 2009 at 11:28 PM, Tim Gales wrote: > N?stor wrote: > >> I am using php 5.2.5 >> php_mysql.dll is loading and I can access my mysql databse with some of my >> php programs >> php_ldap.dll is loading >> >> Yes, I might have to download and install php 5.2.9 which is the latest >> > First download a copy of dependency walker from: > http://www.dependencywalker.com/ > > Make sure that you have a copy of of php_oci8.dll in the > ext directory (as defined in your php.ini) > > Run dependency walker on the php_oci8.dll > > Chances are that you will see an error about not being able to > open OCI.DLL > > This means that your windows os cannot find the client connect software. > > You should change your path to point to the client software -- > or somehow get dependency walker to run clean. > > The most probable cause of not being able to load the client > software is that no client is installed > > Perhaps you should read > > http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf > "THE UNDERGROUND PHP > AND ORACLE? MANUAL > CHRISTOPHER" > > A word of advice: don't let dll's resolve to your system directory > That is, erase php_oci8.dll from the system32 directory > (and anywhere else you may have thought it should go -- > and use 'path' resolving instead) > > -- > T. Gales & Associates > 'Helping People Connect with Technology' > http://www.tgaconnect.com > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Fri Mar 27 09:24:15 2009 From: dan.horning at planetnoc.com (Daniel Horning) Date: Fri, 27 Mar 2009 09:24:15 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: <000301c9aedf$54f6f2e0$fee4d8a0$@horning@planetnoc.com> I say go for it - just one thing - there are quite a few active lists on Drupal.org ... and I can't say I've seen anything go unanswered. But it might be a good idea for us here - to be able to ask more detailed questions. (maybe put a link at the bottom to Drupal.org's page for IRC (where many many many many questions get answered) ) I'm a yay (with a question) -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: Friday, March 27, 2009 9:20 AM To: 'NYPHP Talk' Subject: Re: [nycphp-talk] .... speaking of Drupal Hi, > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? I think this is a good idea, so long as there is interest. Any other yays? I can have it setup today. H _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From rotsen at gmail.com Fri Mar 27 12:33:49 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Fri, 27 Mar 2009 09:33:49 -0700 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <2686104736346000341@unknownmsgid> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> <2686104736346000341@unknownmsgid> Message-ID: Please ad me to the list :-) On Fri, Mar 27, 2009 at 6:24 AM, Daniel Horning wrote: > I say go for it - just one thing - there are quite a few active lists on > Drupal.org ... and I can't say I've seen anything go unanswered. But it > might be a good idea for us here - to be able to ask more detailed > questions. (maybe put a link at the bottom to Drupal.org's page for IRC > (where many many many many questions get answered) ) > > I'm a yay (with a question) > > -- > Dan Horning > > American Digital Services - Where you are only limited by imagination. > dan.horning at planetnoc.com :: http://www.americandigitalservices.com > 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 > 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On > Behalf Of Hans Zaunere > Sent: Friday, March 27, 2009 9:20 AM > To: 'NYPHP Talk' > Subject: Re: [nycphp-talk] .... speaking of Drupal > > Hi, > > > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? > > I think this is a good idea, so long as there is interest. > > Any other yays? I can have it setup today. > > H > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Fri Mar 27 12:35:08 2009 From: rotsen at gmail.com (=?ISO-8859-1?B?TulzdG9y?=) Date: Fri, 27 Mar 2009 09:35:08 -0700 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> <2686104736346000341@unknownmsgid> Message-ID: OK, I signed up already. thanks :-) On Fri, Mar 27, 2009 at 9:33 AM, N?stor wrote: > Please ad me to the list > > :-) > > > On Fri, Mar 27, 2009 at 6:24 AM, Daniel Horning > wrote: > >> I say go for it - just one thing - there are quite a few active lists on >> Drupal.org ... and I can't say I've seen anything go unanswered. But it >> might be a good idea for us here - to be able to ask more detailed >> questions. (maybe put a link at the bottom to Drupal.org's page for IRC >> (where many many many many questions get answered) ) >> >> I'm a yay (with a question) >> >> -- >> Dan Horning >> >> American Digital Services - Where you are only limited by imagination. >> dan.horning at planetnoc.com :: http://www.americandigitalservices.com >> 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 >> 15 Third Street, PO Box 746, Troy, NY 12180 (by appointment only) >> >> >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] >> On >> Behalf Of Hans Zaunere >> Sent: Friday, March 27, 2009 9:20 AM >> To: 'NYPHP Talk' >> Subject: Re: [nycphp-talk] .... speaking of Drupal >> >> Hi, >> >> > Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? >> >> I think this is a good idea, so long as there is interest. >> >> Any other yays? I can have it setup today. >> >> H >> >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smanes at magpie.com Fri Mar 27 18:25:40 2009 From: smanes at magpie.com (Steve Manes) Date: Fri, 27 Mar 2009 18:25:40 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <011201c9aede$ae3d5e80$0ab81b80$@com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> Message-ID: <49CD5264.5070308@magpie.com> Hans Zaunere wrote: >> Maybe we ought to have a NYPHP Drupal SIG/email llist. Doncha think? > > I think this is a good idea, so long as there is interest. > > Any other yays? I can have it setup today. Yay. From smanes at magpie.com Fri Mar 27 18:27:08 2009 From: smanes at magpie.com (Steve Manes) Date: Fri, 27 Mar 2009 18:27:08 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <000301c9aedf$54f6f2e0$fee4d8a0$@horning@planetnoc.com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> <000301c9aedf$54f6f2e0$fee4d8a0$@horning@planetnoc.com> Message-ID: <49CD52BC.5020708@magpie.com> Daniel Horning wrote: > I say go for it - just one thing - there are quite a few active lists on > Drupal.org ... and I can't say I've seen anything go unanswered. But it > might be a good idea for us here - to be able to ask more detailed > questions. (maybe put a link at the bottom to Drupal.org's page for IRC > (where many many many many questions get answered) ) Yes, there's the New York Drupal Group, which is pretty active: http://groups.drupal.org/new-york-city From lists at zaunere.com Fri Mar 27 18:56:47 2009 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 27 Mar 2009 18:56:47 -0400 Subject: [nycphp-talk] .... speaking of Drupal In-Reply-To: <49CD52BC.5020708@magpie.com> References: <721f1cc50903270612t2179e913j35496b56f43453fb@mail.gmail.com> <011201c9aede$ae3d5e80$0ab81b80$@com> <000301c9aedf$54f6f2e0$fee4d8a0$@horning@planetnoc.com> <49CD52BC.5020708@magpie.com> Message-ID: <032601c9af2f$4ebc3250$ec3496f0$@com> > > I say go for it - just one thing - there are quite a few active lists on > > Drupal.org ... and I can't say I've seen anything go unanswered. But it > > might be a good idea for us here - to be able to ask more detailed > > questions. (maybe put a link at the bottom to Drupal.org's page for IRC > > (where many many many many questions get answered) ) > > Yes, there's the New York Drupal Group, which is pretty active: > > http://groups.drupal.org/new-york-city We'd be happy to work with these guys as well, but the response to the Drupal list has been amazing so it seems there's a support void. 29 subscribes today for Drupal - 20 total for Zend :) Anyone interested in Symphony or CakePHP? Contact me off list if so. H From mmwaldman at nyc.rr.com Sat Mar 28 21:35:48 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Sat, 28 Mar 2009 21:35:48 -0400 Subject: [nycphp-talk] Eval a string Message-ID: <20090329013545.WXT23691.hrndva-omta04.mail.rr.com@DeJaVu> I have a database string that looks like "$variable word". When I assign it to a string the $variable is not being replaced by the actual value of $variable. Does anyone know how to force a replacement of a variable name with it's value in a string? Thanks, Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sat Mar 28 21:37:54 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Sat, 28 Mar 2009 21:37:54 -0400 Subject: [nycphp-talk] Eval a string In-Reply-To: <20090329013545.WXT23691.hrndva-omta04.mail.rr.com@DeJaVu> Message-ID: <20090329013751.YDA23691.hrndva-omta04.mail.rr.com@DeJaVu> I think a do use eval, I just used the wrong statement. Michele _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michele Waldman Sent: Saturday, March 28, 2009 9:36 PM To: 'NYPHP Talk' Subject: [nycphp-talk] Eval a string I have a database string that looks like "$variable word". When I assign it to a string the $variable is not being replaced by the actual value of $variable. Does anyone know how to force a replacement of a variable name with it's value in a string? Thanks, Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sat Mar 28 23:40:40 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Sat, 28 Mar 2009 23:40:40 -0400 Subject: [nycphp-talk] imagettftext Message-ID: <20090329034038.LBYW11218.hrndva-omta02.mail.rr.com@DeJaVu> Imagettftext is not being recognized on a server running php 5.2.9. Do I have to include or link in some library? I know I had a similar issue, but I'm drawing a blank right now on how to do that. And I don't know which library. This is similar to the mcrypt problem I had before, I think. Thanks, Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Sat Mar 28 23:46:09 2009 From: tom at supertom.com (Tom Melendez) Date: Sat, 28 Mar 2009 20:46:09 -0700 Subject: [nycphp-talk] imagettftext In-Reply-To: <20090329034038.LBYW11218.hrndva-omta02.mail.rr.com@DeJaVu> References: <20090329034038.LBYW11218.hrndva-omta02.mail.rr.com@DeJaVu> Message-ID: <117286890903282046t5b5b92f9h6b7e52be015ce45a@mail.gmail.com> Hi Michele, 2009/3/28 Michele Waldman : > Imagettftext is not being recognized on a server running php 5.2.9. > > > > Do I have to include or link in some library? According to the manual PHP needs to be compiled with exif: http://us.php.net/manual/en/exif.requirements.php if you look at phpinfo on your server, you'll probably see that missing from the ./configure line. Thanks, Tom http://www.liphp.org From mmwaldman at nyc.rr.com Sun Mar 29 00:17:12 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Sun, 29 Mar 2009 00:17:12 -0400 Subject: [nycphp-talk] imagettftext In-Reply-To: <20090329034038.LBYW11218.hrndva-omta02.mail.rr.com@DeJaVu> Message-ID: <20090329041709.COFO15894.hrndva-omta03.mail.rr.com@DeJaVu> Do I have to do a yum install on an image library? Does anyone know the library name? Michele _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michele Waldman Sent: Saturday, March 28, 2009 11:41 PM To: 'NYPHP Talk' Subject: [nycphp-talk] imagettftext Imagettftext is not being recognized on a server running php 5.2.9. Do I have to include or link in some library? I know I had a similar issue, but I'm drawing a blank right now on how to do that. And I don't know which library. This is similar to the mcrypt problem I had before, I think. Thanks, Michele -------------- next part -------------- An HTML attachment was scrubbed... URL: From justin at justinhileman.info Sun Mar 29 00:20:33 2009 From: justin at justinhileman.info (justin) Date: Sun, 29 Mar 2009 00:20:33 -0400 Subject: [nycphp-talk] Eval a string In-Reply-To: <20090329013545.WXT23691.hrndva-omta04.mail.rr.com@DeJaVu> References: <20090329013545.WXT23691.hrndva-omta04.mail.rr.com@DeJaVu> Message-ID: <1dc0e7e00903282120i3b24298eu2fc8188bdc6c030c@mail.gmail.com> 2009/3/28 Michele Waldman : > I have a database string that looks like ?$variable word?. > > When I assign it to a string the $variable is not being replaced by the > actual value of $variable. > > Does anyone know how to force a replacement of a variable name with it?s > value in a string? Evaling anything makes a bit uncomfortable, but most especially strings pulled out of the database. I typically use something like this instead: // db string is '%variable% word' $db_string = str_replace('%variable%', $variable, $db_string); If you have lots of things to replace, strtr() works well: $vars = array( '%foo%' => $foo, '%bar%' => $baz, '%baz%' => $baz ); $db_string = strtr($db_string, $vars); -- justin http://justinhileman.com From mmwaldman at nyc.rr.com Sun Mar 29 00:44:27 2009 From: mmwaldman at nyc.rr.com (Michele Waldman) Date: Sun, 29 Mar 2009 00:44:27 -0400 Subject: [nycphp-talk] imagettftext In-Reply-To: <117286890903282046t5b5b92f9h6b7e52be015ce45a@mail.gmail.com> Message-ID: <20090329044425.LUKZ11218.hrndva-omta02.mail.rr.com@DeJaVu> Oh "exif" Michele -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Tom Melendez Sent: Saturday, March 28, 2009 11:46 PM To: NYPHP Talk Subject: Re: [nycphp-talk] imagettftext Hi Michele, 2009/3/28 Michele Waldman : > Imagettftext is not being recognized on a server running php 5.2.9. > > > > Do I have to include or link in some library? According to the manual PHP needs to be compiled with exif: http://us.php.net/manual/en/exif.requirements.php if you look at phpinfo on your server, you'll probably see that missing from the ./configure line. Thanks, Tom http://www.liphp.org _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php From danielc at analysisandsolutions.com Sun Mar 29 15:56:21 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 29 Mar 2009 15:56:21 -0400 Subject: [nycphp-talk] git to this presentation Message-ID: <20090329195621.GA18914@panix.com> Folks: Saw this announcement in another group and figured it would be interesting to some people here... --Dan Date: Sat, 28 Mar 2009 19:21:01 -0400 To: announce at lists.nycbug.org From: NYC*BUG Announcements Subject: [announce] NYCBUG Wednesday, April 1 plus BSDCan and BSDCert Git: A Case Study In Distributed Version Control Wednesday, April 1 (really :) 6:45 pm, Suspenders Restaurant http://www.suspendersbar.com/location.php Brian Cully will speak on Git: A Case Study In Distributed Version Control. This talk will go over what distributed version control systems (dVCS) mean, and how git applies itself to its problems. bjc has been involved in open source since the mid 90s, contributing to the BSDs and Linux at various points. He once worked at Panix, and now works at Junction Networks. Wherever he goes he seems to end up working on the version control system, and is now using git exclusively. (pls note later meeting time. We recommend that you arrive early in event you plan to have dinner) -- 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 y2rob at aol.com Sun Mar 29 16:03:36 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Sun, 29 Mar 2009 16:03:36 -0400 Subject: [nycphp-talk] git to this presentation In-Reply-To: <20090329195621.GA18914@panix.com> References: <20090329195621.GA18914@panix.com> Message-ID: <8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com> yeah, i use git now and it's pretty awesome i must say. ~rob -----Original Message----- From: Daniel Convissor To: NYPHP Talk Sent: Sun, 29 Mar 2009 3:56 pm Subject: [nycphp-talk] git to this presentation Folks: Saw this announcement in another group and figured it would be interesting to some people here... --Dan Date: Sat, 28 Mar 2009 19:21:01 -0400 To: announce at lists.nycbug.org From: NYC*BUG Announcements Subject: [announce] NYCBUG Wednesday, April 1 plus BSDCan and BSDCert Git: A Case Study In Distributed Version Control Wednesday, April 1 (really :) 6:45 pm, Suspenders Restaurant http://www.suspendersbar.com/location.php Brian Cully will speak on Git: A Case Study In Distributed Version Control. This talk will go over what distributed version control systems (dVCS) mean, and how git applies itself to its problems. bjc has been involved in open source since the mid 90s, contributing to the BSDs and Linux at various points. He once worked at Panix, and now works at Junction Networks. Wherever he goes he seems to end up working on the version control system, and is now using git exclusively. (pls note later meeting time. We recommend that you arrive early in event you plan to have dinner) -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From randalrust at gmail.com Mon Mar 30 08:57:22 2009 From: randalrust at gmail.com (Randal Rust) Date: Mon, 30 Mar 2009 08:57:22 -0400 Subject: [nycphp-talk] Implementing Version Control Message-ID: As a small business owner, I am fairly able to manage projects with just three server environments -- development, testing, production. But the days of that working effectively are quickly coming to an end as I increase the number of subcontractors. I've used Tortoise in the past, but that was when everyone on the team was on the same network, in the same building. So I am familiar with how version control works. But my needs today are different. I need to provide access to people in various locations, different operating systems and need to be able to keep it all together and not create a huge mess. Any recommendations? -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From rmarscher at beaffinitive.com Mon Mar 30 09:27:56 2009 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Mon, 30 Mar 2009 09:27:56 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: References: Message-ID: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> On Mar 30, 2009, at 8:57 AM, Randal Rust wrote: > I need to provide access to people in various locations, different > operating systems and need to be able to keep it all together and > not create a huge mess. > Any recommendations? I'd say look into a hosted version control service. My favorites for svn version control (which would let Windows users use Tortoise, Mac users use Versions or command-line, and Linux users use a number of different clients -- all can also use plugins within Eclipse) are http://cvsdude.com and http://beanstalkapp.com. GitHub seems to be everyone's favorite for using git version control - http://github.com . Git might be the right solution for you if you are dealing with a team that is very spread out because developers don't have to worry about conflicts as much and you are more in control of what changes make it into the final code. From zippy1981 at gmail.com Mon Mar 30 09:38:36 2009 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 30 Mar 2009 09:38:36 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> Message-ID: <5458db3c0903300638h75b50ec6ra772031b857ef6d2@mail.gmail.com> Svn hosting is a good idea, but if you have a unix box you can give your subcontractors svn accounts and they can remotely access svn that way. Another option is to setup visualsvn server on your machine. On Mon, Mar 30, 2009 at 9:27 AM, Rob Marscher wrote: > On Mar 30, 2009, at 8:57 AM, Randal Rust wrote: > >> I need to provide access to people in various locations, different >> operating systems and need to be able to keep it all together and not create >> a huge mess. >> Any recommendations? >> > > I'd say look into a hosted version control service. > > My favorites for svn version control (which would let Windows users use > Tortoise, Mac users use Versions or command-line, and Linux users use a > number of different clients -- all can also use plugins within Eclipse) are > http://cvsdude.com and http://beanstalkapp.com. > > GitHub seems to be everyone's favorite for using git version control - > http://github.com. Git might be the right solution for you if you are > dealing with a team that is very spread out because developers don't have to > worry about conflicts as much and you are more in control of what changes > make it into the final code. > > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From corey at gelform.com Mon Mar 30 09:39:44 2009 From: corey at gelform.com (Corey H Maass - gelform.com) Date: Mon, 30 Mar 2009 09:39:44 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> Message-ID: <1238420384.15606.1308013263@webmail.messagingengine.com> For SVN hosting, I wound up going with svnrepository.com. Fewer bells and whistles, but cheaper. Good for a small shop if you know what yre doing (sounds like you do). Corey On Mon, 30 Mar 2009 09:27:56 -0400, "Rob Marscher" said: > On Mar 30, 2009, at 8:57 AM, Randal Rust wrote: > > I need to provide access to people in various locations, different > > operating systems and need to be able to keep it all together and > > not create a huge mess. > > Any recommendations? > > I'd say look into a hosted version control service. > > My favorites for svn version control (which would let Windows users > use Tortoise, Mac users use Versions or command-line, and Linux users > use a number of different clients -- all can also use plugins within > Eclipse) are http://cvsdude.com and http://beanstalkapp.com. > > GitHub seems to be everyone's favorite for using git version control - > http://github.com > . Git might be the right solution for you if you are dealing with a > team that is very spread out because developers don't have to worry > about conflicts as much and you are more in control of what changes > make it into the final code. > > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php // Corey H Maass Gelform Design Brooklyn, NY Web design and development for art and business em corey at gelform.com ww http://www.gelform.com ph 646/228.5048 fx 866/502.4861 IM gelform From randalrust at gmail.com Mon Mar 30 09:41:07 2009 From: randalrust at gmail.com (Randal Rust) Date: Mon, 30 Mar 2009 09:41:07 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> Message-ID: On Mon, Mar 30, 2009 at 9:27 AM, Rob Marscher wrote: > GitHub seems to be everyone's favorite for using git version control I am on a local Ruby list as well, even though I don't use it, and all of those folks seem to rave about GitHub. But I wanted to ask here, so that I don't get a bunch of responses that start with, "Why PHP?" -- Randal Rust R.Squared Communications www.r2communications.com 614-370-0036 From paul at devonianfarm.com Mon Mar 30 09:45:15 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 30 Mar 2009 09:45:15 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> Message-ID: <49D0CCEB.7080509@devonianfarm.com> Rob Marscher wrote: > > I'd say look into a hosted version control service. > > My favorites for svn version control (which would let Windows users > use Tortoise, Mac users use Versions or command-line, and Linux users > use a number of different clients -- all can also use plugins within > Eclipse) are http://cvsdude.com and http://beanstalkapp.com. > > GitHub seems to be everyone's favorite for using git version control - > http://github.com. Git might be the right solution for you if you are > dealing with a team that is very spread out because developers don't > have to worry about conflicts as much and you are more in control of > what changes make it into the final code. Personally I love using git on the unix command line. At the moment I'm using it in a mode very similar to CVS: I've got a central repository and multiple instances of the software that are pushed and pulled to it. If anything, I find git on the command line to be easier than CVS. My understanding is that GUI clients for git are currently pretty immature, particularly on Windows, which might be a problem for some. From dorgan at donaldorgan.com Mon Mar 30 09:47:13 2009 From: dorgan at donaldorgan.com (Donald J. Organ IV) Date: Mon, 30 Mar 2009 09:47:13 -0400 (EDT) Subject: [nycphp-talk] Table is full Message-ID: <6320437.121238420833673.JavaMail.root@twoguyshosting.com.> I am encountering the following error for an innoDB table. table 'xxx' is full The table currently has about 21 million rows in it, and i think we area little more than half way finished with the initial data load. >From what I can tell I have to enable autoextend but I am not sure how to do this and how it will affect the rest of the db's on the system. If anyone can point me in the right direction it would be highly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Mon Mar 30 10:10:20 2009 From: tom at supertom.com (Tom Melendez) Date: Mon, 30 Mar 2009 07:10:20 -0700 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <49D0CCEB.7080509@devonianfarm.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> <49D0CCEB.7080509@devonianfarm.com> Message-ID: <117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> >> I'd say look into a hosted version control service. >> I can strongly recommend UnFuddle: http://unfuddle.com/ Both Git and SVN hosting (and the ability to switch between both). Bug tracking and wikis as well. One particular feature that I like is the ability to "commit against bugs". So, someone files a bug with the details. You commit the code and reference the bug number in the commit message. A link to the diff along with your commit message shows up the comments of the bug (you can also close bugs this way). This feature (which is really just an SVN hook) is absolutely priceless long-term. I personally think that GitHub and Unfuddle should merge. Github is awesome for the "social and personal" aspects of sharing code, but Unfuddle really has the business side down. Super cheap too, IMO. Thanks, Tom http://www.liphp.org From ajai at bitblit.net Mon Mar 30 11:02:51 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 30 Mar 2009 11:02:51 -0400 (EDT) Subject: [nycphp-talk] Implementing Version Control In-Reply-To: Message-ID: On Mon, 30 Mar 2009, Randal Rust wrote: > But my needs today are different. I need to provide access to people > in various locations, different operating systems and need to be able > to keep it all together and not create a huge mess. > > Any recommendations? I use svnrepository.com ad Gitub. -- Aj. From ajai at bitblit.net Mon Mar 30 11:07:01 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 30 Mar 2009 11:07:01 -0400 (EDT) Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> Message-ID: On Mon, 30 Mar 2009, Tom Melendez wrote: > I can strongly recommend UnFuddle: > > http://unfuddle.com/ > > Both Git and SVN hosting (and the ability to switch between both). > Bug tracking and wikis as well. > > One particular feature that I like is the ability to "commit against > bugs". So, someone files a bug with the details. You commit the code > and reference the bug number in the commit message. A link to the > diff along with your commit message shows up the comments of the bug > (you can also close bugs this way). This feature (which is really > just an SVN hook) is absolutely priceless long-term. > > I personally think that GitHub and Unfuddle should merge. Github is > awesome for the "social and personal" aspects of sharing code, but > Unfuddle really has the business side down. Super cheap too, IMO. Thanks for posting this, looks great! -- Aj. From y2rob at aol.com Mon Mar 30 11:56:26 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 11:56:26 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: Message-ID: <8CB7F673766E3AB-AD8-50E@webmail-dx06.sysops.aol.com> i think that git/github is the best version control since sliced bread, not that the 2 are related :)? git is awesome though.? for group collaboration you can't do much better when it comes to merging, conflicts and omg branching!! in terms of their gui, it's not quite as robust, but it gets the job done and let's face it, if you're using svn or cvs, you have to know some command line because most likely you need to update staging servers with your code edits in order to test against other developer's code, whom are collaborating to the same project.? if you're a windows user who is also a developer, you should be developing on a mac - the best of both worlds and the future of development. ~rob -----Original Message----- From: Ajai Khattri To: NYPHP Talk Sent: Mon, 30 Mar 2009 11:07 am Subject: Re: [nycphp-talk] Implementing Version Control On Mon, 30 Mar 2009, Tom Melendez wrote: > I can strongly recommend UnFuddle: > > http://unfuddle.com/ > > Both Git and SVN hosting (and the ability to switch between both). > Bug tracking and wikis as well. > > One particular feature that I like is the ability to "commit against > bugs". So, someone files a bug with the details. You commit the code > and reference the bug number in the commit message. A link to the > diff along with your commit message shows up the comments of the bug > (you can also close bugs this way). This feature (which is really > just an SVN hook) is absolutely priceless long-term. > > I personally think that GitHub and Unfuddle should merge. Github is > awesome for the "social and personal" aspects of sharing code, but > Unfuddle really has the business side down. Super cheap too, IMO. Thanks for posting this, looks great! -- Aj. _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Mon Mar 30 12:00:08 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 30 Mar 2009 12:00:08 -0400 Subject: [nycphp-talk] git to this presentation In-Reply-To: <8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com> References: <20090329195621.GA18914@panix.com> <8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com> Message-ID: 2009/3/29 : > yeah, i use git now and it's pretty awesome i must say. > > ~rob The distributed nature of git makes it useful in a number of situations where svn just isn't appropriate, such as tracking changes to local configuration files. Since they only apply to the local machine (and might contain db passwords, app keys, and other sensitive info) you don't want them being pushed to a central repository. Nevertheless, it's nice to be able to track changes and roll back if necessary. git makes it wonderfully easy to add version control in place, and then decide later whether you want to add the repository to a central server or not. It also seems very compatible with svn-- as in, you can use git to track local branches and changes, but continue to use svn as the "master" repository that everything goes into at the end of the day. It's a bit like OO programming -- hard to explain all the advantages to someone who hasn't used it, but really quite clear once you start that "hey this really IS better" in most situations. Chris Snyder http://chxor.chxo.com/ From ajai at bitblit.net Mon Mar 30 12:04:16 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 30 Mar 2009 12:04:16 -0400 (EDT) Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <8CB7F673766E3AB-AD8-50E@webmail-dx06.sysops.aol.com> Message-ID: On Mon, 30 Mar 2009, y2rob at aol.com wrote: > if you're a windows user who is also a developer, you should be > developing on a mac - the best of both worlds and the future of > development. Well said :-) The Ruby guys love github because Rails and a bunch of related projects moved there... -- Aj. From y2rob at aol.com Mon Mar 30 12:10:56 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 12:10:56 -0400 Subject: [nycphp-talk] git to this presentation In-Reply-To: References: <20090329195621.GA18914@panix.com><8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com> Message-ID: <8CB7F693DBDFBA3-AD8-61B@webmail-dx06.sysops.aol.com> i think you do bring up some interesting points, but i'm confused on the sensitive material part.? do you not have this in your version control?? i would assume you have a check to determine if you're developing locally, staging or production, so that you're not editing these files per server. ~rob -----Original Message----- From: Chris Snyder To: NYPHP Talk Sent: Mon, 30 Mar 2009 12:00 pm Subject: Re: [nycphp-talk] git to this presentation 2009/3/29 : > yeah, i use git now and it's pretty awesome i must say. > > ~rob The distributed nature of git makes it useful in a number of situations where svn just isn't appropriate, such as tracking changes to local configuration files. Since they only apply to the local machine (and might contain db passwords, app keys, and other sensitive info) you don't want them being pushed to a central repository. Nevertheless, it's nice to be able to track changes and roll back if necessary. git makes it wonderfully easy to add version control in place, and then decide later whether you want to add the repository to a central server or not. It also seems very compatible with svn-- as in, you can use git to track local branches and changes, but continue to use svn as the "master" repository that everything goes into at the end of the day. It's a bit like OO programming -- hard to explain all the advantages to someone who hasn't used it, but really quite clear once you start that "hey this really IS better" in most situations. Chris Snyder http://chxor.chxo.com/ _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From y2rob at aol.com Mon Mar 30 12:17:25 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 12:17:25 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: Message-ID: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com> well there's another point i'd like to bring up with github, there is a search within it so if your project is public, you can share and get project libraries to help you in your development.? so think of it as being a code repository/sourceforge all in one.? also you can plug into git pretty easy for distribution of your code via command line.? we commit files to git and have a propogation script that runs to distribute these files across our cluster, it's pretty sweet. ~rob -----Original Message----- From: Ajai Khattri To: NYPHP Talk Sent: Mon, 30 Mar 2009 12:04 pm Subject: Re: [nycphp-talk] Implementing Version Control On Mon, 30 Mar 2009, y2rob at aol.com wrote: > if you're a windows user who is also a developer, you should be > developing on a mac - the best of both worlds and the future of > development. Well said :-) The Ruby guys love github because Rails and a bunch of related projects moved there... -- Aj. _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Mon Mar 30 12:19:02 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 30 Mar 2009 12:19:02 -0400 Subject: [nycphp-talk] git to this presentation In-Reply-To: <8CB7F693DBDFBA3-AD8-61B@webmail-dx06.sysops.aol.com> References: <20090329195621.GA18914@panix.com> <8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com> <8CB7F693DBDFBA3-AD8-61B@webmail-dx06.sysops.aol.com> Message-ID: 2009/3/30 : > i think you do bring up some interesting points, but i'm confused on the > sensitive material part.? do you not have this in your version control?? i > would assume you have a check to determine if you're developing locally, > staging or production, so that you're not editing these files per server. > > ~rob I was actually talking about /etc configuration files that really are local, and not part of any php project. In php projects, we normally create config.php-dist as a prototype without any passwords or keys, and include that in the repository. Then we save it as config.php locally. The config.php never gets checked into the repository as it is unique to each installation. I'm sure there are slicker ways to handle that, but it's always worked just fine. From chsnyder at gmail.com Mon Mar 30 12:25:17 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 30 Mar 2009 12:25:17 -0400 Subject: [nycphp-talk] Table is full In-Reply-To: <6320437.121238420833673.JavaMail.root@twoguyshosting.com.> References: <6320437.121238420833673.JavaMail.root@twoguyshosting.com.> Message-ID: 2009/3/30 Donald J. Organ IV : > I am encountering the following error for an innoDB table. > table 'xxx' is full http://dev.mysql.com/doc/refman/5.0/en/full-table.html but you've probably already look there... I haven't dealt with this with InnoDB tables, but I learned a long time ago to include MAX_ROWS=500000 AVG_ROW_LENGTH=500000 (or similar) at the end of MyISAM CREATE TABLE statements. Chris Snyder http://chxor.chxo.com/ From y2rob at aol.com Mon Mar 30 12:28:50 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 12:28:50 -0400 Subject: [nycphp-talk] git to this presentation In-Reply-To: References: <20090329195621.GA18914@panix.com><8CB7EC09447DA84-734-1F78@webmail-da09.sysops.aol.com><8CB7F693DBDFBA3-AD8-61B@webmail-dx06.sysops.aol.com> Message-ID: <8CB7F6BBE220806-AD8-760@webmail-dx06.sysops.aol.com> no, i wasn't trying to criticize, i just wasn't following how your app was configured.? it makes sense though. i've seen it done in both ways, it mostly is determine how you want your application distributed. ~rob -----Original Message----- From: Chris Snyder To: NYPHP Talk Sent: Mon, 30 Mar 2009 12:19 pm Subject: Re: [nycphp-talk] git to this presentation 2009/3/30 : > i think you do bring up some interesting points, but i'm confused on the > sensitive material part.? do you not have this in your version control?? i > would assume you have a check to determine if you're developing locally, > staging or production, so that you're not editing these files per server. > > ~rob I was actually talking about /etc configuration files that really are local, and not part of any php project. In php projects, we normally create config.php-dist as a prototype without any passwords or keys, and include that in the repository. Then we save it as config.php locally. The config.php never gets checked into the repository as it is unique to each installation. I'm sure there are slicker ways to handle that, but it's always worked just fine. _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Mar 30 12:37:33 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 30 Mar 2009 12:37:33 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com> References: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com> Message-ID: <20090330163733.GA373@panix.com> On Mon, Mar 30, 2009 at 12:17:25PM -0400, y2rob at aol.com wrote: > > well there's another point i'd like to bring up with github, there is a > search within it so if your project is public, you can share and get > project libraries to help you in your development.? so think of it as > being a code repository/sourceforge all in one.? Meaning, it's like SourceForge. :) FYI: SourceForge recently added Git as one of the supported version control systems. Fortunately, I haven't committed any code yet, so I switched my project there from Subversion to Git. I look forward to using it. --Dan [Snipping prior posts. It's the nice thing to do.] -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From chsnyder at gmail.com Mon Mar 30 13:03:53 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Mon, 30 Mar 2009 13:03:53 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <20090330163733.GA373@panix.com> References: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com> <20090330163733.GA373@panix.com> Message-ID: On Mon, Mar 30, 2009 at 12:37 PM, Daniel Convissor wrote: > > Meaning, it's like SourceForge. :) Yes, if SourceForge had been created by anyone remotely familiar with either graphic design or social software. :-D From danielc at analysisandsolutions.com Mon Mar 30 13:09:27 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 30 Mar 2009 13:09:27 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: References: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com> <20090330163733.GA373@panix.com> Message-ID: <20090330170927.GA21735@panix.com> On Mon, Mar 30, 2009 at 01:03:53PM -0400, Chris Snyder wrote: > On Mon, Mar 30, 2009 at 12:37 PM, Daniel Convissor > wrote: > > > > Meaning, it's like SourceForge. :) > > Yes, if SourceForge had been created by anyone remotely familiar with > either graphic design or social software. :-D Though they may need to get some folks on staff that are up on how to configure networks/servers. I just went to look at github.com and it timed out. :) --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 paul at devonianfarm.com Mon Mar 30 13:24:19 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 30 Mar 2009 13:24:19 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> <49D0CCEB.7080509@devonianfarm.com> <117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> Message-ID: <49D10043.2050607@devonianfarm.com> Tom Melendez wrote: > I can strongly recommend UnFuddle: > > http://unfuddle.com/ > We use this at work as a bug tracking/project management system and it's pretty good. I'm a tough customer for this sort of thing and can find many complaints, but it's better than any of the other systems I've seen that target it's market segment. (I see Basecamp as an excellent product that's a bit downmarket.) I haven't used the VC service from unfuddle however since we use Visual Source Safe here. VSS has it's problems, but the integration w/ Visual Studio is good and I've managed to point-and-click my way through hairy situations that I'd find intimidating w/ CVS or SVN. (And that's talking as someone who's gotten in pretty deep with CVS.) Personally I think SVN is a scam. It deals with some of the superficial problems with CVS (for instance, being tied to Unix accounts and the difficulty of moving files.) It addresses some of the issues of working in Java, where renaming classes means you need to rename files, but it doesn't address the deeper issues in CVS and it takes a big step back in the branching department by offering only smoke and mirrors for branching support. (The branching model in CVS is quite appropriate for shops that have a main line of development and spin off branches to customers or to production servers.) These days I've fallen in love with git. As somebody else said, git's particularly good for managing code that comes from an open source project or a vendor: you can replace the files in a distribution and "git add ." does the right thing. ------------- As for the problem of configuring multiple instances, +1 to the suggestion of having a single configuration file that sits outside version control. This isn't the most advanced way to do it, but it's a simple mechanism that's a good alternative to the 'status quo' of having no clean mechanism for separating what varies from what stays the same. I particularly get frustrated with hard-coded paths that many products keep inside of databases. One of the reasons why wordpress operators are slow to upgrade to fix the security problems that seem to be discovered every week is that wordpress keeps hard-coded urls inside the database: it's a major production to make a copy of yourblog.com that lives at test.yourblog.com the system will keep trying to redirect you to "yourblog.com;" If I could do this, I'd have a lot more faith that upgrading wordpress won't break my system. I hate to admit it, but I regularly upgrade wordpress directly on production systems because there isn't an officially supported way to do anything else. It's a totally different story with the systems I build, where I can make systems for test and development purposes very quickly. I'm moving away from Wordpress for my non-blog sites that use it. From y2rob at aol.com Mon Mar 30 13:28:12 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 13:28:12 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <20090330170927.GA21735@panix.com> References: <8CB7F6A26124329-AD8-685@webmail-dx06.sysops.aol.com><20090330163733.GA373@panix.com> <20090330170927.GA21735@panix.com> Message-ID: <8CB7F74095A3F14-AD8-B83@webmail-dx06.sysops.aol.com> yeah from time to time it goes down, not sure if their traffic doubled lately or not.? gits been stirring up a lot lately ie this thread!! ~rob -----Original Message----- From: Daniel Convissor To: NYPHP Talk Sent: Mon, 30 Mar 2009 1:09 pm Subject: Re: [nycphp-talk] Implementing Version Control On Mon, Mar 30, 2009 at 01:03:53PM -0400, Chris Snyder wrote: > On Mon, Mar 30, 2009 at 12:37 PM, Daniel Convissor > wrote: > > > > Meaning, it's like SourceForge. :) > > Yes, if SourceForge had been created by anyone remotely familiar with > either graphic design or social software. :-D Though they may need to get some folks on staff that are up on how to configure networks/servers. I just went to look at github.com and it timed out. :) --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From y2rob at aol.com Mon Mar 30 13:37:14 2009 From: y2rob at aol.com (y2rob at aol.com) Date: Mon, 30 Mar 2009 13:37:14 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <49D10043.2050607@devonianfarm.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> <49D0CCEB.7080509@devonianfarm.com><117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> <49D10043.2050607@devonianfarm.com> Message-ID: <8CB7F754C0546A6-AD8-C21@webmail-dx06.sysops.aol.com> i've used vss before and it wasn't bad.? the one thing that was good and bad about vss is that you couldn't check out a file that was checked out by someone else, which makes things bad if you're on a project with someone else and they forget to check something back in and said developer calls out sick, with a deadline of "now" for the project.? not sure if they resolved this and i see the ups and downs of this system in why it works this way, but in terms of users, even with developers, we do forget the simpliest of things.? i guess there are several different types of vcs' out there and to each their own imo, but having used the ones listed in this thread from vss, cvs, svn and now git, i still think git is pretty nice.? again this is only my opinion :)? also a side note, if you're using vcs' then that is a tremendous step in the right direction, believe it or not, there are still serveral big name places that don't use a version control system, which makes me sad. ~rob -----Original Message----- From: Paul A Houle To: NYPHP Talk Sent: Mon, 30 Mar 2009 1:24 pm Subject: Re: [nycphp-talk] Implementing Version Control Tom Melendez wrote:? > I can strongly recommend UnFuddle:? >? > http://unfuddle.com/? > ? We use this at work as a bug tracking/project management system and it's pretty good. I'm a tough customer for this sort of thing and can find many complaints, but it's better than any of the other systems I've seen that target it's market segment. (I see Basecamp as an excellent product that's a bit downmarket.)? ? ? I haven't used the VC service from unfuddle however since we use Visual Source Safe here. VSS has it's problems, but the integration w/ Visual Studio is good and I've managed to point-and-click my way through hairy situations that I'd find intimidating w/ CVS or SVN. (And that's talking as someone who's gotten in pretty deep with CVS.)? ? ? Personally I think SVN is a scam. It deals with some of the superficial problems with CVS (for instance, being tied to Unix accounts and the difficulty of moving files.) It addresses some of the issues of working in Java, where renaming classes means you need to rename files, but it doesn't address the deeper issues in CVS and it takes a big step back in the branching department by offering only smoke and mirrors for branching support. (The branching model in CVS is quite appropriate for shops that have a main line of development and spin off branches to customers or to production servers.)? ? ? These days I've fallen in love with git. As somebody else said, git's particularly good for managing code that comes from an open source project or a vendor: you can replace the files in a distribution and "git add ." does the right thing.? ? -------------? ? ? As for the problem of configuring multiple instances, +1 to the suggestion of having a single configuration file that sits outside version control. This isn't the most advanced way to do it, but it's a simple mechanism that's a good alternative to the 'status quo' of having no clean mechanism for separating what varies from what stays the same.? ? ? I particularly get frustrated with hard-coded paths that many products keep inside of databases. One of the reasons why wordpress operators are slow to upgrade to fix the security problems that seem to be discovered every week is that wordpress keeps hard-coded urls inside the database: it's a major production to make a copy of? ? yourblog.com? ? that lives at? ? test.yourblog.com? ? the system will keep trying to redirect you to "yourblog.com;" If I could do this, I'd have a lot more faith that upgrading wordpress won't break my system. I hate to admit it, but I regularly upgrade wordpress directly on production systems because there isn't an officially supported way to do anything else.? ? It's a totally different story with the systems I build, where I can make systems for test and development purposes very quickly. I'm moving away from Wordpress for my non-blog sites that use it.? _______________________________________________? New York PHP User Group Community Talk Mailing List? http://lists.nyphp.org/mailman/listinfo/talk? ? http://www.nyphp.org/show_participation.php? -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at freephile.com Mon Mar 30 16:38:26 2009 From: greg at freephile.com (Greg Rundlett (freephile)) Date: Mon, 30 Mar 2009 16:38:26 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <8CB7F754C0546A6-AD8-C21@webmail-dx06.sysops.aol.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> <49D0CCEB.7080509@devonianfarm.com> <117286890903300710jfa7c4f3i23bf19d1e68e59e5@mail.gmail.com> <49D10043.2050607@devonianfarm.com> <8CB7F754C0546A6-AD8-C21@webmail-dx06.sysops.aol.com> Message-ID: <5e2aaca40903301338n45943d57w3db456497d1627e9@mail.gmail.com> I too would recommend git (and github) for better collaboration and merge support compared to svn. Most probably know this distinction, but Git is a "distributed" VCS compared to svn which is a "centralized" VCS. (People do still need subversion -- especially where it's the common denominator. I just migrated a whole subversion service today including the repos, the administration system, the websvn browser, the trac project management system from one machine to another.) Although I haven't used it yet, I would also point out that Mercurial (Hg) is the "other" distributed version control system (similar to git). It was just chosen by the Python project for their source. So, I would choose between git and mercurial; either hosted or "internal". hth, -- Greg Rundlett Web Developer - Initiative in Innovative Computing http://iic.harvard.edu camb 617-384-5872 nbpt 978-225-8302 m. 978-764-4424 -skype/aim/irc/twitter freephile http://profiles.aim.com/freephile From ajai at bitblit.net Mon Mar 30 17:12:03 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 30 Mar 2009 17:12:03 -0400 (EDT) Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <5e2aaca40903301338n45943d57w3db456497d1627e9@mail.gmail.com> Message-ID: On Mon, 30 Mar 2009, Greg Rundlett (freephile) wrote: > Although I haven't used it yet, I would also point out that Mercurial > (Hg) is the "other" distributed version control system (similar to > git). It was just chosen by the Python project for their source. So, > I would choose between git and mercurial; either hosted or "internal". There's also Bazaar :-) Since there are a lot of distributed versioning systems out there, has anyone done/seen a decent comparison? I think I remember reading somewhere that there are differences in performance... -- Aj. From paul at devonianfarm.com Mon Mar 30 17:22:58 2009 From: paul at devonianfarm.com (Paul A Houle) Date: Mon, 30 Mar 2009 17:22:58 -0400 Subject: [nycphp-talk] Best practices for combining paths? Message-ID: <49D13832.50008@devonianfarm.com> I pretty frequently write code like $url_base="http://somesite.com/system/controller"; $path="object_type/verb.modifier/object_id"; $url="{$url_base}/{$path}"; note that this working correctly depends sensitively on how paths are used, for instance, if somebody puts a slash at the end of $url_base, you wind up with a double slash in the path. That doesn't usually have a disasterous effect, but I'm a stickler about url canonicalizaton. My question is, am I missing a good PHP built-in for combining parts of URLs or filesystem paths? Is there a good library I should use? From ajai at bitblit.net Mon Mar 30 17:57:37 2009 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 30 Mar 2009 17:57:37 -0400 (EDT) Subject: [nycphp-talk] Best practices for combining paths? In-Reply-To: <49D13832.50008@devonianfarm.com> Message-ID: On Mon, 30 Mar 2009, Paul A Houle wrote: > My question is, am I missing a good PHP built-in for combining parts of > URLs or filesystem paths? Is there a good library I should use? You might want to look at routing components. For example, you can use symfony's routing component by itself without using the whole framework to match URLs (and generate URLs I think): http://pookey.co.uk/blog/archives/79-Playing-with-symfony-routing-without-symfony!.html -- Aj. From ramons at gmx.net Mon Mar 30 19:32:17 2009 From: ramons at gmx.net (David Krings) Date: Mon, 30 Mar 2009 19:32:17 -0400 Subject: [nycphp-talk] Implementing Version Control In-Reply-To: <49D0CCEB.7080509@devonianfarm.com> References: <991974A1-2A3A-45A4-B53D-C07C60343306@beaffinitive.com> <49D0CCEB.7080509@devonianfarm.com> Message-ID: <49D15681.6060301@gmx.net> Paul A Houle wrote: > My understanding is that GUI clients for git are currently pretty > immature, particularly on Windows, which might be a problem for some. I find that the GitExtensions for Windows already do the trick. But my experience is bare bones and I am happy if I can check in and check out. If looking for something I'd see that you get sth like a plugin for the development environment in use. I even found that the port of git itself to Windows works fine. David From krozinov at gmail.com Mon Mar 30 20:03:48 2009 From: krozinov at gmail.com (Konstantin Rozinov) Date: Mon, 30 Mar 2009 20:03:48 -0400 Subject: [nycphp-talk] Using APC to improve performance. Message-ID: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> Hi folks, I recently installed APC (http://pecl.php.net/package/APC) to see how it works. Currently, I'm just using the opcode (file) caching and already the response time is about 4x faster. No code changes were required and it was as easy as just enabling APC in php.ini. Now I'm interested in trying out the "user variable caching" to see if I can get any more improvement in response time. I know that this will require code changes and the use of the APC functions (like apc_add(), apc_fetch(), etc.) For example, I have a configuration file, which has about 400+ defined constants for the web application I'm working on. I've read in the APC documentation and elsewhere that define() is notoriously slow (not sure why??). 1. Will storing these constants in APC help? 2. How would you store these constants? Just use apc_add()? Or use apc_ load_ constants() (the APC docs say that this doesn't work as well as expected?!)? 3. If I'm already using the opcode (file) caching, will it make any difference store the 400+ defined constans in APC? 4. Any links to really good APC howtos or tutorials would be greatly appreciated! Thanks for any help and tips. Konstantin From zippy1981 at gmail.com Mon Mar 30 23:52:18 2009 From: zippy1981 at gmail.com (Justin Dearing) Date: Mon, 30 Mar 2009 23:52:18 -0400 Subject: [nycphp-talk] PHP Certification Message-ID: <5458db3c0903302052i52a911cdyb6733ebfb0057277@mail.gmail.com> Hello all, I bought the PHP certification pack (10 practice exams and an exam voucher). So far I've taken two tests and done some studying. I've passed both, but I don't know by how many points, or how well I would do on the real test. On the section analysis I get 2-3 failures 2-3 excellents and the rest passed. Has anyone taken the practice tests and the real one? If so how do they compare? Should I just take the real one if I passed two practice tests? Regards, Justin Dearing -------------- next part -------------- An HTML attachment was scrubbed... URL: From chehodgins at gmail.com Tue Mar 31 00:30:56 2009 From: chehodgins at gmail.com (Che Hodgins) Date: Tue, 31 Mar 2009 00:30:56 -0400 Subject: [nycphp-talk] Using APC to improve performance. In-Reply-To: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> References: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> Message-ID: Hi Konstantin, On Mon, Mar 30, 2009 at 8:03 PM, Konstantin Rozinov wrote: > > Hi folks, > > I recently installed APC (http://pecl.php.net/package/APC) to see how > it works. ?Currently, I'm just using the opcode (file) caching and > already the response time is about 4x faster. ?No code changes were > required and it was as easy as just enabling APC in php.ini. ?Now I'm > interested in trying out the "user variable caching" to see if I can > get any more improvement in response time. ?I know that this will > require code changes and the use of the APC functions (like apc_add(), > apc_fetch(), etc.) > > For example, I have a configuration file, which has about 400+ defined > constants for the web application I'm working on. ?I've read in the > APC documentation and elsewhere that define() is notoriously slow (not > sure why??). > > 1. Will storing these constants in APC help? Although I don't use apc_define_constants(), I'm sure some gains can be achieved. The question is whether Cost > Reward. I recommend profiling your code with an extension such as Xdebug to see how much you can save by using apc_define_constants. > > 2. How would you store these constants? ?Just use apc_add()? ?Or use > apc_ load_ constants() (the APC docs say that this doesn't work as > well as expected?!)? You should use apc_define_constants() and apc_load_constants(). Since you won't know if they are already loaded you will need something like: > 3. If I'm already using the opcode (file) caching, will it make any > difference store the 400+ defined constans in APC? It should, if not I don't see why they would have created these two functions. > > 4. Any links to really good APC howtos or tutorials would be greatly > appreciated! Before starting to optimize where you think there may be problems, I recommend you actually find out where the problems are. Using tools like xdebug and kcachegrind you can pretty quickly find bottlenecks and you won't waste as much time guessing. Good luck! Che > > Thanks for any help and tips. > Konstantin > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php From tom at supertom.com Tue Mar 31 00:49:26 2009 From: tom at supertom.com (Tom Melendez) Date: Mon, 30 Mar 2009 21:49:26 -0700 Subject: [nycphp-talk] Using APC to improve performance. In-Reply-To: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> References: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> Message-ID: <117286890903302149j40391042j13468768fd6ecafd@mail.gmail.com> > 4. Any links to really good APC howtos or tutorials would be greatly > appreciated! > Not at all what you asked, but.... If you're using absolute paths in your require/include files and you turn this off you should see gains: http://us.php.net/manual/en/apc.configuration.php#ini.apc.stat In setting it to zero, you tell it not to stat the file. If you are using some beefy framework with lots of includes this can be a big win. Leave it set to 1 for development though. Thanks, Tom http://www.liphp.org From krozinov at gmail.com Tue Mar 31 03:02:28 2009 From: krozinov at gmail.com (Konstantin Rozinov) Date: Tue, 31 Mar 2009 03:02:28 -0400 Subject: [nycphp-talk] Using APC to improve performance. In-Reply-To: <117286890903302149j40391042j13468768fd6ecafd@mail.gmail.com> References: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> <117286890903302149j40391042j13468768fd6ecafd@mail.gmail.com> Message-ID: <865a7acf0903310002wb391785ud27ebfcd66474078@mail.gmail.com> Thanks for the tips Che and Tom. I will try the debugging tools to see where the bottlenecks are. I've got apc.stat set to 0, but the largest # of includes in the application is only about 8 in some files, so I wouldn't expect it to make that much of difference, but every little bit counts :) I found these presentations, which have some good pointers, but lack a lot of details. Sample code or pseudo-code would've been nice to see: http://tekrat.com/talks_files/openweb2008/apc at facebook.pdf http://www.scribd.com/doc/4069180/Caching-Performance-Lessons-from-Facebook Konstantin On Tue, Mar 31, 2009 at 12:49 AM, Tom Melendez wrote: >> 4. Any links to really good APC howtos or tutorials would be greatly >> appreciated! >> > > Not at all what you asked, but.... > > If you're using absolute paths in your require/include files and you > turn this off you should see gains: > > http://us.php.net/manual/en/apc.configuration.php#ini.apc.stat > > In setting it to zero, you tell it not to stat the file. ?If you are > using some beefy framework with lots of includes this can be a big > win. > > Leave it set to 1 for development though. > > Thanks, > > Tom > http://www.liphp.org > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From cbaltatescu at greenvision.ro Tue Mar 31 06:32:30 2009 From: cbaltatescu at greenvision.ro (Cristian Baltatescu) Date: Tue, 31 Mar 2009 13:32:30 +0300 Subject: [nycphp-talk] PHP Certification In-Reply-To: <5458db3c0903302052i52a911cdyb6733ebfb0057277@mail.gmail.com> References: <5458db3c0903302052i52a911cdyb6733ebfb0057277@mail.gmail.com> Message-ID: <422973430903310332u7f7c4875xf7b22b632478fee0@mail.gmail.com> 2009/3/31 Justin Dearing > Hello all, > I bought the PHP certification pack (10 practice exams and an exam > voucher). So far I've taken two tests and done some studying. I've passed > both, but I don't know by how many points, or how well I would do on the > real test. On the section analysis I get 2-3 failures 2-3 excellents and the > rest passed. > > Has anyone taken the practice tests and the real one? If so how do they > compare? Should I just take the real one if I passed two practice tests? > > Regards, > > Justin Dearing > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > Hello I have purchased 10 tests too, before passing the real exam. I have found the practice tests a bit imbalanced maybe but I think the real tests are like that too. My biggest problem with the practice test was that some of the questions were the same, after taking 3 of those they kinda became irrelevant because I would chose the answer without actually thinking, so at least in terms of answering in the given time and in terms of focusing, the practice tests did not provide the same experience. But they helped. i only used 5 i think, of the 10 purchased. I ventured to taking the real test once i got no FAILED on the practice ones, maybe a couple of passed and excellent on the rest. Same goes for a friend of mine who followed the same pattern. -- Numai bine, Cristian -------------- next part -------------- An HTML attachment was scrubbed... URL: From bonsaime at gmail.com Tue Mar 31 09:00:15 2009 From: bonsaime at gmail.com (Jesse Callaway) Date: Tue, 31 Mar 2009 09:00:15 -0400 Subject: [nycphp-talk] Using APC to improve performance. In-Reply-To: <865a7acf0903310002wb391785ud27ebfcd66474078@mail.gmail.com> References: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> <117286890903302149j40391042j13468768fd6ecafd@mail.gmail.com> <865a7acf0903310002wb391785ud27ebfcd66474078@mail.gmail.com> Message-ID: On Tue, Mar 31, 2009 at 3:02 AM, Konstantin Rozinov wrote: > Thanks for the tips Che and Tom. ?I will try the debugging tools to > see where the bottlenecks are. ?I've got apc.stat set to 0, but the > largest # of includes in the application is only about 8 in some > files, so I wouldn't expect it to make that much of difference, but > every little bit counts :) > > I found these presentations, which have some good pointers, but lack a > lot of details. ?Sample code or pseudo-code would've been nice to see: > http://tekrat.com/talks_files/openweb2008/apc at facebook.pdf > http://www.scribd.com/doc/4069180/Caching-Performance-Lessons-from-Facebook > > Konstantin > > > > > On Tue, Mar 31, 2009 at 12:49 AM, Tom Melendez wrote: >>> 4. Any links to really good APC howtos or tutorials would be greatly >>> appreciated! >>> >> >> Not at all what you asked, but.... >> >> If you're using absolute paths in your require/include files and you >> turn this off you should see gains: >> >> http://us.php.net/manual/en/apc.configuration.php#ini.apc.stat >> >> In setting it to zero, you tell it not to stat the file. ?If you are >> using some beefy framework with lots of includes this can be a big >> win. >> >> Leave it set to 1 for development though. >> >> Thanks, >> >> Tom >> http://www.liphp.org >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > Hi, The only pointer I can give might seem obvious if you've read all the documentation. I wasted maybe over a half hour on this one so it may help. You can only store single-element variables, so you'll need to flatten or serialize any arrays before storing them. -jesse From chsnyder at gmail.com Tue Mar 31 16:46:38 2009 From: chsnyder at gmail.com (Chris Snyder) Date: Tue, 31 Mar 2009 16:46:38 -0400 Subject: [nycphp-talk] Best practices for combining paths? In-Reply-To: <49D13832.50008@devonianfarm.com> References: <49D13832.50008@devonianfarm.com> Message-ID: On Mon, Mar 30, 2009 at 5:22 PM, Paul A Houle wrote: > I pretty frequently write code like > > $url_base="http://somesite.com/system/controller"; > $path="object_type/verb.modifier/object_id"; > $url="{$url_base}/{$path}"; > > note that this working correctly depends sensitively on how paths are used, > ?for instance, ?if somebody puts a slash at the end of $url_base, ?you wind > up with a double slash in the path. ?That doesn't usually have a disasterous > effect, ?but I'm a stickler about url canonicalizaton. > > My question is, ?am I missing a good PHP built-in for combining parts of > URLs or filesystem paths? ?Is there a good library I should use? > This is the kind of thing where writing your own is annoying but easy. function combine_paths( $path1, $path2 ) { if ( substr( $path1, -1 ) != '/' ) { $path1 .= '/'; } if ( substr( $path2, 0, 1 ) == '/' ) { $path2 = substr( $path2, 1 ); } return $path1.$path2; } Does it need to be any more complicated than that? From brenttech at gmail.com Tue Mar 31 17:10:17 2009 From: brenttech at gmail.com (Brent Baisley) Date: Tue, 31 Mar 2009 17:10:17 -0400 Subject: [nycphp-talk] Best practices for combining paths? In-Reply-To: <49D13832.50008@devonianfarm.com> References: <49D13832.50008@devonianfarm.com> Message-ID: <5d515c620903311410r2b85c2egb53f82b138b94817@mail.gmail.com> You don't need a library to fix that issue. Just use one of the trim functions to trim the trailing / and add you own. If there is no trailing slash, trim will do nothing. $url_base= rtrim($url_base, '/').'/'; On Mon, Mar 30, 2009 at 5:22 PM, Paul A Houle wrote: > I pretty frequently write code like > > $url_base="http://somesite.com/system/controller"; > $path="object_type/verb.modifier/object_id"; > $url="{$url_base}/{$path}"; > > note that this working correctly depends sensitively on how paths are used, > ?for instance, ?if somebody puts a slash at the end of $url_base, ?you wind > up with a double slash in the path. ?That doesn't usually have a disasterous > effect, ?but I'm a stickler about url canonicalizaton. > > My question is, ?am I missing a good PHP built-in for combining parts of > URLs or filesystem paths? ?Is there a good library I should use? > > _______________________________________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/show_participation.php > From krozinov at gmail.com Tue Mar 31 17:15:37 2009 From: krozinov at gmail.com (Konstantin Rozinov) Date: Tue, 31 Mar 2009 17:15:37 -0400 Subject: [nycphp-talk] Using APC to improve performance. In-Reply-To: <865a7acf0903310002wb391785ud27ebfcd66474078@mail.gmail.com> References: <865a7acf0903301703y595b79a9w1c97802763c74a9f@mail.gmail.com> <117286890903302149j40391042j13468768fd6ecafd@mail.gmail.com> <865a7acf0903310002wb391785ud27ebfcd66474078@mail.gmail.com> Message-ID: <865a7acf0903311415t7a7c789bq1f1ad0e37628e2b6@mail.gmail.com> In one of the slides, it says Facebook uses around 640,000 user objects/variables to and from their APC cache. Anyone have any ideas why so many variables? With over 200 million users I would think 640k would be too few if the objects pertained to individual users... Konstantin On 3/31/09, Konstantin Rozinov wrote: > Thanks for the tips Che and Tom. I will try the debugging tools to > see where the bottlenecks are. I've got apc.stat set to 0, but the > largest # of includes in the application is only about 8 in some > files, so I wouldn't expect it to make that much of difference, but > every little bit counts :) > > I found these presentations, which have some good pointers, but lack a > lot of details. Sample code or pseudo-code would've been nice to see: > http://tekrat.com/talks_files/openweb2008/apc at facebook.pdf > http://www.scribd.com/doc/4069180/Caching-Performance-Lessons-from-Facebook > > Konstantin > > > > > On Tue, Mar 31, 2009 at 12:49 AM, Tom Melendez wrote: >>> 4. Any links to really good APC howtos or tutorials would be greatly >>> appreciated! >>> >> >> Not at all what you asked, but.... >> >> If you're using absolute paths in your require/include files and you >> turn this off you should see gains: >> >> http://us.php.net/manual/en/apc.configuration.php#ini.apc.stat >> >> In setting it to zero, you tell it not to stat the file. If you are >> using some beefy framework with lots of includes this can be a big >> win. >> >> Leave it set to 1 for development though. >> >> Thanks, >> >> Tom >> http://www.liphp.org >> _______________________________________________ >> New York PHP User Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/show_participation.php >> > From danielc at analysisandsolutions.com Tue Mar 31 22:44:26 2009 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 31 Mar 2009 22:44:26 -0400 Subject: [nycphp-talk] Best practices for combining paths? In-Reply-To: <49D13832.50008@devonianfarm.com> References: <49D13832.50008@devonianfarm.com> Message-ID: <20090401024426.GA15840@panix.com> Hi Paul: On Mon, Mar 30, 2009 at 05:22:58PM -0400, Paul A Houle wrote: > > $url_base="http://somesite.com/system/controller"; > $path="object_type/verb.modifier/object_id"; > $url="{$url_base}/{$path}"; > > note that this working correctly depends sensitively on how paths are > used, for instance, if somebody puts a slash at the end of $url_base, > you wind up with a double slash in the path. This calls for comments in the code, documentation, coding standards and training; a technical solution is inappropriate, in my eyes. --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