From php at tmcode.com Tue Nov 1 09:51:22 2005 From: php at tmcode.com (Tim McEwen) Date: Tue, 1 Nov 2005 09:51:22 -0500 Subject: [nycphp-talk] Variables syntax In-Reply-To: <20051101005827.GA18350@panix.com> References: <436285A7.9050404@email.smith.edu> <8d9a42800510281314p3327599fodbca10bb79e0d2b0@mail.gmail.com> <20051101005827.GA18350@panix.com> Message-ID: <4F067BC5-63B1-44A9-8D09-7358F0019489@tmcode.com> Dan, AB was set to repeat the request 10 times (-n 10) and I also tried running the test a few times (letting the load settle between tests) on a few machines. The results were consistent All that being said, I must admit to being under the influence of *WAY* too much caffeine on Friday. Consequently I'm happy to eat crow and admit my test was a little skewed. The problem was with the size of string I was constructing: for($i=0; $i<100000; $i++) $string="A{$string}B"; By the end of the test, $string was a couple hundred kbytes in length. If you run the same test with a fixed string that does not grow, it looks like the glue method runs a few ms faster than the double quoted method. This leads me to believe that the concatenate operator only gets slower when working with large variables and for small variables it really doesn't matter. On a side-note, it would be fun to see some more definitive benchmarks on different aspects of the PHP language. In the process of teaching the php essentials courses I always get a few questions on whether double quotes are slower than singles, foreach vs while vs for loops on arrays, echo vs print, include vs include_once, etc. While the answers are fairly intuitive, it would be nice to measure the actual impact in a slightly more scientific fashion. I'm guessing the results would also vary from version to version too. Maybe when I run into some spare time.... (ha!) -Tim McEwen On Oct 31, 2005, at 7:58 PM, Daniel Convissor wrote: > Hey Tim: > > On Fri, Oct 28, 2005 at 04:50:56PM -0400, Tim McEwen wrote: > >> >> ab -n 10 http://localhost/test_a.php >> ... >> Time per request: 28574.142 [ms] (mean) >> ... >> >> ab -n 10 http://localhost/test_b.php >> ... >> Time per request: 14057.574 [ms] (mean) >> ... >> > > How many times did you run your test? Things vary between requests. > > --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 Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From chsnyder at gmail.com Wed Nov 2 11:41:00 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 2 Nov 2005 11:41:00 -0500 Subject: [nycphp-talk] Should labels/tags be inherited? Message-ID: Not strictly a PHP question, but maybe other developers on this list are thinking about folksonomies and adding labels or tags to content, so... Suppose I have an image object stored in my system, with the single label "fun". And suppose that I attach an audio object, describing the image in my own words. The image is at /csnyder/images/001.jpg and the audio is at /csnyder/images/001/description.mp3. Should the audio object inherit the "fun" label? On the surface I would say no, because the audio might not be "fun" in the same way that the image is "fun". But the audio is directly related to something that is "fun", and should probably show up on the "fun" summary page and RSS feed. And in applying the same situation to messages in a discussion thread, you would almost always want the labels you assign to the thread to be inherited by the individual messages, as long as those messages are "on topic"... Any thoughts? -- Chris Snyder http://chxo.com/ From andrew at plexpod.com Wed Nov 2 12:02:16 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 2 Nov 2005 12:02:16 -0500 Subject: [nycphp-talk] Should labels/tags be inherited? In-Reply-To: References: Message-ID: <20051102170216.GH655@desario.homelinux.net> On Wed, Nov 02, 2005 at 11:41:00AM -0500, csnyder wrote: > Not strictly a PHP question, but maybe other developers on this list > are thinking about folksonomies and adding labels or tags to content, > so... > > Suppose I have an image object stored in my system, with the single > label "fun". And suppose that I attach an audio object, describing the > image in my own words. > > The image is at /csnyder/images/001.jpg and the audio is at > /csnyder/images/001/description.mp3. > > Should the audio object inherit the "fun" label? > > On the surface I would say no, because the audio might not be "fun" in > the same way that the image is "fun". But the audio is directly > related to something that is "fun", and should probably show up on the > "fun" summary page and RSS feed. > > And in applying the same situation to messages in a discussion thread, > you would almost always want the labels you assign to the thread to be > inherited by the individual messages, as long as those messages are > "on topic"... > > Any thoughts? I don't think you can generalize this easily, it depends on the nature and structure of the content in question. It may be nice to allow for inherritance in some cases, but suppress it in others. I frequently find the need to turn on and off inherritance in content models. If all child objects of an object are always directly related to the object, allow the inherritance - it is essential a new attribute of the parent object. Sometimes objects might just be broad containers for other content, and in that case, suppress it - its really just a sub-object, very little relation otherwise. In your case of the image - your audio describes the image. In your content structure, if all sub objects of images further qualify the image, give it more value as content, or are attributes of it like I suggested above I'd say sure, appropriate to inherrit there. In the case of discussion thread messages, thats tough. I don't think there is a hard and fast rule there, as the nature of the content is not structured. You can't say whether a sub-object (a reply/comment) should always inherrit. You almost have to leave it to the message authors or maybe a moderator to determine whether it is "on topic", and therefore should inherrit. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From shiflett at php.net Wed Nov 2 12:25:09 2005 From: shiflett at php.net (Chris Shiflett) Date: Wed, 02 Nov 2005 12:25:09 -0500 Subject: [nycphp-talk] Should labels/tags be inherited? In-Reply-To: References: Message-ID: <4368F675.9000501@php.net> csnyder wrote: > Suppose I have an image object stored in my system, with the > single label "fun". And suppose that I attach an audio object, > describing the image in my own words. > > The image is at /csnyder/images/001.jpg and the audio is at > /csnyder/images/001/description.mp3. > > Should the audio object inherit the "fun" label? This is purely subjective, but I would say no. My reasoning is that it leaves you with full flexibility, so you're not polluting your tags in a way that can't be undone. It's easy to consider tags of parents as tags of the child in your code, and you can store these separately, so you can distinguish between them (even if you have no such need right now). Stated differently, I like to err on the side of having too much granularity - I can always group data in the code without losing information (like the fact that the image was labelled fun and the audio just inherited the label). Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From mark at wildwoodinc.com Wed Nov 2 12:31:50 2005 From: mark at wildwoodinc.com (Mark Lassoff) Date: Wed, 2 Nov 2005 11:31:50 -0600 Subject: [nycphp-talk] Smarty Templates In-Reply-To: <4368F675.9000501@php.net> Message-ID: I hope I'm not starting a religious war here, but, I'd like to get some opinions on Smarty-Templates. The sepearation of code logic and display seems intriging to me, however, I'm not sure that programmers could be able to create the back end logic and walk away, leaving the front end totally to the designer. The front end smarty-templates code could get complex-- Having a information from a multi-dimensional array displayed occurs to me. Any experiences you might have would be appreciated. Mark Lassoff Web Developer Wildwood Inc. From codebowl at gmail.com Wed Nov 2 12:34:42 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Nov 2005 12:34:42 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: <114931780415267901@unknownmsgid> References: <4368F675.9000501@php.net> <114931780415267901@unknownmsgid> Message-ID: <8d9a42800511020934n649e511l4a14357a5c9243d4@mail.gmail.com> i would not consider smarty to keep all logic from the designer, well unless you put html in some variables and display just the variables in smarty templates. Smarty templates have the ability to have conditional and loop statments so that your backend can just pass an array and the template will display it however the designer wished. In a sense it is seperation but not totally. Your programmer will have to do the templates if your designer has no idea about loops/conditionals etc.. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at vermonster.com Wed Nov 2 12:02:49 2005 From: brian at vermonster.com (Brian Kaney) Date: Wed, 02 Nov 2005 12:02:49 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: References: Message-ID: <4368F139.7050708@vermonster.com> Strictly speaking if your team has a designer responsible for just creating look & feel and usability, than you will likely will need someone technical to implement the design. And this person will need some level of display logic for looping/conditionals/etc. For this, we usually use PHPSavant, since it gives the person doing the implementation the full power of PHP. Then we enforce design guidelines to keep business logic far away from the template and UI implementation. We've also used PHPTal, since the template language is abstracted and theoretically the backend programming language could be Python, Ruby, Perl or even Java. But it turned out learning a new templating language (similar to Smarty) seemed like too much overhead for us. Good luck. Brian Mark Lassoff wrote: >I hope I'm not starting a religious war here, but, I'd like to get some >opinions on Smarty-Templates. > >The sepearation of code logic and display seems intriging to me, however, >I'm not sure that programmers could be able to create the back end logic and >walk away, leaving the front end totally to the designer. The front end >smarty-templates code could get complex-- Having a information from a >multi-dimensional array displayed occurs to me. > >Any experiences you might have would be appreciated. > >Mark Lassoff >Web Developer >Wildwood Inc. > > > From jdaly at panix.com Wed Nov 2 12:49:48 2005 From: jdaly at panix.com (John Daly) Date: Wed, 2 Nov 2005 12:49:48 -0500 Subject: [nycphp-talk] Smarty Templates References: Message-ID: <00b701c5dfd5$d197c5e0$6401a8c0@GUITAR> Mark, I did one project using Smarty, not knowing it all when I started, and found it fairly easy to use and liked the results. However, it wasn't totally successful becaue the designer had issues with .tpl files and using his tools to for the job (Dreamweaver, etc). I'm not even sure what the problem was. All that is really needed is the name of a template and to not mess around with what's between the curly braces. The rest is just pure design. I think the number of include files, the .tpl extension and the idea of design as a complete canvas instead of included elements is confusing to some people, so a big part - if not all - of my decision to use it in the future would depend on how the designer feels about working in this way. I like it, though. JD ----- Original Message ----- From: "Mark Lassoff" To: "NYPHP Talk" Sent: Wednesday, November 02, 2005 12:31 PM Subject: [nycphp-talk] Smarty Templates I hope I'm not starting a religious war here, but, I'd like to get some opinions on Smarty-Templates. The sepearation of code logic and display seems intriging to me, however, I'm not sure that programmers could be able to create the back end logic and walk away, leaving the front end totally to the designer. The front end smarty-templates code could get complex-- Having a information from a multi-dimensional array displayed occurs to me. Any experiences you might have would be appreciated. Mark Lassoff Web Developer Wildwood Inc. _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From chsnyder at gmail.com Wed Nov 2 13:03:50 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 2 Nov 2005 13:03:50 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: <-3174443285719662243@unknownmsgid> References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> Message-ID: On 11/2/05, Mark Lassoff wrote: > I hope I'm not starting a religious war here, but, I'd like to get some > opinions on Smarty-Templates. > > The sepearation of code logic and display seems intriging to me, however, > I'm not sure that programmers could be able to create the back end logic and > walk away, leaving the front end totally to the designer. The front end > smarty-templates code could get complex-- Having a information from a > multi-dimensional array displayed occurs to me. > > Any experiences you might have would be appreciated. > > Mark Lassoff > Web Developer > Wildwood Inc. > Templates are essential, and Smarty is fun. But there is a lot of overhead to Smarty, you have to learn the ins and outs of another language, and you end up with a more complicated system (more moving parts, more opportunities for things to go wrong). In a NYPHP presentation a couple years ago (has it been that long?) we put Smarty head to head with a couple other template languages, and with PHP itself. PHP blew them all away in performance and (in my opinion) simplicity. PHP makes an excellent template language when used with "short tags". Dreamweaver still can't handle loops and conditionals, but it doesn't choke on the code either. An example of PHP template: <?=htmlentities($title)?>

Today is .

  • subject)?>
    body)?>
  • When working this way you need to write a simple template class that will search for the appropriate template to use from some path. Once identify the template to use, you just include() it (possibly inside an output buffer) and you're done. -- Chris Snyder http://chxo.com/ From cliff at pinestream.com Wed Nov 2 13:17:46 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Wed, 2 Nov 2005 13:17:46 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: Message-ID: <004201c5dfd9$b9b7b990$0ea8a8c0@cliff> I swear by templating, even it the team size is only one -- it forces a presentation/business/date layer thought process. I use Smarty and have a love/hate relationship with it. It has many powerful features, but as some have noted, forces you to learn YAL -- yet another language. And at times, understanding the "flow" of things can be tiresome. At the Zend conference, I heard that Flicker uses Smarty, which in essence nullifies my performance concerns. And it has a built-in caching mechanism. I am intrigued by Chris' comments and analysis though. If used as intended -- for design, a Smarty .tpl should have an absolute minimum of logic (just simple presentation logic) and mainly HTML with tags. So if you can force yourself to use a PHP template structure of , why not? But how will you eliminate "PHP creep". Cliff Hirsch -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Wednesday, November 02, 2005 1:04 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Smarty Templates On 11/2/05, Mark Lassoff wrote: > I hope I'm not starting a religious war here, but, I'd like to get > some opinions on Smarty-Templates. > > The sepearation of code logic and display seems intriging to me, > however, I'm not sure that programmers could be able to create the > back end logic and walk away, leaving the front end totally to the > designer. The front end smarty-templates code could get complex-- > Having a information from a multi-dimensional array displayed occurs > to me. > > Any experiences you might have would be appreciated. > > Mark Lassoff > Web Developer > Wildwood Inc. > Templates are essential, and Smarty is fun. But there is a lot of overhead to Smarty, you have to learn the ins and outs of another language, and you end up with a more complicated system (more moving parts, more opportunities for things to go wrong). In a NYPHP presentation a couple years ago (has it been that long?) we put Smarty head to head with a couple other template languages, and with PHP itself. PHP blew them all away in performance and (in my opinion) simplicity. PHP makes an excellent template language when used with "short tags". Dreamweaver still can't handle loops and conditionals, but it doesn't choke on the code either. An example of PHP template: <?=htmlentities($title)?>

    Today is .

    • subject)?>
      body)?>
    • When working this way you need to write a simple template class that will search for the appropriate template to use from some path. Once identify the template to use, you just include() it (possibly inside an output buffer) and you're done. -- Chris Snyder http://chxo.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From jdaly at panix.com Wed Nov 2 13:59:12 2005 From: jdaly at panix.com (John Daly) Date: Wed, 2 Nov 2005 13:59:12 -0500 Subject: [nycphp-talk] Smarty Templates References: <004201c5dfd9$b9b7b990$0ea8a8c0@cliff> Message-ID: <00d301c5dfdf$8355b360$6401a8c0@GUITAR> The Smarty I used was just a simple templating language. The structures were set in a PHP control file and assigned to template variables. Big decisions like 'auth' 'logged' etc would be PHP decisions of what template was called, and the standard logic of {if results then loop else nada} would be the kind of Smarty code that I would put in the template. I think of it as output logic and an acceptable bare minimum. The whole thing for me was the designer would rather eat Brussel Sprouts all day than work with it. That's a very big problem. I swear by templating, even it the team size is only one -- it forces a presentation/business/date layer thought process. I use Smarty and have a love/hate relationship with it. It has many powerful features, but as some have noted, forces you to learn YAL -- yet another language. And at times, understanding the "flow" of things can be tiresome. At the Zend conference, I heard that Flicker uses Smarty, which in essence nullifies my performance concerns. And it has a built-in caching mechanism. I am intrigued by Chris' comments and analysis though. If used as intended -- for design, a Smarty .tpl should have an absolute minimum of logic (just simple presentation logic) and mainly HTML with tags. So if you can force yourself to use a PHP template structure of , why not? But how will you eliminate "PHP creep". Cliff Hirsch -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Wednesday, November 02, 2005 1:04 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Smarty Templates On 11/2/05, Mark Lassoff wrote: > I hope I'm not starting a religious war here, but, I'd like to get > some opinions on Smarty-Templates. > > The sepearation of code logic and display seems intriging to me, > however, I'm not sure that programmers could be able to create the > back end logic and walk away, leaving the front end totally to the > designer. The front end smarty-templates code could get complex-- > Having a information from a multi-dimensional array displayed occurs > to me. > > Any experiences you might have would be appreciated. > > Mark Lassoff > Web Developer > Wildwood Inc. > Templates are essential, and Smarty is fun. But there is a lot of overhead to Smarty, you have to learn the ins and outs of another language, and you end up with a more complicated system (more moving parts, more opportunities for things to go wrong). In a NYPHP presentation a couple years ago (has it been that long?) we put Smarty head to head with a couple other template languages, and with PHP itself. PHP blew them all away in performance and (in my opinion) simplicity. PHP makes an excellent template language when used with "short tags". Dreamweaver still can't handle loops and conditionals, but it doesn't choke on the code either. An example of PHP template: <?=htmlentities($title)?>

      Today is .

      • subject)?>
        body)?>
      • When working this way you need to write a simple template class that will search for the appropriate template to use from some path. Once identify the template to use, you just include() it (possibly inside an output buffer) and you're done. -- Chris Snyder http://chxo.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From codebowl at gmail.com Wed Nov 2 14:03:49 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Nov 2005 14:03:49 -0500 Subject: [nycphp-talk] Fwd: [PHP-DB] PHP and MSSQL on Linux In-Reply-To: <8d9a42800511021100x77b84757vc0dfae894aa3228b@mail.gmail.com> References: <0MKoyl-1EXNkI31Ms-0006S5@mrelay.perfora.net> <8d9a42800511021100x77b84757vc0dfae894aa3228b@mail.gmail.com> Message-ID: <8d9a42800511021103v6ad57133vf220b612299f019e@mail.gmail.com> ---------- Forwarded message ---------- From: Joseph Crawford Date: Nov 2, 2005 2:00 PM Subject: Re: [PHP-DB] PHP and MSSQL on Linux To: "php at swimwebs.com" I attempted this a while back for a client who used a 3rd party database to get thier content, the database was on a windows machine and MSSQL, however they ended up not being able to fully fund the project so gave up. I did find one thing that you had to install on linux to get linux to communicate with MSSQL however when i talked with a lot of hosts they would not install it because it had security flaws and has not been updated in years. To furthur this project we would have to get a dedicated server and install the package that was needed http://www.freetds.org/ I tried many things but i could not get php to communicate with MSSQL on a windows machine without the use of FreeTDS and even then it seemed to be particularly difficult, had to tweak stuff to get it initially installed. I hope this helps :) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Wed Nov 2 14:03:58 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Nov 2005 14:03:58 -0500 Subject: [nycphp-talk] Fwd: [PHP-DB] PHP and MSSQL on Linux In-Reply-To: <8d9a42800511021103x5a8a3e44i455d7630de043615@mail.gmail.com> References: <0MKoyl-1EXNkI31Ms-0006S5@mrelay.perfora.net> <8d9a42800511021100x77b84757vc0dfae894aa3228b@mail.gmail.com> <8d9a42800511021103x5a8a3e44i455d7630de043615@mail.gmail.com> Message-ID: <8d9a42800511021103s2802d656jbd0327b658bd73c4@mail.gmail.com> ---------- Forwarded message ---------- From: Joseph Crawford Date: Nov 2, 2005 2:03 PM Subject: Re: [PHP-DB] PHP and MSSQL on Linux To: "php at swimwebs.com" I would like to note that i have since checked the CVS and it shows some updates within weeks/months not years :) The part about not being maintained for years came from a few of the hosts i spoke to. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Wed Nov 2 14:04:51 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Wed, 02 Nov 2005 13:04:51 -0600 Subject: [nycphp-talk] Smarty Templates In-Reply-To: References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> Message-ID: <43690DD3.6040004@polymerdb.org> csnyder wrote: > > PHP makes an excellent template language when used with "short tags". > Dreamweaver still can't handle loops and conditionals, but it doesn't > choke on the code either. > > An example of PHP template: > > > > <?=htmlentities($title)?> > > >

        Today is .

        >
          > >
        • subject)?>
          > body)?> >
        • > > > > > When working this way you need to write a simple template class that > will search for the appropriate template to use from some path. Once > identify the template to use, you just include() it (possibly inside > an output buffer) and you're done. Wow, what a great PHP templating method. I am definately going to have to re-evaluate my use of the Smarty system. I work pretty much all day every day with a system that uses Smarty templates. A few years back (already? geez...), when we wanted to port an MS-Access database app to PHP/MySQL, I came up with a sloppy hack to handle user permissions, navigation, ad-hoc reporting, etc., through db tables, and use Smarty templates to format the output. The system has served us well so far (I'm even speculating that it could be useful to other people for other applications). Although, as Chris points out, it's a leaner/meaner system that does the templating natively in PHP, we've been quite happy with Smarty all this time. As for the original question, I, like others here it seems, see the "separation of logic and display" as kind of a gradient scale -- any display system is going to need logical programming structures to handle dynamic data. But a template system of some sort is just about the only way you're going to separate business logic from display logic. "PHP creep" is not so much much more an issue with native PHP templating than it is in Smarty, or other template systems that (even reluctantly) allow you to include PHP code in your templates. The point I think is not to worry about language-creep but about function-creep: as long as the code within a template exists for the purpose of receiving and displaying data, shouldn't that be enough to keep things working cleanly? Good luck finding the system that works for you, Mark. There are lots of choices. The NYPHP presentations page (http://www.nyphp.org/content/presentations/index.php) has links to two presentations on the topic, which may help you a little: http://davidmintz.org/presentations/show.php/QuickForm_and_Smarty (audio at http://www.nyphp.org/content/mp3/nyphp072704.mp3) http://www.nyphp.org/content/presentations/3templates/ (audio at http://www.nyphp.org/content/mp3/nyphp092303pt1.mp3) Whatever you choose, somewhere you're going to commit to one method or another, and you'll deal with the learning curve and make a system that does what you need. -- Allen Shaw Polymer (http://polymerdb.org) From codebowl at gmail.com Wed Nov 2 14:05:20 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Nov 2005 14:05:20 -0500 Subject: [nycphp-talk] [PHP-DB] PHP and MSSQL on Linux In-Reply-To: <8d9a42800511021103s2802d656jbd0327b658bd73c4@mail.gmail.com> References: <0MKoyl-1EXNkI31Ms-0006S5@mrelay.perfora.net> <8d9a42800511021100x77b84757vc0dfae894aa3228b@mail.gmail.com> <8d9a42800511021103x5a8a3e44i455d7630de043615@mail.gmail.com> <8d9a42800511021103s2802d656jbd0327b658bd73c4@mail.gmail.com> Message-ID: <8d9a42800511021105lb8dd281x8d1bf6ee527a706a@mail.gmail.com> here is a nice article about this http://www.linuxjournal.com/article/6636 -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Wed Nov 2 14:39:37 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 2 Nov 2005 14:39:37 -0500 (EST) Subject: [nycphp-talk] Smarty Templates In-Reply-To: <43690DD3.6040004@polymerdb.org> References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> Message-ID: I've noticed that if you use e.g. HTML_QuickForm (a Good Thing, IMHO) then you eventually find yourself almost coerced into getting involved in Smarty (or some other template engine), because QF's default renderer is just adequate for the simplest of display tasks, and customizing it heavily is really tedious. OTOH your Smarty templates end up looking like {if $form.lastname.error}  {$form.lastname.error} {/if} {$form.lastname.html} which about as ugly as the other alternatives. Still, I think it's worth it. I have taken to sticking the form initialization work into the same classes that do the db access work. The result is that the PHP scripts that control the flow end up being short and sweet. --- David Mintz http://davidmintz.org/ From dallas.devries at gmail.com Wed Nov 2 15:10:15 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Wed, 2 Nov 2005 15:10:15 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> Message-ID: <1200dbac0511021210u4cf8350cq17b213746ad7e823@mail.gmail.com> We use PHPLIB from PEAR, http://pear.php.net/package/HTML_Template_PHPLIB Its dead simple to use, just setting template variables and parsing template blocks you define. Pretty much completely keeps programming logic separate from the design phase. All that if/looping stuff is great and all but I'de rather just handle it in the php, its not that hard. Maybe I'm just not used to smarty but embedding php variables/method calls into the template seems like something that will cause pain further down the line as well. The only performance issue I have run into is if you need to parse thousands of items on one page there is a big slow down. In these cases (like big tables) we just embed a little bit of the html in the php. -Dallas SportSpyder.com On 11/2/05, David Mintz wrote: > > > I've noticed that if you use e.g. HTML_QuickForm (a Good Thing, IMHO) then > you eventually find yourself almost coerced into getting involved in > Smarty (or some other template engine), because QF's default renderer is > just adequate for the simplest of display tasks, and customizing it > heavily is really tedious. OTOH your Smarty templates end up looking like > > {if $form.lastname.error} >  {$form.lastname.error} > {/if} > > > > {$form.lastname.html} > > which about as ugly as the other alternatives. Still, I think it's worth > it. I have taken to sticking the form initialization work into the same > classes that do the db access work. The result is that the PHP scripts > that control the flow end up being short and sweet. > > > --- > David Mintz > http://davidmintz.org/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From billy.reisinger at gmail.com Wed Nov 2 15:11:52 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Wed, 2 Nov 2005 15:11:52 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> Message-ID: <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> Using HTML_Template_ITX (from PEAR), the same snippet would look like:  {FORM_ERROR_MESSAGE} {FORM_LASTNAME_HTML The advantage being that the HTML guy would already know what the tag does. THe rest of it doesn't look as confusing, either, IMHO. I really prefer HTML_Template_ITX over Smarty. I agree with you about making the php code cleaner, it really does. Here's what the php for this block would look like: if ($form.lastname.error) { $template->setCurrentBlock("FORM_ERROR"); $template->setVariable("FORM_ERROR_MESSAGE", $form.lastname.error); $template->parseCurrentBlock(); } $template->setVariable("FORM_LASTNAME_HTML", $form.lastname.html); My 2 cents :-) -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 On 11/2/05, David Mintz wrote: > > > I've noticed that if you use e.g. HTML_QuickForm (a Good Thing, IMHO) then > you eventually find yourself almost coerced into getting involved in > Smarty (or some other template engine), because QF's default renderer is > just adequate for the simplest of display tasks, and customizing it > heavily is really tedious. OTOH your Smarty templates end up looking like > > {if $form.lastname.error} >  {$form.lastname.error} > {/if} > > > > {$form.lastname.html} > > which about as ugly as the other alternatives. Still, I think it's worth > it. I have taken to sticking the form initialization work into the same > classes that do the db access work. The result is that the PHP scripts > that control the flow end up being short and sweet. > > > --- > David Mintz > http://davidmintz.org/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Wed Nov 2 15:59:15 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 2 Nov 2005 15:59:15 -0500 (EST) Subject: [nycphp-talk] Smarty Templates In-Reply-To: <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> Message-ID: On Wed, 2 Nov 2005, billy reisinger wrote: > Here's what the php for this block would look > like: > > if ($form.lastname.error) { > $template->setCurrentBlock("FORM_ERROR"); > $template->setVariable("FORM_ERROR_MESSAGE", $form.lastname.error); > $template->parseCurrentBlock(); > } > $template->setVariable("FORM_LASTNAME_HTML", $form.lastname.html); With those dots? What PHP version is that (-: --- David Mintz http://davidmintz.org/ From yournway at gmail.com Wed Nov 2 16:04:01 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Wed, 2 Nov 2005 21:04:01 +0000 Subject: [nycphp-talk] Smarty Templates In-Reply-To: <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> Message-ID: Since nobody mentioned it, I will. For a long time now I surrendered to simplicity, but achieving my gols easily. With TemplatePower it's very easy to work, although the license sucks(even if cheap). http://templatepower.codocad.com/ I let the designer design and produce layout /css and then I just add tags like {THIS_IN_HEADER} or {FORM_ACTION} or even replace form button values to make multiple language applications very, very easy to implement. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From billy.reisinger at gmail.com Wed Nov 2 16:13:26 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Wed, 2 Nov 2005 16:13:26 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> Message-ID: <14a0d8670511021313t7d42b7d5h66999fd9d0928d71@mail.gmail.com> On 11/2/05, David Mintz wrote: > > On Wed, 2 Nov 2005, billy reisinger wrote: > > > Here's what the php for this block would look > > like: > > > > if ($form.lastname.error) { > > $template->setCurrentBlock("FORM_ERROR"); > > $template->setVariable("FORM_ERROR_MESSAGE", $form.lastname.error); > > $template->parseCurrentBlock(); > > } > > $template->setVariable("FORM_LASTNAME_HTML", $form.lastname.html); > > With those dots? What PHP version is that (-: Uhh, yeah, umm... I'm not sure. The new one. Yeah. That's what I get for working on eight things at once ;-) Anyway, the idea is that you can reuse a particular block of HTML for the same purpose, i.e. if you have multiple error messages, you just slap em in an array, and parse a new error block in a foreach loop. Saves lots of time! CHeers, Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Wed Nov 2 16:50:16 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 2 Nov 2005 16:50:16 -0500 Subject: [nycphp-talk] URGENT: my ibm t41p laptop motherboard is messed up Message-ID: <20051102215016.GA13183@panix.com> Hey Folks: I bought an IBM 41p laptop last year. As mentioned the other day, I recently installed FreeBSD, Apache and PHP on it. This is in preparation of preparing a talk I'll be giving a week from today at the International PHP Conference. Well, my laptop's sytem board is now having intermittent problems. I called IBM support and they're not allowed to send me the system board. The only way to get such a board is to send them the machine. Well, that's not gonna work timing wise. First, I need the machine to finish testing my stuff before I go. Second, I'm leaving on Sunday. So, I'm hoping that some of the good people here have some connections, please. Some semi-plausible thoughts that are running through my head, of which one should suffice: * Someone (who knows someone) who's an IBM technician obtain the part for me. The original part number is 93P3313, but that's not available any more. The substitute part is 39T5495. * Someone has a similar IBM laptop which I can borrow for two weeks, allowing me to pull my hard drive out of this laptop and into yours. I must compliment IBM for the elegant design they employ that allows the hard drive to be slid out w/o opening up the machine at all. Crossing my toes, --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 Nov 2 17:39:23 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 02 Nov 2005 17:39:23 -0500 Subject: [nycphp-talk] URGENT: my ibm t41p laptop motherboard is messed up In-Reply-To: <20051102215016.GA13183@panix.com> References: <20051102215016.GA13183@panix.com> Message-ID: <4369401B.2050701@omnistep.com> Daniel Convissor wrote: >Hey Folks: > >I bought an IBM 41p laptop last year. As mentioned the other day, I >recently installed FreeBSD, Apache and PHP on it. This is in preparation >of preparing a talk I'll be giving a week from today at the International >PHP Conference. Well, my laptop's sytem board is now having intermittent >problems. > > What are the symptoms? You might want to first try swapping out the RAM if possible. ~Rolan From suzerain at suzerain.com Wed Nov 2 18:09:33 2005 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 2 Nov 2005 18:09:33 -0500 Subject: [nycphp-talk] Smarty Templates In-Reply-To: <14a0d8670511021313t7d42b7d5h66999fd9d0928d71@mail.gmail.com> References: <4368F675.9000501@php.net> <-3174443285719662243@unknownmsgid> <43690DD3.6040004@polymerdb.org> <14a0d8670511021211l7209682dp2e2501ab1089ada2@mail.gmail.com> <14a0d8670511021313t7d42b7d5h66999fd9d0928d71@mail.gmail.com> Message-ID: Just thought I'd chime in. I think the advantage of Smarty (and like tools) is not so much separation of logic and display, because, as many have pointed out, it's got conditionals and looping, which to me is "logic". I think the advantage of a system like that, on a large team, is really just control or security. In other words, if your templating engine can only do certain things, this means that the templates can also not possibly screw something else up. That said, I tend not to use any kind of templating. For me, writing {%variable%} is not any easier than writing , and I'd prefer to just have my layout people learn a smattering of PHP (rather than some arbitrary template syntax), so that they themselves can learn to understand these issues, and can expand their skill set. So I enforce the logic/display paradigm through discipline. Our publishing engine just has this separation built in, and our 'display' files only contain variable echoing, and simple logic or looping. The rule is, basically, no "calculations" or "data retrieval" happens in the display files (duh). But, if issues of control or security were extremely important to me, or if my team was too large to monitor, then I might reconsider routing everything through a templating engine and accept the performance hit. -- Marc Antony Vose http://www.suzerain.com/ "Anyone who is capable of getting themselves made President should on no account be allowed to do the job." - Douglas Adams From danielc at analysisandsolutions.com Wed Nov 2 18:51:54 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 2 Nov 2005 18:51:54 -0500 Subject: [nycphp-talk] URGENT: my ibm t41p laptop motherboard is messed up In-Reply-To: <4369401B.2050701@omnistep.com> References: <20051102215016.GA13183@panix.com> <4369401B.2050701@omnistep.com> Message-ID: <20051102235153.GA304@panix.com> Howdy: On Wed, Nov 02, 2005 at 05:39:23PM -0500, Rolan Yang wrote: > What are the symptoms? You might want to first try swapping out the RAM > if possible. If I jostle the computer, one of two things happen: * the monitor's image gets jumbled/pixelated * a line appears across the monitor, the the system freezes and then the image gets whiter and whiter as time goes by Before I even finished describing what was going on the person at IBM knew exactly what I was talking about. Based on past experience and the rep's take on things, I'm confident it's the system board. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From mitch.pirtle at gmail.com Wed Nov 2 22:58:12 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 2 Nov 2005 22:58:12 -0500 Subject: [nycphp-talk] URGENT: my ibm t41p laptop motherboard is messed up In-Reply-To: <20051102215016.GA13183@panix.com> References: <20051102215016.GA13183@panix.com> Message-ID: <330532b60511021958y12cb5514ue4c959cec4456757@mail.gmail.com> On 11/2/05, Daniel Convissor wrote: > So, I'm hoping that some of the good people here have some connections, > please. Some semi-plausible thoughts that are running through my head, of > which one should suffice: Well you are free to borrow my lovely Acer Aspire 1800. You will need to pay extra on the flight (overweight) and bring a gas generator with you (battery life ~38 minutes), and the fans will force you to yell at your presentation; but that 17" widescreen sure looks nice. -- Mitch, waiting for the laptop to die, and a solution to be found thereafter From jdaly at panix.com Thu Nov 3 15:23:14 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 15:23:14 -0500 Subject: [nycphp-talk] Offset error during unserializing data Message-ID: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> All, I'm runing into an error when I try to unserialize array or object data, shown below: Notice: unserialize() [function.unserialize]: Error at offset 0 of 2060 bytes in ... I've looked online but yet haven't found anything to help me narrow it down. Any ideas? thanks, JD From dcech at phpwerx.net Thu Nov 3 15:29:44 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 03 Nov 2005 15:29:44 -0500 Subject: [nycphp-talk] Offset error during unserializing data In-Reply-To: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> Message-ID: <436A7338.40808@phpwerx.net> John, You'll probably get some ideas if you post an example of a string causing the problem. Dan John Daly wrote: > All, > > I'm runing into an error when I try to unserialize array or object data, > shown below: > > Notice: unserialize() [function.unserialize]: Error at offset 0 of 2060 > bytes in ... > > I've looked online but yet haven't found anything to help me narrow it down. > Any ideas? > > thanks, > > JD From jdaly at panix.com Thu Nov 3 15:42:34 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 15:42:34 -0500 Subject: [nycphp-talk] Offset error during unserializing data References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> <436A7338.40808@phpwerx.net> Message-ID: <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> Dan, This isn't the original string, but it's the error I've been experiencing. Just a three element array of strings. Thanks, John sst Row: a:3:{i:0;s:3:\"foo\";i:1;s:3:\"bar\";i:2;s:11:\"foo bar you\";} Notice: unserialize() [function.unserialize]: Error at offset 9 of 93 bytes in ----- Original Message ----- From: "Dan Cech" To: "NYPHP Talk" Sent: Thursday, November 03, 2005 3:29 PM Subject: Re: [nycphp-talk] Offset error during unserializing data John, You'll probably get some ideas if you post an example of a string causing the problem. Dan John Daly wrote: > All, > > I'm runing into an error when I try to unserialize array or object data, > shown below: > > Notice: unserialize() [function.unserialize]: Error at offset 0 of 2060 > bytes in ... > > I've looked online but yet haven't found anything to help me narrow it > down. > Any ideas? > > thanks, > > JD _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From jeff.loiselle at gmail.com Thu Nov 3 15:50:52 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Thu, 3 Nov 2005 16:50:52 -0400 Subject: [nycphp-talk] Offset error during unserializing data In-Reply-To: <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> <436A7338.40808@phpwerx.net> <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> Message-ID: <4b1887110511031250m8878252p928d8d64331340d5@mail.gmail.com> Weren't there some unserialize bugs in older versions of PHP? Maybe you need to upgrade? From dcech at phpwerx.net Thu Nov 3 15:52:22 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 03 Nov 2005 15:52:22 -0500 Subject: [nycphp-talk] Offset error during unserializing data In-Reply-To: <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> <436A7338.40808@phpwerx.net> <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> Message-ID: <436A7886.9050105@phpwerx.net> John, It looks like you are introducing slashes into the string somewhere. If you change the string to: a:3:{i:0;s:3:"foo";i:1;s:3:"bar";i:2;s:11:"foo bar you";} it will work fine. You can find more info about the various pitfalls of slash-encoding here: http://www.nyphp.org/phundamentals/storingretrieving.php Dan John Daly wrote: > Dan, > > This isn't the original string, but it's the error I've been experiencing. > Just a three element array of strings. > > Thanks, > > John > > > sst Row: a:3:{i:0;s:3:\"foo\";i:1;s:3:\"bar\";i:2;s:11:\"foo bar you\";} > > Notice: unserialize() [function.unserialize]: Error at offset 9 of 93 bytes > in > > > ----- Original Message ----- > From: "Dan Cech" > To: "NYPHP Talk" > Sent: Thursday, November 03, 2005 3:29 PM > Subject: Re: [nycphp-talk] Offset error during unserializing data > > > John, > > You'll probably get some ideas if you post an example of a string > causing the problem. > > Dan > > John Daly wrote: >> All, >> >> I'm runing into an error when I try to unserialize array or object data, >> shown below: >> >> Notice: unserialize() [function.unserialize]: Error at offset 0 of 2060 >> bytes in ... >> >> I've looked online but yet haven't found anything to help me narrow it >> down. >> Any ideas? >> >> thanks, >> >> JD From jdaly at panix.com Thu Nov 3 15:54:12 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 15:54:12 -0500 Subject: [nycphp-talk] Offset error during unserializing data References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR><436A7338.40808@phpwerx.net> <00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> <4b1887110511031250m8878252p928d8d64331340d5@mail.gmail.com> Message-ID: <00e301c5e0b8$bf022400$6401a8c0@GUITAR> Jeff, PHP 5.0.4 (cli) (built: Jun 27 2005 21:07:52) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies Still not sure what to do about this. JD ----- Original Message ----- From: "Jeff Loiselle" To: "NYPHP Talk" Sent: Thursday, November 03, 2005 3:50 PM Subject: Re: [nycphp-talk] Offset error during unserializing data Weren't there some unserialize bugs in older versions of PHP? Maybe you need to upgrade? _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From jdaly at panix.com Thu Nov 3 16:16:51 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 16:16:51 -0500 Subject: [nycphp-talk] Offset error during unserializing data References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> <436A7338.40808@phpwerx.net><00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> <436A7886.9050105@phpwerx.net> Message-ID: <00fa01c5e0bb$e8a4fc80$6401a8c0@GUITAR> Aha, I found the error. Dang it. if ($form->validate()) { //$form->applyFilter('__ALL__', 'addslashes'); //$form->applyFilter('__ALL__', 'htmlentities'); $form->process('do_action', true); } I forgot about those. The serialized string was assigned to a hidden variable and Quickform was applying the rules. Commented out everything works fine. Thanks for the input, JD ----- Original Message ----- From: "Dan Cech" To: "NYPHP Talk" Sent: Thursday, November 03, 2005 3:52 PM Subject: Re: [nycphp-talk] Offset error during unserializing data John, It looks like you are introducing slashes into the string somewhere. If you change the string to: a:3:{i:0;s:3:"foo";i:1;s:3:"bar";i:2;s:11:"foo bar you";} it will work fine. You can find more info about the various pitfalls of slash-encoding here: http://www.nyphp.org/phundamentals/storingretrieving.php Dan John Daly wrote: > Dan, > > This isn't the original string, but it's the error I've been experiencing. > Just a three element array of strings. > > Thanks, > > John > > > sst Row: a:3:{i:0;s:3:\"foo\";i:1;s:3:\"bar\";i:2;s:11:\"foo bar you\";} > > Notice: unserialize() [function.unserialize]: Error at offset 9 of 93 > bytes > in > > > ----- Original Message ----- > From: "Dan Cech" > To: "NYPHP Talk" > Sent: Thursday, November 03, 2005 3:29 PM > Subject: Re: [nycphp-talk] Offset error during unserializing data > > > John, > > You'll probably get some ideas if you post an example of a string > causing the problem. > > Dan > > John Daly wrote: >> All, >> >> I'm runing into an error when I try to unserialize array or object data, >> shown below: >> >> Notice: unserialize() [function.unserialize]: Error at offset 0 of 2060 >> bytes in ... >> >> I've looked online but yet haven't found anything to help me narrow it >> down. >> Any ideas? >> >> thanks, >> >> JD _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From dmintz at davidmintz.org Thu Nov 3 17:24:21 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 3 Nov 2005 17:24:21 -0500 (EST) Subject: [nycphp-talk] Offset error during unserializing data In-Reply-To: <00fa01c5e0bb$e8a4fc80$6401a8c0@GUITAR> References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR> <436A7338.40808@phpwerx.net><00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR> <436A7886.9050105@phpwerx.net> <00fa01c5e0bb$e8a4fc80$6401a8c0@GUITAR> Message-ID: You might want to reconsider your reasons for adding slashes and escaping html entities in the first place. If you're planning to use the data in a db query you can use prepare/execute at query time. If you're planning to re-draw the form, QuickForm will do the escaping for you. If you're planning to store the form input in a db and display it later, you can escape it at retrieval time. If all this is insultingly obvious, my apologies (-: On Thu, 3 Nov 2005, John Daly wrote: > > Aha, I found the error. Dang it. > > if ($form->validate()) > { > //$form->applyFilter('__ALL__', 'addslashes'); > //$form->applyFilter('__ALL__', 'htmlentities'); > $form->process('do_action', true); > } --- David Mintz http://davidmintz.org/ From jdaly at panix.com Thu Nov 3 17:24:59 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 17:24:59 -0500 Subject: [nycphp-talk] small, lightweight file management component Message-ID: <013a01c5e0c5$6d9493c0$6401a8c0@GUITAR> All, I'm working on a project that needs a minimal file management functionality, i.e. display a directory tree, navigate, add folders and files. It's of secondary importance to the project so it doesn't have to be much. Any suggestions? Thanks, John From jdaly at panix.com Thu Nov 3 17:39:42 2005 From: jdaly at panix.com (John Daly) Date: Thu, 3 Nov 2005 17:39:42 -0500 Subject: [nycphp-talk] Offset error during unserializing data References: <00b701c5e0b4$6b739840$6401a8c0@GUITAR><436A7338.40808@phpwerx.net><00d201c5e0b7$1e9f98e0$6401a8c0@GUITAR><436A7886.9050105@phpwerx.net> <00fa01c5e0bb$e8a4fc80$6401a8c0@GUITAR> Message-ID: <014701c5e0c7$7beadb30$6401a8c0@GUITAR> Well, I liked it because that was one of the things that Quickform can do. I just have to apply it more carefully, heh. That code was really there because it included a nl2br for a textarea, but the textarea ended up getting scratched. thanks, JD ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Thursday, November 03, 2005 5:24 PM Subject: Re: [nycphp-talk] Offset error during unserializing data You might want to reconsider your reasons for adding slashes and escaping html entities in the first place. If you're planning to use the data in a db query you can use prepare/execute at query time. If you're planning to re-draw the form, QuickForm will do the escaping for you. If you're planning to store the form input in a db and display it later, you can escape it at retrieval time. If all this is insultingly obvious, my apologies (-: On Thu, 3 Nov 2005, John Daly wrote: > > Aha, I found the error. Dang it. > > if ($form->validate()) > { > //$form->applyFilter('__ALL__', 'addslashes'); > //$form->applyFilter('__ALL__', 'htmlentities'); > $form->process('do_action', true); > } --- David Mintz http://davidmintz.org/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From rolan at omnistep.com Fri Nov 4 04:20:53 2005 From: rolan at omnistep.com (Rolan Yang) Date: Fri, 04 Nov 2005 04:20:53 -0500 Subject: [nycphp-talk] small, lightweight file management component In-Reply-To: <013a01c5e0c5$6d9493c0$6401a8c0@GUITAR> References: <013a01c5e0c5$6d9493c0$6401a8c0@GUITAR> Message-ID: <436B27F5.40508@omnistep.com> John Daly wrote: >I'm working on a project that needs a minimal file management functionality, >i.e. display a directory tree, navigate, add folders and files. > > http://www.webdav.org/mod_dav/ ~Rolan From rrust at r2communications.com Fri Nov 4 10:48:45 2005 From: rrust at r2communications.com (Randal Rust) Date: Fri, 4 Nov 2005 09:48:45 -0600 Subject: [nycphp-talk] Trouble Updating an array in a class Message-ID: <1131119325.436b82dde93eb@webmail.r2communications.com> I am having issues with updating a property (which is an array) in a class. In the class, I set the property: var $modules=array(); There is a method in this class that fetches the modules from the database and creates an array. This is called in my page, after the class is instantiated: $moduleVars=$user->getModules($db); At this point, if I loop through the array and print the results, I get... NEWS = ART = CONT = IMG = PROJ = EMP = USER = ...which is exactly correct. What I'm doing here is developing the permissions portion of a CMS. So what I've done is set all my permissions to empty. Now, when the page is submitted, I update the $moduleVars array with this: //pull modules and permissions from request string foreach($moduleVars as $moduleCode=>$moduleValue){ if(isset($_REQUEST[$moduleCode])){ $moduleValue=$_REQUEST[$moduleCode]; //echo $moduleCode.' = '.$_REQUEST[$moduleCode].'
          '; } } If I print the results out, I get the correct values that I selected for each module: NEWS = CRU ART = CONT = R IMG = PROJ = EMP = USER = R Now, I have to pass this back to the class, and here is where my problem is. Typically, I pull values from the query string like so... $firstName=$_POST['firstName']; ...and then pass it to the class like this... $user->firstName=$firstName; This has always worked fine. But when I try to reset the array... $user->modules=$moduleVars; ...and then print out what gets passed to the class, I get... NEWS = ART = CONT = IMG = PROJ = EMP = USER = ...as though what I am passing back is not the updated array, but the initial version that was created when I called the getModules() method. Can anyone explain why this is happening? Randal Rust ----------------------------- R.Squared Communications Digital Design for Bricks-and-Mortar Business www.r2communications.com From scott at crisscott.com Fri Nov 4 11:12:08 2005 From: scott at crisscott.com (Scott Mattocks) Date: Fri, 04 Nov 2005 11:12:08 -0500 Subject: [nycphp-talk] Trouble Updating an array in a class In-Reply-To: <1131119325.436b82dde93eb@webmail.r2communications.com> References: <1131119325.436b82dde93eb@webmail.r2communications.com> Message-ID: <436B8858.4070108@crisscott.com> Randal Rust wrote: > //pull modules and permissions from request string > foreach($moduleVars as $moduleCode=>$moduleValue){ > if(isset($_REQUEST[$moduleCode])){ > $moduleValue=$_REQUEST[$moduleCode]; > //echo $moduleCode.' = '.$_REQUEST[$moduleCode].'
          '; > } > } > > Can anyone explain why this is happening? You are not updating the array. You are just updating the variable $moduleValue. You should update the array with a line like this: $moduleVars[$moduleCode] = $_REQUEST[$moduleCode]; Of course you should be sure to scrub the value from the $_REQUEST array before you do anything with it, but that doesn't necessarily need to be done in the foreach loop. -- Scott Mattocks scott at crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks From rrust at r2communications.com Fri Nov 4 10:58:23 2005 From: rrust at r2communications.com (Randal Rust) Date: Fri, 4 Nov 2005 09:58:23 -0600 Subject: [nycphp-talk] Trouble Updating an array in a class In-Reply-To: <436B8858.4070108@crisscott.com> References: <1131119325.436b82dde93eb@webmail.r2communications.com> <436B8858.4070108@crisscott.com> Message-ID: <1131119903.436b851fc2ef5@webmail.r2communications.com> Quoting Scott Mattocks : > You are not updating the array. You are just updating the variable > $moduleValue. You should update the array with a line like this: > > $moduleVars[$moduleCode] = $_REQUEST[$moduleCode]; Thanks, Scott. I figured it out just before this hit my Inbox. I knew it was something simple like this. > Of course you should be sure to scrub the value from the $_REQUEST array > before you do anything with it, Yeah, I do that. I just left it out of this particular discussion. Once I have the updated array, I check it and clean it. Randal Rust ----------------------------- R.Squared Communications Digital Design for Bricks-and-Mortar Business www.r2communications.com From lists at zaunere.com Fri Nov 4 11:43:31 2005 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 4 Nov 2005 11:43:31 -0500 Subject: [nycphp-talk] FW: O'Reilly UG Program MAKE Magazine Holiday Offer Message-ID: <002801c5e15e$e48516f0$6401a8c0@MobileZ> FYI > ***Give the Gift of MAKE Magazine*** > > Give the geek on your list a truly unique gift this holiday season-- > their very own subscription to MAKE magazine. MAKE is the first > magazine devoted to digital projects, hardware hacks, and DIY > inspiration. Each rich issue brings the do-it-yourself mindset to all > the technology in > your life. > > > You have a choice: > > Give a gift for $5 off the regular gift subscription rate--$29.95 > (US), $34.95 (Canada), $44.95 (all other countries): > > > > > To place your gift order at the regular price $34.95 (US), $39.95 > (Canada), $49.95 (all other countries)--and get a MAKE T-shirt free. > > > > > For more information on MAKE or to read the MAKE Blog, go to: > http://makezine.com/ > > > > **Please note gift postcards and MAKE vol 4 will begin mailing on > 12/9/05, orders received after 12/9/05 and non-US orders may not > arrive > in time for the holiday season. Your recipient(s) will receive the > opportunity to add digital access to their subscription. All MAKE > T-shirts will ship to your billing address. To order multiple orders > for multiple countries, please contact customer service at > 1-866-289-8847 (US & Canada), 1-818-487-2037 (all other countries) > between the hours > of 5am to 5pm San Francisco time or Email: MAKE at espcomp.com From d126099 at atos.wmid.amu.edu.pl Sat Nov 5 07:17:46 2005 From: d126099 at atos.wmid.amu.edu.pl (Marcin Szkudlarek) Date: Sat, 5 Nov 2005 13:17:46 +0100 (CET) Subject: [nycphp-talk] online games Message-ID: Hi! I'm thinking about developing online game in php like: http://games.swirve.com/utopia or http://ogame.org Both of them are real-time strategy games. This means that if you make some action in this games, you have to wait for a certain amout of time to see the result. For example sending an army to attack another province takes few hours of a real-world time. My question is , how can I update periodically these kind of data in the database? I think I can do it using cron, updating game database every hour for example. Is there any other way? Usually you don't have access to tool like cron.. Marcin From codebowl at gmail.com Sat Nov 5 07:55:12 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 5 Nov 2005 07:55:12 -0500 Subject: [nycphp-talk] online games In-Reply-To: References: Message-ID: <8d9a42800511050455r21c0ff32lfbeeadecc6b045ab@mail.gmail.com> most web hosts allow you to setup cron, check in your cpanel. I would suggest you run a cron and with each action you set the time it was set as a time() timestamp, then just have the cron(s) check to see if X hours has elapsed, if so follow through with the action. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaelhasz at gmx.net Sat Nov 5 09:01:36 2005 From: michaelhasz at gmx.net (Michael Haszprunar) Date: Sat, 05 Nov 2005 15:01:36 +0100 Subject: [nycphp-talk] online games In-Reply-To: References: Message-ID: <436CBB40.1090104@gmx.net> Marcin Szkudlarek wrote: > Hi! > > I'm thinking about developing online game in php like: > http://games.swirve.com/utopia > or > http://ogame.org > > Both of them are real-time strategy games. This means that if you make > some action in this games, you have to wait for a certain amout of time to > see the result. For example sending an army to attack another province > takes few hours of a real-world time. > My question is , how can I update periodically these kind of data in the > database? I think I can do it using cron, updating game database every > hour for example. Is there any other way? Usually you don't have access > to tool like cron.. > > Marcin Hi, I'm just doing the same and had to do the same thinking. Our solution: Each dataset (for example the users credits) get a timestamp (last update). If a function manipulates this value, the timestamp gets updated. Every time another player accesses this value (for example he sends our a spy to see the opponents agent) the game has to check if the value is still correct (maybe tax were paid in the meantime and the user has not yet logged in to calculate) and if the value is outdated, the value has to be calculated correct, updated and a net timestamp is given. The advantage is, that you don't have to calculate ALL new values at the same time (which can be very complex and long running, depending on the users), but you just calculate the new value on access. The second advantage is, that you don't need a cron, which is not availiable in any hosting environment. The disadvantage is, that you need a more complex data storage and a on-access data consistency check. We tried it and it works great (although the final test is still to come because our project is about 0.1% complete). Hope you understand my point, my english is not very good ... Michael from Germany From yournway at gmail.com Sat Nov 5 09:31:29 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Sat, 5 Nov 2005 14:31:29 +0000 Subject: [nycphp-talk] online games In-Reply-To: <436CBB40.1090104@gmx.net> References: <436CBB40.1090104@gmx.net> Message-ID: Then you have things like Evolution, which have an universal clock that ticks like a regular clock, meaning 1 tick is 1 hour. Every action is based on that assumption and this allows, for example for users to group and plan attacks, bcause everybody has the sime time, a little like Swatch time. On 05/11/05, Michael Haszprunar wrote: > Marcin Szkudlarek wrote: > > Hi! > > > > I'm thinking about developing online game in php like: > > http://games.swirve.com/utopia > > or > > http://ogame.org > > > > Both of them are real-time strategy games. This means that if you make > > some action in this games, you have to wait for a certain amout of time to > > see the result. For example sending an army to attack another province > > takes few hours of a real-world time. > > My question is , how can I update periodically these kind of data in the > > database? I think I can do it using cron, updating game database every > > hour for example. Is there any other way? Usually you don't have access > > to tool like cron.. > > > > Marcin > > Hi, > > I'm just doing the same and had to do the same thinking. Our solution: > Each dataset (for example the users credits) get a timestamp (last > update). If a function manipulates this value, the timestamp gets > updated. Every time another player accesses this value (for example he > sends our a spy to see the opponents agent) the game has to check if the > value is still correct (maybe tax were paid in the meantime and the user > has not yet logged in to calculate) and if the value is outdated, the > value has to be calculated correct, updated and a net timestamp is given. > The advantage is, that you don't have to calculate ALL new values at the > same time (which can be very complex and long running, depending on the > users), but you just calculate the new value on access. The second > advantage is, that you don't need a cron, which is not availiable in any > hosting environment. > The disadvantage is, that you need a more complex data storage and a > on-access data consistency check. > > We tried it and it works great (although the final test is still to come > because our project is about 0.1% complete). > Hope you understand my point, my english is not very good ... > > Michael from Germany > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From codebowl at gmail.com Sat Nov 5 14:05:28 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 5 Nov 2005 14:05:28 -0500 Subject: [nycphp-talk] PHP 4 compatable XML parser Message-ID: <8d9a42800511051105o5ed3f1a5n9cfda8e5456405f1@mail.gmail.com> Anyone here that can recommend a good parser. I have a client who wants to integrate UPS and USPS shipping rates into thier site and i would like to save them on time/cost if possible ;) i dont want to have to write something custom unless absolutely necessary. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dallas.devries at gmail.com Sat Nov 5 18:46:36 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Sat, 5 Nov 2005 18:46:36 -0500 Subject: [nycphp-talk] PHP 4 compatable XML parser In-Reply-To: <8d9a42800511051105o5ed3f1a5n9cfda8e5456405f1@mail.gmail.com> References: <8d9a42800511051105o5ed3f1a5n9cfda8e5456405f1@mail.gmail.com> Message-ID: <1200dbac0511051546m669e28d0s1e0a79a29287ffa@mail.gmail.com> This is what I use to parse rss/atom feeds maybe it will help. XML_Parser 1.2.6 stable XML_RPC 1.4.4 stable XML_Serializer 0.16.0 beta XML_Tree 2.0.0RC2 beta XML_Util 1.1.1 stable $options = array('complexType' => 'object', 'parseAttributes' => true, 'attributesArray' => false); $unserializer = new XML_Unserializer($options); $status = $unserializer->unserialize($this->_mainPage); $data = $unserializer->getUnserializedData(); -Dallas sportspyder.com On 11/5/05, Joseph Crawford wrote: > > Anyone here that can recommend a good parser. I have a client who wants to > integrate UPS and USPS shipping rates into thier site and i would like to > save them on time/cost if possible ;) i dont want to have to write something > custom unless absolutely necessary. > > Thanks, > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d126099 at atos.wmid.amu.edu.pl Sun Nov 6 07:00:28 2005 From: d126099 at atos.wmid.amu.edu.pl (Marcin Szkudlarek) Date: Sun, 6 Nov 2005 13:00:28 +0100 (CET) Subject: [nycphp-talk] online games In-Reply-To: <436CBB40.1090104@gmx.net> References: <436CBB40.1090104@gmx.net> Message-ID: Thanks, for all replies. Michael, I understand your concept very well. Actually, I thought about similar solution before posting my question on the list. But I thought about the same thing you had mention - complexity. Now I have to think about it once again. Marcin (from Poland :) On Sat, 5 Nov 2005, Michael Haszprunar wrote: > Marcin Szkudlarek wrote: >> Hi! >> >> I'm thinking about developing online game in php like: >> http://games.swirve.com/utopia >> or >> http://ogame.org >> >> Both of them are real-time strategy games. This means that if you make >> some action in this games, you have to wait for a certain amout of time to >> see the result. For example sending an army to attack another province >> takes few hours of a real-world time. >> My question is , how can I update periodically these kind of data in the >> database? I think I can do it using cron, updating game database every >> hour for example. Is there any other way? Usually you don't have access >> to tool like cron.. >> >> Marcin > > Hi, > > I'm just doing the same and had to do the same thinking. Our solution: > Each dataset (for example the users credits) get a timestamp (last > update). If a function manipulates this value, the timestamp gets > updated. Every time another player accesses this value (for example he > sends our a spy to see the opponents agent) the game has to check if the > value is still correct (maybe tax were paid in the meantime and the user > has not yet logged in to calculate) and if the value is outdated, the > value has to be calculated correct, updated and a net timestamp is given. > The advantage is, that you don't have to calculate ALL new values at the > same time (which can be very complex and long running, depending on the > users), but you just calculate the new value on access. The second > advantage is, that you don't need a cron, which is not availiable in any > hosting environment. > The disadvantage is, that you need a more complex data storage and a > on-access data consistency check. > > We tried it and it works great (although the final test is still to come > because our project is about 0.1% complete). > Hope you understand my point, my english is not very good ... > > Michael from Germany > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From dmintz at davidmintz.org Tue Nov 8 22:23:11 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 8 Nov 2005 22:23:11 -0500 (EST) Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? Message-ID: I need to set up online credit card processing for a small non-profit organization and I'm wondering what you folks recommend. This organization has its bank account of course but that's it -- no merchant account or anything. I've surfed a few like charge.com that google turned up -- surprise! they all claim they are the greatest. I have been looknig at echo-inc.com but they insist that you open a business checking account with a specific bank, which I think rather sucks. So -- whom do you use and what do you think? Thanks. --- David Mintz http://davidmintz.org/ From 1j0lkq002 at sneakemail.com Tue Nov 8 22:28:39 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 08 Nov 2005 19:28:39 -0800 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: References: Message-ID: <8499-29031@sneakemail.com> David Mintz dmintz-at-davidmintz.org |nyphp dev/internal group use| wrote: >I need to set up online credit card processing for a small non-profit >organization and I'm wondering what you folks recommend. This organization >has its bank account of course but that's it -- no merchant account or >anything. > >I've surfed a few like charge.com that google turned up -- surprise! they >all claim they are the greatest. I have been looknig at echo-inc.com but >they insist that you open a business checking account with a specific >bank, which I think rather sucks. > >So -- whom do you use and what do you think? > >Thanks. > > >--- >David Mintz >http://davidmintz.org/ > > A true non-profit (in the IRS' eyes) should be careful about choosing a merchant service because it is actually a bank account of sorts. My lone experience with that situation required alot of attention from the non-profit's CPA (I can't say whether or not that attention was "smart" or just a big waste of time). They ended up going through their own bank at considerable cost. -=john andrews http://www.seo-fun.com From glenn310b at mac.com Tue Nov 8 23:45:41 2005 From: glenn310b at mac.com (Glenn) Date: Tue, 8 Nov 2005 23:45:41 -0500 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: <8499-29031@sneakemail.com> References: <8499-29031@sneakemail.com> Message-ID: I was visiting the website of an indie recording artist today, and there was a link to paypal, where I could pay via credit card or paypal. I don't know anything more about how it works, but the experience seemed ok to me, and I think the public may be more willing to give credit card info to someone like paypal than to some small outfit that they may not be too familiar with. I maintain 3 .org websites, all three are very small organizations and I also am interested in how I might give them the ability to accept payments online. Thanks for bringing the subject up. Glenn On Nov 8, 2005, at 10:28 PM, inforequest wrote: > David Mintz dmintz-at-davidmintz.org |nyphp dev/internal group use| > wrote: > >> I need to set up online credit card processing for a small non-profit >> organization and I'm wondering what you folks recommend. This >> organization >> has its bank account of course but that's it -- no merchant account or >> anything. >> >> I've surfed a few like charge.com that google turned up -- surprise! >> they >> all claim they are the greatest. I have been looknig at echo-inc.com >> but >> they insist that you open a business checking account with a specific >> bank, which I think rather sucks. >> >> So -- whom do you use and what do you think? >> >> Thanks. >> >> >> --- >> David Mintz >> http://davidmintz.org/ >> >> > > A true non-profit (in the IRS' eyes) should be careful about choosing a > merchant service because it is actually a bank account of sorts. My > lone > experience with that situation required alot of attention from the > non-profit's CPA (I can't say whether or not that attention was "smart" > or just a big waste of time). They ended up going through their own > bank > at considerable cost. > > -=john andrews > http://www.seo-fun.com > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From 1j0lkq002 at sneakemail.com Wed Nov 9 01:49:32 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 08 Nov 2005 22:49:32 -0800 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: References: <8499-29031@sneakemail.com> Message-ID: <25642-70575@sneakemail.com> I really think it is a question for a CPA at that organization (or the one taking on that responsibility). If a non-profit is "used" to generate profits for someone, that can be illegal and can jeopardize the non-profit status (I believe the legal term is inurement). If a non-profit loses its status thusly, it may be retroactively converted to a for-profit entity, which means back-taxes-plus-penalties-and-interest as far back as the creation date (ouch!). We can discuss all we like here but the real important stuff will be decided at the "corporate"level within each particular entity, based on their own comfort levels, risk management, accounting practices, state, etc. I believe the law permits individuals to accept "donations" via PayPal as you describe... something changed a few years ago in that area.... I am not a lawyer nor a CPA so this advice may be worth slightly less than the price you paid for it. Glenn glenn310b-at-mac.com |nyphp dev/internal group use| wrote: >I was visiting the website of an indie recording artist today, >and there was a link to paypal, where I could pay via >credit card or paypal. I don't know anything more about >how it works, but the experience seemed ok to me, >and I think the public may be more willing to give >credit card info to someone like paypal than to some >small outfit that they may not be too familiar with. I maintain >3 .org websites, all three are very small organizations >and I also am interested in how I might give them the ability >to accept payments online. > >Thanks for bringing the subject up. > >Glenn > From rsd at electronink.com Wed Nov 9 06:53:37 2005 From: rsd at electronink.com (Russ Demarest) Date: Wed, 9 Nov 2005 06:53:37 -0500 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: <25642-70575@sneakemail.com> References: <8499-29031@sneakemail.com> <25642-70575@sneakemail.com> Message-ID: If the question you are asking is paypal a viable alternative for accepting credit cards, the answer is yes. The only downside is that if you are trying to come across as a big company and you want your own payment system so it is all under one domain, so to speak, then using PayPal might not be the way to go. There is an instant payment notification system with a PHP sdk. https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/general/ PayPalDeveloperToolKit-outside and other languages. I have used it for a variety of sites and it gives you the info you need without the liability of running your own. Hope this helps. On Nov 9, 2005, at 1:49 AM, inforequest wrote: > I really think it is a question for a CPA at that organization (or the > one taking on that responsibility). > > If a non-profit is "used" to generate profits for someone, that > can be > illegal and can jeopardize the non-profit status (I believe the legal > term is inurement). If a non-profit loses its status thusly, it may be > retroactively converted to a for-profit entity, which means > back-taxes-plus-penalties-and-interest as far back as the creation > date > (ouch!). > > We can discuss all we like here but the real important stuff will be > decided at the "corporate"level within each particular entity, > based on > their own comfort levels, risk management, accounting practices, > state, etc. > > I believe the law permits individuals to accept "donations" via PayPal > as you describe... something changed a few years ago in that > area.... I > am not a lawyer nor a CPA so this advice may be worth slightly less > than > the price you paid for it. > > > > > Glenn glenn310b-at-mac.com |nyphp dev/internal group use| wrote: > >> I was visiting the website of an indie recording artist today, >> and there was a link to paypal, where I could pay via >> credit card or paypal. I don't know anything more about >> how it works, but the experience seemed ok to me, >> and I think the public may be more willing to give >> credit card info to someone like paypal than to some >> small outfit that they may not be too familiar with. I maintain >> 3 .org websites, all three are very small organizations >> and I also am interested in how I might give them the ability >> to accept payments online. >> >> Thanks for bringing the subject up. >> >> Glenn >> > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From tgales at tgaconnect.com Wed Nov 9 09:32:16 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 09 Nov 2005 07:32:16 -0700 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? Message-ID: <43720870.8050103@tgaconnect.com> On 11/08/2005 08:23 PM David Mintz writes: > I need to set up online credit card processing for a small non-profit > organization and I'm wondering what you folks recommend. This is a specialized area. I would suggest you get some expert help. You can get some background information by going to websites like http://www.convio.com and asking for literature. Relying on a salesman in lieu of a consultant is not advisable of course -- but you can oftentimes learn about about known pitfalls from them. -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From list at harveyk.com Wed Nov 9 08:47:20 2005 From: list at harveyk.com (harvey) Date: Wed, 09 Nov 2005 08:47:20 -0500 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: References: <8499-29031@sneakemail.com> <25642-70575@sneakemail.com> Message-ID: <6.2.5.6.2.20051109084616.035774d8@harveyk.com> Paypal Website Pro lets you host all the commerce pages. https://www.paypal.com/us/cgi-bin/webscr?cmd=_wp-pro-overview-outside At 06:53 AM 11/9/2005, Russ Demarest wrote: >If the question you are asking is paypal a viable alternative for >accepting credit cards, the answer is yes. The only downside is that >if you are trying to come across as a big company and you want your >own payment system so it is all under one domain, so to speak, then >using PayPal might not be the way to go. > >There is an instant payment notification system with a PHP sdk. > >https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/general/ >PayPalDeveloperToolKit-outside > >and other languages. > >I have used it for a variety of sites and it gives you the info you >need without the liability of running your own. > >Hope this helps. > > >On Nov 9, 2005, at 1:49 AM, inforequest wrote: > > > I really think it is a question for a CPA at that organization (or the > > one taking on that responsibility). > > > > If a non-profit is "used" to generate profits for someone, that > > can be > > illegal and can jeopardize the non-profit status (I believe the legal > > term is inurement). If a non-profit loses its status thusly, it may be > > retroactively converted to a for-profit entity, which means > > back-taxes-plus-penalties-and-interest as far back as the creation > > date > > (ouch!). > > > > We can discuss all we like here but the real important stuff will be > > decided at the "corporate"level within each particular entity, > > based on > > their own comfort levels, risk management, accounting practices, > > state, etc. > > > > I believe the law permits individuals to accept "donations" via PayPal > > as you describe... something changed a few years ago in that > > area.... I > > am not a lawyer nor a CPA so this advice may be worth slightly less > > than > > the price you paid for it. > > > > > > > > > > Glenn glenn310b-at-mac.com |nyphp dev/internal group use| wrote: > > > >> I was visiting the website of an indie recording artist today, > >> and there was a link to paypal, where I could pay via > >> credit card or paypal. I don't know anything more about > >> how it works, but the experience seemed ok to me, > >> and I think the public may be more willing to give > >> credit card info to someone like paypal than to some > >> small outfit that they may not be too familiar with. I maintain > >> 3 .org websites, all three are very small organizations > >> and I also am interested in how I might give them the ability > >> to accept payments online. > >> > >> Thanks for bringing the subject up. > >> > >> Glenn > >> > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From dmintz at davidmintz.org Wed Nov 9 10:12:53 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 9 Nov 2005 10:12:53 -0500 (EST) Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? In-Reply-To: <43720870.8050103@tgaconnect.com> References: <43720870.8050103@tgaconnect.com> Message-ID: Thanks all. Tim's and inforequest's points about the delicate tax status are well taken. All these people want to do is collect membership dues and possibly event registration fees -- they aren't looking to "make" money in any sense different from what they are already doing with checks and snail mail. And I know of a couple other very comparable organizations that are doing this, guess I oughta talk to them, too. Perhaps this is too OT --I'll shut up now. Thanks. --- David Mintz http://davidmintz.org/ From leegold at fastmail.fm Wed Nov 9 10:52:55 2005 From: leegold at fastmail.fm (leegold) Date: Wed, 09 Nov 2005 10:52:55 -0500 Subject: [nycphp-talk] XML-RPC question In-Reply-To: References: <43720870.8050103@tgaconnect.com> Message-ID: <1131551575.20933.247132499@webmail.messagingengine.com> Hi, I'm a relative newbie when it comes to firewalls and serious network security but I had a thought and wondered how feasible it is. I'm looking at this XML-RPC book, it seems to say that say if I did not have a certain application on my server I could add eg. a laptop to my network which did have that needed application (along w/other required software perhaps a server) and with xml-rpc calls almost use the laptop like an added partition of applications. The catch seems to be security cause all this is passed around w/http ie. as a web-service. So my question is, what would be a way protecting the laptop from any unauthorized outside requests eg. the laptop only talks to the server (or an appointed box) on the local network. Thanks, Lee Gold From chsnyder at gmail.com Wed Nov 9 11:27:16 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 9 Nov 2005 11:27:16 -0500 Subject: [nycphp-talk] XML-RPC question In-Reply-To: <1131551575.20933.247132499@webmail.messagingengine.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> Message-ID: On 11/9/05, leegold wrote: > The catch seems to be security cause all this is passed around w/http > ie. as a web-service. So my question is, what would be a way protecting > the laptop from any unauthorized outside requests eg. the laptop only > talks to the server (or an appointed box) on the local network. Interesting idea. If I understand correctly, you should probably use a combination of NAT/Firewall (that you likely already have in place) to block external port 80 requests to your laptop, and a global Apache Allow directive, to ensure that your laptop only accepts requests from the server's IP address. See http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow -- Chris Snyder http://chxo.com/ From tgales at tgaconnect.com Wed Nov 9 11:42:19 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 9 Nov 2005 11:42:19 -0500 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? Message-ID: <200511091642.jA9GgJT22900@tgaconnect.com> David Mintz writes: > > All these people want to do is collect membership dues and possibly event > registration fees -- they aren't looking to "make" money in any sense Making money is not the only means of providing 'benefit' to private interests who operate the organization. For example, if a database of the membership is created as a by-product of a donation system, there should be some auditable safegards in place to prevent private parties inside the organization from using it for their benefit. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From aaron at aarond.com Wed Nov 9 11:56:18 2005 From: aaron at aarond.com (aaron at aarond.com) Date: Wed, 09 Nov 2005 11:56:18 -0500 Subject: [nycphp-talk] pharma merchant processor Message-ID: <20051109115618.ul2dwk8sffccggcg@208.179.130.20> I know there have been talks about online merchant processors, but can anyone recommend one that will handle pharmaceutical related products? My client says he will just be selling home health care products and not prescriptions, but seems to keep getting his applications denied. I need one that uses Auth.net, or will sync up to it. (I've only done one other online store before) He even had someone deny him on the basis that there is a graphic in the design I created that has pills in it even though he isn't going to sell pills. (It was part of the design I used on the pharmacy site, the online store is a different site but branded similarly. I'll keep my url's off this email so I'm not thought to be spam. :) From rolan at omnistep.com Wed Nov 9 12:05:34 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 09 Nov 2005 12:05:34 -0500 Subject: [nycphp-talk] pharma merchant processor In-Reply-To: <20051109115618.ul2dwk8sffccggcg@208.179.130.20> References: <20051109115618.ul2dwk8sffccggcg@208.179.130.20> Message-ID: <43722C5E.2090500@omnistep.com> aaron at aarond.com wrote: >I know there have been talks about online merchant processors, but can anyone >recommend one that will handle pharmaceutical related products? My client says >he will just be selling home health care products and not prescriptions, but >seems to keep getting his applications denied. > >I need one that uses Auth.net, or will sync up to it. (I've only done one other >online store before) > >He even had someone deny him on the basis that there is a graphic in the design > > > Someone on the list mentioned Paypal Website Pro earlier. If you don't HAVE to use auth.net, Paypal is currently letting anyone apply and there is no monthly fee until 2/1/06. The new paypal feature doesn't require the end user to have a paypal account or even know that paypal is in the background doing the processing. It's pretty much like Verisign payflow pro (which, BTW, Ebay acquired recently). They also have a virtual terminal so you can enter transactions in by hand. The downside is that paypal charges 2.9%+30cents/transaction where as many other auth.net merchants accounts charge roughly 2.1%+25c/transaction. Oscommerce and miva both support the new paypal pro api. I was thinking of writing a generic interface for use with Zencart and other shopping carts over the next few days. ~Rolan From jeff.loiselle at gmail.com Wed Nov 9 12:27:05 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 9 Nov 2005 12:27:05 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database Message-ID: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> From: The Feeling Quite Lazy Today Department... Anyone know of any existing PHP/MySQL code with which one can manage nested sets in a database. Anyone have a category manager they want to share? ;-) If not, I'll post one when I'm done. ;-) I've been reading: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html http://www.sitepoint.com/article/hierarchical-data-database/3 http://www.philbrodeur.com/tutorials/mptt/ --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From aarong at thinkcomputer.com Wed Nov 9 12:55:45 2005 From: aarong at thinkcomputer.com (Aaron Greenspan) Date: Wed, 09 Nov 2005 11:55:45 -0600 Subject: [nycphp-talk] [OT] recommendations re credit cards/merchant accounts? Message-ID: <43723821.3020102@thinkcomputer.com> Hi, We've had a good experience with Authorize.Net's Integrated Payment Service, which goes through Wells Fargo. I use it to run credit cards manually from time to time, and to integrate with the Client Center section of my site, where people can pay their bills. (In the interest of full disclosure, I'm also a reseller for them, but I became one because their service is good.) If you have any questions about it, I'd be happy to answer them. Aaron Aaron Greenspan President & CEO Think Computer Corporation http://www.thinkcomputer.com From chsnyder at gmail.com Wed Nov 9 13:20:56 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 9 Nov 2005 13:20:56 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: On 11/9/05, Jeff Loiselle wrote: > From: The Feeling Quite Lazy Today Department... > > Anyone know of any existing PHP/MySQL code with which one can manage > nested sets in a database. Anyone have a category manager they want to > share? ;-) If not, I'll post one when I'm done. ;-) > Hans will probably post a newer version (if one exists...) but pnsm.pcom is one of the first open source implementations of nested sets in MySQL+PHP: http://cvs.nyphp.org/cvsweb.cgi/clew/lib/pnsm.pcom?rev=1.1&content-type=text/x-cvsweb-markup Unfortunately that earlyish version has no "move" method... I'm supposed to publish a much more recent implementation that I've been working with, but I haven't had time to put the site together. Hmmm, a preview can be found here: http://pine.fcny.org/~csnyder/fcnyNode.txt -- Chris Snyder http://chxo.com/ From chsnyder at gmail.com Wed Nov 9 13:24:28 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 9 Nov 2005 13:24:28 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: On 11/9/05, csnyder wrote: > I'm supposed to publish a much more recent implementation that I've > been working with, but I haven't had time to put the site together. As a followup, you'd probably want the table structure... CREATE TABLE `fcnyNode` ( `id` int(10) unsigned NOT NULL auto_increment, `parentId` int(10) unsigned default NULL, `lt` int(10) unsigned default NULL, `rt` int(10) unsigned default NULL, PRIMARY KEY (`id`) ) TYPE=InnoDB It has to be InnoDB because transactions are necessary to ensure that the tree doesn't get corrupted during moves. -- Chris Snyder http://chxo.com/ From jeff.loiselle at gmail.com Wed Nov 9 13:36:08 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 9 Nov 2005 13:36:08 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: <4b1887110511091036w7974c70fhdbf25a9ece51838d@mail.gmail.com> Chris, Thanks for the resources, this is tremendously helpful. Thanks for sharing your hard work Chris and Hans. It seems I owe you both a beer. ;-) I'll kick back any questions, comments, or suggestions I may have. --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From cliff at pinestream.com Wed Nov 9 13:44:12 2005 From: cliff at pinestream.com (cliff) Date: Wed, 9 Nov 2005 13:44:12 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: <20051109184412.M74684@pinestream.com> I wrote an ugly class that I've used for product categories and nested FAQs. DB structure is: id, parent id, lft, rgt, level, stuff. Haven't fully exercised it and Chris' point regarding InnoDB and tree moves is eye-opening. Here's the jist of it. If you want the guts, yell. class DoFaq public function GetFaqs() public function GetFaq($faqId) public function Add($question, $answer) public function Update($faqId, $question, $answer) public function Delete($faqId) public function AddSub($parentId, $question, $answer) public function Promote($faqId) public function Demote($faqId) public function MoveUpDown($faqId, $updwn) public function GetPath($faqId) private function GetById($faqId) private function GetByLft($lft) private function GetByRgt($rgt) private function GetTree($lft, $rgt) private function UpdateTree($faq) private function Move($lft, $rgt, $space, $updwn) private function AddSpace($lrnum, $space) }//end class ?> Cliff Hirsch -- Pinestream Communications, Inc. www.pinestream.com On Wed, 9 Nov 2005 13:20:56 -0500, csnyder wrote > On 11/9/05, Jeff Loiselle wrote: > > From: The Feeling Quite Lazy Today Department... > > > > Anyone know of any existing PHP/MySQL code with which one can manage > > nested sets in a database. Anyone have a category manager they want to > > share? ;-) If not, I'll post one when I'm done. ;-) > > > > Hans will probably post a newer version (if one exists...) but > pnsm.pcom is one of the first open source implementations of nested > sets in MySQL+PHP: > http://cvs.nyphp.org/cvsweb.cgi/clew/lib/pnsm.pcom?rev=1.1&content- > type=text/x-cvsweb-markup > > Unfortunately that earlyish version has no "move" method... > > I'm supposed to publish a much more recent implementation that I've > been working with, but I haven't had time to put the site together. > Hmmm, a preview can be found here: > http://pine.fcny.org/~csnyder/fcnyNode.txt > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From cliff at pinestream.com Wed Nov 9 13:45:53 2005 From: cliff at pinestream.com (cliff) Date: Wed, 9 Nov 2005 13:45:53 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <4b1887110511091036w7974c70fhdbf25a9ece51838d@mail.gmail.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <4b1887110511091036w7974c70fhdbf25a9ece51838d@mail.gmail.com> Message-ID: <20051109184553.M22601@pinestream.com> If you like my stuff, I'll trade a Sam Adams for a New Amsterdam On Wed, 9 Nov 2005 13:36:08 -0500, Jeff Loiselle wrote > Chris, > > Thanks for the resources, this is tremendously helpful. Thanks for > sharing your hard work Chris and Hans. It seems I owe you both a > beer. ;-) I'll kick back any questions, comments, or suggestions I > may have. > > --- > Jeff Loiselle > Web Developer, Musician, and Observer > http://jeff.loiselles.com From jeff.loiselle at gmail.com Wed Nov 9 13:53:07 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 9 Nov 2005 13:53:07 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: <4b1887110511091053r6cca1c19u488348bf1e2eb90c@mail.gmail.com> On a side note, when I'm reading over the code I keep thinking "fancy node" instead of "fcnyNode." There's your project name right there. ;-) --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From chsnyder at gmail.com Wed Nov 9 13:59:50 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 9 Nov 2005 13:59:50 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <4b1887110511091053r6cca1c19u488348bf1e2eb90c@mail.gmail.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <4b1887110511091053r6cca1c19u488348bf1e2eb90c@mail.gmail.com> Message-ID: On 11/9/05, Jeff Loiselle wrote: > On a side note, when I'm reading over the code I keep thinking "fancy > node" instead of "fcnyNode." There's your project name right there. > ;-) > Heh. "Fancy Node" is when you extend that NSM class so that it works with a separate table of serialised PHP objects, keyed on the node id. From jeff.loiselle at gmail.com Wed Nov 9 16:21:32 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 9 Nov 2005 16:21:32 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> Message-ID: <4b1887110511091321k23ce7beet5d87d6a344f43b8a@mail.gmail.com> Chris, As I've started to mess around with fncyNode a bit, it seems to work well. I was wondering: a. I want to add a "name" column and modify the appendTo() function to save it. Is there a better way? Should I be extending the class? b. Should I be treating this code as a sample, or is it stable for development? --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From jeff.loiselle at gmail.com Wed Nov 9 16:23:44 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Wed, 9 Nov 2005 16:23:44 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <20051109184412.M74684@pinestream.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <20051109184412.M74684@pinestream.com> Message-ID: <4b1887110511091323i39fb441ana9e221e8b8f5a220@mail.gmail.com> Cliff, Sounds like an interesting and useful class. I'd love to take a peek. ;-) I'm totally entrenched in this now.. --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From codebowl at gmail.com Wed Nov 9 17:39:56 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 9 Nov 2005 17:39:56 -0500 Subject: [nycphp-talk] Free Zend Certification Books Message-ID: <8d9a42800511091439n5cbad4dyc81c9ebcfe25c930@mail.gmail.com> Hey, Anyone here that could really use the zend certification guide and practice test book but cannot afford them? I will give mine to you since i have passed my test, all you pay for is shipping ;) email me off list codebowl at gmail.com Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Wed Nov 9 17:48:30 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 9 Nov 2005 17:48:30 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <4b1887110511091321k23ce7beet5d87d6a344f43b8a@mail.gmail.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <4b1887110511091321k23ce7beet5d87d6a344f43b8a@mail.gmail.com> Message-ID: On 11/9/05, Jeff Loiselle wrote: > Chris, > > As I've started to mess around with fncyNode a bit, it seems to work > well. I was wondering: > > a. I want to add a "name" column and modify the appendTo() function to > save it. Is there a better way? Should I be extending the class? > > b. Should I be treating this code as a sample, or is it stable for development? > a) I extend the class. I keep everything other than the id, parentId, lt and rt in another table, and use a join in order to select records. This keeps the node table limited to just integers, which should speed the massive update operations that need to be performed every time you insert or move a node (since fields are all fixed size). That was Hans' thinking, anyway (and I'm not a DB Admin). b) Aside from the addition of numChildren() the interface hasn't changed since last October. We've been using it all over the place for a year with no problems. Not high-traffic sites by any means, but constant daily use with no tree corruption on sets of 3000-5000 nodes. I've tested it up to 50,000 nodes; inserts can take 3-5 seconds at that size, but lookups are as fast as ever. -- Chris Snyder http://chxo.com/ From chris.weyl at gmail.com Wed Nov 9 17:58:17 2005 From: chris.weyl at gmail.com (Chris Weyl) Date: Wed, 9 Nov 2005 17:58:17 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <8d9a42800511091439n5cbad4dyc81c9ebcfe25c930@mail.gmail.com> References: <8d9a42800511091439n5cbad4dyc81c9ebcfe25c930@mail.gmail.com> Message-ID: <7dd7ab490511091458k4b77fdf5kf7b3eeee081c64ab@mail.gmail.com> On 11/9/05, Joseph Crawford wrote: > Hey, > > Anyone here that could really use the zend certification guide and practice > test book but cannot afford them? I will give mine to you since i have > passed my test, all you pay for is shipping ;) > > email me off list codebowl at gmail.com Hmm, what books do you have, and would you recommend them? I'm contemplating going for certification myself fairly soon :) -Chris From krook at us.ibm.com Wed Nov 9 18:46:27 2005 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 9 Nov 2005 18:46:27 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <7dd7ab490511091458k4b77fdf5kf7b3eeee081c64ab@mail.gmail.com> Message-ID: > I'm contemplating going for certification myself fairly soon :) Zend is preparing a certification promotion for NYPHP members. Details will be announced at the November 22nd meeting, so if you've been thinking about the ZCE, this may be a good time to start studying :) Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From shiflett at php.net Wed Nov 9 18:51:34 2005 From: shiflett at php.net (Chris Shiflett) Date: Wed, 09 Nov 2005 18:51:34 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: References: Message-ID: <43728B86.8010609@php.net> Daniel Krook wrote: > Zend is preparing a certification promotion for NYPHP members. > Details will be announced at the November 22nd meeting I'll try to bring a few copies of the study guide to give away. I may also be able to bring a copy or two of Essential PHP Security - depends on how heavy my backpack feels. :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From codebowl at gmail.com Wed Nov 9 23:22:07 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 9 Nov 2005 23:22:07 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <43728B86.8010609@php.net> References: <43728B86.8010609@php.net> Message-ID: <8d9a42800511092022p496ea3d1vff0da35c7ac6ea29@mail.gmail.com> i have these http://www.amazon.com/exec/obidos/tg/detail/-/0672327090/qid=1131596485/sr=8-2/ref=pd_bbs_2/002-0399214-2958430?v=glance&s=books&n=507846 http://www.amazon.com/exec/obidos/tg/detail/-/0973589884/qid=1131596485/sr=8-1/ref=pd_bbs_1/002-0399214-2958430?v=glance&s=books&n=507846 cond slightly used no visible markings On 11/9/05, Chris Shiflett wrote: > > Daniel Krook wrote: > > Zend is preparing a certification promotion for NYPHP members. > > Details will be announced at the November 22nd meeting > > I'll try to bring a few copies of the study guide to give away. I may > also be able to bring a copy or two of Essential PHP Security - depends > on how heavy my backpack feels. :-) > > Chris > > -- > Chris Shiflett > Brain Bulb, The PHP Consultancy > http://brainbulb.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Wed Nov 9 23:22:56 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 9 Nov 2005 23:22:56 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <8d9a42800511092022p496ea3d1vff0da35c7ac6ea29@mail.gmail.com> References: <43728B86.8010609@php.net> <8d9a42800511092022p496ea3d1vff0da35c7ac6ea29@mail.gmail.com> Message-ID: <8d9a42800511092022y18957f18y909d259f76478932@mail.gmail.com> and they are gone ;) On 11/9/05, Joseph Crawford wrote: > > i have these > http://www.amazon.com/exec/obidos/tg/detail/-/0672327090/qid=1131596485/sr=8-2/ref=pd_bbs_2/002-0399214-2958430?v=glance&s=books&n=507846 > > http://www.amazon.com/exec/obidos/tg/detail/-/0973589884/qid=1131596485/sr=8-1/ref=pd_bbs_1/002-0399214-2958430?v=glance&s=books&n=507846 > > > cond slightly used no visible markings > > On 11/9/05, Chris Shiflett wrote: > > > > Daniel Krook wrote: > > > Zend is preparing a certification promotion for NYPHP members. > > > Details will be announced at the November 22nd meeting > > > > I'll try to bring a few copies of the study guide to give away. I may > > also be able to bring a copy or two of Essential PHP Security - depends > > on how heavy my backpack feels. :-) > > > > Chris > > > > -- > > Chris Shiflett > > Brain Bulb, The PHP Consultancy > > http://brainbulb.com/ > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron at aarond.com Thu Nov 10 10:17:26 2005 From: aaron at aarond.com (aaron) Date: Thu, 10 Nov 2005 10:17:26 -0500 Subject: [nycphp-talk] pharma merchant processor In-Reply-To: <43722C5E.2090500@omnistep.com> References: <20051109115618.ul2dwk8sffccggcg@208.179.130.20> <43722C5E.2090500@omnistep.com> Message-ID: <43736486.3030204@aarond.com> I would prefer to not use paypal and offer my client less charge per transaction. I already have the software setup, I just need to tell it where to point to. Using paypal would mean restructuring my whole admin. Any other suggestions? Rolan Yang wrote: >aaron at aarond.com wrote: > > > >>I know there have been talks about online merchant processors, but can anyone >>recommend one that will handle pharmaceutical related products? My client says >>he will just be selling home health care products and not prescriptions, but >>seems to keep getting his applications denied. >> >>I need one that uses Auth.net, or will sync up to it. (I've only done one other >>online store before) >> >>He even had someone deny him on the basis that there is a graphic in the design >> >> >> >> >> >Someone on the list mentioned Paypal Website Pro earlier. If you don't >HAVE to use auth.net, Paypal is currently letting anyone apply and there >is no monthly fee until 2/1/06. The new paypal feature doesn't require >the end user to have a paypal account or even know that paypal is in the >background doing the processing. It's pretty much like Verisign payflow >pro (which, BTW, Ebay acquired recently). They also have a virtual >terminal so you can enter transactions in by hand. The downside is that >paypal charges 2.9%+30cents/transaction where as many other auth.net >merchants accounts charge roughly 2.1%+25c/transaction. Oscommerce and >miva both support the new paypal pro api. I was thinking of writing a >generic interface for use with Zencart and other shopping carts over the >next few days. > >~Rolan > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Thu Nov 10 10:23:51 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 10 Nov 2005 10:23:51 -0500 Subject: [nycphp-talk] pharma merchant processor In-Reply-To: <43736486.3030204@aarond.com> Message-ID: <004e01c5e60a$c18864d0$0ea8a8c0@cliff> authorize.net has a nice developer section and PHP development code. You can get a test account to debug the transaction flow: https://test.authorize.net/ Many resellers work with them. Rates seem to be pretty good. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of aaron Sent: Thursday, November 10, 2005 10:17 AM To: NYPHP Talk Subject: Re: [nycphp-talk] pharma merchant processor I would prefer to not use paypal and offer my client less charge per transaction. I already have the software setup, I just need to tell it where to point to. Using paypal would mean restructuring my whole admin. Any other suggestions? Rolan Yang wrote: aaron at aarond.com wrote: I know there have been talks about online merchant processors, but can anyone recommend one that will handle pharmaceutical related products? My client says he will just be selling home health care products and not prescriptions, but seems to keep getting his applications denied. I need one that uses Auth.net, or will sync up to it. (I've only done one other online store before) He even had someone deny him on the basis that there is a graphic in the design Someone on the list mentioned Paypal Website Pro earlier. If you don't HAVE to use auth.net, Paypal is currently letting anyone apply and there is no monthly fee until 2/1/06. The new paypal feature doesn't require the end user to have a paypal account or even know that paypal is in the background doing the processing. It's pretty much like Verisign payflow pro (which, BTW, Ebay acquired recently). They also have a virtual terminal so you can enter transactions in by hand. The downside is that paypal charges 2.9%+30cents/transaction where as many other auth.net merchants accounts charge roughly 2.1%+25c/transaction. Oscommerce and miva both support the new paypal pro api. I was thinking of writing a generic interface for use with Zencart and other shopping carts over the next few days. ~Rolan _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From cliff at pinestream.com Thu Nov 10 10:27:04 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 10 Nov 2005 10:27:04 -0500 Subject: [nycphp-talk] pharma merchant processor In-Reply-To: <004e01c5e60a$c18864d0$0ea8a8c0@cliff> Message-ID: <005801c5e60b$3466aca0$0ea8a8c0@cliff> The developer section is somewhat buried. See this: http://developer.authorize.net/ authorize.net has a nice developer section and PHP development code. You can get a test account to debug the transaction flow: https://test.authorize.net/ Many resellers work with them. Rates seem to be pretty good. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of aaron Sent: Thursday, November 10, 2005 10:17 AM To: NYPHP Talk Subject: Re: [nycphp-talk] pharma merchant processor I would prefer to not use paypal and offer my client less charge per transaction. I already have the software setup, I just need to tell it where to point to. Using paypal would mean restructuring my whole admin. Any other suggestions? Rolan Yang wrote: aaron at aarond.com wrote: I know there have been talks about online merchant processors, but can anyone recommend one that will handle pharmaceutical related products? My client says he will just be selling home health care products and not prescriptions, but seems to keep getting his applications denied. I need one that uses Auth.net, or will sync up to it. (I've only done one other online store before) He even had someone deny him on the basis that there is a graphic in the design Someone on the list mentioned Paypal Website Pro earlier. If you don't HAVE to use auth.net, Paypal is currently letting anyone apply and there is no monthly fee until 2/1/06. The new paypal feature doesn't require the end user to have a paypal account or even know that paypal is in the background doing the processing. It's pretty much like Verisign payflow pro (which, BTW, Ebay acquired recently). They also have a virtual terminal so you can enter transactions in by hand. The downside is that paypal charges 2.9%+30cents/transaction where as many other auth.net merchants accounts charge roughly 2.1%+25c/transaction. Oscommerce and miva both support the new paypal pro api. I was thinking of writing a generic interface for use with Zencart and other shopping carts over the next few days. ~Rolan _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron at aarond.com Thu Nov 10 10:32:05 2005 From: aaron at aarond.com (aaron) Date: Thu, 10 Nov 2005 10:32:05 -0500 Subject: [nycphp-talk] pharma merchant processor In-Reply-To: <005801c5e60b$3466aca0$0ea8a8c0@cliff> References: <005801c5e60b$3466aca0$0ea8a8c0@cliff> Message-ID: <437367F5.8050207@aarond.com> I have the code developed I just need my client to get a merchant account setup. Please see my original post below: My original post "I know there have been talks about online merchant processors, but can anyone recommend one that will handle pharmaceutical related products? My client says he will just be selling home health care products and not prescriptions, but seems to keep getting his applications denied." Cliff Hirsch wrote: > The developer section is somewhat buried. See this: > http://developer.authorize.net/ > > > authorize.net has a nice developer section and PHP development > code. You can get a test account to debug the transaction flow: > https://test.authorize.net/ Many resellers work with them. Rates > seem to be pretty good. > > -----Original Message----- > *From:* talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] *On Behalf Of *aaron > *Sent:* Thursday, November 10, 2005 10:17 AM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] pharma merchant processor > > I would prefer to not use paypal and offer my client less > charge per transaction. I already have the software setup, I > just need to tell it where to point to. Using paypal would > mean restructuring my whole admin. > > Any other suggestions? > > > Rolan Yang wrote: > >>aaron at aarond.com wrote: >> >> >> >>>I know there have been talks about online merchant processors, but can anyone >>>recommend one that will handle pharmaceutical related products? My client says >>>he will just be selling home health care products and not prescriptions, but >>>seems to keep getting his applications denied. >>> >>>I need one that uses Auth.net, or will sync up to it. (I've only done one other >>>online store before) >>> >>>He even had someone deny him on the basis that there is a graphic in the design >>> >>> >>> >>> >>> >>Someone on the list mentioned Paypal Website Pro earlier. If you don't >>HAVE to use auth.net, Paypal is currently letting anyone apply and there >>is no monthly fee until 2/1/06. The new paypal feature doesn't require >>the end user to have a paypal account or even know that paypal is in the >>background doing the processing. It's pretty much like Verisign payflow >>pro (which, BTW, Ebay acquired recently). They also have a virtual >>terminal so you can enter transactions in by hand. The downside is that >>paypal charges 2.9%+30cents/transaction where as many other auth.net >>merchants accounts charge roughly 2.1%+25c/transaction. Oscommerce and >>miva both support the new paypal pro api. I was thinking of writing a >>generic interface for use with Zencart and other shopping carts over the >>next few days. >> >>~Rolan >> >> >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Thu Nov 10 10:41:55 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 10 Nov 2005 10:41:55 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <63d7c8120511092314h1e615784xb806cf3493f7d1be@mail.gmail.com> References: <8d9a42800511091439n5cbad4dyc81c9ebcfe25c930@mail.gmail.com> <63d7c8120511092314h1e615784xb806cf3493f7d1be@mail.gmail.com> Message-ID: <8d9a42800511100741p683bdee2w5ddc7444350badc5@mail.gmail.com> Sorry the books are gone however it would be nice to see other pass the books around through NYPHP as well. I found them to be really beneficial to the test. I will not post the name of the person who go them so that they cannot be nagged to send them on. If they wish to they can post here and pass them on ;) If this works well and they are passed on maybe i will do it with some of my other PHP books as well. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at wildwoodinc.com Thu Nov 10 10:45:43 2005 From: mark at wildwoodinc.com (Mark Lassoff) Date: Thu, 10 Nov 2005 09:45:43 -0600 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <8d9a42800511100741p683bdee2w5ddc7444350badc5@mail.gmail.com> Message-ID: Not too open Pandora's Box, but is a PDF version available? Mark Lassoff Wildwood Inc. -----Original Message----- From: Joseph Crawford [mailto:codebowl at gmail.com] Sent: Thursday, November 10, 2005 9:42 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Free Zend Certification Books Sorry the books are gone however it would be nice to see other pass the books around through NYPHP as well. I found them to be really beneficial to the test. I will not post the name of the person who go them so that they cannot be nagged to send them on. If they wish to they can post here and pass them on ;) If this works well and they are passed on maybe i will do it with some of my other PHP books as well. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Thu Nov 10 10:53:01 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 10 Nov 2005 10:53:01 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <2827303864903089942@unknownmsgid> References: <8d9a42800511100741p683bdee2w5ddc7444350badc5@mail.gmail.com> <2827303864903089942@unknownmsgid> Message-ID: <8d9a42800511100753h78956dc7w29e44fc5f84ce31b@mail.gmail.com> Mark, I am not sure if i bought the PDF version or not but i know you can get it from php|arch so i am sure if you scour the net you might be able to find it. On 11/10/05, Mark Lassoff wrote: > > Not too open Pandora's Box, but is a PDF version available? > Mark Lassoff > Wildwood Inc. > > -----Original Message----- > *From:* Joseph Crawford [mailto:codebowl at gmail.com] > *Sent:* Thursday, November 10, 2005 9:42 AM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] Free Zend Certification Books > > Sorry the books are gone however it would be nice to see other pass the > books around through NYPHP as well. I found them to be really beneficial to > the test. I will not post the name of the person who go them so that they > cannot be nagged to send them on. > > If they wish to they can post here and pass them on ;) If this works well > and they are passed on maybe i will do it with some of my other PHP books as > well. > > Thanks, > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Thu Nov 10 10:53:41 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 10 Nov 2005 10:53:41 -0500 Subject: [nycphp-talk] Free Zend Certification Books In-Reply-To: <8d9a42800511100753h78956dc7w29e44fc5f84ce31b@mail.gmail.com> References: <8d9a42800511100741p683bdee2w5ddc7444350badc5@mail.gmail.com> <2827303864903089942@unknownmsgid> <8d9a42800511100753h78956dc7w29e44fc5f84ce31b@mail.gmail.com> Message-ID: <8d9a42800511100753q592f573amb827bce0b5d3d013@mail.gmail.com> bah i meant to say you may be able to find it cheaper than php|arch On 11/10/05, Joseph Crawford wrote: > > Mark, > > I am not sure if i bought the PDF version or not but i know you can get it > from php|arch so i am sure if you scour the net you might be able to find > it. > > On 11/10/05, Mark Lassoff wrote: > > > Not too open Pandora's Box, but is a PDF version available? > > Mark Lassoff > > Wildwood Inc. > > > > -----Original Message----- > > *From:* Joseph Crawford [mailto:codebowl at gmail.com] > > *Sent:* Thursday, November 10, 2005 9:42 AM > > *To:* NYPHP Talk > > *Subject:* Re: [nycphp-talk] Free Zend Certification Books > > > > Sorry the books are gone however it would be nice to see other pass the > > books around through NYPHP as well. I found them to be really beneficial to > > the test. I will not post the name of the person who go them so that they > > cannot be nagged to send them on. > > > > If they wish to they can post here and pass them on ;) If this works > > well and they are passed on maybe i will do it with some of my other PHP > > books as well. > > > > Thanks, > > > > -- > > Joseph Crawford Jr. > > Zend Certified Engineer > > Codebowl Solutions, Inc. > > 1-802-671-2021 > > codebowl at gmail.com > > > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > > > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From leegold at fastmail.fm Fri Nov 11 16:05:45 2005 From: leegold at fastmail.fm (leegold) Date: Fri, 11 Nov 2005 16:05:45 -0500 Subject: [nycphp-talk] Trouble with Xampp Win32 upgrade Message-ID: <1131743145.18924.247322264@webmail.messagingengine.com> Hi, Trying the upgrade with: xampp-upgrade-1.5.0-pl1-installer.exe When I do I get the error message: "Can not find Win32 xampp. Installation path not found." And I can not upgrade. Wondered if there's a way to fix this? Win2k, ApacheFriends XAMPP (basic package) version 1.4.15 Thanks PS I've tried the apachefiends forums w/no luck so far wondered if anyone can help. From dmintz at davidmintz.org Thu Nov 10 16:46:49 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 10 Nov 2005 16:46:49 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager Message-ID: Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the recipient list isn't a semi-static, monolithic thing. The admin user needs to be able to select subsets of people/addresses from a database based on various criteria. (This is your chance to point me to an existing (free) tool that can do or be adapted to do this -- I haven't found any.) So here's my (first) question: What constitutes a well-formed HTML email body? Is there a "right" way -- other than getting the MIME headers right? I would assume that your email body should be just like the BODY element of any valid HTML document -- a regular HTML document minus the HEAD element. Hopefully I can make this a well-made and abstract enough beast to merit sharing once it's done. Thanks! --- David Mintz http://davidmintz.org/ From ashaw at polymerdb.org Fri Nov 11 18:24:26 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 11 Nov 2005 17:24:26 -0600 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: Message-ID: <4375282A.5060701@polymerdb.org> Sorry I can't offer any suggestions (wish I could), but I'm curious: are you planning to share this (GPL or anything else) when you're "done" ? (Not that anything's ever "done," but you know what I mean...) - Allen David Mintz wrote: > Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the > recipient list isn't a semi-static, monolithic thing. The admin user needs > to be able to select subsets of people/addresses from a database based on > various criteria. (This is your chance to point me to an existing (free) > tool that can do or be adapted to do this -- I haven't found any.) -- Allen Shaw Polymer (http://polymerdb.org) From list at harveyk.com Fri Nov 11 19:33:14 2005 From: list at harveyk.com (harvey) Date: Fri, 11 Nov 2005 19:33:14 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <4375282A.5060701@polymerdb.org> References: <4375282A.5060701@polymerdb.org> Message-ID: <6.2.5.6.2.20051111193134.031c64b8@harveyk.com> PHPlist http://tincan.co.uk/?lid=294 * Attributes. You can specify information you want to get from users when they sign up. When sending a message, you can use this information to select the users that need to receive the message. For example you can add geographical information. When people sign up, they can identify the geographical location they're in and when sending an email you can determine which locations need to receive the message. At 06:24 PM 11/11/2005, Allen Shaw wrote: >Sorry I can't offer any suggestions (wish I could), but I'm curious: are >you planning to share this (GPL or anything else) when you're "done" ? >(Not that anything's ever "done," but you know what I mean...) > >- Allen > >David Mintz wrote: > > Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the > > recipient list isn't a semi-static, monolithic thing. The admin user needs > > to be able to select subsets of people/addresses from a database based on > > various criteria. (This is your chance to point me to an existing (free) > > tool that can do or be adapted to do this -- I haven't found any.) > >-- >Allen Shaw >Polymer (http://polymerdb.org) >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexlinsker at gmail.com Sat Nov 12 13:50:27 2005 From: alexlinsker at gmail.com (Alex Linsker) Date: Sat, 12 Nov 2005 13:50:27 -0500 Subject: [nycphp-talk] build our own open-source/copyleft "search box" Message-ID: <272527290511121050u139f9a62ib9ffb8293fb5fd86@mail.gmail.com> I've written an article, "How to Search and Find Whatever is Most Important to You," using Google as an example. It is a ten-step process that many people have said they find valuable and useful. Many of the steps are time-consuming but can be automated (the simplest automation is to eliminate duplicate words in strings of text). The article is at www.alexlinsker.com/search.htmlwhere you can see what I have in mind. If you are interested in programming and designing this (or a part of it) with me, then please contact me. There is no pay, so it would need to be inherently interesting for you. I'm not planning to make any money (and am spending some myself to promote the site)...I'm expert in search engine optimization, and your work will help many people. I'm thinking this might be best as an open-source/copyleft project, but I'm open to your ideas. I look forward to hearing from you at alexlinsker at gmail.com Sincerely, Alex Linsker (646) 269-4915 alexlinsker at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From codebowl at gmail.com Sat Nov 12 15:17:56 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 12 Nov 2005 15:17:56 -0500 Subject: [nycphp-talk] build our own open-source/copyleft "search box" In-Reply-To: <272527290511121050u139f9a62ib9ffb8293fb5fd86@mail.gmail.com> References: <272527290511121050u139f9a62ib9ffb8293fb5fd86@mail.gmail.com> Message-ID: <8d9a42800511121217g7cb93533l8b337ff04ed9e97d@mail.gmail.com> i might be interested in this, let me read over your documents a bit more and then we can talk. If you are an expert in SEO maybe in return for my help you could help to make my site rank better in the engines. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Sat Nov 12 15:53:30 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sat, 12 Nov 2005 15:53:30 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <4375282A.5060701@polymerdb.org> References: <4375282A.5060701@polymerdb.org> Message-ID: On Fri, 11 Nov 2005, Allen Shaw wrote: > Sorry I can't offer any suggestions (wish I could), but I'm curious: are > you planning to share this (GPL or anything else) when you're "done" ? I would imagine so (GPL or similar -- I am not that up on all the licensing flavors). First I have to worry about getting it done and doing a decent job (-: --- David Mintz http://davidmintz.org/ From dmintz at davidmintz.org Sat Nov 12 16:08:33 2005 From: dmintz at davidmintz.org (David Mintz) Date: Sat, 12 Nov 2005 16:08:33 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <6.2.5.6.2.20051111193134.031c64b8@harveyk.com> References: <4375282A.5060701@polymerdb.org> <6.2.5.6.2.20051111193134.031c64b8@harveyk.com> Message-ID: On Fri, 11 Nov 2005, harvey wrote: > PHPlist > http://tincan.co.uk/?lid=294 > * Attributes. You can specify information you want to get from > users when they sign up. When sending a message, you can use this > information to select the users that need to receive the message. For > example you can add geographical information. When people sign up, > they can identify the geographical location they're in and when > sending an email you can determine which locations need to receive > the message. I looked at that, then you motivated me to look again. It should at least provide inspiration, but I think my recipient attributes might be too complex -- rather than, e.g., "WHERE state = 'NY'", it will depend on stuff in related tables. Plus the admins need to be able to send mail to everyone in this db whether they "subscribe" or not. We'll see -- thank you. --- David Mintz http://davidmintz.org/ From 1j0lkq002 at sneakemail.com Sun Nov 13 02:08:20 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 12 Nov 2005 23:08:20 -0800 Subject: [nycphp-talk] build our own open-source/copyleft "search box" In-Reply-To: <272527290511121050u139f9a62ib9ffb8293fb5fd86@mail.gmail.com> References: <272527290511121050u139f9a62ib9ffb8293fb5fd86@mail.gmail.com> Message-ID: <8179-94657@sneakemail.com> Alex Linsker alexlinsker-at-gmail.com |nyphp dev/internal group use| wrote: > I'm expert in search engine optimization, and your work will help many > people. I'm thinking this might be best as an open-source/copyleft > project, but I'm open to your ideas. > > I think it's great that experts at SEO participate in this list. However, I am always intrigued and look for examples of their websites. Care to share? From 1j0lkq002 at sneakemail.com Sun Nov 13 02:15:37 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 12 Nov 2005 23:15:37 -0800 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: Message-ID: <4654-45095@sneakemail.com> Hi David. You might want to build this in a modular way with respect to the mailing lists generated by your queries. In other words, design such that IF someday you wanted to offload the actual mailing part, you could do so by just delivering the list in "standard" format. You might look at some list vendors to see what formats they provide for their lists (ascii, comma delimited, etc) The reasons relate to spam and spam filtering, domain banning, and Nazi-like overzealousness. Too much to go into here :-) In general I strongly advise clients NOT to send bulk mail from a valued domain; it's simply too risky. So... it seems wise to be able to outsource the SEND easly when appropriate. -=john andrews http://www.seo-fun.com David Mintz dmintz-at-davidmintz.org |nyphp dev/internal group use| wrote: >Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the >recipient list isn't a semi-static, monolithic thing. The admin user needs >to be able to select subsets of people/addresses from a database based on >various criteria. (This is your chance to point me to an existing (free) >tool that can do or be adapted to do this -- I haven't found any.) > >So here's my (first) question: What constitutes a well-formed HTML email >body? Is there a "right" way -- other than getting the MIME headers right? >I would assume that your email body should be just like the BODY element >of any valid HTML document -- a regular HTML document minus the HEAD >element. > >Hopefully I can make this a well-made and abstract enough beast to merit >sharing once it's done. > >Thanks! > >--- >David Mintz > > > From yournway at gmail.com Mon Nov 14 03:48:03 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Mon, 14 Nov 2005 08:48:03 +0000 Subject: [nycphp-talk] Trouble with Xampp Win32 upgrade In-Reply-To: <1131743145.18924.247322264@webmail.messagingengine.com> References: <1131743145.18924.247322264@webmail.messagingengine.com> Message-ID: leegold This is usually solved through the most famous process LMAYAFSQ: Let me ask you a few stupid questions: - Did you run setup on your new installation? - If previous failed, have you tried to install the new version on a new folder and run setup on it? - Have you tried the second one, had success, exported all the data on previous mysql version and imported it to the new version? (this is what I'd do myself and it always works) HTH -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From matt at jiffycomp.com Sun Nov 13 20:11:19 2005 From: matt at jiffycomp.com (Matt Morgan) Date: Sun, 13 Nov 2005 20:11:19 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: Message-ID: <4377E437.9020607@jiffycomp.com> David Mintz wrote: >Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the >recipient list isn't a semi-static, monolithic thing. The admin user needs >to be able to select subsets of people/addresses from a database based on >various criteria. (This is your chance to point me to an existing (free) >tool that can do or be adapted to do this -- I haven't found any.) > > > This is a great idea. It or something like it could be really popular in the non-profit world, where the big commercial solutions (getactive, convio, kintera) are vast and powerful but too expensive for all but the biggest places, and the lower-end solutions (patronmail) don't do very much. Any plans to build in personalization features with web content, eg image links, so you can track who reads the message and/or clicks through to a web site? Non-profits love that stuff. --Matt From lists at zaunere.com Mon Nov 14 10:40:02 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Nov 2005 10:40:02 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: Message-ID: <009601c5e931$ae567c60$6401a8c0@MobileZ> David Mintz wrote on Thursday, November 10, 2005 4:47 PM: > Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the > recipient list isn't a semi-static, monolithic thing. The admin user > needs to be able to select subsets of people/addresses from a > database based on various criteria. (This is your chance to point me > to an existing (free) tool that can do or be adapted to do this -- I > haven't found any.) Hey, these are always fun things to write :) > So here's my (first) question: What constitutes a well-formed HTML > email body? Is there a "right" way -- other than getting the MIME > headers right? I would assume that your email body should be just > like the BODY element of any valid HTML document -- a regular HTML > document minus the HEAD element. The MIME headers are critical. IIRC, Thunderbird forms good headers. Send yourself a big complicated HTML message, then view the raw source. The HTML is standard HTML - but the headers dictate how things should be read, and of course you should have an alternate part in plain text. > Hopefully I can make this a well-made and abstract enough beast to > merit sharing once it's done. That'd be great - when you get to a sticky spot (like sending large amounts of email from a web server) let us know how things go. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Mon Nov 14 08:16:59 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Nov 2005 08:16:59 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: Message-ID: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> David Mintz wrote on Thursday, November 10, 2005 4:47 PM: > Planning to roll my own MySQL/PHP-based mass emailer. Why? Because the > recipient list isn't a semi-static, monolithic thing. The admin user > needs to be able to select subsets of people/addresses from a > database based on various criteria. (This is your chance to point me > to an existing (free) tool that can do or be adapted to do this -- I > haven't found any.) Hey, these are always fun things to write :) > So here's my (first) question: What constitutes a well-formed HTML > email body? Is there a "right" way -- other than getting the MIME > headers right? I would assume that your email body should be just > like the BODY element of any valid HTML document -- a regular HTML > document minus the HEAD element. The MIME headers are critical. IIRC, Thunderbird forms good headers. Send yourself a big complicated HTML message, then view the raw source. The HTML is standard HTML - but the headers dictate how things should be read, and of course you should have an alternate part in plain text. > Hopefully I can make this a well-made and abstract enough beast to > merit sharing once it's done. That'd be great - when you get to a sticky spot (like sending large amounts of email from a web server) let us know how things go. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From hans.zaunere at nyphp.com Mon Nov 14 11:28:52 2005 From: hans.zaunere at nyphp.com (Hans Zaunere) Date: Mon, 14 Nov 2005 11:28:52 -0500 Subject: [nycphp-talk] Server Issues Message-ID: <009a01c5e938$8277b210$6401a8c0@MobileZ> All, As many have noticed, the server supporting NYPHP.org, NYCBUG.org, ATLPHP.org, and other open source resources, has been up and down over the last couple of days. The Wall Street building housing the box has been having transformer, then generator, and then UPS failures. Needless to say, something is frying the electronics, and this is a major headache for facility operators. Work is being done to resolve the problems, and we expect few, if any, further interruptions. A big thanks to the hosting facility for supplying great service over the years. And, as a note for those interested in vinum: It's sustained numerous hard power cuts on two cheap IDE drives! Please be sensitive to cross-posting if you wish to respond to this note. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From cliff at pinestream.com Mon Nov 14 11:38:35 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 14 Nov 2005 11:38:35 -0500 Subject: [nycphp-talk] Server Issues In-Reply-To: <009a01c5e938$8277b210$6401a8c0@MobileZ> Message-ID: <005f01c5e939$dcfccd50$0ea8a8c0@cliff> See today's Wall Street Journal -- bottom half of front page. Power rules. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: Monday, November 14, 2005 11:29 AM To: 'NYPHP Talk'; 'NYCBUG' Subject: [nycphp-talk] Server Issues All, As many have noticed, the server supporting NYPHP.org, NYCBUG.org, ATLPHP.org, and other open source resources, has been up and down over the last couple of days. The Wall Street building housing the box has been having transformer, then generator, and then UPS failures. Needless to say, something is frying the electronics, and this is a major headache for facility operators. Work is being done to resolve the problems, and we expect few, if any, further interruptions. A big thanks to the hosting facility for supplying great service over the years. And, as a note for those interested in vinum: It's sustained numerous hard power cuts on two cheap IDE drives! Please be sensitive to cross-posting if you wish to respond to this note. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From rsd at electronink.com Mon Nov 14 11:56:38 2005 From: rsd at electronink.com (Russ Demarest) Date: Mon, 14 Nov 2005 11:56:38 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> Message-ID: I was recently turned on to PHPMailer. Nice and easy to handle a lot of mail issues. http://phpmailer.sourceforge.net/ On Nov 14, 2005, at 8:16 AM, Hans Zaunere wrote: > > > David Mintz wrote on Thursday, November 10, 2005 4:47 PM: >> Planning to roll my own MySQL/PHP-based mass emailer. Why? Because >> the >> recipient list isn't a semi-static, monolithic thing. The admin user >> needs to be able to select subsets of people/addresses from a >> database based on various criteria. (This is your chance to point me >> to an existing (free) tool that can do or be adapted to do this -- I >> haven't found any.) > > Hey, these are always fun things to write :) > >> So here's my (first) question: What constitutes a well-formed HTML >> email body? Is there a "right" way -- other than getting the MIME >> headers right? I would assume that your email body should be just >> like the BODY element of any valid HTML document -- a regular HTML >> document minus the HEAD element. > > The MIME headers are critical. IIRC, Thunderbird forms good > headers. Send > yourself a big complicated HTML message, then view the raw source. > The HTML > is standard HTML - but the headers dictate how things should be > read, and of > course you should have an alternate part in plain text. > >> Hopefully I can make this a well-made and abstract enough beast to >> merit sharing once it's done. > > That'd be great - when you get to a sticky spot (like sending large > amounts > of email from a web server) let us know how things go. > > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From jeff.loiselle at gmail.com Mon Nov 14 22:15:38 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 14 Nov 2005 22:15:38 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> Message-ID: <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> I started building one of these bad boys a couple years ago. You are welcome to have a copy of my code and schema. I never finished the project, but it does send mail, track bounces, track how many people opened a message, and sends messages. It even has a rudimentary SOAP interface for adding members to the list. In order for it to send the messages, you have to run a PHP script indefinitely in the background. I did this because you can't set the Reply-To from PHP which is crucial for bounce tracking. Unfortunately I found out later that this could be done with mail() f parameter, but whatever. This actually uses PEAR:Mail to send all the mail via SMTP. I'm sure it's slow as hell and completely the incorrect way to do it. But it worked for me at the time! I sent out a mailing of 200,000 or something which took many many hours. Viva la spam! ;-) From dmintz at davidmintz.org Mon Nov 14 22:38:19 2005 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 14 Nov 2005 22:38:19 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> Message-ID: On Mon, 14 Nov 2005, Jeff Loiselle wrote: > I started building one of these bad boys a couple years ago. You are > welcome to have a copy of my code and schema. I never finished the > project, but it does send mail, track bounces, track how many people > opened a message, and sends messages. It even has a rudimentary SOAP > interface for adding members to the list. Deeply interesting! Wrap it up, I'll take it. > > In order for it to send the messages, you have to run a PHP script > indefinitely in the background. I did this because you can't set the > Reply-To from PHP which is crucial for bounce tracking. Do you mean Return-path? I have discovered that it's tricky -- different tricks work in different environments. I still need guru help (or some more hours of hair-pulling). This has to work on a shared server where you can't mess with php.ini, sendmail configuration, etc. > Unfortunately > I found out later that this could be done with mail() f parameter, but > whatever. This actually uses PEAR:Mail to send all the mail via SMTP. I am leaning towards PEAR::Mail with the sendmail backend (which can mean qmail, e.g,. on my shared host). but I haven't ruled out phpmailer > I'm sure it's slow as hell and completely the incorrect way to do it. > But it worked for me at the time! What did Larry Wall teach you about that? (Answer: A program is "correct" if it runs once before your boss fires you." Or something to that effect.) Running a daemon or some other really long-lived process is not an option. I am thinking cron: every couple of hours, wake up and send. Do 50 or so and sleep for a few seconds until you're done. Yeah that would take a long time for 200,000 emails but this is never gonna need to scale like that. I have looked at PEAR::Mail:Queue and I don't quite agree with (maybe don't understand) its storage logic. Why save n copies of the selfsame email message body in your database? I am actually thinking of saving (for cron, for later) ONE copy of the message and ONE sql query. At send time, the cron job will run the SQL against my database of people to fetch a recipient list. If there's personalization, fine; the message body has placeholders ("Dear {FIRSTNAME} {LASTNAME}...") that I str_replace() as I iterate through the recipient list. --- David Mintz http://davidmintz.org/ From yournway at gmail.com Tue Nov 15 04:15:56 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Tue, 15 Nov 2005 09:15:56 +0000 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> Message-ID: David, > Running a daemon or some other really long-lived process is not an option. > I am thinking cron: every couple of hours, wake up and send. Do 50 or so > and sleep for a few seconds until you're done. Yeah that would take a long > time for 200,000 emails but this is never gonna need to scale like that. > I work in a non-profit project called dailygospel.org and we send out 163.000+ emails everyday of the week with readings from the good book in 11 languages. We use purposedly written php scripts that dispatch emails, once they are parsed and ready, onto a qmail queue. In order to cope with volume we do exactly that, we have divided the sendings by timezone and use cron to trigger the events. What we don't have, and very much would like to have, is a way to automaticaly monitor if the emails have been received or bounced back, and remove the bouncers from the send list so, if you should come to a script that is capable of handling this volume and does what you need (and what we need too) we are candidates to take a deep look at it and implement a similar solution at evangelizo.org. Thanks. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From papillion at gmail.com Tue Nov 15 04:31:14 2005 From: papillion at gmail.com (Anthony Papillion) Date: Tue, 15 Nov 2005 03:31:14 -0600 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> Message-ID: <5458518f0511150131p372fc42exae9056113a607b73@mail.gmail.com> This discussion triggers a question that I'm sure someone here can answer: wouldn't forking the script to the background allow one to send a huge volume of email without a timeout? Anthony On 11/15/05, Alberto dos Santos wrote: > > David, > > > Running a daemon or some other really long-lived process is not an > option. > > I am thinking cron: every couple of hours, wake up and send. Do 50 or so > > and sleep for a few seconds until you're done. Yeah that would take a > long > > time for 200,000 emails but this is never gonna need to scale like that. > > > > I work in a non-profit project called dailygospel.organd we send out > 163.000+ emails everyday of the week with readings from the good book > in 11 languages. > > We use purposedly written php scripts that dispatch emails, once they > are parsed and ready, onto a qmail queue. > > In order to cope with volume we do exactly that, we have divided the > sendings by timezone and use cron to trigger the events. > > What we don't have, and very much would like to have, is a way to > automaticaly monitor if the emails have been received or bounced back, > and remove the bouncers from the send list so, if you should come to a > script that is capable of handling this volume and does what you need > (and what we need too) we are candidates to take a deep look at it and > implement a similar solution at evangelizo.org . > > Thanks. > -- > Alberto dos Santos > Consultor em TI > IT Consultant > > http://www.yournway.com > A internet ? sua maneira. > The Internet your own way. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Anthony Papillion Phone: (918) 926-0139 ICQ: 96-698-595 CAN ONE VOICE CHANGE THE WORLD? http://www.one.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Tue Nov 15 09:19:16 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 15 Nov 2005 09:19:16 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <5458518f0511150131p372fc42exae9056113a607b73@mail.gmail.com> Message-ID: <000001c5e9ef$90d4d510$6701a8c0@MobileZ> Anthony Papillion wrote on Tuesday, November 15, 2005 4:31 AM: > This discussion triggers a question that I'm sure someone here can > answer: wouldn't forking the script to the background allow one to > send a huge volume of email without a timeout? It would, but forking can be a bit of an art. For any long running process that you wish to spawn out of PHP running under Apache (as a DSO anyway) you need to cut ties with Apache. When a fork() is done, the file descriptors are copied as well, meaning that now your PHP script is sharing stdout/stdin/stderr with Apache. The implication of this is that your script is now waiting for input/output just like Apache, and more importantly, Apache is waiting for your script. So in order to correctly - and completely - fork, you need to fork(), kill child, fork() again (creating a new process group), and most importantly, close and reopen file descriptors in the PHP process. How to do this correctly varies a little between flavors of Linux/BSD/etc. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From dcech at phpwerx.net Tue Nov 15 09:41:29 2005 From: dcech at phpwerx.net (Dan Cech) Date: Tue, 15 Nov 2005 09:41:29 -0500 Subject: [nycphp-talk] background processes (was: building an 1-way email list manager) Message-ID: <4379F399.8050806@phpwerx.net> Hans, I for one would be very interested in a more in-depth discussion on this subject, as it sounds like there is a lot more to it than I was aware. Dan Hans Zaunere wrote: > > Anthony Papillion wrote on Tuesday, November 15, 2005 4:31 AM: >> This discussion triggers a question that I'm sure someone here can >> answer: wouldn't forking the script to the background allow one to >> send a huge volume of email without a timeout? > > It would, but forking can be a bit of an art. > > For any long running process that you wish to spawn out of PHP running under > Apache (as a DSO anyway) you need to cut ties with Apache. When a fork() is > done, the file descriptors are copied as well, meaning that now your PHP > script is sharing stdout/stdin/stderr with Apache. The implication of this > is that your script is now waiting for input/output just like Apache, and > more importantly, Apache is waiting for your script. > > So in order to correctly - and completely - fork, you need to fork(), kill > child, fork() again (creating a new process group), and most importantly, > close and reopen file descriptors in the PHP process. How to do this > correctly varies a little between flavors of Linux/BSD/etc. > > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com From shiflett at php.net Tue Nov 15 09:44:16 2005 From: shiflett at php.net (Chris Shiflett) Date: Tue, 15 Nov 2005 09:44:16 -0500 Subject: [nycphp-talk] background processes (was: building an 1-way email list manager) In-Reply-To: <4379F399.8050806@phpwerx.net> References: <4379F399.8050806@phpwerx.net> Message-ID: <4379F440.7020401@php.net> Dan Cech wrote: > I for one would be very interested in a more in-depth discussion on > this subject, as it sounds like there is a lot more to it than I was > aware. You might find this useful (I did): http://netevil.org/node.php?nid=280 Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From dcech at phpwerx.net Tue Nov 15 10:15:16 2005 From: dcech at phpwerx.net (Dan Cech) Date: Tue, 15 Nov 2005 10:15:16 -0500 Subject: [nycphp-talk] background processes In-Reply-To: <4379F440.7020401@php.net> References: <4379F399.8050806@phpwerx.net> <4379F440.7020401@php.net> Message-ID: <4379FB84.2000702@phpwerx.net> Thanks for the link, we do a fair bit of remote network monitoring so this technique could lead to a major performance increase just as soon as I can get it 100% straight in my head. I'm not sure exactly how it applies to running a background process though. Right now for background processes I use an intermediary script which runs the real task and writes the stdout and stderr output to a database row, which can then be polled by the frontend. It seems to work quite well, though the overhead of updating the database is something I would like to be rid of if I can find a better way to do it. Dan Chris Shiflett wrote: > Dan Cech wrote: >> I for one would be very interested in a more in-depth discussion on >> this subject, as it sounds like there is a lot more to it than I was >> aware. > > You might find this useful (I did): > > http://netevil.org/node.php?nid=280 > > Chris > From dmintz at davidmintz.org Tue Nov 15 10:21:54 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 15 Nov 2005 10:21:54 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> Message-ID: On Tue, 15 Nov 2005, Alberto dos Santos wrote: > > What we don't have, and very much would like to have, is a way to > automaticaly monitor if the emails have been received or bounced back, > and remove the bouncers from the send list so, if you should come to a > script that is capable of handling this volume and does what you need > (and what we need too) we are candidates to take a deep look at it and > implement a similar solution at evangelizo.org. > My unoriginal thought is to set return-path to something like bounce-handler at example.org and set a procmail (or equivalent) recipe to pipe anything sent to bounce-handler to a php script that parses out who the intended recipient was, deems it a bounce and acts accordingly. The gotcha here, according to my rigorously scientific thought experiments, is that if someone at elsewhere.org deliberately sent mail to bounce-handler at example.org, the former would be considered a bounce -- unless your bounce-handler worked really hard to figure out if and why the incoming message bounced. Ah, the joy of reinventing the wheel. --- David Mintz http://davidmintz.org/ From lists at zaunere.com Tue Nov 15 11:14:20 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 15 Nov 2005 11:14:20 -0500 Subject: [nycphp-talk] background processes (was: building an 1-way email list manager) In-Reply-To: <4379F440.7020401@php.net> Message-ID: <004401c5e9ff$a423f780$6701a8c0@MobileZ> Chris Shiflett wrote on Tuesday, November 15, 2005 9:44 AM: > Dan Cech wrote: > > I for one would be very interested in a more in-depth discussion on > > this subject, as it sounds like there is a lot more to it than I was > > aware. > > You might find this useful (I did): > > http://netevil.org/node.php?nid=280 That's a good link (although I'm not sure I would agree that select() is a form of threading) but it's not really the same as trying to run a process in the background (daemonize). The crux of a good fork is the double-fork, in addition to destroying the relationship between the Apache process and PHP (file descriptors). For mod_php, this is quite an infamous problem, which is related to things like: http://www.securitytracker.com/alerts/2003/Dec/1008559.html (and search for "Need to fork so apache doesn't kill us" for some C examples). And: http://aspn.activestate.com/ASPN/Mail/Message/php-Dev/538021 Which as far as I know, is still an issue in Apache/PHP/etc (not CGI AFAIK). Anyway, the basic best-practice to fork is something like: function Daemonize() { $pid = pcntl_fork(); if( $pid < 0 ) return NULL; if( $pid ) exit(1); posix_setsid(); $pid = pcntl_fork(); if( $pid < 0 ) return NULL; if( $pid ) exit(1); return posix_getpid(); } (from http://www.pcomd.net/pfork) That should completely detach a PHP process from it's Apache process... well sort of. Because you're basically now left with an Apache process, and fork() dupes file descriptors (read a BSD manpage for fork(2)) the child process (even though it's a session leader and all that) needs to disconnect from Apache's descriptors (similar to the "controlling terminal" comment in the C example in the security link). So what has worked typically is: fclose(0); fclose(1); fclose(2); You should be ok in most cases after this. However, from what I understand, the Apache forked process inherits *all* file descriptors from Apache, which is not good (yes, like database connections, etc). So, in an ideal world - and especially for very long running processes - you would cycle through all open file descriptors in the forked PHP process, and close them all. Then, of course, reopen the ones you need. Long story short: if you're running mod_php, don't expect to create a whole other daemon out of Apache, but it's fine for long running batch processing from what I've seen. And, in terms of preventing a user's browser from "timing out", the important file descriptors to close are the magic three (stdin/out/err). --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From chsnyder at gmail.com Tue Nov 15 12:04:23 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 15 Nov 2005 12:04:23 -0500 Subject: [nycphp-talk] background processes (was: building an 1-way email list manager) In-Reply-To: <4379F399.8050806@phpwerx.net> References: <4379F399.8050806@phpwerx.net> Message-ID: On 11/15/05, Dan Cech wrote: > Hans, > > I for one would be very interested in a more in-depth discussion on this > subject, as it sounds like there is a lot more to it than I was aware. > > Dan > > Hans Zaunere wrote: > > > > Anthony Papillion wrote on Tuesday, November 15, 2005 4:31 AM: > >> This discussion triggers a question that I'm sure someone here can > >> answer: wouldn't forking the script to the background allow one to > >> send a huge volume of email without a timeout? > > > > It would, but forking can be a bit of an art. > > > > For any long running process that you wish to spawn out of PHP > running under > > Apache (as a DSO anyway) you need to cut ties with Apache. It seems like a much better idea to write the outgoing mail to a queue or flat file, and then use a separate process in pure PHP to do the sending. In other words, hand it off to a CLI script. That CLI script could be a daemon that runs all the time, or (more simply) it could just be a cron job that starts up and handles the next item in the queue. By the way (and please excuse the plug) if you'd like another example of PHP daemon code that implements signal handling like a real Unix process, check out simpleDaemon.php from the Pro PHP Security code at http://apress.com/book/supplementDownload.html?bID=437&sID=2888 -- Chris Snyder http://chxo.com/ From jeff.loiselle at gmail.com Tue Nov 15 17:09:11 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Tue, 15 Nov 2005 17:09:11 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> Message-ID: <4b1887110511151409s7d7907edk80f43528d4330882@mail.gmail.com> > My unoriginal thought is to set return-path to something like > bounce-handler at example.org and set a procmail (or equivalent) recipe to > pipe anything sent to bounce-handler to a php script that parses out who > the intended recipient was, deems it a bounce and acts accordingly. The > gotcha here, according to my rigorously scientific thought experiments, is > that if someone at elsewhere.org deliberately sent mail to > bounce-handler at example.org, the former would be considered a bounce -- > unless your bounce-handler worked really hard to figure out if and why the > incoming message bounced. Ah, the joy of reinventing the wheel. Either you can start up a database and start learning how to parse thousands of type of bounces... or.. you can just set a certain limit of the ones that come back to the bounce script, and at that limit, decide to finally bounce the user. --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com "In America, through pressure of conformity, there is freedom of choice, but nothing to choose from." - Peter Ustinov From papillion at gmail.com Tue Nov 15 17:15:53 2005 From: papillion at gmail.com (Anthony Papillion) Date: Tue, 15 Nov 2005 16:15:53 -0600 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <000001c5e9ef$90d4d510$6701a8c0@MobileZ> References: <5458518f0511150131p372fc42exae9056113a607b73@mail.gmail.com> <000001c5e9ef$90d4d510$6701a8c0@MobileZ> Message-ID: <5458518f0511151415i4f727249wc16d90d8f725dc99@mail.gmail.com> So then, the ideal way to handle a long running process might be to use cron and execute a CLI script, right? Because that would be totally independent of the Apache process and is fairly simple (if unelegant) to use. Anthony On 11/15/05, Hans Zaunere wrote: > > > > Anthony Papillion wrote on Tuesday, November 15, 2005 4:31 AM: > > This discussion triggers a question that I'm sure someone here can > > answer: wouldn't forking the script to the background allow one to > > send a huge volume of email without a timeout? > > It would, but forking can be a bit of an art. > > For any long running process that you wish to spawn out of PHP running > under > Apache (as a DSO anyway) you need to cut ties with Apache. When a fork() > is > done, the file descriptors are copied as well, meaning that now your PHP > script is sharing stdout/stdin/stderr with Apache. The implication of this > is that your script is now waiting for input/output just like Apache, and > more importantly, Apache is waiting for your script. > > So in order to correctly - and completely - fork, you need to fork(), kill > child, fork() again (creating a new process group), and most importantly, > close and reopen file descriptors in the PHP process. How to do this > correctly varies a little between flavors of Linux/BSD/etc. > > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Anthony Papillion Phone: (918) 926-0139 ICQ: 96-698-595 CAN ONE VOICE CHANGE THE WORLD? http://www.one.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Tue Nov 15 17:32:03 2005 From: rotsen at gmail.com (Nestor) Date: Tue, 15 Nov 2005 14:32:03 -0800 Subject: [nycphp-talk] How to read a PDF file content Message-ID: I need to read some table data from within a PDF file. The document is part of the Canada's Tax information. Is there a way to read athe contents of a PDF file (php, perl, c, unix script) ? Thanks, Nestor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Tue Nov 15 17:43:03 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 15 Nov 2005 17:43:03 -0500 Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <5458518f0511151415i4f727249wc16d90d8f725dc99@mail.gmail.com> Message-ID: <00bc01c5ea35$f2ec8400$6701a8c0@MobileZ> Anthony Papillion wrote on Tuesday, November 15, 2005 5:16 PM: > So then, the ideal way to handle a long running process might be to > use cron and execute a CLI script, right? Because that would be > totally independent of the Apache process and is fairly simple (if > unelegant) to use. I'm not sure there is a single ideal way - each has it's own advantages and disadvantages. A long running process - of let's say hours - could be effectively forked from a mod_php script. But is this a method to create a true daemon? Not at all - that should be done via CLI/fork. So there are a number of strategies for solving this type of problem. -- have a true daemon process sweep a database or filesystem for jobs to run -- have a true daemon listen for tasks on an internal or external socket (fun!) -- have cron start a process that sweeps a database or filesystem (this can actually get tricky in terms of concurrency; what if a cron fires up a script that begins to run, but continues to run longer than the next cron invocation? ie, you need to concurrency control) -- fork from Apache; this, actually in many ways, is straightforward once the fork issues are understood What works best depends on the programmer's skillset (is he a socket guru? a fork guru?), and of course problems specific to what needs to get done at the end of the day. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From chsnyder at gmail.com Tue Nov 15 18:06:01 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 15 Nov 2005 18:06:01 -0500 Subject: [nycphp-talk] --with-pic ... what's pic? Message-ID: So I have a PHP install (from a Debian package I think) that was configured with the --with-pic switch. Does anyone know what this does? I've also seen --prefer-pic if that helps. Google and the php.net search are both failing me here. -- Chris Snyder http://chxo.com/ From krook at us.ibm.com Tue Nov 15 18:15:47 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue, 15 Nov 2005 18:15:47 -0500 Subject: [nycphp-talk] --with-pic ... what's pic? In-Reply-To: Message-ID: > So I have a PHP install (from a Debian package I think) that was > configured with the --with-pic switch. > > Does anyone know what this does? I've also seen --prefer- > pic if that helps. > > Google and the php.net search are both failing me here. It is probably related to a switch sent to OpenSSL prior to building Apache w/ mod_ssl. I recall looking into it at one point but do not recall what I found out. Try googling the middle line here (don't forget to quote the hyphen so google doesn't try to exclude it, that's bit me a few times :). cd openssl-0.9.7e ./config -fPIC make Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From 1j0lkq002 at sneakemail.com Tue Nov 15 18:21:52 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 15 Nov 2005 15:21:52 -0800 Subject: [nycphp-talk] --with-pic ... what's pic? In-Reply-To: References: Message-ID: <427-50270@sneakemail.com> The php manual simply says --with-pic try to use only PIC/non-PIC objects default=use both A performance issue is mentioned here: http://www.zend.com/zend/week/week219.php#Heading7 some issues with it noted here: http://www.mail-archive.com/internals at lists.php.net/msg11509.html csnyder chsnyder-at-gmail.com |nyphp dev/internal group use| wrote: >So I have a PHP install (from a Debian package I think) that was >configured with the --with-pic switch. > >Does anyone know what this does? I've also seen --prefer-pic if that helps. > >Google and the php.net search are both failing me here. > > >-- >Chris Snyder >http://chxo.com/ >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From lists at zaunere.com Tue Nov 15 18:22:07 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 15 Nov 2005 18:22:07 -0500 Subject: [nycphp-talk] --with-pic ... what's pic? In-Reply-To: Message-ID: <00d101c5ea3b$669f67a0$6701a8c0@MobileZ> csnyder wrote on Tuesday, November 15, 2005 6:06 PM: > So I have a PHP install (from a Debian package I think) that was > configured with the --with-pic switch. > > Does anyone know what this does? I've also seen --prefer-pic if that > helps. Oh, this one is easy... PIC = position independent code PIC has to do with the way shared objects are linked together, the Apache DSO model, etc - if forking from Apache was a touch subject, then PIC is... Perhaps some of the C gurus who hide on this list can fill in more details. It's very platform dependant, quite complex, and quite subtle. Supposedly non-PIC is faster (since the linker can "know" where to link shared objects together, and some platforms are (or, at least used to be) buggy with regards to PIC code. For some general reading: http://sources.redhat.com/autobook/autobook/autobook_71.html http://docs.hp.com/en/B2355-90655/ch07s03.html http://www.delorie.com/gnu/docs/gcc/gccint_143.html http://www.llnl.gov/CASC/components/docs/users_guide/node196.html http://www.linuxjournal.com/article/1059 So what does this mean for PHP? http://apache.dev.wapme.net/modules/php-4.0.5/INSTALL http://www.php-editors.com/apache_manual/dso.html http://www.phpbuilder.com/manual/zend.creating.php (search for PIC in the above) And there's been some recent discussion: http://marc.theaimsgroup.com/?l=php-dev&w=2&r=1&s=pic&q=b There's actually a lot of resources - Yahoo/Google for "position independent code php", versus using the acronym. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From shiflett at php.net Tue Nov 15 18:47:31 2005 From: shiflett at php.net (Chris Shiflett) Date: Tue, 15 Nov 2005 18:47:31 -0500 Subject: [nycphp-talk] --with-pic ... what's pic? In-Reply-To: References: Message-ID: <437A7393.2030803@php.net> csnyder wrote: > So I have a PHP install (from a Debian package I think) that > was configured with the --with-pic switch. > > Does anyone know what this does? (PIC == Position Independent Code) The performance gurus tell us to compile PHP with -prefer-non-pic (for DSOs to match the performance of a static library): http://www.schlossnagle.org/~george/blog/index.php?/archives/58-The-DSO-Myth.html http://www.schlossnagle.org/~george/blog/index.php?/archives/57-The-DSO-Myth-Part-2.html http://www.schlossnagle.org/~george/blog/index.php?/archives/56-The-DSO-Myth-Part-3.html Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From jeff.loiselle at gmail.com Tue Nov 15 23:20:18 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Tue, 15 Nov 2005 23:20:18 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <4b1887110511091321k23ce7beet5d87d6a344f43b8a@mail.gmail.com> Message-ID: <4b1887110511152020u2f5fa367gd43032a73289255@mail.gmail.com> Hello, So I completely understand how to add nodes, removes nodes, move nodes, select children and parents. But I'm having a hard time figuring out how to draw trees in select boxes and using packages like PEAR::HTML_TreeMenu to build trees without using recursion. I'm going brain-dead on this one. The fcnyNode class has been extremely helpful along with the articles I'm reading which I posted before. What's my big hangup? ;-) /jeff On 11/9/05, csnyder wrote: > On 11/9/05, Jeff Loiselle wrote: > > Chris, > > > > As I've started to mess around with fncyNode a bit, it seems to work > > well. I was wondering: > > > > a. I want to add a "name" column and modify the appendTo() function to > > save it. Is there a better way? Should I be extending the class? > > > > b. Should I be treating this code as a sample, or is it stable for development? > > > > a) I extend the class. I keep everything other than the id, parentId, > lt and rt in another table, and use a join in order to select records. > This keeps the node table limited to just integers, which should speed > the massive update operations that need to be performed every time you > insert or move a node (since fields are all fixed size). That was > Hans' thinking, anyway (and I'm not a DB Admin). > > b) Aside from the addition of numChildren() the interface hasn't > changed since last October. We've been using it all over the place for > a year with no problems. Not high-traffic sites by any means, but > constant daily use with no tree corruption on sets of 3000-5000 nodes. > I've tested it up to 50,000 nodes; inserts can take 3-5 seconds at > that size, but lookups are as fast as ever. > > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com "In America, through pressure of conformity, there is freedom of choice, but nothing to choose from." - Peter Ustinov From ajai at bitblit.net Tue Nov 15 23:22:09 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Tue, 15 Nov 2005 23:22:09 -0500 Subject: [nycphp-talk] --with-pic ... what's pic? In-Reply-To: <437A7393.2030803@php.net> References: <437A7393.2030803@php.net> Message-ID: <437AB3F1.1010400@bitblit.net> Chris Shiflett wrote: >(PIC == Position Independent Code) > >The performance gurus tell us to compile PHP with -prefer-non-pic (for >DSOs to match the performance of a static library): > > (Dusting off and putting on my old C coding hat) Presumably, the overhead of having to re-calculate memory addresses when loading a library into memory makes PIC objects larger (since there is relocation code) and slightly slower (because of the calculation). A static library would have fixed addresses, so a static library would be slightly smaller and faster to load. However, their is a price to pay - you dont get any of the benefits that a shared library brings to the table (which means each application would load and use its own copy of a static library and so you would use much more memory overall). I would argue that using static libraries only gives you benefits when initially loading a library into memory but that the increased memory usage would probably outweigh these benefits pretty quickly (picture a web server where each PHP application has its own libraries loaded into memory instead of sharing one instance across all instantiations and you will get the picture). Also, with today's faster CPUs and memory, the intial load time is getting smaller all the time... -- Aj. From j at nybg.org Wed Nov 16 07:43:40 2005 From: j at nybg.org (Freeman, Joshua) Date: Wed, 16 Nov 2005 07:43:40 -0500 Subject: [nycphp-talk] slightly OT: FalconStor storage seminar... free food, Thurs., 12 - 4 Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E0502910D8E@xmail.nybg.org> Since we're in the market for a SAN at NYBG I was all set to attend this fine sounding event. Something's come up and I cannot attend. Apparently there are about still about 10 spaces. If you are in a decision-making type role at your job and you're in the market for storage solutions this will interest you... Hopefully you can get away for a few hours and check it out. cheers, J. --------------snip----------------- DATA PROTECTION: IT'S NOT JUST ABOUT BACKUP ANYMORE Seminar and gourmet lunch featuring esteemed data protection experts Curtis Preston and Ken Male Thursday, Nov. 17, 2005 12 ? 4 PM W Hotel Union Square 201 Park Avenue South, NYC, (Between 17th and 18th street) REGISTER NOW to Guarantee your Space at the seminar: http://www.falconstor.com/wevent Phone: 866.NOW.FALC (866.669.3252) Cost: Complimentary To help you learn more about protecting and optimizing your storage environment, FalconStor Software ? the industry leader in BCDR and VTL? cordially invites you to an exclusive event on Thursday, November 17 at the hip W Hotel in Union Square, New York. There was a time when data protection just meant backups. They didn't work all that well, but everybody accepted that as the status quo. Now times have changed, with exponentially damaging effects for companies whose backups fail. The good news is that the storage industry is addressing the issues. A powerful panel of experts ? including W. Curtis Preston, VP of Data Protection at GlassHouse Technologies; Ken Male, founder and CEO of The Info Pro; Wayne Lam, co-founder of FalconStor, and John Lallier, VP of Technology at FalconStor ? explain the problems plaguing today's data centers, and follows with the facts about solutions available for all of your most challenging data protection issues. First-person enduser success stories will be presented by executives from Hartz Mountain, the largest privately held real-estate firm in the US, and Skadden Arps LLP, one of the country?s top corporate law firms. Gourmet lunch and dessert from Todd English's renowned Olive's restaurant will be served. Cocktails to follow seminar. Bonus You will receive a FREE evaluation of your storage environment, and qualify to win the cool new portable Archos? DVR everyone wants. Plus, you will be eligible to receive a special discount on FalconStor products reserved exclusively for attendees of this event. More info & online registration: http://www.falconstor.com/register/wevent Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org | skype: karmester -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Wed Nov 16 11:05:37 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 16 Nov 2005 11:05:37 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <4b1887110511151409s7d7907edk80f43528d4330882@mail.gmail.com> References: <007001c5e91d$b2e172d0$6401a8c0@MobileZ> <4b1887110511141915v6fa72e5djc2fa81502d02c66e@mail.gmail.com> <4b1887110511151409s7d7907edk80f43528d4330882@mail.gmail.com> Message-ID: On Tue, 15 Nov 2005, Jeff Loiselle wrote: > > My unoriginal thought is to set return-path to something like > > bounce-handler at example.org and set a procmail (or equivalent) recipe to > > pipe anything sent to bounce-handler to a php script that parses out who > > the intended recipient was, deems it a bounce and acts accordingly. The > > gotcha here, according to my rigorously scientific thought experiments, is > > that if someone at elsewhere.org deliberately sent mail to > > bounce-handler at example.org, the former would be considered a bounce -- > > unless your bounce-handler worked really hard to figure out if and why the > > incoming message bounced. Ah, the joy of reinventing the wheel. > > Either you can start up a database and start learning how to parse > thousands of type of bounces... or.. you can just set a certain limit > of the ones that come back to the bounce script, and at that limit, > decide to finally bounce the user. I hear you. A bounce threshold is in fact part of my grand plan -- again, really original. --- David Mintz http://davidmintz.org/ From dmintz at davidmintz.org Wed Nov 16 11:08:11 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 16 Nov 2005 11:08:11 -0500 (EST) Subject: [nycphp-talk] building an 1-way email list manager In-Reply-To: <4377E437.9020607@jiffycomp.com> References: <4377E437.9020607@jiffycomp.com> Message-ID: On Sun, 13 Nov 2005, Matt Morgan wrote: > David Mintz wrote: > [...] > > Any plans to build in personalization features with web content, eg > image links, so you can track who reads the message and/or clicks > through to a web site? Non-profits love that stuff. Not planning on it, but the users would be free to embed all that sneaky image stuff into the email themselves and implement their own... --- David Mintz http://davidmintz.org/ From chsnyder at gmail.com Wed Nov 16 11:41:35 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 16 Nov 2005 11:41:35 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: <4b1887110511152020u2f5fa367gd43032a73289255@mail.gmail.com> References: <4b1887110511090927u1df65797t64397cac063c14d9@mail.gmail.com> <4b1887110511091321k23ce7beet5d87d6a344f43b8a@mail.gmail.com> <4b1887110511152020u2f5fa367gd43032a73289255@mail.gmail.com> Message-ID: On 11/15/05, Jeff Loiselle wrote: > Hello, > > So I completely understand how to add nodes, removes nodes, move > nodes, select children and parents. But I'm having a hard time > figuring out how to draw trees in select boxes and using packages like > PEAR::HTML_TreeMenu to build trees without using recursion. I'm going > brain-dead on this one. The fcnyNode class has been extremely helpful > along with the articles I'm reading which I posted before. > > What's my big hangup? ;-) > > /jeff You can loop through all the nodes in a set (you'll need to sooner or later, if only to display them) and use the parentId to keep track of relative depth. Or you can tie the tree to a conventional hierarchical naming system, and count the nameparts of any node to determine its depth. The first method looks something like the following, where $nodes is an array of nodes. $previous = FALSE; foreach( $nodes AS $index=>$child ) { if ( !$previous ) { $depth = array( $child->parentId ); } else { if ( $child->parentId == $previous->id ) { // child of previous $depth[] = $child->id; } else { $popped = array_pop( $depth ); while ( $popped && $popped != $child->parentId ) { // close containers $popped = array_pop( $depth ); } $depth[] = $child->parentId; if ( $child->parentId != $this->id ) { $depth[] = $child->id; } } } $nodes[$index]->depth = count( $depth ); $previous = $child; } Following that, each node in the $nodes array will have a depth property. -- Chris Snyder http://chxo.com/ From cliff at pinestream.com Wed Nov 16 13:03:37 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Wed, 16 Nov 2005 13:03:37 -0500 Subject: [nycphp-talk] Managing Nested Sets in a Database In-Reply-To: Message-ID: <008701c5ead8$1173bb80$0ea8a8c0@cliff> I calculate the depth when adding/updating/deleting nodes and store the depth in the database. If the set is read intensive, this reduces the processing load. For a simple indent, I use this:
          -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Wednesday, November 16, 2005 11:42 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Managing Nested Sets in a Database On 11/15/05, Jeff Loiselle wrote: > Hello, > > So I completely understand how to add nodes, removes nodes, move > nodes, select children and parents. But I'm having a hard time > figuring out how to draw trees in select boxes and using packages like > PEAR::HTML_TreeMenu to build trees without using recursion. I'm going > brain-dead on this one. The fcnyNode class has been extremely helpful > along with the articles I'm reading which I posted before. > > What's my big hangup? ;-) > > /jeff You can loop through all the nodes in a set (you'll need to sooner or later, if only to display them) and use the parentId to keep track of relative depth. Or you can tie the tree to a conventional hierarchical naming system, and count the nameparts of any node to determine its depth. The first method looks something like the following, where $nodes is an array of nodes. $previous = FALSE; foreach( $nodes AS $index=>$child ) { if ( !$previous ) { $depth = array( $child->parentId ); } else { if ( $child->parentId == $previous->id ) { // child of previous $depth[] = $child->id; } else { $popped = array_pop( $depth ); while ( $popped && $popped != $child->parentId ) { // close containers $popped = array_pop( $depth ); } $depth[] = $child->parentId; if ( $child->parentId != $this->id ) { $depth[] = $child->id; } } } $nodes[$index]->depth = count( $depth ); $previous = $child; } Following that, each node in the $nodes array will have a depth property. -- Chris Snyder http://chxo.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From andrew at plexpod.com Wed Nov 16 14:45:29 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 16 Nov 2005 14:45:29 -0500 Subject: [nycphp-talk] How to read a PDF file content In-Reply-To: References: Message-ID: <20051116194529.GQ21172@desario.homelinux.net> On Tue, Nov 15, 2005 at 02:32:03PM -0800, Nestor wrote: > Is there a way to read athe contents of a PDF file (php, perl, c, unix > script) ? There are the pdftotext and pdftohtml tools that might do the trick for you. If you have xpdf installed, you may already have them. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From rotsen at gmail.com Wed Nov 16 14:49:03 2005 From: rotsen at gmail.com (Nestor) Date: Wed, 16 Nov 2005 11:49:03 -0800 Subject: [nycphp-talk] How to read a PDF file content In-Reply-To: <20051116194529.GQ21172@desario.homelinux.net> References: <20051116194529.GQ21172@desario.homelinux.net> Message-ID: I foun dout also that Adobe has a site that will do convertions for you: http://www.adobe.com/products/acrobat/access_onlinetools.html Thanks, Nestor :-) On 11/16/05, Andrew Yochum wrote: > > On Tue, Nov 15, 2005 at 02:32:03PM -0800, Nestor wrote: > > Is there a way to read athe contents of a PDF file (php, perl, c, unix > > script) ? > > There are the pdftotext and pdftohtml tools that might do the trick for > you. If you have xpdf installed, you may already have them. > > HTH, > Andrew > > -- > Andrew Yochum > Plexpod > andrew at plexpod.com > 718-360-0879 > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at genoverly.net Wed Nov 16 18:55:50 2005 From: lists at genoverly.net (michael) Date: Wed, 16 Nov 2005 18:55:50 -0500 Subject: [nycphp-talk] benefits document Message-ID: <20051116185550.0ae42a9e@genoverly.com> I had a client request a document outlining the benefits of upgrading from PHP4 to PHP5. I poked around the php.net site and found http://us3.php.net/manual/en/faq.migration5.php, but I was hoping someone could point me to something better. Michael From krook at us.ibm.com Wed Nov 16 19:05:58 2005 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 16 Nov 2005 19:05:58 -0500 Subject: [nycphp-talk] benefits document In-Reply-To: <20051116185550.0ae42a9e@genoverly.com> Message-ID: > I had a client request a document outlining the benefits > of upgrading > from PHP4 to PHP5. I poked around the php.net site and found > http://us3.php.net/manual/en/faq.migration5.php, but I was hoping > someone could point me to something better. > > Michael Have a look at the first (short) chapter of Adam Trachtenberg's "Upgrading to PHP 5." http://www.oreilly.com/catalog/upgradephp5/ Adam also provided an article that covers the same bases as chapter 1. http://www.onlamp.com/pub/a/php/2004/07/15/UpgradePHP5.html Basically it boils down to improved OOP, MySQL, and XML support. Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From lists at zaunere.com Wed Nov 16 19:31:13 2005 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 16 Nov 2005 19:31:13 -0500 Subject: [nycphp-talk] benefits document In-Reply-To: <20051116185550.0ae42a9e@genoverly.com> Message-ID: <002301c5eb0e$37af9310$6401a8c0@MobileZ> michael wrote on Wednesday, November 16, 2005 6:56 PM: > I had a client request a document outlining the benefits of upgrading > from PHP4 to PHP5. I poked around the php.net site and found > http://us3.php.net/manual/en/faq.migration5.php, but I was hoping > someone could point me to something better. That attached has been going around on the PHP-DEV list. Not specific to 4 -> 5, but covers some interesting points. The number one advantage of moving to PHP 5 from 4 is the object model, that is to say, more complete and objects are handled by resource/reference, rather than being copied on a continual basis. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: third_draft_upgrade_notes.txt URL: From lists at genoverly.net Wed Nov 16 19:38:35 2005 From: lists at genoverly.net (michael) Date: Wed, 16 Nov 2005 19:38:35 -0500 Subject: [nycphp-talk] benefits document In-Reply-To: <20051116185550.0ae42a9e@genoverly.com> References: <20051116185550.0ae42a9e@genoverly.com> Message-ID: <20051116193835.55d45975@genoverly.com> On Wed, 16 Nov 2005 18:55:50 -0500 michael wrote: > I had a client request a document outlining the benefits of upgrading > from PHP4 to PHP5. I poked around the php.net site and found > http://us3.php.net/manual/en/faq.migration5.php, but I was hoping > someone could point me to something better. > > Michael Thanks guys, good stuff. Michael From billy.reisinger at gmail.com Thu Nov 17 11:01:40 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Thu, 17 Nov 2005 11:01:40 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? Message-ID: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> Hello, all - This is probably a simple thing, but here goes: I have a JavaScript file in an includes directory that I want to keep private - i.e. I don't want anyone to be able to pull it up in their web browser so that they can see the contents of it. On the other hand, I need a certain php script to be able to have access to it. All of this is in a shared hosting environment. I've tried to use .htaccess by limiting access to only "localhost", the ip of the server, and the domain name, but everything I try ends up denying permission to the php script trying to access the file. Thanks, -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 From shiflett at php.net Thu Nov 17 11:07:31 2005 From: shiflett at php.net (Chris Shiflett) Date: Thu, 17 Nov 2005 11:07:31 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> Message-ID: <437CAAC3.8080907@php.net> billy reisinger wrote: > I have a JavaScript file in an includes directory that I want to > keep private - i.e. I don't want anyone to be able to pull it up > in their web browser so that they can see the contents of it. Maybe I'm confused, but what good is JavaScript if the client can't get it? Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From billy.reisinger at gmail.com Thu Nov 17 11:10:20 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Thu, 17 Nov 2005 11:10:20 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <437CAAC3.8080907@php.net> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> <437CAAC3.8080907@php.net> Message-ID: <14a0d8670511170810n52e88ebuf7acdc2a159ebaac@mail.gmail.com> I'm using php to dynamically create javascript based on user requests or behavior. The information in the javascript file is sensitive. On 11/17/05, Chris Shiflett wrote: > billy reisinger wrote: > > I have a JavaScript file in an includes directory that I want to > > keep private - i.e. I don't want anyone to be able to pull it up > > in their web browser so that they can see the contents of it. > > Maybe I'm confused, but what good is JavaScript if the client can't get it? > > Chris > > -- > Chris Shiflett > Brain Bulb, The PHP Consultancy > http://brainbulb.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 From andrew at plexpod.com Thu Nov 17 11:11:21 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Thu, 17 Nov 2005 11:11:21 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> Message-ID: <20051117161120.GH21172@desario.homelinux.net> On Thu, Nov 17, 2005 at 11:01:40AM -0500, billy reisinger wrote: > Hello, all - > This is probably a simple thing, but here goes: > I have a JavaScript file in an includes directory that I want to keep > private - i.e. I don't want anyone to be able to pull it up in their > web browser so that they can see the contents of it. On the other > hand, I need a certain php script to be able to have access to it. > All of this is in a shared hosting environment. A few things: Completely protecting javascript is impossible, AFAIK. There are javascript "encoders" that obfuscate it. Google around. You might serve the javascript out of a PHP script that checks to see if the referrer is your desired script. Or use mod_rewrite to check the referrer. These are standard "hot link protection" methods, often used to prevent reuse of images, javascript or other assets. This however far from foolproof. The referrer can be faked, the script read from browser cache, etc. If you are concerned about someone reading the source code, using it for their own purposes or finding out some super secret proprietary business info then it shouldn't be done client side. Do it server side. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From mwithington at PLMresearch.com Thu Nov 17 11:16:51 2005 From: mwithington at PLMresearch.com (Mark Withington) Date: Thu, 17 Nov 2005 11:16:51 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358D6A582@network.PLMresearch.com> I think this is an issue of definition ;-) There is "the Client" (e.g. the one who pays the mortgage) and then there's the client (e.g. Firefox, IE, etc.). When it comes to Billy's script, sounds as though he'd like the former persona non grata. But then again, Latin was never my forte.... -------------------------- Mark L. Withington PLMresearch v: 508-746-2383 m: 508-801-0181 AIM/MSN/Skype: PLMresearch Yahoo: PLMresearch2000 > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett > Sent: Thursday, November 17, 2005 11:08 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] securing a file w/ htaccess? > > > billy reisinger wrote: > > I have a JavaScript file in an includes directory that I > want to keep > > private - i.e. I don't want anyone to be able to pull it up > in their > > web browser so that they can see the contents of it. > > Maybe I'm confused, but what good is JavaScript if the client > can't get it? > > Chris > > -- > Chris Shiflett > Brain Bulb, The PHP Consultancy > http://brainbulb.com/ _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From billy.reisinger at gmail.com Thu Nov 17 11:21:23 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Thu, 17 Nov 2005 11:21:23 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <20051117161120.GH21172@desario.homelinux.net> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> <20051117161120.GH21172@desario.homelinux.net> Message-ID: <14a0d8670511170821ucbe34edwff6e090430ea4bb7@mail.gmail.com> > If you are concerned about someone reading the source code, using it for > their own purposes or finding out some super secret proprietary business > info then it shouldn't be done client side. Do it server side. > > HTH, > Andrew That's a very good point. I've been asked to implement a "suggest" feature (ala Google) while avoiding increased client/server traffic. I could use XMLHttpRequest to fetch only that data that I need from the server. The problem with that, again, is the added server load it would cause. But you're right, in this case it's probably best to do the searching on the server side, and that's what I'll have to "suggest" to the boss. Cheers, Billy Reisinger From dallas.devries at gmail.com Thu Nov 17 22:11:24 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Thu, 17 Nov 2005 22:11:24 -0500 Subject: [nycphp-talk] Deprecated Pear errors in PHP5 Message-ID: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> I hope this isn't a dumb question, but here it is....Is the only way to get rid of the deprecated errors in PEAR such as is_a and static calls etc to actually modify the PEAR code? Turning down the error reporting in my logs doesn't seem like a good solution and I heard that modifying PEAR will make it difficult to get updates using the package manager. How have the rest of you dealt with this? Thanks -Dallas -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikko.rantalainen at peda.net Fri Nov 18 03:06:49 2005 From: mikko.rantalainen at peda.net (Mikko Rantalainen) Date: Fri, 18 Nov 2005 10:06:49 +0200 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <14a0d8670511170821ucbe34edwff6e090430ea4bb7@mail.gmail.com> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> <20051117161120.GH21172@desario.homelinux.net> <14a0d8670511170821ucbe34edwff6e090430ea4bb7@mail.gmail.com> Message-ID: <437D8B99.9020307@peda.net> billy reisinger wrote: >>If you are concerned about someone reading the source code, using it for >>their own purposes or finding out some super secret proprietary business >>info then it shouldn't be done client side. Do it server side. > > That's a very good point. I've been asked to implement a "suggest" > feature (ala Google) while avoiding increased client/server traffic. There's no way that you or anybody else can implement the "google suggest" feature without increasing the server traffic. It's plain impossible - think about it! The "suggest" feature provides the user more data while he's using the application and transferring more data *will* increase the server traffic. > I could use XMLHttpRequest to fetch only that data that I need from > the server. The problem with that, again, is the added server load it > would cause. But you're right, in this case it's probably best to do > the searching on the server side, and that's what I'll have to > "suggest" to the boss. I hope your previous plan (doing it in the client end) wasn't too close to "the Javascript Search Engine" featured in The Daily WTF a few days ago: http://thedailywtf.com/forums/50523/ShowPost.aspx If you cannot deal with the increased server load caused by "suggest" feature implemented with XMLHttpRequest, then you probably shouldn't implement the "suggest" feature at all. If you're trying to implement this with JavaScript, the JavaScript file will end up being quite a huge file and that will cause increased server load, too. -- Mikko From danielc at analysisandsolutions.com Fri Nov 18 10:26:38 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 18 Nov 2005 10:26:38 -0500 Subject: [nycphp-talk] Deprecated Pear errors in PHP5 In-Reply-To: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> References: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> Message-ID: <20051118152638.GA20072@panix.com> Hey: On Thu, Nov 17, 2005 at 10:11:24PM -0500, Dallas DeVries wrote: > I hope this isn't a dumb question, but here it is....Is the only way to get > rid of the deprecated errors Remove E_STRICT from your error reporting settings. This can be done via E_ALL. But if you're using a custom error handler function, you'll have to use the error_types parameter for set_error_handler(). --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 billy.reisinger at gmail.com Fri Nov 18 10:34:43 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Fri, 18 Nov 2005 10:34:43 -0500 Subject: [nycphp-talk] securing a file w/ htaccess? In-Reply-To: <437D8B99.9020307@peda.net> References: <14a0d8670511170801x6de521bam239bc7f818b5776a@mail.gmail.com> <20051117161120.GH21172@desario.homelinux.net> <14a0d8670511170821ucbe34edwff6e090430ea4bb7@mail.gmail.com> <437D8B99.9020307@peda.net> Message-ID: <14a0d8670511180734q70d1f161h6a932f20f92aa46c@mail.gmail.com> > There's no way that you or anybody else can implement the "google > suggest" feature without increasing the server traffic. It's plain > impossible - think about it! The "suggest" feature provides the user > more data while he's using the application and transferring more > data *will* increase the server traffic. > You are carrying my boss's mandate to the illogical extreme. I was not asked to reduce or eliminate any server traffic with this feature - I was asked to keep it to a minimum. > > I hope your previous plan (doing it in the client end) wasn't too > close to "the Javascript Search Engine" featured in The Daily WTF a > few days ago: http://thedailywtf.com/forums/50523/ShowPost.aspx > Different strokes for different folks, I guess. No need to fear JavaScript or client-side anything. Just make sure it works, doesn't get in the way, doesn't break something if JavaScript isn't enabled, and doesn't present an unmanageable risk. > If you cannot deal with the increased server load caused by > "suggest" feature implemented with XMLHttpRequest, then you probably > shouldn't implement the "suggest" feature at all. If you're trying > to implement this with JavaScript, the JavaScript file will end up > being quite a huge file and that will cause increased server load, too. > No, the JavaScript file won't be that big. Also, I don't throw my arms up and cry "uncle" every time I come across a roadblock or two, so I definitely won't be telling my boss that it can't be done. From dallas.devries at gmail.com Fri Nov 18 11:00:20 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Fri, 18 Nov 2005 11:00:20 -0500 Subject: [nycphp-talk] Deprecated Pear errors in PHP5 In-Reply-To: <20051118152638.GA20072@panix.com> References: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> <20051118152638.GA20072@panix.com> Message-ID: <1200dbac0511180800n28ce07c7kae7735bd9ee570c0@mail.gmail.com> I'd rather not turn down my error reporting level, that was the point of the question :) I think I prefer modifying the PEAR base class to that solution. On 11/18/05, Daniel Convissor wrote: > > Hey: > > On Thu, Nov 17, 2005 at 10:11:24PM -0500, Dallas DeVries wrote: > > I hope this isn't a dumb question, but here it is....Is the only way to > get > > rid of the deprecated errors > > Remove E_STRICT from your error reporting settings. This can be done via > E_ALL. But if you're using a custom error handler function, you'll have > to use the error_types parameter for set_error_handler(). > > --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 Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dorgan at optonline.net Fri Nov 18 11:06:29 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:06:29 -0500 Subject: [nycphp-talk] Open Source Firewall Message-ID: <437DFC05.6060909@optonline.net> Does anyone know of an opensource solution for a firewall that supports multiple classes, and is a briding firewall?? And because of the higher up authority we need a web interface to it. Right now we are using a sonic wall and because of recent events we now need something that supports multiple classes, this sonicwall does not. From yournway at gmail.com Fri Nov 18 11:08:51 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 18 Nov 2005 16:08:51 +0000 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437DFC05.6060909@optonline.net> References: <437DFC05.6060909@optonline.net> Message-ID: Hi. Look at www.smoothwall.org. HTH -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From hertso at yahoo.com Fri Nov 18 11:11:47 2005 From: hertso at yahoo.com (Mabonga Herbertson) Date: Fri, 18 Nov 2005 16:11:47 +0000 Subject: [nycphp-talk] Calendar Message-ID: <20051118161148.E9BEEA85E9@virtu.nyphp.org> Hi, I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 Thanks, Mabonga From yournway at gmail.com Fri Nov 18 11:12:45 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 18 Nov 2005 16:12:45 +0000 Subject: [nycphp-talk] Calendar In-Reply-To: <20051118161148.E9BEEA85E9@virtu.nyphp.org> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> Message-ID: WTF? On 18/11/05, Mabonga Herbertson wrote: > Hi, > > I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. > > http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 > > Thanks, > Mabonga > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From dorgan at optonline.net Fri Nov 18 11:16:56 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:16:56 -0500 Subject: [nycphp-talk] Calendar In-Reply-To: References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> Message-ID: <437DFE78.9000200@optonline.net> But does this support bridging and multiple classes?? Alberto dos Santos wrote: >WTF? > >On 18/11/05, Mabonga Herbertson wrote: > > >>Hi, >> >>I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. >> >> http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 >> >>Thanks, >>Mabonga >> >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >> > > >-- >Alberto dos Santos >Consultor em TI >IT Consultant > >http://www.yournway.com >A internet ? sua maneira. >The Internet your own way. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From lists at genoverly.net Fri Nov 18 11:17:20 2005 From: lists at genoverly.net (michael) Date: Fri, 18 Nov 2005 11:17:20 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437DFC05.6060909@optonline.net> References: <437DFC05.6060909@optonline.net> Message-ID: <20051118111720.14e66712@genoverly.com> On Fri, 18 Nov 2005 11:06:29 -0500 "Donald J. Organ IV" wrote: pfsense my have what you need. http://pfsense.org/ If not, a small dedicated machine with at least 2 nics running OpenBSD can tackle virtually any firewalling, bridging, networking requirements. Michael From yournway at gmail.com Fri Nov 18 11:18:14 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 18 Nov 2005 16:18:14 +0000 Subject: [nycphp-talk] Calendar In-Reply-To: <437DFE78.9000200@optonline.net> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> <437DFE78.9000200@optonline.net> Message-ID: what do you mean by multiple classes On 18/11/05, Donald J. Organ IV wrote: > But does this support bridging and multiple classes?? > > Alberto dos Santos wrote: > > >WTF? > > > >On 18/11/05, Mabonga Herbertson wrote: > > > > > >>Hi, > >> > >>I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. > >> > >> http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 > >> > >>Thanks, > >>Mabonga > >> > >>_______________________________________________ > >>New York PHP Talk Mailing List > >>AMP Technology > >>Supporting Apache, MySQL and PHP > >>http://lists.nyphp.org/mailman/listinfo/talk > >>http://www.nyphp.org > >> > >> > >> > > > > > >-- > >Alberto dos Santos > >Consultor em TI > >IT Consultant > > > >http://www.yournway.com > >A internet ? sua maneira. > >The Internet your own way. > >_______________________________________________ > >New York PHP Talk Mailing List > >AMP Technology > >Supporting Apache, MySQL and PHP > >http://lists.nyphp.org/mailman/listinfo/talk > >http://www.nyphp.org > > > > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From dorgan at optonline.net Fri Nov 18 11:19:20 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:19:20 -0500 Subject: [nycphp-talk] Calendar In-Reply-To: <437DFE78.9000200@optonline.net> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> <437DFE78.9000200@optonline.net> Message-ID: <437DFF08.5070605@optonline.net> oops wrong message, sorry guys Donald J. Organ IV wrote: >But does this support bridging and multiple classes?? > >Alberto dos Santos wrote: > > > >>WTF? >> >>On 18/11/05, Mabonga Herbertson wrote: >> >> >> >> >>>Hi, >>> >>>I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. >>> >>>http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 >>> >>>Thanks, >>>Mabonga >>> >>>_______________________________________________ >>>New York PHP Talk Mailing List >>>AMP Technology >>>Supporting Apache, MySQL and PHP >>>http://lists.nyphp.org/mailman/listinfo/talk >>>http://www.nyphp.org >>> >>> >>> >>> >>> >>-- >>Alberto dos Santos >>Consultor em TI >>IT Consultant >> >>http://www.yournway.com >>A internet ? sua maneira. >>The Internet your own way. >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> >> >> >> > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From dorgan at optonline.net Fri Nov 18 11:19:55 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:19:55 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: References: <437DFC05.6060909@optonline.net> Message-ID: <437DFF2B.5000705@optonline.net> But it doesnt look like this is a bridging firewall and doesnt look like it supports multiple classes Alberto dos Santos wrote: >Hi. >Look at www.smoothwall.org. > >HTH > >-- >Alberto dos Santos >Consultor em TI >IT Consultant > >http://www.yournway.com >A internet ? sua maneira. >The Internet your own way. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From jeff.knight at gmail.com Fri Nov 18 11:22:10 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Fri, 18 Nov 2005 10:22:10 -0600 Subject: [nycphp-talk] Calendar In-Reply-To: <437DFF08.5070605@optonline.net> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> <437DFE78.9000200@optonline.net> <437DFF08.5070605@optonline.net> Message-ID: <2ca9ba910511180822u27a69a50vbe2401f4d155c5c8@mail.gmail.com> Made me laugh On 11/18/05, Donald J. Organ IV wrote: > > oops wrong message, sorry guys -------------- next part -------------- An HTML attachment was scrubbed... URL: From yournway at gmail.com Fri Nov 18 11:24:54 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 18 Nov 2005 16:24:54 +0000 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437DFF2B.5000705@optonline.net> References: <437DFC05.6060909@optonline.net> <437DFF2B.5000705@optonline.net> Message-ID: Donald, It sure allows for bridging, I've done it. I'm not so sure what you mean with "multiple classes" in a Firewalling environment. Can you specify a little? -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From scott at crisscott.com Fri Nov 18 11:28:19 2005 From: scott at crisscott.com (Scott Mattocks) Date: Fri, 18 Nov 2005 11:28:19 -0500 Subject: [nycphp-talk] Deprecated Pear errors in PHP5 In-Reply-To: <1200dbac0511180800n28ce07c7kae7735bd9ee570c0@mail.gmail.com> References: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> <20051118152638.GA20072@panix.com> <1200dbac0511180800n28ce07c7kae7735bd9ee570c0@mail.gmail.com> Message-ID: <437E0123.1030000@crisscott.com> Dallas DeVries wrote: > I'd rather not turn down my error reporting level, that was the point of the > question :) > I think I prefer modifying the PEAR base class to that solution. Modifying the PEAR base class probably won't help that much. Not all PEAR classes extend PEAR. You would probably have to modify many classes. When you modify a package your changes will be lost next time you update. The only solution I can think of that doesn't require messing with error reporting settings is to create a custom error handler. In it you could check the error type and then decide whether or not to log the error. -- Scott Mattocks scott at crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks From dorgan at optonline.net Fri Nov 18 11:29:44 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:29:44 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: References: <437DFC05.6060909@optonline.net> <437DFF2B.5000705@optonline.net> Message-ID: <437E0178.9050703@optonline.net> well right now the sonicwall that we use gets a /29 mounted to its DMZ we are getting another /29 and want to be able to mount that to the DMZ as well. Alberto dos Santos wrote: >Donald, >It sure allows for bridging, I've done it. > >I'm not so sure what you mean with "multiple classes" in a Firewalling >environment. >Can you specify a little? > > >-- >Alberto dos Santos >Consultor em TI >IT Consultant > >http://www.yournway.com >A internet ? sua maneira. >The Internet your own way. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From dorgan at optonline.net Fri Nov 18 11:33:31 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 11:33:31 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <20051118111720.14e66712@genoverly.com> References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> Message-ID: <437E025B.3040203@optonline.net> if pfense supported multiple classes it would work, but according to the screenshorts it looks like it only supports the use of 1 class. michael wrote: >On Fri, 18 Nov 2005 11:06:29 -0500 >"Donald J. Organ IV" wrote: > >pfsense my have what you need. >http://pfsense.org/ > >If not, a small dedicated machine with at least 2 nics running OpenBSD >can tackle virtually any firewalling, bridging, networking requirements. > > >Michael >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From shiflett at php.net Fri Nov 18 11:52:03 2005 From: shiflett at php.net (Chris Shiflett) Date: Fri, 18 Nov 2005 11:52:03 -0500 Subject: [nycphp-talk] Calendar In-Reply-To: <2ca9ba910511180822u27a69a50vbe2401f4d155c5c8@mail.gmail.com> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> <437DFE78.9000200@optonline.net> <437DFF08.5070605@optonline.net> <2ca9ba910511180822u27a69a50vbe2401f4d155c5c8@mail.gmail.com> Message-ID: <437E06B3.8000007@php.net> Jeff Knight wrote: > Made me laugh Me, too. I thought it was an intentional joke. Was even better when it was declared a mistake. :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From yournway at gmail.com Fri Nov 18 13:45:07 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Fri, 18 Nov 2005 18:45:07 +0000 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437E025B.3040203@optonline.net> References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> <437E025B.3040203@optonline.net> Message-ID: Oh! Do you mean to have different zones with different netmasks, is that it? Like external a class C address, dmz a class B and internal a class A address? If that's it, look no further, and download SmoothWall. -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From dorgan at optonline.net Fri Nov 18 14:18:48 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 18 Nov 2005 14:18:48 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> <437E025B.3040203@optonline.net> Message-ID: <437E2918.1070606@optonline.net> Well kind of, basically i want the DMZ to be able to have two class C netmasks. Eg. Mounting to full class C's to the DMZ Alberto dos Santos wrote: >Oh! > >Do you mean to have different zones with different netmasks, is that it? > >Like external a class C address, dmz a class B and internal a class A address? > >If that's it, look no further, and download SmoothWall. >-- >Alberto dos Santos >Consultor em TI >IT Consultant > >http://www.yournway.com >A internet ? sua maneira. >The Internet your own way. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From chauncey.thorn at gmail.com Fri Nov 18 18:25:21 2005 From: chauncey.thorn at gmail.com (Chauncey Thorn) Date: Fri, 18 Nov 2005 18:25:21 -0500 Subject: [nycphp-talk] DataObjects generator Message-ID: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> I've developed a tool that creates a DataObject for each table I have in my MySQL database. When the script is executed against a particular table it generates a script containing OO code with a number of methods defined by default e.g. set_/get_ , getAll, get, insert, delete, update, and a error method. It has also been fun finding ways to use the DataObjects. As a result, I have put together a couple of examples; Using a single DataObject : http://cthorn.com/oodbigen/usingdataobject.php MVC wrapper for the DataObjects : http://cthorn.com/oodbigen/mvcwrapper.php Hope someone finds this useful. Feedback welcomed.. Chauncey Thorn PHP App. Developer email: chaunceyt at gmail dot com url: http://www.cthorn.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Fri Nov 18 18:35:51 2005 From: ken at secdat.com (Kenneth Downs) Date: Fri, 18 Nov 2005 18:35:51 -0500 (EST) Subject: [nycphp-talk] DataObjects generator In-Reply-To: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> Message-ID: <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> Have you considered simply dumping out associative arrays that describe each table, and then having single library of code that handles them? This gives you the flexibility to see the code's efficacy in real-time as you work on it -- without having to run the generator for every little tweak -- and then having it save cached chunks of HTML as it goes. > I've developed a tool that creates a DataObject for each table I have in > my > MySQL database. When the script is executed against a particular table it > generates a script containing OO code with a number of methods defined by > default e.g. set_/get_ , getAll, get, insert, delete, update, and a error > method. > > It has also been fun finding ways to use the DataObjects. As a result, I > have put together a couple of examples; > Using a single DataObject : http://cthorn.com/oodbigen/usingdataobject.php > MVC wrapper for the DataObjects : > http://cthorn.com/oodbigen/mvcwrapper.php > > Hope someone finds this useful. Feedback welcomed.. > > Chauncey Thorn > PHP App. Developer > email: chaunceyt at gmail dot com > url: http://www.cthorn.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From chauncey.thorn at gmail.com Fri Nov 18 22:43:04 2005 From: chauncey.thorn at gmail.com (Chauncey Thorn) Date: Fri, 18 Nov 2005 22:43:04 -0500 Subject: [nycphp-talk] DataObjects generator In-Reply-To: <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> Message-ID: <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> After tweaking the generator, a simple refresh of my browser allows me to see the output of the script generated and the output from executing each method in the DataObject. Since this refresh has the database and table info already and the assoc array - $_POST is still available. On 11/18/05, Kenneth Downs wrote: > > Have you considered simply dumping out associative arrays that describe > each table, and then having single library of code that handles them? > This gives you the flexibility to see the code's efficacy in real-time as > you work on it -- without having to run the generator for every little > tweak -- and then having it save cached chunks of HTML as it goes. > > > I've developed a tool that creates a DataObject for each table I have in > > my > > MySQL database. When the script is executed against a particular table > it > > generates a script containing OO code with a number of methods defined > by > > default e.g. set_/get_ , getAll, get, insert, delete, update, and a > error > > method. > > > > It has also been fun finding ways to use the DataObjects. As a result, I > > have put together a couple of examples; > > Using a single DataObject : > http://cthorn.com/oodbigen/usingdataobject.php > > MVC wrapper for the DataObjects : > > http://cthorn.com/oodbigen/mvcwrapper.php > > > > Hope someone finds this useful. Feedback welcomed.. > > > > Chauncey Thorn > > PHP App. Developer > > email: chaunceyt at gmail dot com > > url: http://www.cthorn.com/ > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > -- > Kenneth Downs > Secure Data Software > 631-379-0010 > ken at secdat.com > PO Box 708 > East Setauket, NY 11733 > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Sat Nov 19 01:08:45 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Fri, 18 Nov 2005 22:08:45 -0800 Subject: [nycphp-talk] [OT] Re: Calendar In-Reply-To: <20051118161148.E9BEEA85E9@virtu.nyphp.org> References: <20051118161148.E9BEEA85E9@virtu.nyphp.org> Message-ID: <25132-32253@sneakemail.com> Mabonga Herbertson hertso-at-yahoo.com |nyphp dev/internal group use| wrote: >Hi, > >I am creating a birthday calendar of all my friends and family. Can you please click on the link below to enter your birthday for me. > > http://www.birthdayalarm.com/bd1/58052060a129939088b836932012c715908273d905 > > > spam. From papillion at gmail.com Sat Nov 19 04:32:45 2005 From: papillion at gmail.com (Anthony Papillion) Date: Sat, 19 Nov 2005 03:32:45 -0600 Subject: [nycphp-talk] OpenLaszlo and PHP Message-ID: <5458518f0511190132r48a7d2day36a27af76b557e97@mail.gmail.com> Hello Everyone, I've recently began experimenting with designing UI's for my web apps in OpenLaszlo and doing my backend scripting with PHP. So far, I am pretty impressed with how much work using these two technologies together has saved me but I'm wondering what everyone else thinks. Anyone here using Laszlo in conjunction with PHP? What are your thoughts on it? How has it worked for you? Thanks! Anthony Papillion Advanced Data Concepts Phone: (918) 926-0139 ICQ: 96-698-595 CAN ONE VOICE CHANGE THE WORLD? http://www.one.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Sat Nov 19 07:20:59 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 19 Nov 2005 07:20:59 -0500 (EST) Subject: [nycphp-talk] DataObjects generator In-Reply-To: <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> Message-ID: <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> I think I phrased my question badly. What I should have said was that as the complexity of your generator increases, and as the table count increases, running the generator becomes more and more of a delay. If the generator produced an assoc array of layout, you would only need to run it when layout changed, and your system would be much more flexible both in terms of development and deployment. I have a system of 170 tables and re-running the generator is just not an option when I'm trying to tweak a bug, I want to modify the code directly and see the effect. When it is fixed, it goes into the distribution tree and all systems using that library file are affected w/o rerunning any generators. > After tweaking the generator, a simple refresh of my browser allows me to > see the output of the script generated and the output from executing each > method in the DataObject. Since this refresh has the database and table > info > already and the assoc array - $_POST is still available. > > > On 11/18/05, Kenneth Downs wrote: >> >> Have you considered simply dumping out associative arrays that describe >> each table, and then having single library of code that handles them? >> This gives you the flexibility to see the code's efficacy in real-time >> as >> you work on it -- without having to run the generator for every little >> tweak -- and then having it save cached chunks of HTML as it goes. >> >> > I've developed a tool that creates a DataObject for each table I have >> in >> > my >> > MySQL database. When the script is executed against a particular table >> it >> > generates a script containing OO code with a number of methods defined >> by >> > default e.g. set_/get_ , getAll, get, insert, delete, update, and a >> error >> > method. >> > >> > It has also been fun finding ways to use the DataObjects. As a result, >> I >> > have put together a couple of examples; >> > Using a single DataObject : >> http://cthorn.com/oodbigen/usingdataobject.php >> > MVC wrapper for the DataObjects : >> > http://cthorn.com/oodbigen/mvcwrapper.php >> > >> > Hope someone finds this useful. Feedback welcomed.. >> > >> > Chauncey Thorn >> > PHP App. Developer >> > email: chaunceyt at gmail dot com >> > url: http://www.cthorn.com/ >> > _______________________________________________ >> > New York PHP Talk Mailing List >> > AMP Technology >> > Supporting Apache, MySQL and PHP >> > http://lists.nyphp.org/mailman/listinfo/talk >> > http://www.nyphp.org >> >> >> -- >> Kenneth Downs >> Secure Data Software >> 631-379-0010 >> ken at secdat.com >> PO Box 708 >> East Setauket, NY 11733 >> >> _______________________________________________ >> New York PHP Talk Mailing List >> AMP Technology >> Supporting Apache, MySQL and PHP >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org >> > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From danielc at analysisandsolutions.com Sat Nov 19 09:56:23 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Nov 2005 09:56:23 -0500 Subject: [nycphp-talk] PHP in SecurityFocus #322 Message-ID: <20051119145506.109E2DE7080@mailspool3.panix.com> These summaries are available online RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html Alerts from SecurityFocus Newsletter #322 PHP --- PHP Apache 2 Local Denial of Service Vulnerability http://www.securityfocus.com/bid/15177 This SF report says the matter has been resolved in 4.4.1. But looking at the CVS log messages at http://cvs.php.net/php-src/sapi/apache2handler/sapi_apache2.c one can see that further important fixes for this SAPI were implemented on 18 Nov 2005 which have yet to be incorporated into an official release. APPLICATIONS USING PHP ---------------------- phpMyAdmin Theme Variable Local File Inclusion Vulnerability http://www.securityfocus.com/bid/15169 phpBB Avatar Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15170 PHPNuke Multiple Modules SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15178 PunBB Common.PHP Remote File Include Vulnerability http://www.securityfocus.com/bid/15175 Nuked Klan Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15181 FlatNuke Index.PHP Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/15172 FlatNuke Index.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15176 TriggerTG TClanPortal Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15173 Platinum DBoardGear Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15174 Platinum DBoardGear Theme Import SQL Injection Vulnerability http://www.securityfocus.com/bid/15194 Zomplog Detail.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/15168 DCP-Portal Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15183 SAPHP Lesson Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15185 PHP-Fusion Message Post HTML Injection Vulnerability http://www.securityfocus.com/bid/15187 PHP ICalendar Default_View Remote File Include Vulnerability http://www.securityfocus.com/bid/15193 XOOPS Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/15195 Basic Analysis And Security Engine Base_qry_main.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15199 AR-Blog Comment HTML Injection Vulnerability http://www.securityfocus.com/bid/15201 AR-Blog Remote Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15203 SparkleBlog Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/15202 MyBulletinBoard Usercp.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15204 IPBProArcade GameID Parameter Remote SQL Injection Vulnerability http://www.securityfocus.com/bid/15205 Belchior Foundry VCard Remote File Include Vulnerability http://www.securityfocus.com/bid/15207 Flyspray Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15209 Mantis Multiple Unspecified SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15210 Mantis Bug_sponsorship_list_view_inc.PHP File Include Vulnerability http://www.securityfocus.com/bid/15212 Mantis Multiple Remote Vulnerabilities http://www.securityfocus.com/bid/15227 Woltlab Info-DB Info_db.PHP Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15214 GCards News.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15216 Search Enhanced Module for PHP-Nuke HTML Injection Vulnerability http://www.securityfocus.com/bid/15218 ATutor Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15221 PBLang Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15223 PHPESP Multiple Unspecified Input Validation Vulnerabilities http://www.securityfocus.com/bid/15232 MG2 Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15235 PHP Advanced Transfer Manager Remote Unauthorized Access Vulnerability http://www.securityfocus.com/bid/15237 Subdreamer Multiple Remote SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15238 RELATED STUFF ------------- Apache Mod_Auth_Shadow Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15224 ITEMS OF INTEREST FROM OTHER SOURCES ------------------------------------ PEAR HTML_Form Cross-Site Scripting and Remote Code Injection Vulnerabilities http://www.securityfocus.com/bid/ Release 1.3.0 of PEAR's HTML_Form package contains important security fixes. From danielc at analysisandsolutions.com Sat Nov 19 09:56:29 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Nov 2005 09:56:29 -0500 Subject: [nycphp-talk] PHP in SecurityFocus #324 Message-ID: <20051119145511.CD15ADE7080@mailspool3.panix.com> These summaries are available online RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html Alerts from SecurityFocus Newsletter #324 PHP --- PHP Group Exif Module Infinite Recursion Denial Of Service Vulnerability http://www.securityfocus.com/bid/15358 This is a relatively minor issue. It is only a denial of service and only applies to users parsing EXIF data in corrupted JPEG images. APPLICATIONS USING PHP ---------------------- Invision Power Board Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15344 Invision Power Board Multiple HTML Injection Vulnerabilities http://www.securityfocus.com/bid/15345 PHPFM Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/15335 Debian Horde Default Administrator Password Vulnerability http://www.securityfocus.com/bid/15337 XMB U2U.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15342 toendaCMS Admin.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/15348 toendaCMS Remote File Upload Vulnerability http://www.securityfocus.com/bid/15351 PHPList Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15350 PHPKit Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15354 ATutor Registration.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15355 YaBB Image Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15368 TikiWiki Tiki-view_forum_thread.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15371 TikiWiki Tiki-User_Preferences.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/15392 TikiWiki Tiki-Editpage.PHP Directory Traversal Vulnerability http://www.securityfocus.com/bid/15390 Moodle Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15380 phpAdsNew Lib-sessions.inc.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15385 OcoMon Multiple Unspecified SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15386 Exponent CMS Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15389 PHPSysInfo Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15396 PHPWebThings Download.PHP File Parameter SQL Injection Vulnerability http://www.securityfocus.com/bid/15399 ActiveCampaign 1-2-All Broadcast Email Admin Control Panel Username SQL Injection Vulnerability http://www.securityfocus.com/bid/15400 From danielc at analysisandsolutions.com Sat Nov 19 09:56:26 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Nov 2005 09:56:26 -0500 Subject: [nycphp-talk] PHP in SecurityFocus #323 Message-ID: <20051119145509.1E8E96A0660@mailspool2.panix.com> These summaries are available online RSS: http://phpsec.org/projects/vulnerabilities/securityfocus.xml HTML: http://phpsec.org/projects/vulnerabilities/securityfocus.html Alerts from SecurityFocus Newsletter #323 PHP --- PHP Parse_Str Register_Globals Activation Weakness http://www.securityfocus.com/bid/15249 This matter was fixed in CVS on September 29. Upgrade to PHP 4.4.1 or 5.1.0-RC2. For PHP 5.0.x, compile from updated sources. PHP File Upload GLOBAL Variable Overwrite Vulnerability http://www.securityfocus.com/bid/15250 This matter was fixed in CVS on September 29. Upgrade to PHP 4.4.1 or 5.1.0-RC2. For PHP 5.0.x, compile from updated sources. PHP PHPInfo Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15248 This issue was addressed in CVS on August 15. Upgade to PHP 4.4.1, 5.0.5 or 5.1.0-RC1. But people who are security conscious don't have phpinfo() output laying around in the first place, RIGHT? APPLICATIONS USING PHP ---------------------- PHPBB Global Variable Deregistration Bypass Vulnerabilities http://www.securityfocus.com/bid/15243 PHPBB Multiple Unspecified Vulnerabilities http://www.securityfocus.com/bid/15246 Invision Gallery Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15240 Invision Gallery Image Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15286 MG2 Authentication Bypass Vulnerability http://www.securityfocus.com/bid/15235 PHP Advanced Transfer Manager Remote Unauthorized Access Vulnerability http://www.securityfocus.com/bid/15237 Subdreamer Multiple Remote SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15238 PHPCafe Tutorial Manager Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15244 OaBoard Forum.PHP Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15245 Belchior Foundry vCard Pro Addrbook.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15254 EyeOS Desktop.PHP HTML Injection Vulnerability http://www.securityfocus.com/bid/15255 EyeOS User And Password Information Disclosure Vulnerability http://www.securityfocus.com/bid/15256 VUBB Index.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15260 XMB Forum Post.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15267 News2Net Index.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15274 phpWebThings Forum.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/15276 PHPWebThing Forum.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15277 Simple PHP Blog Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/15283 PHP Handicapper Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/15294 PHP Handicapper Process_signup.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15298 PHP Handicapper Process_signup.PHP HTTP Response Splitting Vulnerability http://www.securityfocus.com/bid/15301 CutePHP CuteNews Directory Traversal Vulnerability http://www.securityfocus.com/bid/15295 vBulletin Image Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15296 Movable Type Blog Entry Posting HTML Injection Vulnerability http://www.securityfocus.com/bid/15305 Galerie ShowGallery.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/15313 PunBB/Blog:CMS Image Upload HTML Injection Vulnerability http://www.securityfocus.com/bid/15322 JPortal Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/15324 PunBB/BLOG:CMS Origin Spoofing Vulnerability http://www.securityfocus.com/bid/15326 PunBB/BLOG:CMS Unspecified Information Disclosure Vulnerability http://www.securityfocus.com/bid/15328 ibProArcade User ID SQL Injection Vulnerability http://www.securityfocus.com/bid/15333 From lamolist at cyberxdesigns.com Sat Nov 19 10:10:02 2005 From: lamolist at cyberxdesigns.com (Hans Kaspersetz) Date: Sat, 19 Nov 2005 10:10:02 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437E2918.1070606@optonline.net> References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> <437E025B.3040203@optonline.net> <437E2918.1070606@optonline.net> Message-ID: <437F404A.6070007@cyberxdesigns.com> I am not really clear on what this has to do with PHP? Can someone fill me in? HCK Donald J. Organ IV wrote: >Well kind of, basically i want the DMZ to be able to have two class C >netmasks. > >Eg. Mounting to full class C's to the DMZ > >Alberto dos Santos wrote: > > From yournway at gmail.com Sat Nov 19 10:13:28 2005 From: yournway at gmail.com (Alberto dos Santos) Date: Sat, 19 Nov 2005 15:13:28 +0000 Subject: [nycphp-talk] DataObjects generator In-Reply-To: <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> Message-ID: On 19/11/05, Kenneth Downs wrote: > I think I phrased my question badly. > > What I should have said was that as the complexity of your generator > increases, and as the table count increases, running the generator becomes > more and more of a delay. If the generator produced an assoc array of > layout, you would only need to run it when layout changed, and your system > would be much more flexible both in terms of development and deployment. > > I have a system of 170 tables and re-running the generator is just not an > option when I'm trying to tweak a bug, I want to modify the code directly > and see the effect. When it is fixed, it goes into the distribution tree > and all systems using that library file are affected w/o rerunning any > generators. > You should check Qcodo, I've tried it and now I use it regularly, I already have two apps, one will be online soon, and it works like a charm. PHP5 based with "strict" oop approach, and does a good job with code generation. www.qcodo.com -- Alberto dos Santos Consultor em TI IT Consultant http://www.yournway.com A internet ? sua maneira. The Internet your own way. From ken at secdat.com Sat Nov 19 10:39:22 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 19 Nov 2005 10:39:22 -0500 (EST) Subject: [nycphp-talk] DataObjects generator In-Reply-To: References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> Message-ID: <37176.38.117.147.25.1132414762.squirrel@38.117.147.25> ? Why? > On 19/11/05, Kenneth Downs wrote: >> I think I phrased my question badly. >> >> What I should have said was that as the complexity of your generator >> increases, and as the table count increases, running the generator >> becomes >> more and more of a delay. If the generator produced an assoc array of >> layout, you would only need to run it when layout changed, and your >> system >> would be much more flexible both in terms of development and deployment. >> >> I have a system of 170 tables and re-running the generator is just not >> an >> option when I'm trying to tweak a bug, I want to modify the code >> directly >> and see the effect. When it is fixed, it goes into the distribution >> tree >> and all systems using that library file are affected w/o rerunning any >> generators. >> > You should check Qcodo, I've tried it and now I use it regularly, I > already have two apps, one will be online soon, and it works like a > charm. PHP5 based with "strict" oop approach, and does a good job with > code generation. > www.qcodo.com > > -- > Alberto dos Santos > Consultor em TI > IT Consultant > > http://www.yournway.com > A internet ? sua maneira. > The Internet your own way. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From chauncey.thorn at gmail.com Sat Nov 19 10:53:43 2005 From: chauncey.thorn at gmail.com (Chauncey Thorn) Date: Sat, 19 Nov 2005 10:53:43 -0500 Subject: [nycphp-talk] DataObjects generator In-Reply-To: <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> Message-ID: <9ebd5b3c0511190753m4cbffa6ew4fb889d56effe1a6@mail.gmail.com> My focus with the generator was to create a base DataObject. When using the DataObject in a project, if I decide to add methods that perform tasks outside of the core basics I would just extends the base DataObject for that table in another file. Tweaking/debugging of that other file doesn't affect the base. Now, If these methods are agreed to be common enough to apply to each table, you could hack another generator that by default extends the base DataObject for those specific methods common to each table. Running the generator against 170 tables shouldn't take very long and since you extends the base DataObject to add additional functionality when using it in a project. The impact should be little to nothing. In theory, after generating the base DataObjects script files, you should "never" have to edit those files again. The goal is to have a "standard" DataObject for every table. So, having to re-run the generator after fixing a bug in the base DataObject is required. Also, If I modify the database table(s) adding/removing fields I would re-run the generator on that table(s) only just to ensure I maintain the standard base DataObject for my project. On 11/19/05, Kenneth Downs wrote: > > I think I phrased my question badly. > > What I should have said was that as the complexity of your generator > increases, and as the table count increases, running the generator becomes > more and more of a delay. If the generator produced an assoc array of > layout, you would only need to run it when layout changed, and your system > would be much more flexible both in terms of development and deployment. > > I have a system of 170 tables and re-running the generator is just not an > option when I'm trying to tweak a bug, I want to modify the code directly > and see the effect. When it is fixed, it goes into the distribution tree > and all systems using that library file are affected w/o rerunning any > generators. > > > After tweaking the generator, a simple refresh of my browser allows me > to > > see the output of the script generated and the output from executing > each > > method in the DataObject. Since this refresh has the database and table > > info > > already and the assoc array - $_POST is still available. > > > > > > On 11/18/05, Kenneth Downs wrote: > >> > >> Have you considered simply dumping out associative arrays that describe > >> each table, and then having single library of code that handles them? > >> This gives you the flexibility to see the code's efficacy in real-time > >> as > >> you work on it -- without having to run the generator for every little > >> tweak -- and then having it save cached chunks of HTML as it goes. > >> > >> > I've developed a tool that creates a DataObject for each table I have > >> in > >> > my > >> > MySQL database. When the script is executed against a particular > table > >> it > >> > generates a script containing OO code with a number of methods > defined > >> by > >> > default e.g. set_/get_ , getAll, get, insert, delete, update, and a > >> error > >> > method. > >> > > >> > It has also been fun finding ways to use the DataObjects. As a > result, > >> I > >> > have put together a couple of examples; > >> > Using a single DataObject : > >> http://cthorn.com/oodbigen/usingdataobject.php > >> > MVC wrapper for the DataObjects : > >> > http://cthorn.com/oodbigen/mvcwrapper.php > >> > > >> > Hope someone finds this useful. Feedback welcomed.. > >> > > >> > Chauncey Thorn > >> > PHP App. Developer > >> > email: chaunceyt at gmail dot com > >> > url: http://www.cthorn.com/ > >> > _______________________________________________ > >> > New York PHP Talk Mailing List > >> > AMP Technology > >> > Supporting Apache, MySQL and PHP > >> > http://lists.nyphp.org/mailman/listinfo/talk > >> > http://www.nyphp.org > >> > >> > >> -- > >> Kenneth Downs > >> Secure Data Software > >> 631-379-0010 > >> ken at secdat.com > >> PO Box 708 > >> East Setauket, NY 11733 > >> > >> _______________________________________________ > >> New York PHP Talk Mailing List > >> AMP Technology > >> Supporting Apache, MySQL and PHP > >> http://lists.nyphp.org/mailman/listinfo/talk > >> http://www.nyphp.org > >> > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > -- > Kenneth Downs > Secure Data Software > 631-379-0010 > ken at secdat.com > PO Box 708 > East Setauket, NY 11733 > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Sat Nov 19 11:07:10 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Nov 2005 11:07:10 -0500 Subject: [nycphp-talk] Deprecated Pear errors in PHP5 In-Reply-To: <437E0123.1030000@crisscott.com> References: <1200dbac0511171911y7d58d42eub43059f0aab4c704@mail.gmail.com> <20051118152638.GA20072@panix.com> <1200dbac0511180800n28ce07c7kae7735bd9ee570c0@mail.gmail.com> <437E0123.1030000@crisscott.com> Message-ID: <20051119160710.GA515@panix.com> Heya: On Fri, Nov 18, 2005 at 11:28:19AM -0500, Scott Mattocks wrote: > The only solution I can think of that doesn't require messing with error > reporting settings is to create a custom error handler. In it you could > check the error type and then decide whether or not to log the error. Good idea. And check the file name too. If it's in a PEAR file, just ignore the E_STRICT warning. But if it's elsewhere, kvetch. --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 ken at secdat.com Sat Nov 19 11:13:21 2005 From: ken at secdat.com (Kenneth Downs) Date: Sat, 19 Nov 2005 11:13:21 -0500 (EST) Subject: [nycphp-talk] DataObjects generator In-Reply-To: <9ebd5b3c0511190753m4cbffa6ew4fb889d56effe1a6@mail.gmail.com> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> <9ebd5b3c0511190753m4cbffa6ew4fb889d56effe1a6@mail.gmail.com> Message-ID: <37213.38.117.147.25.1132416801.squirrel@38.117.147.25> best of luck. > My focus with the generator was to create a base DataObject. When using > the > DataObject in a project, if I decide to add methods that perform tasks > outside of the core basics I would just extends the base DataObject for > that > table in another file. Tweaking/debugging of that other file doesn't > affect > the base. Now, If these methods are agreed to be common enough to apply to > each table, you could hack another generator that by default extends the > base DataObject for those specific methods common to each table. > > Running the generator against 170 tables shouldn't take very long and > since > you extends the base DataObject to add additional functionality when using > it in a project. The impact should be little to nothing. > > In theory, after generating the base DataObjects script files, you should > "never" have to edit those files again. The goal is to have a "standard" > DataObject for every table. So, having to re-run the generator after > fixing > a bug in the base DataObject is required. > Also, If I modify the database table(s) adding/removing fields I would > re-run the generator on that table(s) only just to ensure I maintain the > standard base DataObject for my project. > > > > > > > On 11/19/05, Kenneth Downs wrote: >> >> I think I phrased my question badly. >> >> What I should have said was that as the complexity of your generator >> increases, and as the table count increases, running the generator >> becomes >> more and more of a delay. If the generator produced an assoc array of >> layout, you would only need to run it when layout changed, and your >> system >> would be much more flexible both in terms of development and deployment. >> >> I have a system of 170 tables and re-running the generator is just not >> an >> option when I'm trying to tweak a bug, I want to modify the code >> directly >> and see the effect. When it is fixed, it goes into the distribution tree >> and all systems using that library file are affected w/o rerunning any >> generators. >> >> > After tweaking the generator, a simple refresh of my browser allows me >> to >> > see the output of the script generated and the output from executing >> each >> > method in the DataObject. Since this refresh has the database and >> table >> > info >> > already and the assoc array - $_POST is still available. >> > >> > >> > On 11/18/05, Kenneth Downs wrote: >> >> >> >> Have you considered simply dumping out associative arrays that >> describe >> >> each table, and then having single library of code that handles them? >> >> This gives you the flexibility to see the code's efficacy in >> real-time >> >> as >> >> you work on it -- without having to run the generator for every >> little >> >> tweak -- and then having it save cached chunks of HTML as it goes. >> >> >> >> > I've developed a tool that creates a DataObject for each table I >> have >> >> in >> >> > my >> >> > MySQL database. When the script is executed against a particular >> table >> >> it >> >> > generates a script containing OO code with a number of methods >> defined >> >> by >> >> > default e.g. set_/get_ , getAll, get, insert, delete, update, and a >> >> error >> >> > method. >> >> > >> >> > It has also been fun finding ways to use the DataObjects. As a >> result, >> >> I >> >> > have put together a couple of examples; >> >> > Using a single DataObject : >> >> http://cthorn.com/oodbigen/usingdataobject.php >> >> > MVC wrapper for the DataObjects : >> >> > http://cthorn.com/oodbigen/mvcwrapper.php >> >> > >> >> > Hope someone finds this useful. Feedback welcomed.. >> >> > >> >> > Chauncey Thorn >> >> > PHP App. Developer >> >> > email: chaunceyt at gmail dot com >> >> > url: http://www.cthorn.com/ >> >> > _______________________________________________ >> >> > New York PHP Talk Mailing List >> >> > AMP Technology >> >> > Supporting Apache, MySQL and PHP >> >> > http://lists.nyphp.org/mailman/listinfo/talk >> >> > http://www.nyphp.org >> >> >> >> >> >> -- >> >> Kenneth Downs >> >> Secure Data Software >> >> 631-379-0010 >> >> ken at secdat.com >> >> PO Box 708 >> >> East Setauket, NY 11733 >> >> >> >> _______________________________________________ >> >> New York PHP Talk Mailing List >> >> AMP Technology >> >> Supporting Apache, MySQL and PHP >> >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org >> >> >> > _______________________________________________ >> > New York PHP Talk Mailing List >> > AMP Technology >> > Supporting Apache, MySQL and PHP >> > http://lists.nyphp.org/mailman/listinfo/talk >> > http://www.nyphp.org >> >> >> -- >> Kenneth Downs >> Secure Data Software >> 631-379-0010 >> ken at secdat.com >> PO Box 708 >> East Setauket, NY 11733 >> >> _______________________________________________ >> New York PHP Talk Mailing List >> AMP Technology >> Supporting Apache, MySQL and PHP >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org >> > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org -- Kenneth Downs Secure Data Software 631-379-0010 ken at secdat.com PO Box 708 East Setauket, NY 11733 From matt at jiffycomp.com Sat Nov 19 11:35:58 2005 From: matt at jiffycomp.com (Matt Morgan) Date: Sat, 19 Nov 2005 11:35:58 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437DFC05.6060909@optonline.net> References: <437DFC05.6060909@optonline.net> Message-ID: <437F546E.7080501@jiffycomp.com> Smoothwall is really excellent. There's a less powerful (but still good) free version and a fully capable, supported paid version. Or you could just use iptables, which can do anything but is a little hard to get used to. Confession: I don't know what "briding" means in this context. Donald J. Organ IV wrote: >Does anyone know of an opensource solution for a firewall that supports >multiple classes, and is a briding firewall?? And because of the higher >up authority we need a web interface to it. Right now we are using a >sonic wall and because of recent events we now need something that >supports multiple classes, this sonicwall does not. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From rotsen at gmail.com Sat Nov 19 15:19:07 2005 From: rotsen at gmail.com (Nestor) Date: Sat, 19 Nov 2005 12:19:07 -0800 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437F404A.6070007@cyberxdesigns.com> References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> <437E025B.3040203@optonline.net> <437E2918.1070606@optonline.net> <437F404A.6070007@cyberxdesigns.com> Message-ID: Most php programmers tend to have a diverse knowledge background that is why we ask other quick questions non related to PHP. I think thsi type of questions should be prefaced by the letters "OT" Other Topic. ex:OT - Open source Firewall My 2 cents Nestor :-) On 11/19/05, Hans Kaspersetz wrote: > > I am not really clear on what this has to do with PHP? Can someone fill > me in? > > HCK > > Donald J. Organ IV wrote: > > >Well kind of, basically i want the DMZ to be able to have two class C > >netmasks. > > > >Eg. Mounting to full class C's to the DMZ > > > >Alberto dos Santos wrote: > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at plexpod.com Sat Nov 19 16:19:16 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Sat, 19 Nov 2005 16:19:16 -0500 Subject: [nycphp-talk] Open Source Firewall In-Reply-To: <437F404A.6070007@cyberxdesigns.com> References: <437DFC05.6060909@optonline.net> <20051118111720.14e66712@genoverly.com> <437E025B.3040203@optonline.net> <437E2918.1070606@optonline.net> <437F404A.6070007@cyberxdesigns.com> Message-ID: <20051119211916.GD21172@desario.homelinux.net> On Sat, Nov 19, 2005 at 10:10:02AM -0500, Hans Kaspersetz wrote: > I am not really clear on what this has to do with PHP? Can someone fill > me in? Even PHP app servers need to wear protection. -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From jeff.loiselle at gmail.com Sun Nov 20 02:22:28 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Sun, 20 Nov 2005 02:22:28 -0500 Subject: [nycphp-talk] DataObjects generator In-Reply-To: <37213.38.117.147.25.1132416801.squirrel@38.117.147.25> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> <9ebd5b3c0511190753m4cbffa6ew4fb889d56effe1a6@mail.gmail.com> <37213.38.117.147.25.1132416801.squirrel@38.117.147.25> Message-ID: <4b1887110511192322k7f37bb27me434b525d3f71c01@mail.gmail.com> Have you taken a look at PEAR:DataObject? I use it regularly, and it sounds very similar to what you are trying to accomplish. From chauncey.thorn at gmail.com Sun Nov 20 09:43:21 2005 From: chauncey.thorn at gmail.com (Chauncey Thorn) Date: Sun, 20 Nov 2005 09:43:21 -0500 Subject: [nycphp-talk] DataObjects generator In-Reply-To: <4b1887110511192322k7f37bb27me434b525d3f71c01@mail.gmail.com> References: <9ebd5b3c0511181525k7f064179n505e59430240af56@mail.gmail.com> <36728.38.117.147.25.1132356951.squirrel@38.117.147.25> <9ebd5b3c0511181943k7bceb88bj9c610ccb21702697@mail.gmail.com> <36910.38.117.147.25.1132402859.squirrel@38.117.147.25> <9ebd5b3c0511190753m4cbffa6ew4fb889d56effe1a6@mail.gmail.com> <37213.38.117.147.25.1132416801.squirrel@38.117.147.25> <4b1887110511192322k7f37bb27me434b525d3f71c01@mail.gmail.com> Message-ID: <9ebd5b3c0511200643v58ec6bcdl20d27f4a61f22f17@mail.gmail.com> No, I haven't used it. But I'm aware it exist. On 11/20/05, Jeff Loiselle wrote: > > Have you taken a look at PEAR:DataObject? I use it regularly, and it > sounds very similar to what you are trying to accomplish. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leegold at fastmail.fm Mon Nov 21 09:57:30 2005 From: leegold at fastmail.fm (leegold) Date: Mon, 21 Nov 2005 09:57:30 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> Message-ID: <1132585050.1795.247997967@webmail.messagingengine.com> I'm looking for a host with PHP5 and MYSQL5 and PHPMYADMIN in the lowest price plan they would have. I don't need voice support just good email support is OK. But they have to have these up to date version... Any recommendations appreciated. Note: This is only for personal playing not any mission critical enterprise. The versions have to current as i cited above... Thanks, Lee G. From dorgan at optonline.net Mon Nov 21 10:09:18 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 21 Nov 2005 10:09:18 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: <1132585050.1795.247997967@webmail.messagingengine.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> <1132585050.1795.247997967@webmail.messagingengine.com> Message-ID: <4381E31E.5050207@optonline.net> Does it matter if its a windows box or not?? leegold wrote: >I'm looking for a host with PHP5 and MYSQL5 and PHPMYADMIN in the lowest >price plan they would have. >I don't need voice support just good email support is OK. But they have >to have these up to date version... >Any recommendations appreciated. Note: This is only for personal playing >not any mission critical enterprise. >The versions have to current as i cited above... > >Thanks, >Lee G. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From list at harveyk.com Mon Nov 21 10:30:04 2005 From: list at harveyk.com (harvey) Date: Mon, 21 Nov 2005 10:30:04 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: <1132585050.1795.247997967@webmail.messagingengine.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> <1132585050.1795.247997967@webmail.messagingengine.com> Message-ID: <6.2.5.6.2.20051121102141.02f15b10@harveyk.com> Dreamhost offers PHP 5. Looks like MySQL is 4.1.11 on one of my sites, but I guess it's possible it's upgraded on others. PhpMyAdmin is automatically installed for you when you create a db. Each account comes with unlimited mysql db's. At 09:57 AM 11/21/2005, leegold wrote: >I'm looking for a host with PHP5 and MYSQL5 and PHPMYADMIN in the lowest >price plan they would have. >I don't need voice support just good email support is OK. But they have >to have these up to date version... >Any recommendations appreciated. Note: This is only for personal playing >not any mission critical enterprise. >The versions have to current as i cited above... > >Thanks, >Lee G. >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From dorgan at optonline.net Mon Nov 21 10:28:44 2005 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 21 Nov 2005 10:28:44 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: <6.2.5.6.2.20051121102141.02f15b10@harveyk.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> <1132585050.1795.247997967@webmail.messagingengine.com> <6.2.5.6.2.20051121102141.02f15b10@harveyk.com> Message-ID: <4381E7AC.2060104@optonline.net> I can give you the number of a company I have been using they are located in Deer Park, and can probably work with you on whatever you need. http://www.saturn5net.com 631-253-3600 harvey wrote: >Dreamhost offers PHP 5. >Looks like MySQL is 4.1.11 on one of my sites, but I guess it's >possible it's upgraded on others. >PhpMyAdmin is automatically installed for you when you create a db. >Each account comes with unlimited mysql db's. > > >At 09:57 AM 11/21/2005, leegold wrote: > > > >>I'm looking for a host with PHP5 and MYSQL5 and PHPMYADMIN in the lowest >>price plan they would have. >>I don't need voice support just good email support is OK. But they have >>to have these up to date version... >>Any recommendations appreciated. Note: This is only for personal playing >>not any mission critical enterprise. >>The versions have to current as i cited above... >> >>Thanks, >>Lee G. >>_______________________________________________ >>New York PHP Talk Mailing List >>AMP Technology >>Supporting Apache, MySQL and PHP >>http://lists.nyphp.org/mailman/listinfo/talk >>http://www.nyphp.org >> >> > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > From leegold at fastmail.fm Mon Nov 21 10:47:57 2005 From: leegold at fastmail.fm (leegold) Date: Mon, 21 Nov 2005 10:47:57 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: <4381E31E.5050207@optonline.net> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> <1132585050.1795.247997967@webmail.messagingengine.com> <4381E31E.5050207@optonline.net> Message-ID: <1132588077.7052.248002512@webmail.messagingengine.com> On Mon, 21 Nov 2005 10:09:18 -0500, "Donald J. Organ IV" said: > Does it matter if its a windows box or not?? All things being equal I'd go for *NIX but please link me if you have MS based host, Thanks ... From jeff.loiselle at gmail.com Mon Nov 21 10:57:35 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 21 Nov 2005 07:57:35 -0800 Subject: [nycphp-talk] host recommendations In-Reply-To: <1132585050.1795.247997967@webmail.messagingengine.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> <1132585050.1795.247997967@webmail.messagingengine.com> Message-ID: <4b1887110511210757u74a089bapdd7af5e39ade8da5@mail.gmail.com> If you're interested in having root on your own box... I've said it before and I'll say it again.. there's ServerPronto.com. Someone on this list reccomended them to me, and they have been great. From cliff at pinestream.com Mon Nov 21 11:16:46 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 11:16:46 -0500 Subject: [nycphp-talk] host recommendations In-Reply-To: <4b1887110511210757u74a089bapdd7af5e39ade8da5@mail.gmail.com> Message-ID: <009501c5eeb6$f9d595b0$0ea8a8c0@cliff> Great prices, but a Florida data center? Electricity optional?! And why the difference between their prices and mama's http://www.infolink.com/ if its one and the same? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Loiselle Sent: Monday, November 21, 2005 10:58 AM To: NYPHP Talk Subject: Re: [nycphp-talk] host recommendations If you're interested in having root on your own box... I've said it before and I'll say it again.. there's ServerPronto.com. Someone on this list reccomended them to me, and they have been great. _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From cliff at pinestream.com Mon Nov 21 11:29:48 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 11:29:48 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submit buttons Message-ID: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> Ok, this is probably a trivial newbie questions, but here goes: For a form that has multiple rows containing identical buttons for each row, i.e. Edit row, Delete row, etc. what is your preferred scheme? I have also seen this: I have been using the first method, but #2 seems slightly easier to parse. Pundits say #2 identifies the scripting language as PHP, but how much is security by obscurity worth anyway. Comments? From danielc at analysisandsolutions.com Mon Nov 21 11:49:42 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 21 Nov 2005 11:49:42 -0500 Subject: [nycphp-talk] XML-RPC question In-Reply-To: <1131551575.20933.247132499@webmail.messagingengine.com> References: <43720870.8050103@tgaconnect.com> <1131551575.20933.247132499@webmail.messagingengine.com> Message-ID: <20051121164942.GA18318@panix.com> Hi Lee: On Wed, Nov 09, 2005 at 10:52:55AM -0500, leegold wrote: > The catch seems to be security cause all this is passed around w/http > ie. as a web-service. So my question is, what would be a way protecting > the laptop from any unauthorized outside requests eg. the laptop only > talks to the server (or an appointed box) on the local network. Funny you should ask. I just gave a presentation about this at the International PHP Conference. Unfortunately, my laptop died while I was there so I don't have slides yet. But the short story is use SSL certificates and/or PGP/GPG keys to authenticate and encrypt the data. --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 ray at lances.net Mon Nov 21 12:54:17 2005 From: ray at lances.net (Ray Lance) Date: Mon, 21 Nov 2005 12:54:17 -0500 Subject: [nycphp-talk] host recommendations References: <009501c5eeb6$f9d595b0$0ea8a8c0@cliff> Message-ID: <02b301c5eec4$98394d20$0600000a@rayl> Despite ServerPronto being largely in Ft. Lauderdale, there was not a moment's outage due to the storms this past year. ----- Original Message ----- From: "Cliff Hirsch" To: "'NYPHP Talk'" Sent: Monday, November 21, 2005 11:16 AM Subject: [work] Re: [nycphp-talk] host recommendations Great prices, but a Florida data center? Electricity optional?! And why the difference between their prices and mama's http://www.infolink.com/ if its one and the same? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Loiselle Sent: Monday, November 21, 2005 10:58 AM To: NYPHP Talk Subject: Re: [nycphp-talk] host recommendations If you're interested in having root on your own box... I've said it before and I'll say it again.. there's ServerPronto.com. Someone on this list reccomended them to me, and they have been great. _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From hertso at yahoo.com Mon Nov 21 13:51:17 2005 From: hertso at yahoo.com (hertso) Date: Mon, 21 Nov 2005 10:51:17 -0800 (PST) Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray Message-ID: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> hi try this out but it has adult content so watch yo step You are receiving this email because your friend hertso has invited you to join Onlinebootycall.com, the funniest and only singles/dating THEME site on the net. We`re making *booty call* a household phrase. Make sure you CLICK your friend's special link at the bottom so they get credit for referring you. http://www.onlinebootycall.com/r.php?ref=372140 Your friend`s username on Onlinebootycall.com is ashtray. Registration is FREE and easy. As an Onlinebootycall.com member, you can search for people who want to meet based on location and mutual attraction. Your contact info is never revealed and you only get contacted by those YOU accept on your *bootycall list* The fun is just 1 click away!!! Onlinebootycall.com, Finding pieces without the puzzle. http://www.onlinebootycall.com/r.php?ref=372140 Click here if you wish to discontinue receieving this email http://www.onlinebootycall.com/block_email1.php From codebowl at gmail.com Mon Nov 21 14:43:42 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 21 Nov 2005 14:43:42 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> References: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> Message-ID: <8d9a42800511211143n2e8075a6p427de555e15a71e6@mail.gmail.com> this is some nice spam ;) On 11/21/05, hertso wrote: > > hi try this out but it has adult content so watch yo step > > You are receiving this email because your friend hertso has invited you to > join Onlinebootycall.com , the funniest and > only singles/dating THEME site on the net. We`re making *booty call* a > household phrase. Make sure you CLICK your friend's special link at the > bottom so they get credit for referring you. > > http://www.onlinebootycall.com/r.php?ref=372140 > > Your friend`s username on Onlinebootycall.com is ashtray. Registration is FREE and easy. As an > Onlinebootycall.com member, you can search > for people who want to meet based on location and mutual attraction. Your > contact info is never revealed and you only get contacted by those YOU > accept on your *bootycall list* > > The fun is just 1 click away!!! > > Onlinebootycall.com , > Finding pieces without the puzzle. > http://www.onlinebootycall.com/r.php?ref=372140 > > Click here if you wish to discontinue receieving this email > http://www.onlinebootycall.com/block_email1.php > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From KLOPP.GEO at YAHOO.COM Mon Nov 21 15:06:29 2005 From: KLOPP.GEO at YAHOO.COM (Stefan Klopp) Date: Mon, 21 Nov 2005 12:06:29 -0800 (PST) Subject: [nycphp-talk] Friendly URL's Message-ID: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> Hello All, I wanted to get your feedback on the best (and securest) way to do friendly URL's. I currently have implemented a simple one that basically appends directories onto the end of the php file, for example: http://www.example.com/script.php/variable1/variable2/ To get the variables I am splitting on / in the $_SERVER['PATH_INFO']. This appears to work quite well for me. However the only problem I am facing now is when my page has included header information such as CSS or javascript. Since the includes are not full URL they try to find the files in: http://www.example.com/script.php/variable1/variable2/ instead of in: http://www.example.com/ Now I know I can do this via mod_rewrite but I would rather keep it all in the php. So one way I found around this was to put: $path = preg_split("/\//", $_SERVER['PATH_INFO']); $file = array_pop($path); if (preg_match("/\.(js)$/", $file)) { include($file); exit; } if (preg_match("/\.(jpg|gif|png|css)$/", $file)) { $extra_path = array_pop($path); include($extra_path . "/" .$file); exit; } Basically this just checks if the last block on the url is a file. If it is and is javascript simple include the file directly (from the current working dir). If it is a image or css file get the extra directory information then include the file. Now again this works for my current app, however I very much fear doing a dynamic include. Can anyone think of a better way to handle this? Thanks, Stefan __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From jeff.knight at gmail.com Mon Nov 21 15:10:51 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Mon, 21 Nov 2005 14:10:51 -0600 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <8d9a42800511211143n2e8075a6p427de555e15a71e6@mail.gmail.com> References: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> <8d9a42800511211143n2e8075a6p427de555e15a71e6@mail.gmail.com> Message-ID: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> please don't spam this list, I'm sure everyone on it gets plenty without your added efforts On 11/21/05, Joseph Crawford wrote: > spammed the list From codebowl at gmail.com Mon Nov 21 15:27:58 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 21 Nov 2005 15:27:58 -0500 Subject: [nycphp-talk] Friendly URL's In-Reply-To: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> References: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> Message-ID: <8d9a42800511211227x6578cf8fkc4a18def42c186d1@mail.gmail.com> wow way to go ;) however why not just use mod_rewrite for this? -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.loiselle at gmail.com Mon Nov 21 15:28:49 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 21 Nov 2005 12:28:49 -0800 Subject: [nycphp-talk] Preferred method for parsing multi-row submit buttons In-Reply-To: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> References: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> Message-ID: <4b1887110511211228t1d60945dvd3e29f605b7990ce@mail.gmail.com> Make each row its own form? From jeff.loiselle at gmail.com Mon Nov 21 15:29:56 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 21 Nov 2005 12:29:56 -0800 Subject: [nycphp-talk] host recommendations In-Reply-To: <02b301c5eec4$98394d20$0600000a@rayl> References: <009501c5eeb6$f9d595b0$0ea8a8c0@cliff> <02b301c5eec4$98394d20$0600000a@rayl> Message-ID: <4b1887110511211229g3c3e97b0g9492a7405dc2a245@mail.gmail.com> Not a single one. I can vouch for that as well. From jeff.loiselle at gmail.com Mon Nov 21 15:31:08 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 21 Nov 2005 12:31:08 -0800 Subject: [nycphp-talk] host recommendations In-Reply-To: <009501c5eeb6$f9d595b0$0ea8a8c0@cliff> References: <4b1887110511210757u74a089bapdd7af5e39ade8da5@mail.gmail.com> <009501c5eeb6$f9d595b0$0ea8a8c0@cliff> Message-ID: <4b1887110511211231x19859928ma91b68590dbd29@mail.gmail.com> > Great prices, but a Florida data center? Electricity optional?! And why > the difference between their prices and mama's http://www.infolink.com/ > if its one and the same? I think you get less support for free. But all I've ever needed was a reset, and that didnt cost anything. --- Jeff Loiselle Web Developer, Musician, and Observer http://jeff.loiselles.com From cliff at pinestream.com Mon Nov 21 15:48:54 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 15:48:54 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <4b1887110511211228t1d60945dvd3e29f605b7990ce@mail.gmail.com> Message-ID: <002f01c5eedc$fcf09c10$0ea8a8c0@cliff> Yes, I thought of that and a form per row sure would be the easiest way to go. But I want to have the flexibility to add checkboxes to each row, if required, which would facilitate global, "do action to all checked" buttons. I just do something like this: foreach($_POST as $key => $value) { if (substr($key,0,6) == "submit") { $temp = explode("_", $key); $action = $temp[1]; $row = $temp[2]; break; } } It works -- just wondering if there's a better way. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Loiselle Sent: Monday, November 21, 2005 3:29 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-row submitbuttons Make each row its own form? _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From billy.reisinger at gmail.com Mon Nov 21 16:04:37 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Mon, 21 Nov 2005 16:04:37 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <002f01c5eedc$fcf09c10$0ea8a8c0@cliff> References: <4b1887110511211228t1d60945dvd3e29f605b7990ce@mail.gmail.com> <002f01c5eedc$fcf09c10$0ea8a8c0@cliff> Message-ID: <14a0d8670511211304v51a1c08q724c3a300088487d@mail.gmail.com> You probably already thought of this, but another alternative is to have a couple of radio buttons with self-explanatory icons next to them (edit and delete) and only one submit button. On 11/21/05, Cliff Hirsch wrote: > Yes, I thought of that and a form per row sure would be the easiest way > to go. But I want to have the flexibility to add checkboxes to each row, > if required, which would facilitate global, "do action to all checked" > buttons. > > I just do something like this: > > foreach($_POST as $key => $value) { > if (substr($key,0,6) == "submit") { > $temp = explode("_", $key); > $action = $temp[1]; > $row = $temp[2]; > break; > } > } > > It works -- just wondering if there's a better way. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Jeff Loiselle > Sent: Monday, November 21, 2005 3:29 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Preferred method for parsing multi-row > submitbuttons > > Make each row its own form? > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 From danielc at analysisandsolutions.com Mon Nov 21 16:13:27 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 21 Nov 2005 16:13:27 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submit buttons In-Reply-To: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> References: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> Message-ID: <20051121211326.GA16610@panix.com> Hey Cliff: On Mon, Nov 21, 2005 at 11:29:48AM -0500, Cliff Hirsch wrote: > > Seems like this would be better as hyperlinks rather than forms. --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 KLOPP.GEO at YAHOO.COM Mon Nov 21 16:17:29 2005 From: KLOPP.GEO at YAHOO.COM (Stefan Klopp) Date: Mon, 21 Nov 2005 13:17:29 -0800 (PST) Subject: [nycphp-talk] Friendly URL's In-Reply-To: <8d9a42800511211227x6578cf8fkc4a18def42c186d1@mail.gmail.com> Message-ID: <20051121211729.89379.qmail@web32505.mail.mud.yahoo.com> Basically I wanted a solution that could work right out of the box after installing the script, without having to worry about whether mod_rewrite was installed, if they could access it via a .htaccess etc. Stefan --- Joseph Crawford wrote: > wow way to go ;) however why not just use > mod_rewrite for this? > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From danielc at analysisandsolutions.com Mon Nov 21 16:19:15 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 21 Nov 2005 16:19:15 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> References: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> <8d9a42800511211143n2e8075a6p427de555e15a71e6@mail.gmail.com> <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> Message-ID: <20051121211915.GB16610@panix.com> Hey Jeff: Joseph sure is a dope, eh? How's shit down in Texas? I was just in Amsterdam hanging out and cycling around. No, no depraved pot smokin and womanizin. What a beautiful city! --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 cliff at pinestream.com Mon Nov 21 16:26:45 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 16:26:45 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <20051121211326.GA16610@panix.com> Message-ID: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> I thought of that, and again, it sure would be much easier. But doesn't that violate the W3C recommendation for get versus post. Isn't a Hyperlink simulating a get submission, which should not be used for "actions" that modify a database. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Convissor Sent: Monday, November 21, 2005 4:13 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-row submitbuttons Hey Cliff: On Mon, Nov 21, 2005 at 11:29:48AM -0500, Cliff Hirsch wrote: > type="submit" name="submit[$row_id]" value="Del"/> Seems like this would be better as hyperlinks rather than forms. --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 Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From danielc at analysisandsolutions.com Mon Nov 21 16:31:50 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 21 Nov 2005 16:31:50 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> References: <20051121211326.GA16610@panix.com> <003801c5eee2$47dd1d20$0ea8a8c0@cliff> Message-ID: <20051121213150.GA24114@panix.com> Heya: On Mon, Nov 21, 2005 at 04:26:45PM -0500, Cliff Hirsch wrote: > that violate the W3C recommendation for get versus post. Isn't a > Hyperlink simulating a get submission, which should not be used for > "actions" that modify a database. Bah. I wouldn't interpret the difference between GET and POST that way. --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 chsnyder at gmail.com Mon Nov 21 16:37:33 2005 From: chsnyder at gmail.com (csnyder) Date: Mon, 21 Nov 2005 16:37:33 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <20051121211915.GB16610@panix.com> References: <20051121185117.8C46F4B97E@www3.onlinebootycall.com> <8d9a42800511211143n2e8075a6p427de555e15a71e6@mail.gmail.com> <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> <20051121211915.GB16610@panix.com> Message-ID: On 11/21/05, Daniel Convissor wrote: > Hey Jeff: Hmmm... hey list! > I was just in Amsterdam hanging out and cycling around. No, no depraved > pot smokin and womanizin. But... but... you'll have to go back! You're giving the rest of us a bad name. ;-) From cliff at pinestream.com Mon Nov 21 16:39:44 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 16:39:44 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: <20051121213150.GA24114@panix.com> Message-ID: <003e01c5eee4$1630ac90$0ea8a8c0@cliff> Bah he says. Comments from the peanut gallery? PHPAdmin does it the Hyperlink way and it's a mighty fine piece of software. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Convissor Sent: Monday, November 21, 2005 4:32 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons Heya: On Mon, Nov 21, 2005 at 04:26:45PM -0500, Cliff Hirsch wrote: > that violate the W3C recommendation for get versus post. Isn't a > Hyperlink simulating a get submission, which should not be used for > "actions" that modify a database. Bah. I wouldn't interpret the difference between GET and POST that way. --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 Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From krook at us.ibm.com Mon Nov 21 16:55:13 2005 From: krook at us.ibm.com (Daniel Krook) Date: Mon, 21 Nov 2005 16:55:13 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> Message-ID: > > > type="submit" name="submit[$row_id]" value="Del"/> > > Seems like this would be better as hyperlinks rather than forms. > > --Dan ... > I thought of that, and again, it sure would be much > easier. But doesn't > that violate the W3C recommendation for get versus post. Isn't a > Hyperlink simulating a get submission, which should not be used for > "actions" that modify a database. Yep, in theory GET requests should be side-effect free, so the instinct is not to use links... If only for one lesson learned the hard way... What if a spider or recursive wget hits this page (and all you have to stop the requests for the normal user are JavaScript confirms)? Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From jeff.loiselle at gmail.com Mon Nov 21 17:09:51 2005 From: jeff.loiselle at gmail.com (Jeff Loiselle) Date: Mon, 21 Nov 2005 14:09:51 -0800 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <20051121213150.GA24114@panix.com> References: <20051121211326.GA16610@panix.com> <003801c5eee2$47dd1d20$0ea8a8c0@cliff> <20051121213150.GA24114@panix.com> Message-ID: <4b1887110511211409o2ab33943x661e459292eb849d@mail.gmail.com> > Bah. I wouldn't interpret the difference between GET and POST that way. That's because you're a free-thinking rebel, Dan. ;-) From billy.reisinger at gmail.com Mon Nov 21 17:15:13 2005 From: billy.reisinger at gmail.com (billy reisinger) Date: Mon, 21 Nov 2005 17:15:13 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: References: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> Message-ID: <14a0d8670511211415n3071fe72i2f5352178cefd7d9@mail.gmail.com> I'm not sure exactly what you are trying to do, so this may not apply to you. I'll throw it out there anyway: If you have many things on one page that a user could edit or delete, it may be easier for the user if you provide them with a way of doing them all at once. In other words, use a toggle next to each item (a select widget, radio button, whatever) and have a "Edit Selected" or "Delete Selected' button at the top and bottom of the list. PHPMyAdmin does this too, and I agree, it is a great peice of software. Just a thought! Cheers -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 On 11/21/05, Daniel Krook wrote: > > > > > type="submit" name="submit[$row_id]" value="Del"/> > > > > Seems like this would be better as hyperlinks rather than forms. > > > > --Dan > ... > > I thought of that, and again, it sure would be much > > easier. But doesn't > > that violate the W3C recommendation for get versus post. Isn't a > > Hyperlink simulating a get submission, which should not be used for > > "actions" that modify a database. > > Yep, in theory GET requests should be side-effect free, so the instinct is > not to use links... If only for one lesson learned the hard way... What if > a spider or recursive wget hits this page (and all you have to stop the > requests for the normal user are JavaScript confirms)? > > > > > > > > Daniel Krook, Content Tools Developer > Global Production Services - Tools, ibm.com > > http://bluepages.redirect.webahead.ibm.com/ > http://blogpages.redirect.webahead.ibm.com/ > http://bookmarks.redirect.webahead.ibm.com/ > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From lists at zaunere.com Mon Nov 21 17:15:35 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 21 Nov 2005 17:15:35 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> Message-ID: <019701c5eee9$1975d330$6701a8c0@MZ> Jeff Knight wrote on Monday, November 21, 2005 3:11 PM: > please don't spam this list, I'm sure everyone on it gets plenty > without your added efforts Yeah, not a good post - he's been removed and banned. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From cliff at pinestream.com Mon Nov 21 17:21:44 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 17:21:44 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: <14a0d8670511211415n3071fe72i2f5352178cefd7d9@mail.gmail.com> Message-ID: <004a01c5eee9$f497d8f0$0ea8a8c0@cliff> Actually, I already do this, and use a similar UI to PHPAdmin -- checkboxes for global button actions and individual buttons for single row actions. Hard to beat it's UI, other than a lot of clutter. The difference is PHPAdmin uses Hyperlinks and I'm leaning towards submit buttons. But than again, I'm a bit of a stickler for protocol. Ok...rigid... Although, if the Action requires an authenticated user, I'm still not sure I understand where the risk is. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of billy reisinger Sent: Monday, November 21, 2005 5:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons I'm not sure exactly what you are trying to do, so this may not apply to you. I'll throw it out there anyway: If you have many things on one page that a user could edit or delete, it may be easier for the user if you provide them with a way of doing them all at once. In other words, use a toggle next to each item (a select widget, radio button, whatever) and have a "Edit Selected" or "Delete Selected' button at the top and bottom of the list. PHPMyAdmin does this too, and I agree, it is a great peice of software. Just a thought! Cheers -- Billy Reisinger billy.reisinger at gmail.com 410.736.0148 On 11/21/05, Daniel Krook wrote: > > > > > type="submit" name="submit[$row_id]" value="Del"/> > > > > Seems like this would be better as hyperlinks rather than forms. > > > > --Dan > ... > > I thought of that, and again, it sure would be much > > easier. But doesn't > > that violate the W3C recommendation for get versus post. Isn't a > > Hyperlink simulating a get submission, which should not be used for > > "actions" that modify a database. > > Yep, in theory GET requests should be side-effect free, so the > instinct is not to use links... If only for one lesson learned the > hard way... What if a spider or recursive wget hits this page (and all > you have to stop the requests for the normal user are JavaScript > confirms)? > > > > > > > > Daniel Krook, Content Tools Developer > Global Production Services - Tools, ibm.com > > http://bluepages.redirect.webahead.ibm.com/ > http://blogpages.redirect.webahead.ibm.com/ > http://bookmarks.redirect.webahead.ibm.com/ > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From krook at us.ibm.com Mon Nov 21 17:26:20 2005 From: krook at us.ibm.com (Daniel Krook) Date: Mon, 21 Nov 2005 17:26:20 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: <004a01c5eee9$f497d8f0$0ea8a8c0@cliff> Message-ID: > Although, if the Action requires an authenticated user, > I'm still not > sure I understand where the risk is. Cliff, You are right that the spider/wget risk is somewhat mitigated if you have a protected page, but that still leaves open the URL being saved in the browser history, or even bookmarked. Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From krook at us.ibm.com Mon Nov 21 17:30:20 2005 From: krook at us.ibm.com (Daniel Krook) Date: Mon, 21 Nov 2005 17:30:20 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: Message-ID: > > Although, if the Action requires an authenticated user, > > I'm still not > > sure I understand where the risk is. > > Cliff, > > You are right that the spider/wget risk is somewhat > mitigated if you have > a protected page, but that still leaves open the URL being > saved in the > browser history, or even bookmarked. Actually, now that I think about it again... if you had a link to a delete page with an id, and you'd clicked it already (putting it in the browser history) a second click to the same delete page with that id wouldn't (in theory) have an effect. In any case, going from POST to GET opens up a lot of these minor things to think about :) Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ From jeff.knight at gmail.com Mon Nov 21 17:32:54 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Mon, 21 Nov 2005 16:32:54 -0600 Subject: [nycphp-talk] Preferred method for parsing multi-row submit buttons In-Reply-To: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> References: <009b01c5eeb8$ca9eb900$0ea8a8c0@cliff> Message-ID: <2ca9ba910511211432j66012751h9cc07c434109cb54@mail.gmail.com> On 11/21/05, Cliff Hirsch wrote: > I have also seen this: > > > Pundits say #2 identifies the scripting language as PHP, but how > much is security by obscurity worth anyway. In this case, the Pundits you are listening to are dead wrong, Using brackets to name form elements does not identify the language as php, as the same structure could be used by PHP, ASP, mod_perl, cgi or even just javascript in an html file. From cliff at pinestream.com Mon Nov 21 17:37:20 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 17:37:20 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: Message-ID: <004b01c5eeec$223a5d30$0ea8a8c0@cliff> That's what I figured. I'll stick with POST. Than I only have to worry about impatient users with overly active button pushing tendencies. And what if it the link was an update, not a delete -- like a status change. An old bookmarked link might change a status that has been updated subsequently to a different status. It means more state information needs to be saved to prevent these issues. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Krook Sent: Monday, November 21, 2005 5:30 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons > > Although, if the Action requires an authenticated user, > > I'm still not > > sure I understand where the risk is. > > Cliff, > > You are right that the spider/wget risk is somewhat > mitigated if you have > a protected page, but that still leaves open the URL being > saved in the > browser history, or even bookmarked. Actually, now that I think about it again... if you had a link to a delete page with an id, and you'd clicked it already (putting it in the browser history) a second click to the same delete page with that id wouldn't (in theory) have an effect. In any case, going from POST to GET opens up a lot of these minor things to think about :) Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com http://bluepages.redirect.webahead.ibm.com/ http://blogpages.redirect.webahead.ibm.com/ http://bookmarks.redirect.webahead.ibm.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From ashaw at polymerdb.org Mon Nov 21 17:38:01 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 21 Nov 2005 16:38:01 -0600 Subject: [nycphp-talk] enforcing Latin-1 input Message-ID: <43824C49.6080302@polymerdb.org> Hi Folks, I have an app that should be storing input only in Latin-1 characters, but which will probably be used by English-speaking individuals in Asia, Middle East, and other locales. I expect that some of those people will sometimes type input in their own local character set, but I really do not want to store information that I won't even be able to read later. I've been reading around and have gotten more of an understanding of this issue lately, but still don't understand enough to filter user input to be sure it's in the Latin-1 character set. I tried using "accept-charset" attribute in
          tag, and I also thought that at least MySQL would mangle input that's not Latin-1 on this database having a charset value of "Latin-1", but darnit, mysql is too good for me and stores and retrieves Korean and Japanese text without a hitch. Naturally mangled input is not what I want, so I guess it's okay that mysql didn't destroy the data. :o) What I really want is that if $_POST['usertext'] == ???????????? [wow, how does that look in your mail reader?] then the app will know it and tell the user "please enter only characters in the Latin-1 set". As usual, I'm sure I'm just not getting something basic here. Is this even possible? -- Allen Shaw Polymer (http://polymerdb.org) From cliff at pinestream.com Mon Nov 21 17:39:26 2005 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 21 Nov 2005 17:39:26 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <2ca9ba910511211432j66012751h9cc07c434109cb54@mail.gmail.com> Message-ID: <004c01c5eeec$6d4b6f80$0ea8a8c0@cliff> Humm, so much for trusting the user contributed notes at http://www.php.net/manual/en/language.variables.external.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Knight Sent: Monday, November 21, 2005 5:33 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Preferred method for parsing multi-row submitbuttons On 11/21/05, Cliff Hirsch wrote: > I have also seen this: > type="submit" name="submit[$row_id]" value="Del"/> > Pundits say #2 identifies the scripting language as PHP, but how > much is security by obscurity worth anyway. In this case, the Pundits you are listening to are dead wrong, Using brackets to name form elements does not identify the language as php, as the same structure could be used by PHP, ASP, mod_perl, cgi or even just javascript in an html file. _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From ashaw at polymerdb.org Mon Nov 21 17:42:53 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Mon, 21 Nov 2005 16:42:53 -0600 Subject: [nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons In-Reply-To: <004b01c5eeec$223a5d30$0ea8a8c0@cliff> References: <004b01c5eeec$223a5d30$0ea8a8c0@cliff> Message-ID: <43824D6D.6060703@polymerdb.org> Cliff Hirsch wrote: > That's what I figured. I'll stick with POST. Than I only have to worry > about impatient users with overly active button pushing tendencies. > > And what if it the link was an update, not a delete -- like a status > change. An old bookmarked link might change a status that has been > updated subsequently to a different status. It means more state > information needs to be saved to prevent these issues. Often what I do here is have the script write a variable with a unique key into the form/URL, and on submission, store the key and/or see if it's been used before. If it's been used before, the "update" action gets skipped, and just the page is displayed. For pages that depend on the output of the update query then you don't get exactly the same page, but you can code around that. But this way I don't have to worry about even something like a page reload doing weird things to my data. -- Allen Shaw Polymer (http://polymerdb.org) From shiflett at php.net Mon Nov 21 21:23:18 2005 From: shiflett at php.net (Chris Shiflett) Date: Mon, 21 Nov 2005 21:23:18 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> References: <003801c5eee2$47dd1d20$0ea8a8c0@cliff> Message-ID: <43828116.9000705@php.net> Cliff Hirsch wrote: > I thought of that, and again, it sure would be much easier. But > doesn't that violate the W3C recommendation for get versus post. > Isn't a Hyperlink simulating a get submission, which should not > be used for "actions" that modify a database. That's my interpretation. Section 9.1.1 of RFC 2616: "In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested." Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From mitch.pirtle at gmail.com Mon Nov 21 22:26:39 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 21 Nov 2005 22:26:39 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <019701c5eee9$1975d330$6701a8c0@MZ> References: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com> <019701c5eee9$1975d330$6701a8c0@MZ> Message-ID: <330532b60511211926k1404ab8bgd9596da277e61d14@mail.gmail.com> On 11/21/05, Hans Zaunere wrote: > > Jeff Knight wrote on Monday, November 21, 2005 3:11 PM: > > please don't spam this list, I'm sure everyone on it gets plenty > > without your added efforts > > Yeah, not a good post - he's been removed and banned. Well at least he didn't try to sell me on getting my breasts enlarged, in Russian. -- Mitch, thinking about breast *reduction* at his age From Consult at CovenantEDesign.com Mon Nov 21 22:31:47 2005 From: Consult at CovenantEDesign.com (CED) Date: Mon, 21 Nov 2005 22:31:47 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray References: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com><019701c5eee9$1975d330$6701a8c0@MZ> <330532b60511211926k1404ab8bgd9596da277e61d14@mail.gmail.com> Message-ID: <000a01c5ef15$44ec84b0$1519a8c0@ced> lol And I was haggled a few weeks back for pointing out 'bitch' in a piece of spam...hrmmm lol ----- Original Message ----- From: "Mitch Pirtle" To: "NYPHP Talk" Sent: Monday, November 21, 2005 10:26 PM Subject: Re: [nycphp-talk] Invitation from your friend hertso aka ashtray On 11/21/05, Hans Zaunere wrote: > > Jeff Knight wrote on Monday, November 21, 2005 3:11 PM: > > please don't spam this list, I'm sure everyone on it gets plenty > > without your added efforts > > Yeah, not a good post - he's been removed and banned. Well at least he didn't try to sell me on getting my breasts enlarged, in Russian. -- Mitch, thinking about breast *reduction* at his age _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From Consult at CovenantEDesign.com Mon Nov 21 22:34:15 2005 From: Consult at CovenantEDesign.com (CED) Date: Mon, 21 Nov 2005 22:34:15 -0500 Subject: [nycphp-talk] LAMP References: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com><019701c5eee9$1975d330$6701a8c0@MZ> <330532b60511211926k1404ab8bgd9596da277e61d14@mail.gmail.com> Message-ID: <000e01c5ef15$9d06fe00$1519a8c0@ced> Does anyone know of a simple how-to LAMP installation guide for SUSE... I have access to the LAMP book "Making them play well together..." or something to that effect. But a co-worker is setting up two servers, and I really don't think she'll have time to wade through it. Last I knew, I thought SUSE came bundled with MySQL and PHP 4? Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: "Mitch Pirtle" To: "NYPHP Talk" Sent: Monday, November 21, 2005 10:26 PM Subject: Re: [nycphp-talk] Invitation from your friend hertso aka ashtray On 11/21/05, Hans Zaunere wrote: > > Jeff Knight wrote on Monday, November 21, 2005 3:11 PM: > > please don't spam this list, I'm sure everyone on it gets plenty > > without your added efforts > > Yeah, not a good post - he's been removed and banned. Well at least he didn't try to sell me on getting my breasts enlarged, in Russian. -- Mitch, thinking about breast *reduction* at his age _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From lists at zaunere.com Mon Nov 21 22:42:17 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 21 Nov 2005 22:42:17 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <43828116.9000705@php.net> Message-ID: <01bd01c5ef16$bce2db30$6701a8c0@MZ> Chris Shiflett wrote on Monday, November 21, 2005 9:23 PM: > Cliff Hirsch wrote: > > I thought of that, and again, it sure would be much easier. But > > doesn't that violate the W3C recommendation for get versus post. > > Isn't a Hyperlink simulating a get submission, which should not > > be used for "actions" that modify a database. > > That's my interpretation. Section 9.1.1 of RFC 2616: > > "In particular, the convention has been established that the GET and > HEAD methods SHOULD NOT have the significance of taking an action other > than retrieval. These methods ought to be considered "safe". This allows > user agents to represent other methods, such as POST, PUT and DELETE, in > a special way, so that the user is made aware of the fact that a > possibly unsafe action is being requested." But this certainly shouldn't be considered a real practice. For example, a GET comes in and I update a session - via a database let's say. While RFCs are good academically, that's how security holes are born. Let's not examine the SHOULD or SHOULD NOTs in the TCP or IP RFCs :) --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From shiflett at php.net Mon Nov 21 23:05:21 2005 From: shiflett at php.net (Chris Shiflett) Date: Mon, 21 Nov 2005 23:05:21 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <01bd01c5ef16$bce2db30$6701a8c0@MZ> References: <01bd01c5ef16$bce2db30$6701a8c0@MZ> Message-ID: <43829901.60202@php.net> Hans Zaunere wrote: > But this certainly shouldn't be considered a real practice. HTTP isn't something to violate on a whim, and adhering to it is a real practice. > While RFCs are good academically, that's how security holes > are born. Care to substantiate that? Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From jellicle at gmail.com Mon Nov 21 23:18:21 2005 From: jellicle at gmail.com (Michael Sims) Date: Mon, 21 Nov 2005 23:18:21 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <01bd01c5ef16$bce2db30$6701a8c0@MZ> References: <01bd01c5ef16$bce2db30$6701a8c0@MZ> Message-ID: <200511212318.21564.jellicle@gmail.com> While the RFC's are all well and good, the real reason for not deleting items from your database via a simple hyperlink click is that sooner or later, one of your users is going to install a Firefox extension that promises to speed up web-browsing by pre-caching everything. They're going to visit your page with that extension installed, and the Firefox extension is going to delete their whole database by auto-loading all the page links. And who are they going to blame? You. Yes. You can see it, can't you? The client calling in apoplectic rage? The sinking feeling in your stomach? That's why you "make things happen" with POST instead of GET wherever possible... Michael Sims From 1j0lkq002 at sneakemail.com Mon Nov 21 12:43:03 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 21 Nov 2005 09:43:03 -0800 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <000a01c5ef15$44ec84b0$1519a8c0@ced> References: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com><019701c5eee9$1975d330$6701a8c0@MZ> <330532b60511211926k1404ab8bgd9596da277e61d14@mail.gmail.com> <000a01c5ef15$44ec84b0$1519a8c0@ced> Message-ID: <24357-47439@sneakemail.com> CED Consult-at-CovenantEDesign.com |nyphp dev/internal group use| wrote: >lol > >And I was haggled a few weeks back for pointing out 'bitch' in a piece of >spam...hrmmm > >lol > > > From mikko.rantalainen at peda.net Tue Nov 22 05:19:55 2005 From: mikko.rantalainen at peda.net (Mikko Rantalainen) Date: Tue, 22 Nov 2005 12:19:55 +0200 Subject: [nycphp-talk] enforcing Latin-1 input In-Reply-To: <43824C49.6080302@polymerdb.org> References: <43824C49.6080302@polymerdb.org> Message-ID: <4382F0CB.8080909@peda.net> Allen Shaw wrote: > I have an app that should be storing input only in Latin-1 characters, > but which will probably be used by English-speaking individuals in Asia, > Middle East, and other locales. I expect that some of those people will > sometimes type input in their own local character set, but I really do > not want to store information that I won't even be able to read later. > > I've been reading around and have gotten more of an understanding of > this issue lately, but still don't understand enough to filter user > input to be sure it's in the Latin-1 character set. I tried using > "accept-charset" attribute in tag, and I also thought that at > least MySQL would mangle input that's not Latin-1 on this database > having a charset value of "Latin-1", but darnit, mysql is too good for > me and stores and retrieves Korean and Japanese text without a hitch. The problem is that you cannot accurately identify different 8 bit encodings from each other. Latin-1 (iso-8859-1) and Latin-9 (iso-8859-15) text may contain identical byte sequences and still different content so you have no way to know which one user intended to use. Some 8 bit encodings have different *probabilities* for different byte sequences and you could make an educated guess which encoding the user agent really used. That would still be just a guess. The way I do it is that I send the html with UTF-8 encoding (I also have in case some user agent supports that, most user agents just use the same encoding the page with the form used) and I check that the user input is valid UTF-8 byte sequence. If the user input isn't a valid UTF-8 sequence then I just take it as a fact that the real encoding is iso-8859-1 and I blindly convert from iso-8859-1 to UTF-8 -- I've yet to see an user agent which does support different encodings AND doesn't support UTF-8 AND defaults to any other charset but iso-8859-1. So far, this has worked perfectly. Or should I say, almost correctly... I'm pretty sure that some windows user agents send incorrect unicode characters that are technically correctly encoded as UTF-8. I believe that those invalid characters are meant to represent code points from windows-1252 character set and user agent doesn't correctly translate from windows-1252 to UTF-8. Expect to see such input if user, for example, copies text containing "smart quotes" from MS Word to text area. > Naturally mangled input is not what I want, so I guess it's okay that > mysql didn't destroy the data. :o) What I really want is that if > $_POST['usertext'] == ???????????? [wow, how does that look > in your mail reader?] then the app will know it and tell the user > "please enter only characters in the Latin-1 set". Those japanese characters work just fine because your mail used UTF-8 encoding. -- Mikko From tgales at tgaconnect.com Tue Nov 22 06:54:34 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 22 Nov 2005 06:54:34 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <43829901.60202@php.net> References: <01bd01c5ef16$bce2db30$6701a8c0@MZ> <43829901.60202@php.net> Message-ID: <438306FA.5000507@tgaconnect.com> Chris Shiflett writes: > Hans Zaunere wrote: >> But this certainly shouldn't be considered a real practice. > > HTTP isn't something to violate on a whim, and adhering to it is a real > practice. If you're using a 'personal' hypertext preprocessor with 'my' sql on a private intranet, you can do it the 'My'crock-software way. cf: Does Microsoft Care About Web Standards? http://www.alttags.org/archives/2004/04/29/33/ It does seem, that Microsoft, early on at least, took a rather cavalier attitude of "rules. what rules? we can make our own rules..." when creating their Internet products. The result is a BWOT (big waste of time) when getting entangled in things like cross-browser support. (I won't even go into Active-X, the cousin of Direct-X whose icon is strikingly similar to the radioactive waste symbol -- but here's a hint: 'security nightmare') -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com "Rules are mostly made to be broken and are too often for the lazy to hide behind." -- Gen. Douglas Macarthur (and possibly Bill Gates) From Consult at CovenantEDesign.com Tue Nov 22 07:36:09 2005 From: Consult at CovenantEDesign.com (CED) Date: Tue, 22 Nov 2005 07:36:09 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray References: <2ca9ba910511211210k517784cfi4423b6415973bbcf@mail.gmail.com><019701c5eee9$1975d330$6701a8c0@MZ> <330532b60511211926k1404ab8bgd9596da277e61d14@mail.gmail.com><000a01c5ef15$44ec84b0$1519a8c0@ced> <24357-47439@sneakemail.com> Message-ID: <001901c5ef61$51459cf0$1519a8c0@ced> I'm afraid you're confused. ----- Original Message ----- From: "inforequest" <1j0lkq002 at sneakemail.com> To: Sent: Monday, November 21, 2005 12:43 PM Subject: Re: [nycphp-talk] Invitation from your friend hertso aka ashtray CED Consult-at-CovenantEDesign.com |nyphp dev/internal group use| wrote: >lol > >And I was haggled a few weeks back for pointing out 'bitch' in a piece of >spam...hrmmm > >lol > > > _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From lists at zaunere.com Tue Nov 22 11:02:40 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Nov 2005 11:02:40 -0500 Subject: [nycphp-talk] Invitation from your friend hertso aka ashtray In-Reply-To: <001901c5ef61$51459cf0$1519a8c0@ced> Message-ID: <007201c5ef7e$2b20ba10$6701a8c0@MZ> Let's not continue a thread that started as spam. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com CED wrote on Tuesday, November 22, 2005 7:36 AM: > I'm afraid you're confused. > > > ----- Original Message ----- > From: "inforequest" <1j0lkq002 at sneakemail.com> > To: > Sent: Monday, November 21, 2005 12:43 PM > Subject: Re: [nycphp-talk] Invitation from your friend hertso aka ashtray > > > CED Consult-at-CovenantEDesign.com |nyphp dev/internal group use| wrote: > > > lol > > > > And I was haggled a few weeks back for pointing out 'bitch' in a piece > > of spam...hrmmm > > > > lol > > > > > > > the hagglers, deleted before being submitted as a reply> > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From chsnyder at gmail.com Tue Nov 22 11:18:46 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 22 Nov 2005 11:18:46 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <200511212318.21564.jellicle@gmail.com> References: <01bd01c5ef16$bce2db30$6701a8c0@MZ> <200511212318.21564.jellicle@gmail.com> Message-ID: On 11/21/05, Michael Sims wrote: > > While the RFC's are all well and good, the real reason for not deleting > items from your database via a simple hyperlink click is that sooner or > later, one of your users is going to install a Firefox extension that > promises to speed up web-browsing by pre-caching everything. They're > going to visit your page with that extension installed, and the Firefox > extension is going to delete their whole database by auto-loading all the > page links. And who are they going to blame? You. Yes. You can see it, > can't you? The client calling in apoplectic rage? The sinking feeling in > your stomach? > > That's why you "make things happen" with POST instead of GET wherever > possible... > > Michael Sims Exactly. And I'm sure it's already been pointed out that some loser could post an image on a website somewhere whose src attribute is a URL that includes the GET vars needed to modify data in your app. There's a million scenarios (some more likely than others, of course) in which allowing *important* changes to data based on GET is a really bad idea. Not that you can't trick someone into inadvertantly POSTing data (as with a search form) but at least the user has to take some action for this to happen. -- Chris Snyder http://chxo.com/ From lists at zaunere.com Tue Nov 22 11:27:11 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Nov 2005 11:27:11 -0500 Subject: [nycphp-talk] Preferred method for parsingmulti-row submitbuttons In-Reply-To: <43829901.60202@php.net> Message-ID: <007d01c5ef81$9825c940$6701a8c0@MZ> Chris Shiflett wrote on Monday, November 21, 2005 11:05 PM: > Hans Zaunere wrote: > > But this certainly shouldn't be considered a real practice. > > HTTP isn't something to violate on a whim, and adhering to it is a real > practice. Standards are important, and vital to the internet. But RFCs aren't perfect, and knowing when the real-world comes into play, is just as vital. > > While RFCs are good academically, that's how security holes > > are born. > > Care to substantiate that? Sure - A search for rfc exploit brings up a lot, but here's actually an RFC that explains just such a thing. There are a number of exploits listed, but section 3, Tiny Fragment Attack is: --- STD 5, RFC 791 states: Every internet module must be able to forward a datagram of 68 octets without further fragmentation. This is because an internet header may be up to 60 octets, and the minimum fragment is 8 octets. Note that, for the purpose of security, it is not sufficient to merely guarantee that a fragment contains at least 8 octets of data beyond the IP header because important transport header information (e.g., the CODE field of the TCP header) might be beyond the 8th data octet. --- Here RFC 791, which in fact has been elevated to standard status, is cited as not sufficiently describing behavior for the purpose of security. And, perhaps one of the most famous, which proved exploitable by a combination of implementation issues and assumptions about what people would do with a protocol. http://damaged.crontab.org/pub-dir/texts/s/sequence_attacks.txt So not to get philosophical, but adhereing to a standard without considering undocumented "what if" scenarios, is exactly what hacking and security is all about. People will bend the standards, and to keep yourself protected, you need to bend them beforehand. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From glenn310b at mac.com Tue Nov 22 12:45:42 2005 From: glenn310b at mac.com (Glenn) Date: Tue, 22 Nov 2005 12:45:42 -0500 Subject: [nycphp-talk] Preferred method for parsing multi-row submitbuttons In-Reply-To: <002f01c5eedc$fcf09c10$0ea8a8c0@cliff> References: <002f01c5eedc$fcf09c10$0ea8a8c0@cliff> Message-ID: <5b04e281cb391082491760ec36f434bd@mac.com> How about encoding all form widgets with form_row info, including an action widget/s for each row. (a select with an "Ignore" or "Skip" option selected by default works for me). You can encode the widget names to allow grouping by table_row_action, pretty much anything. Explode each widget key and set up a multidimensional associative array. One submit button will process the whole form. If it's a dynamic form, create a unique name for it and create a plain text tmp file using the form name. Write copies of your auto-generated form widget names to the tmp file. As someone else said, if the tmp file doesn't exist when the form is submitted, then the form has already been processed. When you process the form, compare the widget names from the form to the widget names in the tmp file. If they don't match exactly, it's a form error. Of course all the usual validation needs to be done as well... After the form is processed, delete the tmp file. Glenn On Nov 21, 2005, at 3:48 PM, Cliff Hirsch wrote: > Yes, I thought of that and a form per row sure would be the easiest way > to go. But I want to have the flexibility to add checkboxes to each > row, > if required, which would facilitate global, "do action to all checked" > buttons. > > I just do something like this: > > foreach($_POST as $key => $value) { > if (substr($key,0,6) == "submit") { > $temp = explode("_", $key); > $action = $temp[1]; > $row = $temp[2]; > break; > } > } > > It works -- just wondering if there's a better way. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Jeff Loiselle > Sent: Monday, November 21, 2005 3:29 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Preferred method for parsing multi-row > submitbuttons > > Make each row its own form? > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From ashaw at polymerdb.org Tue Nov 22 13:57:25 2005 From: ashaw at polymerdb.org (Allen Shaw) Date: Tue, 22 Nov 2005 12:57:25 -0600 Subject: [nycphp-talk] enforcing Latin-1 input In-Reply-To: <4382F0CB.8080909@peda.net> References: <43824C49.6080302@polymerdb.org> <4382F0CB.8080909@peda.net> Message-ID: <43836A15.7030806@polymerdb.org> Mikko Rantalainen wrote: > The problem is that you cannot accurately identify different 8 bit > encodings from each other. Latin-1 (iso-8859-1) and Latin-9 > (iso-8859-15) text may contain identical byte sequences and still > different content so you have no way to know which one user intended > to use. > Some 8 bit encodings have different *probabilities* for different > byte sequences and you could make an educated guess which encoding > the user agent really used. That would still be just a guess. > > The way I do it is that I send the html with UTF-8 encoding (I also > have in case some user agent > supports that, most user agents just use the same encoding the page > with the form used) and I check that the user input is valid UTF-8 > byte sequence. [snip...] I'm very curious how you test this. Also, I'm continuing to read more on all of this (and cripes, there's a lot to read...), but just so I don't lose momentum here, I want to ask what you think of this half-baked idea: A form on a document with iso-8859-1 encoding will apparently (according to a few quick tests) encode its user input into Latin-1 also. If I put something else in there, say that Japanese string I gave you, it gets encoded into "大阪市浪速区のマ ンション" So, if I can find user input matching a regex pattern like '&#\d+;', I know the user is either intentionally typing HTML numeric entities into my form, or trying to enter some non-Latin-1 characters. Of course, what to do with that information is an app-level question, but the question here is: is this really a valid test, or will I be getting false positives and false negatives? Any thoughts? -- Allen Shaw Polymer (http://polymerdb.org) From lists at zaunere.com Tue Nov 22 15:00:49 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Nov 2005 15:00:49 -0500 Subject: [nycphp-talk] Friendly URL's In-Reply-To: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> Message-ID: <00c601c5ef9f$7074f9c0$6701a8c0@MZ> Stefan Klopp wrote on Monday, November 21, 2005 3:06 PM: > Hello All, > > I wanted to get your feedback on the best (and > securest) way to do friendly URL's. I currently have > implemented a simple one that basically appends > directories onto the end of the php file, for example: > > http://www.example.com/script.php/variable1/variable2/ > > To get the variables I am splitting on / in the > $_SERVER['PATH_INFO']. This appears to work quite well > for me. However the only problem I am facing now is > when my page has included header information such as > CSS or javascript. Since the includes are not full URL > they try to find the files in: > > http://www.example.com/script.php/variable1/variable2/ > > instead of in: > > http://www.example.com/ > > Now I know I can do this via mod_rewrite but I would > rather keep it all in the php. So one way I found > around this was to put: > > $path = preg_split("/\//", > $_SERVER['PATH_INFO']); > $file = array_pop($path); > if (preg_match("/\.(js)$/", $file)) { > include($file); > exit; > } > if (preg_match("/\.(jpg|gif|png|css)$/", > $file)) { > $extra_path = array_pop($path); > include($extra_path . "/" .$file); > exit; > } > > Basically this just checks if the last block on the > url is a file. If it is and is javascript simple > include the file directly (from the current working > dir). If it is a image or css file get the extra > directory information then include the file. > > Now again this works for my current app, however I > very much fear doing a dynamic include. Can anyone > think of a better way to handle this? This is always an interesting problem; the filesystem/URL relationship. So far, there are a few of ways to handle this, most of which you've mentioned: -- mod_rewrite -- "fusebox" everything through index.php and *carefully* parse PATH_INFO -- catch 404 errors and handle accordingly (either through include/require or redirect) -- create ghost directories with a single index.php that knows what to do for that request Non of which are very elegant IMO. The main problem is that PHP can't reach far enough up into Apache's request stages to truly deal with non-existent filesystem paths. AFAIK, both Python and Perl can. There's another option, apache_hooks, that does allow the same level of Apache/PHP interaction as lets say Apache/mod_perl. However, development seems to have stalled, and it's still in a very experimental stage from what I hear. One day, perhaps, we can get it back into action again :) --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Tue Nov 22 17:01:13 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Nov 2005 17:01:13 -0500 Subject: [nycphp-talk] OT: Go Yahoo! Message-ID: <010e01c5efb0$41e841f0$6701a8c0@MZ> It seems that Google is getting all the glory for high-tech and innovative sites, including strong AJAX technology. But I just came across http://farechase.yahoo.com/, which truly makes some of these technologies useful. The use of AJAX and rich client-side browser based applications takes the site to the next level for travel searching. +1 Yahoo! in my opinion for delivering something useful, and steering clear of fluffy map and email launches. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From codebowl at gmail.com Tue Nov 22 17:05:00 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 22 Nov 2005 17:05:00 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <010e01c5efb0$41e841f0$6701a8c0@MZ> References: <010e01c5efb0$41e841f0$6701a8c0@MZ> Message-ID: <8d9a42800511221405g7b521ff1na1aca28d43bb3bbe@mail.gmail.com> I agree +1 Yahoo ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Tue Nov 22 17:14:28 2005 From: shiflett at php.net (Chris Shiflett) Date: Tue, 22 Nov 2005 17:14:28 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <010e01c5efb0$41e841f0$6701a8c0@MZ> References: <010e01c5efb0$41e841f0$6701a8c0@MZ> Message-ID: <43839844.5080602@php.net> Hans Zaunere wrote: > I just came across http://farechase.yahoo.com/, which truly makes some > of these technologies useful. At first glance, this looks like a clone of kayak.com. What I find really interesting about kayak.com is that it has .jsp in the URL and doesn't suck. That's a big testament to the usefulness of Ajax - if your server-side technologies suck, do more on the client. :-) (All direspect shown toward Java is just for fun.) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ From Consult at CovenantEDesign.com Tue Nov 22 17:19:16 2005 From: Consult at CovenantEDesign.com (CED) Date: Tue, 22 Nov 2005 17:19:16 -0500 Subject: [nycphp-talk] OT: Go Yahoo! References: <010e01c5efb0$41e841f0$6701a8c0@MZ> <43839844.5080602@php.net> Message-ID: <000a01c5efb2$c7347c50$1519a8c0@ced> Ironicly Chris, .jsp in the URL really means nothing. lol. Especially on a PHP forum where most people are Apache-Directive-Dorks, and know that any extension can and does exist. Infact, I recall compiling Apache to run with a .asp extension as PHP code, just for the insult. =D Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Tuesday, November 22, 2005 5:14 PM Subject: Re: [nycphp-talk] OT: Go Yahoo! Hans Zaunere wrote: > I just came across http://farechase.yahoo.com/, which truly makes some > of these technologies useful. At first glance, this looks like a clone of kayak.com. What I find really interesting about kayak.com is that it has .jsp in the URL and doesn't suck. That's a big testament to the usefulness of Ajax - if your server-side technologies suck, do more on the client. :-) (All direspect shown toward Java is just for fun.) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From lists at zaunere.com Tue Nov 22 17:25:06 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Nov 2005 17:25:06 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <000a01c5efb2$c7347c50$1519a8c0@ced> Message-ID: <012501c5efb3$9838a240$6701a8c0@MZ> > extension can and does exist. Infact, I recall compiling Apache to run > with a .asp extension as PHP code, just for the insult. =D We took advantage of this when we launched, albeit for a day only, New York ASP http://lists.nyphp.org/pipermail/talk/2003-April/002941.html Unfortunately, the site itself still doesn't live anywhere (I don't think) so it's only a happy April memory now :) --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From matt at jobsforge.com Tue Nov 22 17:59:39 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Tue, 22 Nov 2005 17:59:39 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <000a01c5efb2$c7347c50$1519a8c0@ced> References: <010e01c5efb0$41e841f0$6701a8c0@MZ> <43839844.5080602@php.net> <000a01c5efb2$c7347c50$1519a8c0@ced> Message-ID: On Nov 22, 2005, at 5:19 PM, CED wrote: > Ironicly Chris, .jsp in the URL really means nothing. lol. Especially > on a > PHP forum where most people are Apache-Directive-Dorks, and know that > any > extension can and does exist. Okay, all Enterprise Java Web apps come out of the closet, we know you're really running PHP. From codebowl at gmail.com Tue Nov 22 20:19:02 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 22 Nov 2005 20:19:02 -0500 Subject: [nycphp-talk] Curl & Traversing Pages Message-ID: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Hello Everyone, let me explain a bit what i am trying to do. I have a script that will grab the first page which i specify from a URL such as http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=0 now when it grabs this page, it will scour the returned HTML and grab all the information for each record under Yellow Page Listings. once it has all records it then checks to see if there is a Next page, basically Next will either be a link or not. If it is a link the script will execute using the URL from the Next Link. Here's where i am running into problems. I want to feed it 1 url and have it go through every page until there is not a next page. The issue i am having is that with the url grabbed from the link, curl fetches the page, but it's not the page expected rather it's an error page from superpages stating that i have not supplied enough search criteria. On the first page grabbed, this is the link that is grabbed from the source http://yellowpages.superpages.com/listings.jsp?PS=45&PP=L&CB=1&L=VT&CID=00000518939&paging=1&F=1&OO=1&PI=45 Now when curl grabs that url it complains about search criteria however if you paste that to a browser it will work just fine. here is a screenshot of the page that is returned by cURL http://codebowl.dontexist.net/images/ypresult.jpg I am not sure what is going on with this but if anyone here can lend a hand with curl i would appreciate it. I have the cookie directory writable by apache also as i read you had to specify the exact path to the cookie on windows using apache 2 Here is my code http://codebowl.dontexist.net/codebowl/System/Misc/Curl.phps http://codebowl.dontexist.net/codebowl/System/Misc/YellowPages.phps Note that i created a curl class because i am thinking of expanding on what i have and the framework i am working on is going to be 100% Object Oriented. Any help is appreciated. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com From dallas.devries at gmail.com Tue Nov 22 20:50:51 2005 From: dallas.devries at gmail.com (Dallas DeVries) Date: Tue, 22 Nov 2005 20:50:51 -0500 Subject: [nycphp-talk] Curl & Traversing Pages In-Reply-To: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> References: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Message-ID: <1200dbac0511221750u2314160eyec2986b1c5dc13f2@mail.gmail.com> I see you have commented out, I think these are key for this to work for you use these to allow cookies that get sent from yellowpages to be written and subsequently read on the next request //$c->SetOpt(CURLOPT_COOKIEJAR, "e:\htdocs\tmp\cookies\superpages.cookie.txt"); //$c->SetOpt(CURLOPT_COOKIEFILE, "e:\htdocs\tmp\cookies\superpages.cookie.txt"); Do you see this file superpages.cookie.txt created and a value set? only use these if you wish to define the cookies yourself $c->SetOpt(CURLOPT_COOKIE, 1); and curl_setopt($c, CURLOPT_COOKIE, $cookieFields); this is a snippet from what I use for passing around cookies curl_setopt($c, CURLOPT_COOKIEJAR, STATIC_ROOT ."/cookies/" . $this->_domainObj->getDomainId() . ".txt"); if(file_exists(STATIC_ROOT ."/cookies/" . $this->_domainObj->getDomainId() . ".txt")) { if(filesize(STATIC_ROOT ."/cookies/" . $this->_domainObj->getDomainId() . ".txt") < 8000) { curl_setopt($c, CURLOPT_COOKIEFILE, STATIC_ROOT ."/cookies/" . $this->_domainObj->getDomainId() . ".txt"); } } On 11/22/05, Joseph Crawford wrote: > > Hello Everyone, > > let me explain a bit what i am trying to do. I have a script that > will grab the first page which i specify from a URL such as > > > http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=0 > > now when it grabs this page, it will scour the returned HTML and grab > all the information for each record under Yellow Page Listings. > once it has all records it then checks to see if there is a Next page, > basically Next will either be a link or not. > > If it is a link the script will execute using the URL from the Next > Link. Here's where i am running into problems. I want to feed it 1 > url and have it go through every page until there is not a next page. > > The issue i am having is that with the url grabbed from the link, curl > fetches the page, but it's not the page expected rather it's an error > page from superpages stating that i have not supplied enough search > criteria. > > On the first page grabbed, this is the link that is grabbed from the > source > > http://yellowpages.superpages.com/listings.jsp?PS=45&PP=L&CB=1&L=VT&CID=00000518939&paging=1&F=1&OO=1&PI=45 > > Now when curl grabs that url it complains about search criteria > however if you paste that to a browser it will work just fine. > > here is a screenshot of the page that is returned by cURL > http://codebowl.dontexist.net/images/ypresult.jpg > > I am not sure what is going on with this but if anyone here can lend a > hand with curl i would appreciate it. I have > the cookie directory writable by apache also as i read you had to > specify the exact path to the cookie on windows using apache 2 > > Here is my code > > http://codebowl.dontexist.net/codebowl/System/Misc/Curl.phps > http://codebowl.dontexist.net/codebowl/System/Misc/YellowPages.phps > > > Note that i created a curl class because i am thinking of expanding on > what i have and the framework i am working on > is going to be 100% Object Oriented. > > Any help is appreciated. > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Tue Nov 22 20:54:20 2005 From: rotsen at gmail.com (Nestor) Date: Tue, 22 Nov 2005 17:54:20 -0800 Subject: [nycphp-talk] Curl & Traversing Pages In-Reply-To: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> References: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Message-ID: Joe, I noticed that your link to the nest page and the link I get are a bit different. My next link: http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=45 You next link: http://yellowpages.superpages.com/listings.jsp?PS=45&PP=L&CB=1&L=VT&CID=00000518939&paging=1&F=1&OO=1&PI=45 Why is that? Nestor :-) On 11/22/05, Joseph Crawford wrote: > Hello Everyone, > > let me explain a bit what i am trying to do. I have a script that > will grab the first page which i specify from a URL such as > > http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=0 > > now when it grabs this page, it will scour the returned HTML and grab > all the information for each record under Yellow Page Listings. > once it has all records it then checks to see if there is a Next page, > basically Next will either be a link or not. > > If it is a link the script will execute using the URL from the Next > Link. Here's where i am running into problems. I want to feed it 1 > url and have it go through every page until there is not a next page. > > The issue i am having is that with the url grabbed from the link, curl > fetches the page, but it's not the page expected rather it's an error > page from superpages stating that i have not supplied enough search > criteria. > > On the first page grabbed, this is the link that is grabbed from the source > http://yellowpages.superpages.com/listings.jsp?PS=45&PP=L&CB=1&L=VT&CID=00000518939&paging=1&F=1&OO=1&PI=45 > > Now when curl grabs that url it complains about search criteria > however if you paste that to a browser it will work just fine. > > here is a screenshot of the page that is returned by cURL > http://codebowl.dontexist.net/images/ypresult.jpg > > I am not sure what is going on with this but if anyone here can lend a > hand with curl i would appreciate it. I have > the cookie directory writable by apache also as i read you had to > specify the exact path to the cookie on windows using apache 2 > > Here is my code > > http://codebowl.dontexist.net/codebowl/System/Misc/Curl.phps > http://codebowl.dontexist.net/codebowl/System/Misc/YellowPages.phps > > > Note that i created a curl class because i am thinking of expanding on > what i have and the framework i am working on > is going to be 100% Object Oriented. > > Any help is appreciated. > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > 1-802-671-2021 > codebowl at gmail.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From codebowl at gmail.com Tue Nov 22 21:26:03 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 22 Nov 2005 21:26:03 -0500 Subject: [nycphp-talk] Curl & Traversing Pages In-Reply-To: References: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Message-ID: <8d9a42800511221826m4d15d1fesa05e20ecbe29e3c9@mail.gmail.com> I have tried with the lines uncommented as well and get the same results. Nestor, as for the different links i will have to look into that in the morning however i am grabbing the same link you click on when going from page to page ;) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl at gmail.com From rolan at omnistep.com Tue Nov 22 21:46:02 2005 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 22 Nov 2005 21:46:02 -0500 Subject: [nycphp-talk] Curl & Traversing Pages In-Reply-To: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> References: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Message-ID: <4383D7EA.5000208@omnistep.com> A great tool for debugging bots and spiders is the "Tamper Data 0.85" extension of Firefox browser. Go download the browser, then install the extension, which can be found here: https://addons.mozilla.org/extensions/showlist.php?application=firefox&category=Developer%20Tools&numpg=10&pageid=7 It logs and displays all inbound and outbound traffic to the browser. This is very useful, especially when creating bots that interface with SSL pages. I used to use a packet sniffer to debug, but having to tackle an SSL only application prompted me to seek out and discover this wonderful app. An alternative way to spider a website is to grab the pages with "wget" then parse and process it all offline later. One caveat: some dynamic scripts may generate links on the fly resulting in loops. Googlebot, for example, has been endlessely spidering my same photo album pages for the past year and a half. ~Rolan Joseph Crawford wrote: >Hello Everyone, > >let me explain a bit what i am trying to do. I have a script that >will grab the first page which i specify from a URL such as > >http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=0 > > > From ngibson at wans.net Tue Nov 22 22:36:10 2005 From: ngibson at wans.net (Nathaniel Gibson) Date: Tue, 22 Nov 2005 19:36:10 -0800 (PST) Subject: [nycphp-talk] A translation programming language translation standard Message-ID: <20051123033610.39033.qmail@web80730.mail.yahoo.com> I'm starting a new sourceforge project based on creating a standard language for the use of translating and interpreting languages from one to another. The resulting project will be an engine called SILC. I'm going to be licensing the source code for this engine as closed source at least for awhile as I have plans to make much money on some of this tool's possible applications. For those of you who don't know what this program is, the name is pretty self-explanatory, but it's an engine that, given tranlation libraries, has the possibility of translating any programming language to any other programming language, or even to english, or russian... or whatever language translation the library developer can imagine. The library files are written in SILC code which is my own language for translating languages. The engine takes in a piece of code or a file written in the input language, and outputs a file written in the output language. I will soon put up a site on how the SILC language works on sourceforge. Here's some actual translations from the current pre-alpha version: The user inputs PHP code: if ($harman == true || $booty != false && substr($txt,0,1) == "a") print("Hello World"); Outputs code in QBASIC language: IF harman$ = true OR booty$ <> false AND MID$(txt$,1,1) = "a" THEN PRINT "Hello World" Outputs code in English language: if the variable harman is equal to true or the variable booty is not equal to false and a sample the length of 1 characters of the variable txt starting at character 1 is equal to "a" then print the text "Hello World" The output code above is actual program output. The difference between translating an input language to QB and translating it to english is simply altering the rewrite rules and some of the flag options to format the output correctly. The code above was translated using three rewrite rules! I created one rule for If, one for substr, and one for print. I'm in the pre-alpha phases of the project as I just recreated it last weekend from scratch in PHP after a four year downtime for this project. So far, I've made much progress because I attacked the coding of the translation engine from a completley different angle and it's working now, whereas before I got stopped at the important part. I've created the line by line translation function first and I have yet to create the part of the engine that will read a translation libary and an input file performing translation functions on a whole program scale. So far, I've envisioned how I need to do it and it won't take much work for a version 1 to be released. Creating the engine is the easy part but creating all of the translation libraries is quite a formidable task. Although I have made the silc code syntax very easy to use, it will still take some basic knowledge of two languages and how they behave to create a translation library file. More about that and the syntax of a SILC Library File (SLF) later on the sourceforge project site. I'll be posting the project homepage url when I get it. The translation libraries will be open-source and those are mainly what the sourceforge project will be about creating. The uses for this program are boundless, but this project will mainly be focusing on the use of it for free and paid translation of source code to a wide range of clientelle. The project website will include a user interface in which users will be able to paste source code written in it's native language in a text field and translate it to another language by selecting the language and clicking the "Translate" button for free or they can translate larger files on a paid account. Another use we will be exploring is the translation of source code into english for educational purposes. Users who are already developers would be able to figure out how to code a specific algorithm that's perhaps written in a programming language they do not understand. Users who are not already developers can easily learn advanced concepts. Anyone who might be interested in creating library files for any reason and for any language, please reply to this message. More news later, Nate From dwclifton at gmail.com Tue Nov 22 22:41:13 2005 From: dwclifton at gmail.com (Douglas Clifton) Date: Tue, 22 Nov 2005 22:41:13 -0500 Subject: [nycphp-talk] talk Digest, Vol 30, Issue 35 In-Reply-To: References: Message-ID: <7d6cdcb0511221941x32a276a8w8c8f2fce9195b022@mail.gmail.com> > ---------- Forwarded message ---------- > From: "Hans Zaunere" > To: "'NYPHP Talk'" > Date: Tue, 22 Nov 2005 17:01:13 -0500 > Subject: [nycphp-talk] OT: Go Yahoo! > > It seems that Google is getting all the glory for high-tech and innovative > sites, including strong AJAX technology. > > But I just came across http://farechase.yahoo.com/, which truly makes some > of these technologies useful. The use of AJAX and rich client-side browser > based applications takes the site to the next level for travel searching. > > +1 Yahoo! in my opinion for delivering something useful, and steering clear > of fluffy map and email launches. Actually, http://maps.yahoo.com/beta/ is very useful. Look for Yahoo! to roll out many cool ajax-enabled properties in the near future. Less you all forget, Rasmus works there, making Yahoo! very PHP savvy. Try also: http://toys.lerdorf.com/ -- Douglas Clifton dwclifton at gmail.com http://loadaveragezero.com/ http://loadaveragezero.com/app/s9y/ http://loadaveragezero.com/drx/rss/recent From 1j0lkq002 at sneakemail.com Wed Nov 23 01:08:16 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 22 Nov 2005 22:08:16 -0800 Subject: [nycphp-talk] Curl & Traversing Pages In-Reply-To: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> References: <8d9a42800511221719h709e0a53gd0ddebdac7c4f2f@mail.gmail.com> Message-ID: <28620-62067@sneakemail.com> By the way, site scraping may not be a crime but it is considered "hostile" by many webmasters. Not to mention that you might be lifting someone's database, you are also using their bandwidth to do it, and muddying their stats, etc. So if they are smart they might hinder your ability to scrape as much as possible (that's what I do on competitive sites). By hitting the site with curl, what user agent are you offering? Ditto for wget... there are recommended configurations to deny (or better, misdirect) such requests as wget 1.1 wget 1.1 Wget 1.8.2 Wget/1.8.2 modified Wget 1.9 Wget/1.9+cvs-stable (Red Hat modified) How about a scraper honeypot? There are many of those out there tying up the harvesters because, well, harvesters are evil. Another method is to put a /whatever into robots.txt as a deny, with a link on the home page.. Anyone who asks for a file in there is by definition a bad bot (as you would be if you simply parsed the home page for links and followed them scraping). A script can tie that bot up with endless loops of autogenerated garbage or perhaps comon sql inection atempts, folowed by an IP ban ater N attempts. This stuff is out there. Personally I like serving realistic (but fake) Apache error codes whenever I am hit with wget because I know those are *nix folk and it's fun to mess with their heads. I mention all this because it seems you haven't considered that it might be part of your problem. When you're ready to step up to the big leagues of Spy vs. Spy site scraping, you might start with the Snoopy class. I think it's a nice piece of work. It lets you focus on the randomization and proxy management, since the fetch is really solid. -=john andrews http://www.seo-fun.com "I could tell you how to beat my anti-scraper code, but then I'd have to kill you" Joseph Crawford codebowl-at-gmail.com |nyphp dev/internal group use| wrote: >Hello Everyone, > >let me explain a bit what i am trying to do. I have a script that >will grab the first page which i specify from a URL such as > >http://yellowpages.superpages.com/listings.jsp?PS=45&OO=1&R=N&PP=L&CB=1&STYPE=S&F=1&L=VT&CID=00000518939&paging=1&PI=0 > >now when it grabs this page, it will scour the returned HTML and grab >all the information for each record under Yellow Page Listings. >once it has all records it then checks to see if there is a Next page, >basically Next will either be a link or not. > >If it is a link the script will execute using the URL from the Next >Link. Here's where i am running into problems. I want to feed it 1 >url and have it go through every page until there is not a next page. > >The issue i am having is that with the url grabbed from the link, curl >fetches the page, but it's not the page expected rather it's an error >page from superpages stating that i have not supplied enough search >criteria. > >On the first page grabbed, this is the link that is grabbed from the source >http://yellowpages.superpages.com/listings.jsp?PS=45&PP=L&CB=1&L=VT&CID=00000518939&paging=1&F=1&OO=1&PI=45 > >Now when curl grabs that url it complains about search criteria >however if you paste that to a browser it will work just fine. > >here is a screenshot of the page that is returned by cURL >http://codebowl.dontexist.net/images/ypresult.jpg > >I am not sure what is going on with this but if anyone here can lend a >hand with curl i would appreciate it. I have >the cookie directory writable by apache also as i read you had to >specify the exact path to the cookie on windows using apache 2 > >Here is my code > >http://codebowl.dontexist.net/codebowl/System/Misc/Curl.phps >http://codebowl.dontexist.net/codebowl/System/Misc/YellowPages.phps > > >Note that i created a curl class because i am thinking of expanding on >what i have and the framework i am working on >is going to be 100% Object Oriented. > >Any help is appreciated. > >-- >Joseph Crawford Jr. >Zend Certified Engineer >Codebowl Solutions, Inc. >1-802-671-2021 >codebowl at gmail.com > > From agfische at email.smith.edu Wed Nov 23 07:53:42 2005 From: agfische at email.smith.edu (Aaron Fischer) Date: Wed, 23 Nov 2005 07:53:42 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <010e01c5efb0$41e841f0$6701a8c0@MZ> References: <010e01c5efb0$41e841f0$6701a8c0@MZ> Message-ID: <43846656.9000404@email.smith.edu> Hans Zaunere wrote: >+1 Yahoo! in my opinion for delivering something useful, and steering clear >of fluffy map and email launches. > > > Hmmm... I find Google maps to be pretty useful (and cool with the satellite image overlays). Very helpful to be able to do everything one wants, i.e. zoom and move around without having to reload the @#$@ page. Good stuff, IMO. -Aaron From list at harveyk.com Wed Nov 23 08:43:21 2005 From: list at harveyk.com (harvey) Date: Wed, 23 Nov 2005 08:43:21 -0500 Subject: [nycphp-talk] OT: Go Yahoo! In-Reply-To: <43846656.9000404@email.smith.edu> References: <010e01c5efb0$41e841f0$6701a8c0@MZ> <43846656.9000404@email.smith.edu> Message-ID: <6.2.5.6.2.20051123084248.036a6eb0@harveyk.com> Yahoo is getting much better on that too http://maps.yahoo.com/beta/index.php#trf=0 At 07:53 AM 11/23/2005, Aaron Fischer wrote: >Hans Zaunere wrote: > > >+1 Yahoo! in my opinion for delivering something useful, and steering clear > >of fluffy map and email launches. > > > > > > > > >Hmmm... I find Google maps to be pretty useful (and cool with the >satellite image overlays). > >Very helpful to be able to do everything one wants, i.e. zoom and move >around without having to reload the @#$@ page. > >Good stuff, IMO. > >-Aaron > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From mikko.rantalainen at peda.net Wed Nov 23 10:07:21 2005 From: mikko.rantalainen at peda.net (Mikko Rantalainen) Date: Wed, 23 Nov 2005 17:07:21 +0200 Subject: [nycphp-talk] Friendly URL's In-Reply-To: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> References: <20051121200629.43560.qmail@web32513.mail.mud.yahoo.com> Message-ID: <438485A9.5010907@peda.net> Stefan Klopp wrote: > I wanted to get your feedback on the best (and > securest) way to do friendly URL's. I currently have > implemented a simple one that basically appends > directories onto the end of the php file, for example: > > http://www.example.com/script.php/variable1/variable2/ You might want to try something like SetHandler application/x-httpd-php AcceptPathInfo On and just drop the ".php" extension from your script.php or just put the whole file outside the server root and create a symbolic link between those two. Put the above declaration in a file and drop it in /etc/httpd/conf.d/99_whatever.conf (assuming that you're using a recent Apache). > To get the variables I am splitting on / in the > $_SERVER['PATH_INFO']. This appears to work quite well > for me. However the only problem I am facing now is > when my page has included header information such as > CSS or javascript. Since the includes are not full URL > they try to find the files in: > > http://www.example.com/script.php/variable1/variable2/ > > instead of in: > > http://www.example.com/ Cannot you just use