From matt at jobsforge.com Sun Oct 1 10:11:10 2006 From: matt at jobsforge.com (Matthew Terenzio) Date: Sun, 1 Oct 2006 10:11:10 -0400 Subject: [nycphp-talk] RSS and Images In-Reply-To: <8d9a42800609301830q7612000bi4f2f82d018cc0a74@mail.gmail.com> References: <8d9a42800609300701s300621eax6e053260576f7e95@mail.gmail.com> <44fdd8e8af571b577e3fffc411a76918@jobsforge.com> <8d9a42800609301830q7612000bi4f2f82d018cc0a74@mail.gmail.com> Message-ID: <7f728dc96068e3865bf474dfa95502d7@jobsforge.com> On Sep 30, 2006, at 9:30 PM, Joseph Crawford wrote: > Matt, > > All of my images are linked with > http://www.josephcrawford.com/wp-content/uploads/ etc... Hmm. Did you make the links manually in the post, or did they get generated automatically when you uploaded a photo to WP. I'm talking about manually adding a link with an absolute url in the body of the post. I don't know if it works when you upload a photo in WP, even if it's an absolute url in the code that WP generates. Also, I say "LINKS" here meaning the anchor tag, not the img src= A quick look at your site and I don't see links on the images on the first few pages. > > However they do not show in the rss, you can see the site at > http://www.josephcrawford.com and then check the rss in > http://www.josephcrawford.com/rss/ > > Thanks, > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > http://www.codebowl.com/ > Blog: http://www.josephcrawford.com/ > 1-802-671-2021 > codebowl at gmail.com_______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > Matt Terenzio ________________________________________ Two-way, shared, public RSS feeds by SkinnyFarm http://skinnyfarm.com From ps at pswebcode.com Sun Oct 1 11:38:17 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Sun, 1 Oct 2006 11:38:17 -0400 Subject: [nycphp-talk] PHP HTML Document Parser Message-ID: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> I'm looking for a free PHP module/class/script that can accept an HTML document as a string or file and might have a few methods built in to help parse the file for certain keywords or the grab the textual content between certain open and closing HTML tags. This module/class/script does not have to make the connection to get the file, only to do the parsing. As usual thanks in advance if you know something that fits the bill. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From strudeau at umich.edu Sun Oct 1 18:23:25 2006 From: strudeau at umich.edu (Scott Trudeau) Date: Sun, 1 Oct 2006 18:23:25 -0400 Subject: [nycphp-talk] PHP HTML Document Parser In-Reply-To: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> Message-ID: <90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com> I've used this: http://php-html.sourceforge.net/ with some success ... but not for production code -- just for some script-checks, conversions. Scott On 10/1/06, Peter Sawczynec wrote: > > > I'm looking for a free PHP module/class/script that can accept an > HTML document as a string or file and might have a few methods built in > to help parse the file for certain keywords or the grab the textual content > between certain open and closing HTML tags. > > This module/class/script does not have to make the connection to get the > file, only to do the parsing. > > As usual thanks in advance if you know something that fits the bill. > > Warmest regards, > > Peter Sawczynec > Technology Director > PSWebcode > _Design & Interface > _Ecommerce > _Database Management > 646.316.3678 > ps at pswebcode.com > www.pswebcode.com > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From skyline at publicmine.com Sun Oct 1 19:32:59 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Sun, 1 Oct 2006 19:32:59 -0400 Subject: [nycphp-talk] PHP-GTK module error References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> <90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com> Message-ID: <000301c6e5b1$f0bc9260$6401a8c0@sickbox> Hello All, I've just installed GTK from source, following these directions: http://gtk.php.net/manual/en/tutorials.installation.linux.php $ ./buildconf $ ./configure $ make $ make install Everything built find. I then added php_gtk2.so module to the extension's in php.ini, restarted apache. I ran $ php -m | grep php-gtk and got ...Unable to load dynamic library, '/usr/lib/php/modules/php_gtk2.so'....undefine symbol: phpi_get_le_gd in Unknown on line 0... Well, looks pretty obvious an error in the .c code. I've done apache module development in the past, and the 'Unknown' could point to c code. Anyways, I've done some goggle searching..nothing to helpful. So does anyone have any tips or work arounds? Thanks, Ben From jonbaer at jonbaer.com Sun Oct 1 21:17:54 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Sun, 1 Oct 2006 21:17:54 -0400 Subject: [nycphp-talk] PHP-GTK module error In-Reply-To: <000301c6e5b1$f0bc9260$6401a8c0@sickbox> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> <90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com> <000301c6e5b1$f0bc9260$6401a8c0@sickbox> Message-ID: (guess) Try something like "php -m | grep gd" to see if you are loading gd.so as well? Its making a reference to a function in GD that it can't find (either lib path is wrong or something else), or may need to compile PHP again with --with-gd=/path/to/gd And probably make sure its getting loading via extension_dir first before php_gtk2. - Jon On Oct 1, 2006, at 7:32 PM, Ben Sgro (sk) wrote: > Hello All, > > I've just installed GTK from source, following these directions: > http://gtk.php.net/manual/en/tutorials.installation.linux.php > $ ./buildconf > $ ./configure > $ make > $ make install > Everything built find. I then added php_gtk2.so module to the > extension's in > php.ini, restarted apache. > > I ran > $ php -m | grep php-gtk > and got ...Unable to load dynamic library, > '/usr/lib/php/modules/php_gtk2.so'....undefine symbol: > phpi_get_le_gd in > Unknown on line 0... > > Well, looks pretty obvious an error in the .c code. I've done > apache module > development in the past, and the 'Unknown' could point to c code. > > Anyways, I've done some goggle searching..nothing to helpful. So > does anyone > have any tips or work arounds? > > Thanks, Ben > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From skyline at publicmine.com Sun Oct 1 22:10:51 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Sun, 1 Oct 2006 22:10:51 -0400 Subject: [nycphp-talk] PHP-GTK module error References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1><90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com><000301c6e5b1$f0bc9260$6401a8c0@sickbox> Message-ID: <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> Hey all, Thanks Jon. I am adding GTK to an existing PHP installation. It appears php was compiled with '--with-gd=shared'. The only module that fails to load is the gtk one. Also, the extension_dir is being correctly set. Any other ideas? Thanks, Ben ----- Original Message ----- From: "Jon Baer" To: "NYPHP Talk" Sent: Sunday, October 01, 2006 9:17 PM Subject: Re: [nycphp-talk] PHP-GTK module error (guess) Try something like "php -m | grep gd" to see if you are loading gd.so as well? Its making a reference to a function in GD that it can't find (either lib path is wrong or something else), or may need to compile PHP again with --with-gd=/path/to/gd And probably make sure its getting loading via extension_dir first before php_gtk2. - Jon On Oct 1, 2006, at 7:32 PM, Ben Sgro (sk) wrote: > Hello All, > > I've just installed GTK from source, following these directions: > http://gtk.php.net/manual/en/tutorials.installation.linux.php > $ ./buildconf > $ ./configure > $ make > $ make install > Everything built find. I then added php_gtk2.so module to the > extension's in > php.ini, restarted apache. > > I ran > $ php -m | grep php-gtk > and got ...Unable to load dynamic library, > '/usr/lib/php/modules/php_gtk2.so'....undefine symbol: > phpi_get_le_gd in > Unknown on line 0... > > Well, looks pretty obvious an error in the .c code. I've done > apache module > development in the past, and the 'Unknown' could point to c code. > > Anyways, I've done some goggle searching..nothing to helpful. So > does anyone > have any tips or work arounds? > > Thanks, Ben > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From jonbaer at jonbaer.com Mon Oct 2 08:48:18 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Mon, 2 Oct 2006 08:48:18 -0400 Subject: [nycphp-talk] PHP-GTK module error In-Reply-To: <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1><90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com><000301c6e5b1$f0bc9260$6401a8c0@sickbox> <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> Message-ID: <504A4ED0-64C5-4909-8007-4A3AC6D95D76@jonbaer.com> So both extentions were compiled w/ =shared and both are loading in via php.ini to extension_dir and in the ~same~ directory? (guess) Im not sure if this matters anymore but where does your (env) LD_LIBRARY_PATH point to? Probably would not hurt to tack on your extension_dir @ the beginning. Sorry not much help, but have toyed w/ PHP-GTK in the past ... - Jon On Oct 1, 2006, at 10:10 PM, Ben Sgro (sk) wrote: > Hey all, > > Thanks Jon. I am adding GTK to an existing PHP installation. It > appears php > was compiled with '--with-gd=shared'. > The only module that fails to load is the gtk one. > > Also, the extension_dir is being correctly set. > > Any other ideas? > > Thanks, Ben > > ----- Original Message ----- > From: "Jon Baer" > To: "NYPHP Talk" > Sent: Sunday, October 01, 2006 9:17 PM > Subject: Re: [nycphp-talk] PHP-GTK module error > > > (guess) Try something like "php -m | grep gd" to see if you are > loading gd.so as well? > > Its making a reference to a function in GD that it can't find (either > lib path is wrong or something else), or may need to compile PHP > again with --with-gd=/path/to/gd > > And probably make sure its getting loading via extension_dir first > before php_gtk2. > > - Jon > > On Oct 1, 2006, at 7:32 PM, Ben Sgro (sk) wrote: > >> Hello All, >> >> I've just installed GTK from source, following these directions: >> http://gtk.php.net/manual/en/tutorials.installation.linux.php >> $ ./buildconf >> $ ./configure >> $ make >> $ make install >> Everything built find. I then added php_gtk2.so module to the >> extension's in >> php.ini, restarted apache. >> >> I ran >> $ php -m | grep php-gtk >> and got ...Unable to load dynamic library, >> '/usr/lib/php/modules/php_gtk2.so'....undefine symbol: >> phpi_get_le_gd in >> Unknown on line 0... >> >> Well, looks pretty obvious an error in the .c code. I've done >> apache module >> development in the past, and the 'Unknown' could point to c code. >> >> Anyways, I've done some goggle searching..nothing to helpful. So >> does anyone >> have any tips or work arounds? >> >> Thanks, Ben >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From scott at crisscott.com Mon Oct 2 09:16:43 2006 From: scott at crisscott.com (Scott Mattocks) Date: Mon, 02 Oct 2006 09:16:43 -0400 Subject: [nycphp-talk] PHP-GTK module error In-Reply-To: <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1><90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com><000301c6e5b1$f0bc9260$6401a8c0@sickbox> <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> Message-ID: <4521113B.3070908@crisscott.com> Ben Sgro (sk) wrote: > Hey all, > > Thanks Jon. I am adding GTK to an existing PHP installation. It appears php > was compiled with '--with-gd=shared'. > The only module that fails to load is the gtk one. > > Any other ideas? Make sure that both extensions were compiled against the same version of PHP and that you are loading PHP-GTK in the same executable that you compiled it against (Should be compiled against a CLI version not a CGI version). If everything looks good you can try looking at this thread: http://marc.theaimsgroup.com/?l=php-gtk-general&m=114317952909700&w=2 (although it doesn't say much more) Also, try the PHP-GTK-general mailing list. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From agfische at email.smith.edu Mon Oct 2 09:39:28 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Mon, 02 Oct 2006 09:39:28 -0400 Subject: [nycphp-talk] OT - Recommendatons for MySQL books? Message-ID: <45211690.1040007@email.smith.edu> Greetings, I'd like to invest in a book that focuses entirely on MySQL. I have one book that looks at PHP/MySQL but I feel that there is a lot that I am missing. My experience level/goals: I'd like to learn about database design and the features of MySQL. I've been programming with PHP for about four years and working with MySQL for the same amount of time. While my PHP skills have been growing I feel that my database skills have remained pretty flat. For example, relational database design, primary keys, indexing, etc. are all terms that I have varying degrees of familiarity with but I would like to learn much more about them. There are some times that I am solving a problem with PHP and wondering if it would be more efficient if I used a feature in MySQL instead. I'd be interested in a book that has a chapter on database security as well. Would appreciate any recommendations. Thanks! -Aaron From tedd at sperling.com Mon Oct 2 09:52:01 2006 From: tedd at sperling.com (tedd) Date: Mon, 2 Oct 2006 09:52:01 -0400 Subject: [nycphp-talk] OT - Recommendatons for MySQL books? In-Reply-To: <45211690.1040007@email.smith.edu> References: <45211690.1040007@email.smith.edu> Message-ID: At 9:39 AM -0400 10/2/06, Aaron Fischer wrote: >Greetings, > >I'd like to invest in a book that focuses entirely on MySQL. I have one >book that looks at PHP/MySQL but I feel that there is a lot that I am >missing. > >My experience level/goals: >I'd like to learn about database design and the features of MySQL. I've >been programming with PHP for about four years and working with MySQL >for the same amount of time. While my PHP skills have been growing I >feel that my database skills have remained pretty flat. > >For example, relational database design, primary keys, indexing, etc. >are all terms that I have varying degrees of familiarity with but I >would like to learn much more about them. There are some times that I >am solving a problem with PHP and wondering if it would be more >efficient if I used a feature in MySQL instead. > >I'd be interested in a book that has a chapter on database security as well. > >Would appreciate any recommendations. Thanks! > >-Aaron MySQL Cookbook by Paul DuBois. That's a great book -- lot's of ways to use MySQL and thus learn features, concepts, and design. If you want more in depth stuff, try: High Performance MySQL by Zawodny et al. Serious stuff. tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From rmarscher at beaffinitive.com Mon Oct 2 10:07:54 2006 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Mon, 02 Oct 2006 10:07:54 -0400 Subject: [nycphp-talk] OT - Recommendatons for MySQL books? In-Reply-To: References: <45211690.1040007@email.smith.edu> Message-ID: <45211D3A.3050506@beaffinitive.com> High Performance MySQL is one of my favorite books. I just got Pro MySQL because I wanted to learn a bit more about the newer MySQL features like stored procedures and views. It seems very thorough... though I haven't gotten very deep into it yet. It does have a chapter on security. -Rob tedd wrote: > At 9:39 AM -0400 10/2/06, Aaron Fischer wrote: > >> Greetings, >> >> I'd like to invest in a book that focuses entirely on MySQL. I have one >> book that looks at PHP/MySQL but I feel that there is a lot that I am >> missing. >> >> My experience level/goals: >> I'd like to learn about database design and the features of MySQL. I've >> been programming with PHP for about four years and working with MySQL >> for the same amount of time. While my PHP skills have been growing I >> feel that my database skills have remained pretty flat. >> >> For example, relational database design, primary keys, indexing, etc. >> are all terms that I have varying degrees of familiarity with but I >> would like to learn much more about them. There are some times that I >> am solving a problem with PHP and wondering if it would be more >> efficient if I used a feature in MySQL instead. >> >> I'd be interested in a book that has a chapter on database security as well. >> >> Would appreciate any recommendations. Thanks! >> >> -Aaron >> > > > MySQL Cookbook by Paul DuBois. > > That's a great book -- lot's of ways to use MySQL and thus learn > features, concepts, and design. > > If you want more in depth stuff, try: > > High Performance MySQL by Zawodny et al. > > Serious stuff. > > tedd > From morgan at forsalebyowner.com Mon Oct 2 10:20:08 2006 From: morgan at forsalebyowner.com (Morgan Craft) Date: Mon, 02 Oct 2006 10:20:08 -0400 Subject: [nycphp-talk] OT - Recommendatons for MySQL books? In-Reply-To: <45211690.1040007@email.smith.edu> References: <45211690.1040007@email.smith.edu> Message-ID: <45212018.8010601@forsalebyowner.com> MySQL Database Design and Tuning by mySql press is a great book - http://dev.mysql.com/books/mysqlpress/ It covers in-depth information about the various storage engines in mysql: innoDB, myISAM, Memory, Heap, Archive and how they work (row locking) and when/why to use them for various data-types. These various storage engines are what make MySQL such a powerful database engine. Also, the book also covers indexing methods - primary and foreign keys, hashing, column types. Basically it covers everything relating to database design for mysql and focuses less on tricks you can do with SQL queries. I highly recommend it. I don't think you can order it through amazon - where I normally get all my books. But if you go to a Barnes and Noble I'm sure they have it. Give it a look I'm sure it is what you are looking for. -Morgan Aaron Fischer wrote: > Greetings, > > I'd like to invest in a book that focuses entirely on MySQL. I have one > book that looks at PHP/MySQL but I feel that there is a lot that I am > missing. > > My experience level/goals: > I'd like to learn about database design and the features of MySQL. I've > been programming with PHP for about four years and working with MySQL > for the same amount of time. While my PHP skills have been growing I > feel that my database skills have remained pretty flat. > > For example, relational database design, primary keys, indexing, etc. > are all terms that I have varying degrees of familiarity with but I > would like to learn much more about them. There are some times that I > am solving a problem with PHP and wondering if it would be more > efficient if I used a feature in MySQL instead. > > I'd be interested in a book that has a chapter on database security as well. > > Would appreciate any recommendations. Thanks! > > -Aaron > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From jbaer at VillageVoice.com Mon Oct 2 11:08:58 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Mon, 2 Oct 2006 11:08:58 -0400 Subject: [nycphp-talk] OT - Recommendatons for MySQL books? In-Reply-To: <45211D3A.3050506@beaffinitive.com> Message-ID: <4D2FAD9B00577645932AD7ED5FECA24503738EC9@mail> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Besides the books (which tend to get outdated pretty quickly as items change in core code) ... I find the free webinars that they give every month to be pretty much in depth and up to date w/ the latest info. The archive is good as well .. http://www.mysql.com/news-and-events/on-demand-webinars/ Also the study guide for MySQL 5.0 certification is also a great in-depth surprise for being a "study guide". And subscribing to a few feeds @ http://www.planetmysql.org/ helps. - - Jon - -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Rob Marscher Sent: Monday, October 02, 2006 10:08 AM To: NYPHP Talk Subject: Re: [nycphp-talk] OT - Recommendatons for MySQL books? High Performance MySQL is one of my favorite books. I just got Pro MySQL because I wanted to learn a bit more about the newer MySQL features like stored procedures and views. It seems very thorough... though I haven't gotten very deep into it yet. It does have a chapter on security. - -Rob tedd wrote: > At 9:39 AM -0400 10/2/06, Aaron Fischer wrote: > >> Greetings, >> >> I'd like to invest in a book that focuses entirely on MySQL. I have >> one book that looks at PHP/MySQL but I feel that there is a lot that >> I am missing. >> >> My experience level/goals: >> I'd like to learn about database design and the features of MySQL. >> I've been programming with PHP for about four years and working with >> MySQL for the same amount of time. While my PHP skills have been >> growing I feel that my database skills have remained pretty flat. >> >> For example, relational database design, primary keys, indexing, etc. >> are all terms that I have varying degrees of familiarity with but I >> would like to learn much more about them. There are some times that >> I am solving a problem with PHP and wondering if it would be more >> efficient if I used a feature in MySQL instead. >> >> I'd be interested in a book that has a chapter on database security as well. >> >> Would appreciate any recommendations. Thanks! >> >> -Aaron >> > > > MySQL Cookbook by Paul DuBois. > > That's a great book -- lot's of ways to use MySQL and thus learn > features, concepts, and design. > > If you want more in depth stuff, try: > > High Performance MySQL by Zawodny et al. > > Serious stuff. > > tedd > _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFFISuK99e5DI8C/rsRAi7sAKDq2jNB9vBWHR4VFlhWfbKELNWFBgCffMk3 WuvAIAXwTqFkIdJE5XLMxb0= =RDPM -----END PGP SIGNATURE----- From dmintz at davidmintz.org Mon Oct 2 11:57:49 2006 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 2 Oct 2006 11:57:49 -0400 (EDT) Subject: [nycphp-talk] OT - Recommendatons for MySQL books? In-Reply-To: <45212018.8010601@forsalebyowner.com> References: <45211690.1040007@email.smith.edu> <45212018.8010601@forsalebyowner.com> Message-ID: On Mon, 2 Oct 2006, Morgan Craft wrote: > queries. I highly recommend it. > > I don't think you can order it through amazon - where I normally get all > my books. But if you go to a Barnes and Noble I'm sure they have it. > Give it a look I'm sure it is what you are looking for. Try http://bookpool.com Good prices, impeccable service. Sorry for the off-off-topic. --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From skyline at publicmine.com Mon Oct 2 12:34:13 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Mon, 2 Oct 2006 12:34:13 -0400 Subject: [nycphp-talk] PHP-GTK module error References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1><90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com><000301c6e5b1$f0bc9260$6401a8c0@sickbox> <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> <4521113B.3070908@crisscott.com> Message-ID: <00d101c6e640$99bb4440$6401a8c0@sickbox> Hey all, Yes I have php (cli). I believe gd was never installed. There was no trace of the gd.so. I did a yum update php-gd and then added the module to php.ini. Besides the fact that apache doesn't server pages when the php-gtk/gd modules are loaded (yet they work) it works. I had to comment out the modules to get apache to work as usual. Strange... Thanks! - Ben ----- Original Message ----- From: "Scott Mattocks" To: "NYPHP Talk" Sent: Monday, October 02, 2006 9:16 AM Subject: Re: [nycphp-talk] PHP-GTK module error Ben Sgro (sk) wrote: > Hey all, > > Thanks Jon. I am adding GTK to an existing PHP installation. It appears > php > was compiled with '--with-gd=shared'. > The only module that fails to load is the gtk one. > > Any other ideas? Make sure that both extensions were compiled against the same version of PHP and that you are loading PHP-GTK in the same executable that you compiled it against (Should be compiled against a CLI version not a CGI version). If everything looks good you can try looking at this thread: http://marc.theaimsgroup.com/?l=php-gtk-general&m=114317952909700&w=2 (although it doesn't say much more) Also, try the PHP-GTK-general mailing list. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From scott at crisscott.com Mon Oct 2 13:14:17 2006 From: scott at crisscott.com (Scott Mattocks) Date: Mon, 02 Oct 2006 13:14:17 -0400 Subject: [nycphp-talk] PHP-GTK module error In-Reply-To: <00d101c6e640$99bb4440$6401a8c0@sickbox> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1><90174f6c0610011523g4247b826h5f83c0bd0af6177e@mail.gmail.com><000301c6e5b1$f0bc9260$6401a8c0@sickbox> <000b01c6e5c7$fd7454f0$6401a8c0@sickbox> <4521113B.3070908@crisscott.com> <00d101c6e640$99bb4440$6401a8c0@sickbox> Message-ID: <452148E9.10401@crisscott.com> PHP-GTK should not be loaded in your php.ini for Apache. I have two separate php.ini files and compiled my cli php to look in a different location for its php.ini file. The apache version uses the default location. Ben Sgro (sk) wrote: > Hey all, > > Yes I have php (cli). I believe gd was never installed. > There was no trace of the gd.so. I did a yum update php-gd > and then added the module to php.ini. > > Besides the fact that apache doesn't server pages when the php-gtk/gd > modules are loaded (yet they work) it works. > > I had to comment out the modules to get apache to work as usual. > > Strange... > > Thanks! > > - Ben > ----- Original Message ----- > From: "Scott Mattocks" > To: "NYPHP Talk" > Sent: Monday, October 02, 2006 9:16 AM > Subject: Re: [nycphp-talk] PHP-GTK module error > > > Ben Sgro (sk) wrote: >> Hey all, >> >> Thanks Jon. I am adding GTK to an existing PHP installation. It appears >> php >> was compiled with '--with-gd=shared'. >> The only module that fails to load is the gtk one. >> >> Any other ideas? > > Make sure that both extensions were compiled against the same version of > PHP and that you are loading PHP-GTK in the same executable that you > compiled it against (Should be compiled against a CLI version not a CGI > version). > > If everything looks good you can try looking at this thread: > http://marc.theaimsgroup.com/?l=php-gtk-general&m=114317952909700&w=2 > (although it doesn't say much more) Also, try the PHP-GTK-general > mailing list. > -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From 1j0lkq002 at sneakemail.com Mon Oct 2 13:24:21 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 02 Oct 2006 10:24:21 -0700 Subject: [nycphp-talk] PHP HTML Document Parser In-Reply-To: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> References: <000001c6e56f$9dea5af0$6701a8c0@SUNCODE1> Message-ID: <26825-48565@sneakemail.com> Peter Sawczynec ps-at-pswebcode.com |nyphp dev/internal group use| wrote: > I'm looking for a free PHP module/class/script that can accept an > HTML document as a string or file and might have a few methods built in > to help parse the file for certain keywords or the grab the textual > content > between certain open and closing HTML tags. > > This module/class/script does not have to make the connection to get the > file, only to do the parsing. > > As usual thanks in advance if you know something that fits the bill. > > Warmest regards, > There is a Tidy library by John Coggeshall that does a ton but I have found it to be a very dry sandwich to consume without a decent pint of beer. Maybe that's cause I am such a lousy PHP coder, but the team I was working with loved it and got everything they needed from it. Maybe start with a Zend article here http://devzone.zend.com/node/view/id/761 -=john andrews -- ------------------------------------------------------------- "The web is competitive. Just because you can't smell the stench or see the grime, doesn't mean the person on the other end of the connection is a good citizen in an upscale suburban neighborhood making an honest living giving you a fair deal. He's probably not." --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From ps at pswebcode.com Mon Oct 2 15:04:47 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Mon, 2 Oct 2006 15:04:47 -0400 Subject: [nycphp-talk] Array Transformation Assistance. Message-ID: <002101c6e655$a1049ac0$6701a8c0@SUNCODE1> Go ahead chuckle it up. But, yes, I need this one little one. I begin with a numerically indexed array of elements (could be any length): $master_names = array("Joe", "Sam", "Tom" ... ) I need to rename all the array elements as to make a matching consistent associative array. And... the keys in the associative array must be derived from combining the name of the array (in this example 'master_names') with the correct former index value appended on the end of each new key: $master_names = array('master_names0'=>"Joe", 'master_names1'=>"Sam, 'master_names2'=>"Tom" ... ) OR $master_names[0]="Joe" $master_names[1]="Sam" $master_names[2]="Tom" becomes... $master_names['master_names0']="Joe" $master_names['master_names1']="Sam" $master_names['master_names2']="Tom" Yes, that is it. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From skyline at publicmine.com Mon Oct 2 15:10:23 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Mon, 2 Oct 2006 15:10:23 -0400 Subject: [nycphp-talk] Array Transformation Assistance. References: <002101c6e655$a1049ac0$6701a8c0@SUNCODE1> Message-ID: <010401c6e656$6b05b570$6401a8c0@sickbox> Message ----- Original Message ----- From: Peter Sawczynec To: 'Org, Talk at Nyphp.' Sent: Monday, October 02, 2006 3:04 PM Subject: [nycphp-talk] Array Transformation Assistance. Go ahead chuckle it up. But, yes, I need this one little one. I begin with a numerically indexed array of elements (could be any length): $master_names = array("Joe", "Sam", "Tom" ... ) I need to rename all the array elements as to make a matching consistent associative array. And... the keys in the associative array must be derived from combining the name of the array (in this example 'master_names') with the correct former index value appended on the end of each new key: $master_names = array('master_names0'=>"Joe", 'master_names1'=>"Sam, 'master_names2'=>"Tom" ... ) OR $master_names[0]="Joe" $master_names[1]="Sam" $master_names[2]="Tom" becomes... $master_names['master_names0']="Joe" $master_names['master_names1']="Sam" $master_names['master_names2']="Tom" Yes, that is it. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at pswebcode.com Mon Oct 2 15:37:26 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Mon, 2 Oct 2006 15:37:26 -0400 Subject: [nycphp-talk] Array Transformation Assistance. In-Reply-To: <010401c6e656$6b05b570$6401a8c0@sickbox> Message-ID: <003801c6e65a$30a2d260$6701a8c0@SUNCODE1> This is technically correct, thank you. Except your solution takes it for granted that we always want the new associative array keys to be named 'master_names'.$index, but that is not the case. The new keys must take on the name of the original array variable name whatever it was, more like so: $Any_Variable_Name = array('joe', 'adam', 'alex'); $master_new = array( ); while(list($index, $value) = each($Any_Variable_Name)) { $master_new[$Any_Variable_Name. $index] = $value; } Thank you. Peter -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (sk) Sent: Monday, October 02, 2006 3:10 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Array Transformation Assistance. ----- Original Message ----- From: Peter Sawczynec To: 'Org, Talk at Nyphp.' Sent: Monday, October 02, 2006 3:04 PM Subject: [nycphp-talk] Array Transformation Assistance. Go ahead chuckle it up. But, yes, I need this one little one. I begin with a numerically indexed array of elements (could be any length): $master_names = array("Joe", "Sam", "Tom" ... ) I need to rename all the array elements as to make a matching consistent associative array. And... the keys in the associative array must be derived from combining the name of the array (in this example 'master_names') with the correct former index value appended on the end of each new key: $master_names = array('master_names0'=>"Joe", 'master_names1'=>"Sam, 'master_names2'=>"Tom" ... ) OR $master_names[0]="Joe" $master_names[1]="Sam" $master_names[2]="Tom" becomes... $master_names['master_names0']="Joe" $master_names['master_names1']="Sam" $master_names['master_names2']="Tom" Yes, that is it. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com _____ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Oct 2 16:46:35 2006 From: ramons at gmx.net (David Krings) Date: Mon, 02 Oct 2006 16:46:35 -0400 Subject: [nycphp-talk] Array Transformation Assistance. In-Reply-To: <002101c6e655$a1049ac0$6701a8c0@SUNCODE1> References: <002101c6e655$a1049ac0$6701a8c0@SUNCODE1> Message-ID: <6.1.2.0.2.20061002164238.02f338e0@pop.gmx.net> Hi, I usually create a second numerically indexed array that has as elements the key names. The numerical keys correspond to each other so that I only need a while loop and a counter to access each element of the source arrays that I then stick together as key/element pairs in a resulting array. I do not know the exact circumstance, but I needed to get two things out of a database that were related to each other and that had to be of the same count by design. Worked great, but today I'd use SQL and a join for this, which works even better. David At 03:04 PM 10/2/2006, you wrote: >Go ahead chuckle it up. But, yes, I need this one little one. >I begin with a numerically indexed array of elements (could be any length): > >$master_names = array("Joe", "Sam", "Tom" ... ) > >I need to rename all the array elements as to make a matching consistent >associative array. >And... the keys in the associative array must be derived from combining >the name of the array >(in this example 'master_names') with the correct former index value >appended on the end of >each new key: > >$master_names = array('master_names0'=>"Joe", 'master_names1'=>"Sam, >'master_names2'=>"Tom" ... ) > > >OR > >$master_names[0]="Joe" >$master_names[1]="Sam" >$master_names[2]="Tom" > >becomes... > >$master_names['master_names0']="Joe" >$master_names['master_names1']="Sam" >$master_names['master_names2']="Tom" > > >Yes, that is it. > >Warmest regards, > >Peter Sawczynec >Technology Director >PSWebcode >_Design & Interface >_Ecommerce >_Database Management >646.316.3678 >ps at pswebcode.com >www.pswebcode.com > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From scott at crisscott.com Mon Oct 2 16:55:32 2006 From: scott at crisscott.com (Scott Mattocks) Date: Mon, 02 Oct 2006 16:55:32 -0400 Subject: [nycphp-talk] Array Transformation Assistance. In-Reply-To: <003801c6e65a$30a2d260$6701a8c0@SUNCODE1> References: <003801c6e65a$30a2d260$6701a8c0@SUNCODE1> Message-ID: <45217CC4.2020007@crisscott.com> Peter Sawczynec wrote: > This is technically correct, thank you. Except your solution takes it for > granted that > we always want the new associative array keys to be named > 'master_names'.$index, but > that is not the case. > > The new keys must take on the name of the original array variable name > whatever it was, > more like so: You would have to have the name of the array variable stored in another variable. Then you have to access the array with a variable variable. ${$array_name}[$array_name . $index] = $value; Unfortunately, there is no way to get the name of a variable dynamically like that. You would have to have it hard coded somewhere. Scott Mattocks From cliff at pinestream.com Mon Oct 2 21:48:14 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 2 Oct 2006 21:48:14 -0400 Subject: [nycphp-talk] Smarty Template question Message-ID: <000501c6e68d$fe0426e0$12a8a8c0@HirschLaptop> I have a table comprised of a PHP file and Smarty template. It's so lovely that I have decided to display it several times on one page, with different conditions for each iteration. Example: a table for pending projects, a table for completed project.terminated projects, etc. If the PHP and templates were built successively, I think this would work. But since, with Smarty, the PHP runs first and than the individual template "pieces" are populated with the assigned variables, the last "table build" would simply be displayed in all the tables. Follow me? Making each PHP version of the table an object would be simple. But how can I use one template for multiple instances on one page? The only solution I can think of it to build an array and have loop over the array for each version of the table. Any other ideas? Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rolan at omnistep.com Mon Oct 2 23:39:45 2006 From: rolan at omnistep.com (Rolan Yang) Date: Mon, 02 Oct 2006 23:39:45 -0400 Subject: [nycphp-talk] Smarty Template question In-Reply-To: <000501c6e68d$fe0426e0$12a8a8c0@HirschLaptop> References: <000501c6e68d$fe0426e0$12a8a8c0@HirschLaptop> Message-ID: <4521DB81.9020401@omnistep.com> The smarty template does not have to be a complete page. I believe you can call a template multiple times from within the PHP document e.g. $smarty->display('header.tpl'); $data=getTableData($first); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $data=getTableData($second); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $data=getTableData($third); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $smarty->display('footer.tpl'); ~Rolan Cliff Hirsch wrote: > > I have a table comprised of a PHP file and Smarty template. It?s so > lovely that I have decided to display it several times on one page, > with different conditions for each iteration. Example: a table for > pending projects, a table for completed project?terminated projects, etc. > > If the PHP and templates were built successively, I think this would > work. But since, with Smarty, the PHP runs first and than the > individual template ?pieces? are populated with the assigned > variables, the last ?table build? would simply be displayed in all the > tables. Follow me? > > Making each PHP version of the table an object would be simple. But > how can I use one template for multiple instances on one page? The > only solution I can think of it to build an array and have loop over > the array for each version of the table. Any other ideas? > > Cliff > > _______________________________ > *Pinestream Communications, Inc.* > Publisher of /Semiconductor Times/ & /Telecom Trends/ > 52 Pine Street, Weston, MA 02493 USA > Tel: 781.647.8800, Fax: 781.647.8825 > http://www.pinestream.com > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From cliff at pinestream.com Tue Oct 3 07:45:26 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Tue, 3 Oct 2006 07:45:26 -0400 Subject: [nycphp-talk] Smarty Template question In-Reply-To: <4521DB81.9020401@omnistep.com> Message-ID: <001401c6e6e1$6b3b0d20$12a8a8c0@HirschLaptop> Rolan: Many thanks. Seems obviously, but I have been stuck because I use a single Display command with the "content template" included in the middle of a master template. It seems like Multiple Displays would work, but it does make it more difficult to keep track of lots of pieces in a complex template. Perhaps I could use Fetch instead to take care of this one problem and then still use Display to build the composite template. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Rolan Yang Sent: Monday, October 02, 2006 10:40 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Smarty Template question The smarty template does not have to be a complete page. I believe you can call a template multiple times from within the PHP document e.g. $smarty->display('header.tpl'); $data=getTableData($first); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $data=getTableData($second); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $data=getTableData($third); $smarty->assign('data',$data); $smarty->display('tabletemplate.tpl'); $smarty->display('footer.tpl'); ~Rolan Cliff Hirsch wrote: > > I have a table comprised of a PHP file and Smarty template. It's so > lovely that I have decided to display it several times on one page, > with different conditions for each iteration. Example: a table for > pending projects, a table for completed project.terminated projects, etc. > > If the PHP and templates were built successively, I think this would > work. But since, with Smarty, the PHP runs first and than the > individual template "pieces" are populated with the assigned > variables, the last "table build" would simply be displayed in all the > tables. Follow me? > > Making each PHP version of the table an object would be simple. But > how can I use one template for multiple instances on one page? The > only solution I can think of it to build an array and have loop over > the array for each version of the table. Any other ideas? > > Cliff > > _______________________________ > *Pinestream Communications, Inc.* > Publisher of /Semiconductor Times/ & /Telecom Trends/ > 52 Pine Street, Weston, MA 02493 USA > Tel: 781.647.8800, Fax: 781.647.8825` > http://www.pinestream.com > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From cliff at pinestream.com Tue Oct 3 08:43:12 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Tue, 3 Oct 2006 08:43:12 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? Message-ID: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> I'm confused by mod_rewrite What is the point? What is the big deal? Why is www.website.com/page/action/stuff/morestuff/ Better than www.website.com/page.php?action=something&id=#&.... What difference does it make? To me it mainly looks like a major headache making all the queries written in PHP play nicely with mod_rewrite. Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rharding at mitechie.com Tue Oct 3 08:45:52 2006 From: rharding at mitechie.com (Richard Harding) Date: Tue, 03 Oct 2006 08:45:52 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> Message-ID: <45225B80.2080907@mitechie.com> Cliff Hirsch wrote: > I?m confused by mod_rewrite > > What is the point? What is the big deal? > > Why is www.website.com/page/action/stuff/morestuff/ > > Better than > > www.website.com/page.php?action=something&id=#&.... > > What difference does it make? To me it mainly looks like a major > headache making all the queries written in PHP play nicely with mod_rewrite. Ever tried reading an email like the second over the phone? Rick From scott at crisscott.com Tue Oct 3 08:47:57 2006 From: scott at crisscott.com (Scott Mattocks) Date: Tue, 03 Oct 2006 08:47:57 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> Message-ID: <45225BFD.3010606@crisscott.com> Cliff Hirsch wrote: > I'm confused by mod_rewrite > > What is the point? What is the big deal? > > Why is www.website.com/page/action/stuff/morestuff/ > > Better than > > www.website.com/page.php?action=something&id=#&.... > > > What difference does it make? To me it mainly looks like a major > headache making all the queries written in PHP play nicely with > mod_rewrite. The Googlebot likes version one much better. And it is always a good idea to make the Googlebot happy. It's also easier for users to read and understand so they can get back to a particular page more easily or understand what their bookmark says. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From mwithington at PLMresearch.com Tue Oct 3 08:49:36 2006 From: mwithington at PLMresearch.com (Mark Withington) Date: Tue, 3 Oct 2006 08:49:36 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358016929C9@network.PLMresearch.com> I'm no Jack Kennedy, however, I believe part of the idea is "security-by-obscurity". The less you tell the bad guys the better. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 ext. 704 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 Skype: 508-570-2285 http://www.PLMresearch.com AIM/MSN/Skype: PLMresearch Yahoo: PLMresearch2000 mwithington at plmresearch.com Public Key: http://www.plmresearch.com/keys/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Cliff Hirsch Sent: Tuesday, October 03, 2006 8:43 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] mod_rewrite -- what's the big deal? I'm confused by mod_rewrite What is the point? What is the big deal? Why is www.website.com/page/action/stuff/morestuff/ Better than www.website.com/page.php?action=something&id=#&.... What difference does it make? To me it mainly looks like a major headache making all the queries written in PHP play nicely with mod_rewrite. Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From billy.reisinger at gmail.com Tue Oct 3 08:52:28 2006 From: billy.reisinger at gmail.com (Billy Reisinger) Date: Tue, 3 Oct 2006 07:52:28 -0500 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <45225B80.2080907@mitechie.com> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> <45225B80.2080907@mitechie.com> Message-ID: <09403F59-867F-44D0-9583-63AD644431E8@gmail.com> So, yeah, there's the whole point about the urls being easier to remember. Also, having your query string out there in the wild reveals some things about your implementation to would-be hackers. Not that you aren't covering your ass, of course. That's just another excuse I've heard for using mod-rewrite. Another thing is that you aren't revealing the file type you are using (php) and thus are making it even harder for someone to know how you are generating content. Of course, someone could just inspect the HTTP headers to find out your server is using PHP. On the other hand, if you are using a service to distribute your content widely, like a server farm (think Akamai), you now have complete ambiguity about what technology you are using. On Oct 3, 2006, at 7:45 AM, Richard Harding wrote: > Cliff Hirsch wrote: >> I?m confused by mod_rewrite >> >> What is the point? What is the big deal? >> >> Why is www.website.com/page/action/stuff/morestuff/ >> >> Better than >> >> www.website.com/page.php?action=something&id=#&.... >> >> What difference does it make? To me it mainly looks like a major >> headache making all the queries written in PHP play nicely with >> mod_rewrite. > > Ever tried reading an email like the second over the phone? > > Rick > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From dorgan at optonline.net Tue Oct 3 09:06:46 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Tue, 03 Oct 2006 09:06:46 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <09403F59-867F-44D0-9583-63AD644431E8@gmail.com> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> <45225B80.2080907@mitechie.com> <09403F59-867F-44D0-9583-63AD644431E8@gmail.com> Message-ID: <45226066.9040007@optonline.net> Also mod_rewrite makes it easier to track stats as well. For instance you may not be able to get stats for index.php?action=Products&prodid=99 where as you would be able to track stats on /products/99 Billy Reisinger wrote: > So, yeah, there's the whole point about the urls being easier to > remember. Also, having your query string out there in the wild > reveals some things about your implementation to would-be hackers. > Not that you aren't covering your ass, of course. That's just another > excuse I've heard for using mod-rewrite. > Another thing is that you aren't revealing the file type you are > using (php) and thus are making it even harder for someone to know > how you are generating content. Of course, someone could just > inspect the HTTP headers to find out your server is using PHP. On > the other hand, if you are using a service to distribute your content > widely, like a server farm (think Akamai), you now have complete > ambiguity about what technology you are using. > > On Oct 3, 2006, at 7:45 AM, Richard Harding wrote: > > >> Cliff Hirsch wrote: >> >>> I?m confused by mod_rewrite >>> >>> What is the point? What is the big deal? >>> >>> Why is www.website.com/page/action/stuff/morestuff/ >>> >>> Better than >>> >>> www.website.com/page.php?action=something&id=#&.... >>> >>> What difference does it make? To me it mainly looks like a major >>> headache making all the queries written in PHP play nicely with >>> mod_rewrite. >>> >> Ever tried reading an email like the second over the phone? >> >> Rick >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From tom at supertom.com Tue Oct 3 09:39:35 2006 From: tom at supertom.com (Tom Melendez) Date: Tue, 3 Oct 2006 09:39:35 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <45226066.9040007@optonline.net> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> <45225B80.2080907@mitechie.com> <09403F59-867F-44D0-9583-63AD644431E8@gmail.com> <45226066.9040007@optonline.net> Message-ID: <117286890610030639j38e62e8na1c9ca6760c9f424@mail.gmail.com> And while we're all leading the cheer for mod_rewrite, I like to mention a particular feature that I have found useful: proxy. With the proxy directive, you can rewrite the URL without notifying the browser (you're actually "proxying" the url). So, the user types in one thing, you can redirect their request somewhere else without the user suspecting anything. I use this on search feature for a website - the searches are conducted on a completely different machine - but the user still sees the same website and URLs Tom http://www.liphp.org On 10/3/06, Donald J Organ IV wrote: > Also mod_rewrite makes it easier to track stats as well. For instance > you may not be able to get stats for index.php?action=Products&prodid=99 > where as you would be able to track stats on /products/99 > > Billy Reisinger wrote: > > So, yeah, there's the whole point about the urls being easier to > > remember. Also, having your query string out there in the wild > > reveals some things about your implementation to would-be hackers. > > Not that you aren't covering your ass, of course. That's just another > > excuse I've heard for using mod-rewrite. > > Another thing is that you aren't revealing the file type you are > > using (php) and thus are making it even harder for someone to know > > how you are generating content. Of course, someone could just > > inspect the HTTP headers to find out your server is using PHP. On > > the other hand, if you are using a service to distribute your content > > widely, like a server farm (think Akamai), you now have complete > > ambiguity about what technology you are using. > > > > On Oct 3, 2006, at 7:45 AM, Richard Harding wrote: > > > > > >> Cliff Hirsch wrote: > >> > >>> I'm confused by mod_rewrite > >>> > >>> What is the point? What is the big deal? > >>> > >>> Why is www.website.com/page/action/stuff/morestuff/ > >>> > >>> Better than > >>> > >>> www.website.com/page.php?action=something&id=#&.... > >>> > >>> What difference does it make? To me it mainly looks like a major > >>> headache making all the queries written in PHP play nicely with > >>> mod_rewrite. > >>> > >> Ever tried reading an email like the second over the phone? > >> > >> Rick > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From chsnyder at gmail.com Tue Oct 3 09:44:04 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 3 Oct 2006 09:44:04 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> Message-ID: On 10/3/06, Cliff Hirsch wrote: > What difference does it make? To me it mainly looks like a major headache > making all the queries written in PHP play nicely with mod_rewrite. This may be going beyond the substance of your question, but mod_rewrite is arguably the best way to enable a model-view-controller-ish interface for your web application. A simple rewrite rule, along with some exceptions for static assets (design elements, javascript libraries), will funnel everything through your dispatch script. RewriteEngine On RewriteCond %{REQUEST_URI} !^/www/.* RewriteRule ^.* /usr/local/myframework/http-engine.php Now all requests that don't begin with /www/ get handled by one script, which can give you big savings in the maintenance and security departments. Rewriting doesn't change queries at all, btw. You can pick up the requested uri from the $_SERVER superglobal, and $_GET vars are set correctly. --- Chris Snyder http://chxo.com/ From cliff at pinestream.com Tue Oct 3 10:12:34 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Tue, 3 Oct 2006 10:12:34 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: Message-ID: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> Ok, so I'm starting to see the benefits, but now I have to be an Apache guru on top of a PHP guru? Can anyone suggest good tutorials? Does this mean I have to change every URL that's embedded in every page from ?key=value&... to /value1/value2 And do I have to know the order of the request params for it to work? Or as Chris says, do I still access the query values from $get, $post? I don't use a Framework or a true MVC architecture -- I think. It's more like Cliff's hack. But to my defense, I do use a single entry point (index.php) that dispatches requests via ?page=somepage&action=someaction&other params as required. So where would I go from here? And don't say scrap your code and switch to a Framework. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of csnyder Sent: Tuesday, October 03, 2006 8:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] mod_rewrite -- what's the big deal? On 10/3/06, Cliff Hirsch wrote: > What difference does it make? To me it mainly looks like a major headache > making all the queries written in PHP play nicely with mod_rewrite. This may be going beyond the substance of your question, but mod_rewrite is arguably the best way to enable a model-view-controller-ish interface for your web application. A simple rewrite rule, along with some exceptions for static assets (design elements, javascript libraries), will funnel everything through your dispatch script. RewriteEngine On RewriteCond %{REQUEST_URI} !^/www/.* RewriteRule ^.* /usr/local/myframework/http-engine.php Now all requests that don't begin with /www/ get handled by one script, which can give you big savings in the maintenance and security departments. Rewriting doesn't change queries at all, btw. You can pick up the requested uri from the $_SERVER superglobal, and $_GET vars are set correctly. --- Chris Snyder http://chxo.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From dorgan at optonline.net Tue Oct 3 10:17:04 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Tue, 03 Oct 2006 10:17:04 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> References: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> Message-ID: <452270E0.7050604@optonline.net> Yes you would have to change the links in the page to /value1/value2 and yes you would still access the variables via $_GET, $_POST, & $_REQUEST all apache does with mod_rewrite is look at the pattern and then in the background make the normal ?key=value calls in the background. Cliff Hirsch wrote: > Ok, so I'm starting to see the benefits, but now I have to be an Apache > guru on top of a PHP guru? Can anyone suggest good tutorials? > > Does this mean I have to change every URL that's embedded in every page > from ?key=value&... to /value1/value2 And do I have to know the order of > the request params for it to work? Or as Chris says, do I still access > the query values from $get, $post? > > I don't use a Framework or a true MVC architecture -- I think. It's more > like Cliff's hack. But to my defense, I do use a single entry point > (index.php) that dispatches requests via > ?page=somepage&action=someaction&other params as required. > > So where would I go from here? And don't say scrap your code and switch > to a Framework. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of csnyder > Sent: Tuesday, October 03, 2006 8:44 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] mod_rewrite -- what's the big deal? > > On 10/3/06, Cliff Hirsch wrote: > > >> What difference does it make? To me it mainly looks like a major >> > headache > >> making all the queries written in PHP play nicely with mod_rewrite. >> > > This may be going beyond the substance of your question, but > mod_rewrite is arguably the best way to enable a > model-view-controller-ish interface for your web application. A simple > rewrite rule, along with some exceptions for static assets (design > elements, javascript libraries), will funnel everything through your > dispatch script. > > RewriteEngine On > RewriteCond %{REQUEST_URI} !^/www/.* > RewriteRule ^.* /usr/local/myframework/http-engine.php > > Now all requests that don't begin with /www/ get handled by one > script, which can give you big savings in the maintenance and security > departments. > > Rewriting doesn't change queries at all, btw. You can pick up the > requested uri from the $_SERVER superglobal, and $_GET vars are set > correctly. > > --- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From chsnyder at gmail.com Tue Oct 3 12:01:54 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 3 Oct 2006 12:01:54 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> References: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> Message-ID: On 10/3/06, Cliff Hirsch wrote: > I don't use a Framework or a true MVC architecture -- I think. It's more > like Cliff's hack. But to my defense, I do use a single entry point > (index.php) that dispatches requests via > ?page=somepage&action=someaction&other params as required. > > So where would I go from here? And don't say scrap your code and switch > to a Framework. So you could use mod_rewrite to switch to urls that look like http://example.org/somepage?action=someaction, or even http://example.org/somepage/someaction Depends on how much re-coding you want to do, and how flexible "Cliff's hack" needs to be to get the job done. I use a url scheme that looks like http://example.org/path/to/some/object.format?action=someaction The default action is "view" so standard page views require no query string. -- Chris Snyder http://chxo.com/ From 1j0lkq002 at sneakemail.com Tue Oct 3 12:34:11 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 03 Oct 2006 09:34:11 -0700 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> References: <003d01c6e6e9$7d65f480$12a8a8c0@HirschLaptop> Message-ID: <14203-88120@sneakemail.com> Cliff Hirsch cliff-at-pinestream.com |nyphp dev/internal group use| wrote: > I?m confused by mod_rewrite > > What is the point? What is the big deal? > > Why is www.website.com/page/action/stuff/morestuff/ > > Better than > > www.website.com/page.php?action=something&id=#&.... > > What difference does it make? To me it mainly looks like a major > headache making all the queries written in PHP play nicely with > mod_rewrite. > > Cliff > Keeping in mind that my focus is on competitive webmastering (where different isn't always better, but different that is faster/more transparent/easier etc is always better) you aren't stuck with mod rewrite and Apache. As I know Chris Snyder knows very well ;-) there's more than one way to code a front controller. Any way you want to achieve a goal of satisfying a virtual URL is fine. Of course if it is slow, resource intensive, or allows for duplicate URLs for the same content you would be better off with mod_rewrite because it's pretty good and accurate. In my opinion, at this time, Apache provides the fastest ways to manage the URLs of your site, with several options in addition to mod_rewrite (Tom Melendez mentioned proxy, I have used files and directory directives, and combinations of PHP and all of the above). One thing I can promise you is that right now, a URL like www.example.com/stuff-catalog/Type-one-stuff/bluestuff.html works much better than www.example.com/index.php?catalog=stuff&stuff_type=1&view='blue' for users, search engines, and archives. And if you research front controllers, an easy path to enlightenment is the symfony framework because the code is good and the front controller is well planned. However, I personally would not use it because it is sub-optimal in the search engine and competitiveness departments. It is a good exercise for understanding front controllers, and to see the conceptual limitations that come with abstracting a front controller. If you are a search optimizer you can use that as the example to beat, because it represents a fairly state of the art implementation of a framework/front controller (and therefore represents that status quo, which is what you need to outperform). Hope that's helpful. I am not a PHP guru. -=john andrews -- ------------------------------------------------------------- "The web is competitive. Just because you can't smell the stench or see the grime, doesn't mean the person on the other end of the connection is a good citizen in an upscale suburban neighborhood making an honest living giving you a fair deal. He's probably not." --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From rmarscher at beaffinitive.com Tue Oct 3 12:49:34 2006 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue, 03 Oct 2006 12:49:34 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> References: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> Message-ID: <4522949E.8080603@beaffinitive.com> Yeah, Cliff. If all of your pages already follow a standard of ?page=somepage&action=someaction&other params... Then you can just drop in this rule: RewriteRule (.+)/(.+) index.php?page=$1&action=$2 [QSA,L] And instantly be able to do www.somesite.com/sompage/someaction?otherparam=something&etc... without breaking anything. You wouldn't even have to change any of your existing links immediately if you didn't feel like it... they would still work. -Rob Cliff Hirsch wrote: > Ok, so I'm starting to see the benefits, but now I have to be an Apache > guru on top of a PHP guru? Can anyone suggest good tutorials? > > Does this mean I have to change every URL that's embedded in every page > from ?key=value&... to /value1/value2 And do I have to know the order of > the request params for it to work? Or as Chris says, do I still access > the query values from $get, $post? > > I don't use a Framework or a true MVC architecture -- I think. It's more > like Cliff's hack. But to my defense, I do use a single entry point > (index.php) that dispatches requests via > ?page=somepage&action=someaction&other params as required. > > So where would I go from here? And don't say scrap your code and switch > to a Framework. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of csnyder > Sent: Tuesday, October 03, 2006 8:44 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] mod_rewrite -- what's the big deal? > > On 10/3/06, Cliff Hirsch wrote: > > >> What difference does it make? To me it mainly looks like a major >> > headache > >> making all the queries written in PHP play nicely with mod_rewrite. >> > > This may be going beyond the substance of your question, but > mod_rewrite is arguably the best way to enable a > model-view-controller-ish interface for your web application. A simple > rewrite rule, along with some exceptions for static assets (design > elements, javascript libraries), will funnel everything through your > dispatch script. > > RewriteEngine On > RewriteCond %{REQUEST_URI} !^/www/.* > RewriteRule ^.* /usr/local/myframework/http-engine.php > > Now all requests that don't begin with /www/ get handled by one > script, which can give you big savings in the maintenance and security > departments. > > Rewriting doesn't change queries at all, btw. You can pick up the > requested uri from the $_SERVER superglobal, and $_GET vars are set > correctly. > > --- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From stephen at capellic.com Fri Oct 6 13:20:54 2006 From: stephen at capellic.com (Stephen Musgrave) Date: Fri, 6 Oct 2006 13:20:54 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? Message-ID: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> I am hoping for some direction here, other efforts have come up fruitless. Thanks in advance! Here's what we need: We have files on a Unix web server in various formats, the foremost is Word DOC. We have a script that runs in PHP that gathers all of the documents and creates a PDF document stuffs the files in there. But the problem is that we can't stuff a Word document into a PDF document without first converting it to a PDF. What I will need to be able to do is covert that document via PHP or PHP's command line capability (presumably using the exec() command). We will then return control to our compilation script, pull in the newly converted file and then we're done. Thanks, Stephen Musgrave *capellic ///////////////////////////////////////////////////////// 718 384 0787 stephen at capellic.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Fri Oct 6 13:36:24 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 06 Oct 2006 12:36:24 -0500 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> Message-ID: <45269418.4000303@polymerdb.org> Hi Stephen, Best I've been able to do is get my .doc files into RTF format, and then go from RTF to PDF using Ted. But going from .doc to RTF (or from .doc to *anything*) without MS-Word itself (which I presume isn't running on your Unix web server) -- that's going to be tough, and probably impossible, unless you either have fairly generic page layouts, or you're not highly concerned about losing some level of formatting. And still, I'm not aware of any command line tool that will convert files from .doc format. Wish I could offer more, but then I also wish I had *found* more, as I too would love to be able to automate conversion from MS-Word to PDF without Windows and Word. - Allen Stephen Musgrave wrote: > I am hoping for some direction here, other efforts have come up > fruitless. Thanks in advance! > > Here's what we need: > > We have files on a Unix web server in various formats, the foremost is > Word DOC. We have a script that runs in PHP that gathers all of the > documents and creates a PDF document stuffs the files in there. But the > problem is that we can't stuff a Word document into a PDF document > without first converting it to a PDF. What I will need to be able to do > is covert that document via PHP or PHP's command line capability > (presumably using the exec() command). We will then return control to > our compilation script, pull in the newly converted file and then we're > done. > > > Thanks, > > Stephen Musgrave > *capellic > > ///////////////////////////////////////////////////////// > > 718 384 0787 > stephen at capellic.com > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Allen Shaw Polymer (http://polymerdb.org) From tboyden at supercoups.com Wed Oct 4 12:49:49 2006 From: tboyden at supercoups.com (Timothy Boyden) Date: Wed, 4 Oct 2006 12:49:49 -0400 Subject: [nycphp-talk] PECL extension how to question Message-ID: Hi everyone, I'm attempting to re-code the following example in a PHP equivalent way: http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/webap p/HelloWorldServlet.java Basically it is a code example from the Java based iText PDF manipulation library. My final code will be limited by the scripting technology made available by our Network Solutions hosting package. Thus I am attempting to use a compiled PHP class of the iText library created with the PHP-Java-Bridge extension as detailed here: http://php-java-bridge.sourceforge.net/ My setup seems to be working properly as the test examples for the PHP-Java-Bridge work correctly. So I have begun to step into the programming problem and am stuck on how to replicate the Java HttpRequest and HttpResponse mechanisms in a PHP way. My first thoughts were to do this using the PECL HTTP extension and use the HttpRequest and HttpResponse classes, however I've never coded in an object-oriented fashion and can't seem to figure out how to use the PECL HTTP extension. But perhaps I'm going in the wrong direction with how to approach this? Any suggestions would be welcome and greatly appreciated. Thanks, Tim Boyden --------------------------- Timothy Boyden Network Administrator tboyden at supercoups.com SuperCoups(r) | 350 Revolutionary Drive | E. Taunton, MA 02718 508-977-2034 | www.supercoups.com --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Fri Oct 6 13:57:47 2006 From: ramons at gmx.net (David Krings) Date: Fri, 06 Oct 2006 13:57:47 -0400 Subject: [nycphp-talk] Getting GMT bias from browser Message-ID: <6.1.2.0.2.20061006135740.02cbafc8@pop.snet.yahoo.com> Hi, this question is probably as old as the www. How do I get the GMT bias of the system on which the client browser runs? Getting the actual time would be even nicer. I'm fine with a solution that works most of the time. I thought about figuring out where in the world the IP is located. I recall that there are websites that can track an IP to a location (which may or may not be correct), but I'd need to handle such a response and then have to figure out what the GMT bias is. There must be a more straight forward solution. I need to know the client's time on the browser, so it is not just about displaying the time in the browser for which JavaScript would be the better choice. Any tips? David From leeu at cfl.rr.com Fri Oct 6 14:05:52 2006 From: leeu at cfl.rr.com (Lee Underwood) Date: Fri, 06 Oct 2006 14:05:52 -0400 Subject: [nycphp-talk] XAMPP upgrade from lite version Message-ID: <7.0.1.0.0.20061006140503.02158180@cfl.rr.com> I have been successfully running the lite version of XAMPP. I now want to upgrade so I can use Mercury Mail for testing, as well as adding Perl. I just want to check to see if there is a different method for doing it aside from the one I figured out. I am going to save the httpd-vhosts.conf and php.ini files (I made several changes to them). Then backup the htdocs dir. Then I will delete the XAMPPLITE dir and install the XAMPP version, adding back the httpd-vhosts.conf and php.ini files and the htdoc directory (a few subdirectories actually). I figured that the httpd-vhosts.conf and php.ini files are the same in the full version so I wouldn't have to make all the changes again. Does this look correct? Any suggestions? Lee From rmarscher at beaffinitive.com Fri Oct 6 14:16:41 2006 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Fri, 06 Oct 2006 14:16:41 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> Message-ID: <45269D89.1070309@beaffinitive.com> That sounds like a pain in the ass :-) Only think I can think of is having a Windows machine somewhere that your Unix webserver ftp's the files to. The Windows machine has a scheduled batch program or something that periodically checks a folder to see if any doc files are in there... runs something like this command line program to do the conversion - - and then ftp's the resulting pdf back to your Unix server. Obviously not ideal... -Rob Stephen Musgrave wrote: > I am hoping for some direction here, other efforts have come up > fruitless. Thanks in advance! > > Here's what we need: > > We have files on a Unix web server in various formats, the foremost is > Word DOC. We have a script that runs in PHP that gathers all of the > documents and creates a PDF document stuffs the files in there. But > the problem is that we can't stuff a Word document into a PDF document > without first converting it to a PDF. What I will need to be able to > do is covert that document via PHP or PHP's command line capability > (presumably using the exec() command). We will then return control to > our compilation script, pull in the newly converted file and then > we're done. > > > Thanks, > > Stephen Musgrave > *capellic > > ///////////////////////////////////////////////////////// > > 718 384 0787 > stephen at capellic.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Rob Marscher Software Engineer rmarscher at beaffinitive.com 212.684.9100x17 From rotsen at gmail.com Fri Oct 6 14:34:21 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Fri, 6 Oct 2006 11:34:21 -0700 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <45269D89.1070309@beaffinitive.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <45269D89.1070309@beaffinitive.com> Message-ID: Openoffice converts DOCs to PDF or RTF N?stor :-) On 10/6/06, Rob Marscher wrote: > > That sounds like a pain in the ass :-) Only think I can think of is > having a Windows machine somewhere that your Unix webserver ftp's the > files to. The Windows machine has a scheduled batch program or > something that periodically checks a folder to see if any doc files are > in there... runs something like this command line program to do the > conversion - > - and then ftp's the resulting pdf back to your Unix server. Obviously > not ideal... > -Rob > > Stephen Musgrave wrote: > > I am hoping for some direction here, other efforts have come up > > fruitless. Thanks in advance! > > > > Here's what we need: > > > > We have files on a Unix web server in various formats, the foremost is > > Word DOC. We have a script that runs in PHP that gathers all of the > > documents and creates a PDF document stuffs the files in there. But > > the problem is that we can't stuff a Word document into a PDF document > > without first converting it to a PDF. What I will need to be able to > > do is covert that document via PHP or PHP's command line capability > > (presumably using the exec() command). We will then return control to > > our compilation script, pull in the newly converted file and then > > we're done. > > > > > > Thanks, > > > > Stephen Musgrave > > *capellic > > > > ///////////////////////////////////////////////////////// > > > > 718 384 0787 > > stephen at capellic.com > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > -- > Rob Marscher > Software Engineer > rmarscher at beaffinitive.com > 212.684.9100x17 > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellicle at gmail.com Fri Oct 6 14:49:24 2006 From: jellicle at gmail.com (Michael Sims) Date: Fri, 6 Oct 2006 14:49:24 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> Message-ID: <200610061449.25114.jellicle@gmail.com> On Friday 06 October 2006 1:20 pm, Stephen Musgrave wrote: > We have files on a Unix web server in various formats, the foremost > is Word DOC. We have a script that runs in PHP that gathers all of > the documents and creates a PDF document stuffs the files in there. > But the problem is that we can't stuff a Word document into a PDF > document without first converting it to a PDF. What I will need to > be able to do is covert that document via PHP or PHP's command line > capability (presumably using the exec() command). We will then > return control to our compilation script, pull in the newly converted > file and then we're done. OpenOffice can read Word, output PDF, has an API, and is available for Windows, Linux, Unix, etc. Here's someone who did it on a Windows machine: http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/ Doing it on a Unix machine is left as an exercise for the reader (or Googler). Michael Sims From ashaw at polymerdb.org Fri Oct 6 14:53:36 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 06 Oct 2006 13:53:36 -0500 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <45269D89.1070309@beaffinitive.com> Message-ID: <4526A630.7040703@polymerdb.org> Sure it does, with a human operator, but is there any way to do that in a batch or from the command line? - Allen N?stor wrote: > Openoffice converts DOCs to PDF or RTF > > N?stor :-) > > On 10/6/06, Rob Marscher wrote: > >> >> That sounds like a pain in the ass :-) Only think I can think of is >> having a Windows machine somewhere that your Unix webserver ftp's the >> files to. The Windows machine has a scheduled batch program or >> something that periodically checks a folder to see if any doc files are >> in there... runs something like this command line program to do the >> conversion - >> - and then ftp's the resulting pdf back to your Unix server. Obviously >> not ideal... >> -Rob >> -- Allen Shaw Polymer (http://polymerdb.org) From ramons at gmx.net Fri Oct 6 16:06:35 2006 From: ramons at gmx.net (David Krings) Date: Fri, 06 Oct 2006 16:06:35 -0400 Subject: [nycphp-talk] XAMPP upgrade from lite version In-Reply-To: <7.0.1.0.0.20061006140503.02158180@cfl.rr.com> References: <7.0.1.0.0.20061006140503.02158180@cfl.rr.com> Message-ID: <6.1.2.0.2.20061006160258.02c661f8@pop.gmx.net> Hi, looks good to me, but I'd make a copy of the apache config file as well unless you are very sure that you didn't change anything in there. Mercury Mail is nice, but make sure that it really saves the settings that you specified in the GUI. The ini files are somewhat easy to follow. I once tried Mercury Mail, configured it all nicely to allow only local accounts for testing, but it never saved the settings on clicking Save. Luckily I noticed that I was running a spam server before my ISP got aware of it. Since then I dropped the idea of running my own mail server. David At 02:05 PM 10/6/2006, you wrote: >I have been successfully running the lite version of XAMPP. I now >want to upgrade so I can use Mercury Mail for testing, as well as >adding Perl. I just want to check to see if there is a different >method for doing it aside from the one I figured out. I am going to >save the httpd-vhosts.conf and php.ini files (I made several changes >to them). Then backup the htdocs dir. Then I will delete the >XAMPPLITE dir and install the XAMPP version, adding back the >httpd-vhosts.conf and php.ini files and the htdoc directory (a few >subdirectories actually). > >I figured that the httpd-vhosts.conf and php.ini files are the same >in the full version so I wouldn't have to make all the changes again. >Does this look correct? Any suggestions? > >Lee > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From ramons at gmx.net Fri Oct 6 16:10:05 2006 From: ramons at gmx.net (David Krings) Date: Fri, 06 Oct 2006 16:10:05 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <45269D89.1070309@beaffinitive.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <45269D89.1070309@beaffinitive.com> Message-ID: <6.1.2.0.2.20061006160847.02e9be48@pop.gmx.net> Does OOo have command line capability? It can open doc files and save them right into PDF and OOo can run on Unix. Even if it works, it is still pretty ugly. David At 02:16 PM 10/6/2006, you wrote: >That sounds like a pain in the ass :-) Only think I can think of is >having a Windows machine somewhere that your Unix webserver ftp's the >files to. The Windows machine has a scheduled batch program or >something that periodically checks a folder to see if any doc files are >in there... runs something like this command line program to do the >conversion - >- and then ftp's the resulting pdf back to your Unix server. Obviously >not ideal... >-Rob > >Stephen Musgrave wrote: > > I am hoping for some direction here, other efforts have come up > > fruitless. Thanks in advance! > > > > Here's what we need: > > > > We have files on a Unix web server in various formats, the foremost is > > Word DOC. We have a script that runs in PHP that gathers all of the > > documents and creates a PDF document stuffs the files in there. But > > the problem is that we can't stuff a Word document into a PDF document > > without first converting it to a PDF. What I will need to be able to > > do is covert that document via PHP or PHP's command line capability > > (presumably using the exec() command). We will then return control to > > our compilation script, pull in the newly converted file and then > > we're done. > > > > > > Thanks, > > > > Stephen Musgrave > > *capellic > > > > ///////////////////////////////////////////////////////// > > > > 718 384 0787 > > stephen at capellic.com > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > >-- >Rob Marscher >Software Engineer >rmarscher at beaffinitive.com >212.684.9100x17 > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From ajai at bitblit.net Fri Oct 6 16:46:22 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 06 Oct 2006 16:46:22 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> References: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> Message-ID: <4526C09E.2060208@bitblit.net> Cliff Hirsch wrote: > Ok, so I'm starting to see the benefits, but now I have to be an Apache > guru on top of a PHP guru? Well, wouldn't that make you a better developer? -- A From cliff at pinestream.com Fri Oct 6 16:56:16 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Fri, 6 Oct 2006 16:56:16 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <4526C09E.2060208@bitblit.net> Message-ID: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> Sure, but I'm really a publisher and semiconductor sales, marketing, biz dev. and analyst guy. And I lick stamps, take out the garbage and burn toast. How many hats do I have to wear! -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ajai Khattri Sent: Friday, October 06, 2006 3:46 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mod_rewrite -- what's the big deal? Cliff Hirsch wrote: > Ok, so I'm starting to see the benefits, but now I have to be an Apache > guru on top of a PHP guru? Well, wouldn't that make you a better developer? -- A _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From jeff.knight at gmail.com Fri Oct 6 16:59:48 2006 From: jeff.knight at gmail.com (Jeff Knight) Date: Fri, 6 Oct 2006 15:59:48 -0500 Subject: [nycphp-talk] Apache Con Message-ID: <2ca9ba910610061359v18b1e36fq9afc248045634a29@mail.gmail.com> Who's coming down to apache con next week? Contact me off list for best bars & bbq. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Fri Oct 6 18:10:09 2006 From: ramons at gmx.net (David Krings) Date: Fri, 06 Oct 2006 18:10:09 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> References: <4526C09E.2060208@bitblit.net> <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> Message-ID: <6.1.2.0.2.20061006180115.02cbb2e8@pop.gmx.net> At 04:56 PM 10/6/2006, you wrote: >Sure, but I'm really a publisher and semiconductor sales, marketing, biz >dev. and analyst guy. And I lick stamps, take out the garbage and burn >toast. How many hats do I have to wear! The one of the Apache admin. I feel your pain. I have three degrees, tons of experience, am fluent in two languages, and collected skills in tech support, programming, technical writing, SQL, HTML, PHP,.....ok, enough bragging. As soon as I look for a better job, it all isn't enough, because I can't do Java, or C# or something else not on my list. You never wear enough hats. Besides that, when you can figure out semiconductors, then Apache is a piece of cake...well, in regards to complexity. I find the apache config file easier to grasp than IIS's admin GUI. Even I figured it out and I really hate ini files and programming and stuff like that....not enough hats, you know. David From ajai at bitblit.net Fri Oct 6 18:15:53 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 06 Oct 2006 18:15:53 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> References: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> Message-ID: <4526D599.5040605@bitblit.net> Cliff Hirsch wrote: > Sure, but I'm really a publisher and semiconductor sales, marketing, biz > dev. and analyst guy. And I lick stamps, take out the garbage and burn > toast. How many hats do I have to wear! FWIW, I got offered a great new job exactly because of my combined web development and sys. admin. experience... -- A From ajai at bitblit.net Fri Oct 6 18:22:38 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 06 Oct 2006 18:22:38 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> References: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> Message-ID: <4526D72E.3070403@bitblit.net> Cliff Hirsch wrote: > Sure, but I'm really a publisher and semiconductor sales, marketing, biz > dev. and analyst guy. And I lick stamps, take out the garbage and burn > toast. How many hats do I have to wear! Yeah but I assume that "semiconductor sales" wouldn't be of much use on your resume if you were applying for a web developer job and, "apache experience" on the other hand *would* be useful in that situation. I think a lot of us have worn many hats at one time or another - hell, Ive done sales and even writing product descriptions for a newsletter/catalog (no, not for J Peterman's ;-). But you decide what you want to go for and wear the appropriate hat(s) a lot more than the 'less useful" ones ;-) -- A From ken at secdat.com Fri Oct 6 19:06:59 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 06 Oct 2006 19:06:59 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <4526D599.5040605@bitblit.net> References: <001b01c6e989$ddfe9c00$12a8a8c0@HirschLaptop> <4526D599.5040605@bitblit.net> Message-ID: <4526E193.6030605@secdat.com> Ajai Khattri wrote: > Cliff Hirsch wrote: > >> Sure, but I'm really a publisher and semiconductor sales, marketing, biz >> dev. and analyst guy. And I lick stamps, take out the garbage and burn >> toast. How many hats do I have to wear! >> > > FWIW, I got offered a great new job exactly because of my combined web > development and sys. admin. experience... > > > > Congrats! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From chsnyder at gmail.com Fri Oct 6 19:10:37 2006 From: chsnyder at gmail.com (csnyder) Date: Fri, 6 Oct 2006 19:10:37 -0400 Subject: [nycphp-talk] PECL extension how to question In-Reply-To: References: Message-ID: On 10/4/06, Timothy Boyden wrote: > So I have begun to step into the programming > problem and am stuck on how to replicate the Java HttpRequest and > HttpResponse mechanisms in a PHP way. My first thoughts were to do this > using the PECL HTTP extension and use the HttpRequest and HttpResponse > classes, however I've never coded in an object-oriented fashion and can't > seem to figure out how to use the PECL HTTP extension. But perhaps I'm going > in the wrong direction with how to approach this? At the risk of telling you what you already know, the standard "PHP way" is to use the $_SERVER, $_GET, and/or $_POST superglobals to obtain whatever information you need about the request. These are automatically created when the webserver passes the request to PHP. PHP sets a few HTTP response headers automatically, which can be supplemented or overwritten using the header() function. The response body is simply the output of your script. There is an output buffering mechanism that can give you control over this. Anything outside of tags will also be part of the response. Sorry, this may be way too simple an answer, but I can't tell from your post whether you're new to PHP or if there's some advanced functionality you're trying to get at. -- Chris Snyder http://chxo.com/ From chsnyder at gmail.com Fri Oct 6 19:21:06 2006 From: chsnyder at gmail.com (csnyder) Date: Fri, 6 Oct 2006 19:21:06 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <200610061449.25114.jellicle@gmail.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <200610061449.25114.jellicle@gmail.com> Message-ID: On 10/6/06, Michael Sims wrote: > OpenOffice can read Word, output PDF, has an API, and is available for > Windows, Linux, Unix, etc. > > Here's someone who did it on a Windows machine: > > http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/ > > Doing it on a Unix machine is left as an exercise for the reader (or > Googler). This might save you some reading and googling: http://j.crecy.free.fr/index.php/2006/03/01/3-php_word_to_pdf Description is in French, but the code is English. Apparently you can connect to the OO.org service manager using a socket. Neat! -- Chris Snyder http://chxo.com/ From jonbaer at jonbaer.com Fri Oct 6 20:40:15 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Fri, 6 Oct 2006 20:40:15 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <200610061449.25114.jellicle@gmail.com> Message-ID: <58F01DE8-821D-481D-B50E-8E6B7CD10039@jonbaer.com> The thing is you are creating your own macros *in* OO and then running them CLI ... you would need X installed over a normal LAMP system still though I beleive ... http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html - Jon On Oct 6, 2006, at 7:21 PM, csnyder wrote: > On 10/6/06, Michael Sims wrote: > >> OpenOffice can read Word, output PDF, has an API, and is available >> for >> Windows, Linux, Unix, etc. >> >> Here's someone who did it on a Windows machine: >> >> http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/ >> >> Doing it on a Unix machine is left as an exercise for the reader (or >> Googler). > > This might save you some reading and googling: > http://j.crecy.free.fr/index.php/2006/03/01/3-php_word_to_pdf > > Description is in French, but the code is English. Apparently you can > connect to the OO.org service manager using a socket. Neat! > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From preinheimer at gmail.com Fri Oct 6 23:03:13 2006 From: preinheimer at gmail.com (Paul Reinheimer) Date: Fri, 6 Oct 2006 23:03:13 -0400 Subject: [nycphp-talk] Getting GMT bias from browser In-Reply-To: <6.1.2.0.2.20061006135740.02cbafc8@pop.snet.yahoo.com> References: <6.1.2.0.2.20061006135740.02cbafc8@pop.snet.yahoo.com> Message-ID: <6ec19ec70610062003qd7e7e7bhe4cb01441f7a9977@mail.gmail.com> This isn't going to appear in any of the headers the browser is going to send you, here's my print_r on apache_get_headers() -- Array ( [User-Agent] => Opera/9.01 (Macintosh; Intel Mac OS X; U; en) [Host] => example.preinheimer.com [Accept] => text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 [Accept-Language] => en,ja;q=0.9,fr;q=0.8,de;q=0.7,es;q=0.6,it;q=0.5,nl;q=0.4,sv;q=0.3,nb;q=0.2 [Accept-Charset] => iso-8859-1, utf-8, utf-16, *;q=0.1 [Accept-Encoding] => deflate, gzip, x-gzip, identity, *;q=0 [Cookie] => ZDEDebuggerPresent=php,phtml,php3 [Cookie2] => $Version=1 [Connection] => Keep-Alive, TE [TE] => deflate, gzip, chunked, identity, trailers ) -- Nothing in there about the GMT bias. I think your javascript idea however could be put to a decent use, use javascript to request a document, write a link to an image or whatever and send the user's current time that way. then store the information in a cookie, or their session. paul -- Paul Reinheimer Zend Over Certified Engineer 4^2, 5^2 :) From tedd at sperling.com Sat Oct 7 09:34:01 2006 From: tedd at sperling.com (tedd) Date: Sat, 7 Oct 2006 09:34:01 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <4526C09E.2060208@bitblit.net> References: <000001c6e6f5$f961ccb0$12a8a8c0@HirschLaptop> <4526C09E.2060208@bitblit.net> Message-ID: >Cliff Hirsch wrote: >> Ok, so I'm starting to see the benefits, but now I have to be an Apache > > guru on top of a PHP guru? For me, she would have to be an attractive PHP guru. :-) tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From paul at devonianfarm.com Sat Oct 7 16:51:37 2006 From: paul at devonianfarm.com (paul at devonianfarm.com) Date: Sat, 7 Oct 2006 16:51:37 -0400 (EDT) Subject: [nycphp-talk] mod_rewrite -- what's the big deal? Message-ID: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> An HTML attachment was scrubbed... URL: From tuon1 at netzero.net Sat Oct 7 20:16:03 2006 From: tuon1 at netzero.net (tuon1 at netzero.net) Date: Sun, 8 Oct 2006 00:16:03 GMT Subject: [nycphp-talk] mod_rewrite : What's the big deal? Message-ID: <20061007.171657.16038.976879@webmail22.nyc.untd.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Sun Oct 8 16:37:50 2006 From: paul at devonianfarm.com (paul at devonianfarm.com) Date: Sun, 8 Oct 2006 16:37:50 -0400 (EDT) Subject: [nycphp-talk] mod_rewrite : What's the big deal? Message-ID: <59795.192.168.1.70.1160339870.webmail@192.168.1.70> An HTML attachment was scrubbed... URL: From irfanbaig78 at gmail.com Sun Oct 8 20:39:28 2006 From: irfanbaig78 at gmail.com (irfan baig) Date: Sun, 8 Oct 2006 20:39:28 -0400 Subject: [nycphp-talk] DOC to PDF conversion on a LAMP system? In-Reply-To: <58F01DE8-821D-481D-B50E-8E6B7CD10039@jonbaer.com> References: <83413726-4434-4FBD-8E6C-728B18F229ED@capellic.com> <200610061449.25114.jellicle@gmail.com> <58F01DE8-821D-481D-B50E-8E6B7CD10039@jonbaer.com> Message-ID: <5a06fef90610081739v51a4be31ia103c85fc4eb544d@mail.gmail.com> If this is a one-off, or rare requirement, just do an OpenOffice macro on your local machine, as mentioned elsewhere in the thread. Otherwise, if you need on the fly conversion, or even scheduled conversion *on the webserver*, it's a little harder. One solution is to use PyUNO. PyUNO: First, this probably will not be possible on a shared server, unless you can install Open Office, or if there is an OOo process running and available. You will also need to install Xvfb and run OOo through that on your server. http://www.oooforum.org/forum/viewtopic.phtml?t=19790&highlight= I suppose since OOo runs on a port, you could run it on your local desktop box, or something, leaving it always on - I've never tried it. Essentially the actual conversion involves running a Python script (via exec(), for example) to communicate with OOo via PyUNO. Too bad there isn't a php-uno binding or extension - at least some of your problems would be solved ;) On 10/6/06, Jon Baer wrote: > The thing is you are creating your own macros *in* OO and then > running them CLI ... you would need X installed over a normal LAMP > system still though I beleive ... > > http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html > > - Jon > > On Oct 6, 2006, at 7:21 PM, csnyder wrote: > > > On 10/6/06, Michael Sims wrote: > > > >> OpenOffice can read Word, output PDF, has an API, and is available > >> for > >> Windows, Linux, Unix, etc. > >> > >> Here's someone who did it on a Windows machine: > >> > >> http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/ > >> > >> Doing it on a Unix machine is left as an exercise for the reader (or > >> Googler). > > > > This might save you some reading and googling: > > http://j.crecy.free.fr/index.php/2006/03/01/3-php_word_to_pdf > > > > Description is in French, but the code is English. Apparently you can > > connect to the OO.org service manager using a socket. Neat! > > > > -- > > Chris Snyder > > http://chxo.com/ > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Best, Irfan Baig From lturmelle at guamcell.com Mon Oct 9 01:56:47 2006 From: lturmelle at guamcell.com (Ligaya A. Turmelle) Date: Mon, 9 Oct 2006 15:56:47 +1000 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? Message-ID: <20B3D64D393A61429B3FE5C852C4D76F01BD19E1@gcabe.guamcell.com> :P - we are thank you ;) -----Original Message----- From: tedd [mailto:tedd at sperling.com] Sent: Saturday, October 07, 2006 11:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mod_rewrite -- what's the big deal? >Cliff Hirsch wrote: >> Ok, so I'm starting to see the benefits, but now I have to be an >> Apache > > guru on top of a PHP guru? For me, she would have to be an attractive PHP guru. :-) tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From billy.reisinger at gmail.com Mon Oct 9 11:50:41 2006 From: billy.reisinger at gmail.com (Billy Reisinger) Date: Mon, 9 Oct 2006 10:50:41 -0500 Subject: [nycphp-talk] Getting GMT bias from browser In-Reply-To: <6ec19ec70610062003qd7e7e7bhe4cb01441f7a9977@mail.gmail.com> References: <6.1.2.0.2.20061006135740.02cbafc8@pop.snet.yahoo.com> <6ec19ec70610062003qd7e7e7bhe4cb01441f7a9977@mail.gmail.com> Message-ID: <7E00768C-9527-45EB-8950-D4ED007AC2E0@gmail.com> Yeah, there's no good way to do this other than to have the user's browser tell you what it thinks the date/time is. The Javascript Date () object will, by default, return a date string that has the GMT offset in it. Mon Oct 09 2006 10:32:00 GMT-0500 (CDT) It also has a method called getTimezoneOffset(), which tells you the (+/-) minutes away from GMT the browser is. You could just test the value of $_COOKIE in php, redirect to a page that sets a cookie, and then go back to the main page. It sucks, but it works. "; print_r($_COOKIE); echo ""; } ?> Hope that speeds things up for you. Billy On Oct 6, 2006, at 10:03 PM, Paul Reinheimer wrote: > This isn't going to appear in any of the headers the browser is going > to send you, here's my print_r on apache_get_headers() > -- > Array > ( > [User-Agent] => Opera/9.01 (Macintosh; Intel Mac OS X; U; en) > [Host] => example.preinheimer.com > [Accept] => text/html, application/xml;q=0.9, > application/xhtml+xml, image/png, image/jpeg, image/gif, > image/x-xbitmap, */*;q=0.1 > [Accept-Language] => > en,ja;q=0.9,fr;q=0.8,de;q=0.7,es;q=0.6,it;q=0.5,nl;q=0.4,sv;q=0.3,nb;q > =0.2 > [Accept-Charset] => iso-8859-1, utf-8, utf-16, *;q=0.1 > [Accept-Encoding] => deflate, gzip, x-gzip, identity, *;q=0 > [Cookie] => ZDEDebuggerPresent=php,phtml,php3 > [Cookie2] => $Version=1 > [Connection] => Keep-Alive, TE > [TE] => deflate, gzip, chunked, identity, trailers > ) > -- > > Nothing in there about the GMT bias. > > I think your javascript idea however could be put to a decent use, use > javascript to request a document, write a link to an image or whatever > and send the user's current time that way. then store the information > in a cookie, or their session. > > > paul > > -- > Paul Reinheimer > Zend Over Certified Engineer 4^2, 5^2 :) > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From ajai at bitblit.net Mon Oct 9 12:16:59 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 09 Oct 2006 12:16:59 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> References: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> Message-ID: <452A75FB.6090101@bitblit.net> paul at devonianfarm.com wrote: > Roughly half of the market uses Apache and half uses IIS. Really? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Mon Oct 9 12:22:14 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 09 Oct 2006 12:22:14 -0400 Subject: [nycphp-talk] mod_rewrite : What's the big deal? In-Reply-To: <59795.192.168.1.70.1160339870.webmail@192.168.1.70> References: <59795.192.168.1.70.1160339870.webmail@192.168.1.70> Message-ID: <452A7736.6070204@bitblit.net> paul at devonianfarm.com wrote: > I've seen time and time again that the stuffs that come after the > domain name part, such as the > path/to/some/object.format?action=someaction that you all are talking > about: here are my questions. > > 1) what are those items mean? > http://en.wikipedia.org/wiki/Query_string -- A -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Mon Oct 9 12:23:20 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Mon, 09 Oct 2006 12:23:20 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> References: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> Message-ID: <452A7778.7040107@bitblit.net> paul at devonianfarm.com wrote: > Roughly half of the market uses Apache and half uses IIS. Sorry, I meant to send this URL in my last post: http://news.netcraft.com/archives/web_server_survey.html -- A -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at devonianfarm.com Mon Oct 9 20:59:39 2006 From: paul at devonianfarm.com (paul at devonianfarm.com) Date: Mon, 9 Oct 2006 20:59:39 -0400 (EDT) Subject: [nycphp-talk] mod_rewrite -- what's the big deal? Message-ID: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> An HTML attachment was scrubbed... URL: From ramons at gmx.net Mon Oct 9 21:29:21 2006 From: ramons at gmx.net (David Krings) Date: Mon, 09 Oct 2006 21:29:21 -0400 Subject: [nycphp-talk] Getting GMT bias from browser In-Reply-To: <7E00768C-9527-45EB-8950-D4ED007AC2E0@gmail.com> References: <6.1.2.0.2.20061006135740.02cbafc8@pop.snet.yahoo.com> <6ec19ec70610062003qd7e7e7bhe4cb01441f7a9977@mail.gmail.com> <7E00768C-9527-45EB-8950-D4ED007AC2E0@gmail.com> Message-ID: <6.1.2.0.2.20061009205902.02f2dc98@pop.gmx.net> At 11:50 AM 10/9/2006, you wrote: >Yeah, there's no good way to do this other than to have the user's >browser tell you what it thinks the date/time is. The Javascript Date >() object will, by default, return a date string that has the GMT >offset in it. > >Mon Oct 09 2006 10:32:00 GMT-0500 (CDT) > >It also has a method called getTimezoneOffset(), which tells you the >(+/-) minutes away from GMT the browser is. You could just test the >value of $_COOKIE in php, redirect to a page that sets a cookie, and >then go back to the main page. It sucks, but it works. Thank you very much for the script code. I did try it out and it indeed sets the GMT_Bias in $_COOKIE. So far so good. Being in CT I expected the bias to be 300, but it is 240. I also placed myself in different timezones and not surprisingly, it comes up with the same result. So, how about putting my server back on the East Coast and make my client now on a different PC to be in Germany. As bias I get this time -120 although I expected it to be -60. That together makes 360 minutes and that results to 6 hours difference, which indeed is the correct difference between here and Germany. So I guess what I need to do know is add some protection in case the browser does not accept cookies and figure out what my server GMT bias is and arrange that with the browser GMT bias to calculate the browser time based on the server time and the GMT difference. I probably can do that in one go by mashing the biases together and add the positive or negative bias. A quick look on the GMT website shows that the 240 and -120 are indeed correct due to DST. So I should do some more testing by placing both client and server in that week where the US is off in its DST setting compared to the rest of the world, which by the way really sucks big time when dealing with folks in Germany and the difference is out of a sudden 7 hours. How was that? By next year it gets even worse as DST in the US lasts one month longer than everywhere else. Ah well, now I have a nice script that will help me figure this all out. If I just wouldn't have a pesky job that takes the best 8 hours of my day...... Thank you very much, that was really nice of you ! David K. From ramons at gmx.net Mon Oct 9 21:37:21 2006 From: ramons at gmx.net (David Krings) Date: Mon, 09 Oct 2006 21:37:21 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <452A75FB.6090101@bitblit.net> References: <53285.192.168.1.71.1160254297.webmail@192.168.1.71> <452A75FB.6090101@bitblit.net> Message-ID: <6.1.2.0.2.20061009212936.03056f00@pop.gmx.net> I think it is more 2/3 Apache and 1/3 IIS. Which is still unbelievable...IMHO IIS rapidly inhales big time. For the numbers look here: http://arstechnica.com/journals/microsoft.ars/2006/6/8/4271 Also, some of these many magazines I get at work did quite a thorogh comparison between the various stacks for web apps and WAMPP came up on top in regards to speed and ease of use. That is in line with my experiences. David K. At 12:16 PM 10/9/2006, you wrote: >paul at devonianfarm.com wrote: >>Roughly half of the market uses Apache and half uses IIS. > >Really? From skyline at publicmine.com Mon Oct 9 21:54:06 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Mon, 9 Oct 2006 21:54:06 -0400 Subject: [nycphp-talk] Running backtick commands and responding to stdout/in Message-ID: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> Hey all, I am attempting to run ssh (w/out the ssh2 module) by backticking commands from the command line. $result = `ssh -l $userStr $hostStr`; This line causes the script to display the enter password and php seems to let it go right to stdin/console. Is there any way for php to catch this (since I know its comming) and enter the password? Or must I install the ssh2 module and call ssh2_connect( )? Thanks! - Ben From dcech at phpwerx.net Mon Oct 9 22:00:49 2006 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 09 Oct 2006 22:00:49 -0400 Subject: [nycphp-talk] Running backtick commands and responding to stdout/in In-Reply-To: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> References: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> Message-ID: <452AFED1.9010702@phpwerx.net> Ben Sgro (sk) wrote: > Hey all, > > I am attempting to run ssh (w/out the ssh2 module) by backticking commands > from the command line. > > $result = `ssh -l $userStr $hostStr`; > > This line causes the script to display the enter password and php seems to > let it go right to stdin/console. > Is there any way for php to catch this (since I know its comming) and enter > the password? You can do this a few different ways, but probably the most straightforward is to use proc_open (http://php.net/proc_open). This lets you define file descriptors for stdin, stdout and stderr so you can do some pretty complex interaction with external programs. Dan > > Or must I install the ssh2 module and call ssh2_connect( )? > > Thanks! > > - Ben From skyline at publicmine.com Mon Oct 9 22:04:23 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Mon, 9 Oct 2006 22:04:23 -0400 Subject: [nycphp-talk] Running backtick commands and responding tostdout/in References: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> <452AFED1.9010702@phpwerx.net> Message-ID: <000301c6ec10$6aa5f210$6401a8c0@gamebox> Hello Dan, Just gave that a quick read. Very cool. I will post results tomorrow. Thanks! - Ben ----- Original Message ----- From: "Dan Cech" To: "NYPHP Talk" Sent: Monday, October 09, 2006 10:00 PM Subject: Re: [nycphp-talk] Running backtick commands and responding tostdout/in Ben Sgro (sk) wrote: > Hey all, > > I am attempting to run ssh (w/out the ssh2 module) by backticking commands > from the command line. > > $result = `ssh -l $userStr $hostStr`; > > This line causes the script to display the enter password and php seems to > let it go right to stdin/console. > Is there any way for php to catch this (since I know its comming) and > enter > the password? You can do this a few different ways, but probably the most straightforward is to use proc_open (http://php.net/proc_open). This lets you define file descriptors for stdin, stdout and stderr so you can do some pretty complex interaction with external programs. Dan > > Or must I install the ssh2 module and call ssh2_connect( )? > > Thanks! > > - Ben _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From subson at gmail.com Tue Oct 10 07:25:09 2006 From: subson at gmail.com (Subson Mittal) Date: Tue, 10 Oct 2006 16:55:09 +0530 Subject: [nycphp-talk] How to get Hotmail address book using php Message-ID: Hello , I need to script to get the hotmail address book using php script. can anybody help? -- Thanks Subson Mittal -------------- next part -------------- An HTML attachment was scrubbed... URL: From agfische at email.smith.edu Tue Oct 10 08:26:45 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue, 10 Oct 2006 08:26:45 -0400 Subject: [nycphp-talk] Security and POP/IMAP/HTTPS Message-ID: <452B9185.7070205@email.smith.edu> Greetings, Someone was proposing sending PDFs containing sensitive info over email. I was thinking of recommending against it, citing the lack of security in the POP/IMAP protocols. Is that a legitimate concern? An alternative would be to email them with a link to the PDF which would be protected with a login system (That's where the PHP would come in). Thoughts? Thanks, -Aaron From sailer at bnl.gov Tue Oct 10 08:46:13 2006 From: sailer at bnl.gov (Tim Sailer) Date: Tue, 10 Oct 2006 08:46:13 -0400 Subject: [nycphp-talk] Security and POP/IMAP/HTTPS In-Reply-To: <452B9185.7070205@email.smith.edu> References: <452B9185.7070205@email.smith.edu> Message-ID: <20061010124612.GA5704@bnl.gov> On Tue, Oct 10, 2006 at 08:26:45AM -0400, Aaron Fischer wrote: > Greetings, > > Someone was proposing sending PDFs containing sensitive info over email. > I was thinking of recommending against it, citing the lack of security > in the POP/IMAP protocols. Is that a legitimate concern? Oh, just a little concern! :) > An alternative would be to email them with a link to the PDF which would > be protected with a login system (That's where the PHP would come in). A few years ago, I wrote an http file transfer system, where you would upload a file via a ssl form, and the system would give you a url containing convoluted dir names to grab the file. This way, a bot couldn't 'guess' the full path, and we would remove the file after 24 hrs. All this in PHP, of course. If you are interested, I think I still have the source kicking around somewhere. It wasn't nice code, or a lot of it, but it worked for the client. Tim -- Tim Sailer DoE Intelligence and Counterintelligence - Cyber Division Northeast Regional Counterintelligence Office Brookhaven National Laboratory (631) 344-3001 From lists at genoverly.net Tue Oct 10 09:06:58 2006 From: lists at genoverly.net (michael) Date: Tue, 10 Oct 2006 09:05:58 -0401 Subject: [nycphp-talk] Security and POP/IMAP/HTTPS In-Reply-To: <452B9185.7070205@email.smith.edu> References: <452B9185.7070205@email.smith.edu> Message-ID: <20061010090558.3888b729@dt.genoverly.com> On Tue, 10 Oct 2006 08:26:45 -0400 Aaron Fischer wrote: > Greetings, > > Someone was proposing sending PDFs containing sensitive info over > email. I was thinking of recommending against it, citing the lack of > security in the POP/IMAP protocols. Is that a legitimate concern? POP/IMAP is used when you connect your mail client (MUA) to the server to send and retrieve mail. It can be very secure, most clients I have used allow you to check the TLS/SSL box to encrypt the initial and subsequent conversations with a mail server (MDA). SMTP is used to route mail from server to server (MTA) over the internet. This is where your mail will fly naked. You may want to consider encrypt the mail at the source and decrypt at the target. Not only does this method secure the message it also handles the 'other' concern in security: the sender is who he says he is. Found on Amazon for $17.22 PGP & GPG: Email for the Practical Paranoid [ILLUSTRATED] (Paperback) by Michael W Lucas (Author) "You don't need to understand everything about modern cryptography to use OpenPGP successfully..." MUA = mail user agent (thuderbird, sylpheed, etc) MDA = mail delivery agent (courier-imap, dovecot, etc) MTA = mail transfer agent (postfix, sendmail, etc) Wikipedia can give a good overview of email protocols.. read it. > An alternative would be to email them with a link to the PDF which > would be protected with a login system (That's where the PHP would > come in). > > Thoughts? > > Thanks, > > -Aaron Sending emails with large attachments (images, spreadsheets, pdfs, etc) is really not a good practice, and frankly, pretty annoying. Your idea of just sending the link and hosting the documents on a server is a preferred method (well done!). It is much less hassle to set up -and- you get the added bonus of being able to make corrections and additions to the document (are they ever done right the first time? [grin]). You only have to repost to the web and not resend to all the target recipients. Not to mention.. you don't have to teach them PGP/GPG. -- michael From jellicle at gmail.com Tue Oct 10 09:21:57 2006 From: jellicle at gmail.com (Michael Sims) Date: Tue, 10 Oct 2006 09:21:57 -0400 Subject: [nycphp-talk] Security and POP/IMAP/HTTPS In-Reply-To: <452B9185.7070205@email.smith.edu> References: <452B9185.7070205@email.smith.edu> Message-ID: <200610100921.57562.jellicle@gmail.com> On Tuesday 10 October 2006 8:26 am, Aaron Fischer wrote: > Someone was proposing sending PDFs containing sensitive info over email. > I was thinking of recommending against it, citing the lack of security > in the POP/IMAP protocols. Is that a legitimate concern? Sure, but only if you make sure the solution is actually more secure. > An alternative would be to email them with a link to the PDF which would > be protected with a login system (That's where the PHP would come in). And how did they get their username/password in the first place? Via unencrypted email? See what I'm saying? If you send usernames/passwords via snail mail, and then have people login over https, that's pretty good security. But if the passwords are going out over email anyway, you might as well send the sensitive document via email too. Michael Sims From tedd at sperling.com Tue Oct 10 10:23:53 2006 From: tedd at sperling.com (tedd) Date: Tue, 10 Oct 2006 10:23:53 -0400 Subject: [nycphp-talk] desktop v web applications (was mod_rewrite -- what's the big deal?) In-Reply-To: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> References: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> Message-ID: At 8:59 PM -0400 10/9/06, paul at devonianfarm.com wrote: >The web is a powerful unifier -- I see the real "enemy" as desktop >applications. The transition from the "Office" paradigm to web apps >that help people work together will keep PHP programmers busy for >many years. I don't see desktop applications as an enemy, but rather as a means to fulfill single user specific need. If one wants everyone to "work" together then web applications are certainly a solution. However, both solutions have trade-offs and mutually exclusive advantages/disadvantages. I hope php programmers will be busy for many years, but many of the languages that I sunk my teeth into have passed on to the big null in the sky. tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From scott at crisscott.com Tue Oct 10 10:36:13 2006 From: scott at crisscott.com (Scott Mattocks) Date: Tue, 10 Oct 2006 10:36:13 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> References: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> Message-ID: <452BAFDD.2080304@crisscott.com> paul at devonianfarm.com wrote: > The web is a powerful unifier -- I see the real "enemy" as desktop > applications. The transition from the "Office" paradigm to web apps that help > people work together will keep PHP programmers busy for many years. The web is not just websites. There are plenty of ways to communicate on the web without using HTML. Desktop applications can be used to help people work together just as well as (and in some cases more effectively and efficiently than) web apps. Don't dismiss the desktop app as "the old way". After all, its a desktop app (web browser) that makes all web apps even possible. Also, don't forget that desktop apps can be written entirely with PHP! I have a vested interest in PHP desktop applications :) -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From chsnyder at gmail.com Tue Oct 10 12:29:20 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 10 Oct 2006 12:29:20 -0400 Subject: [nycphp-talk] Running backtick commands and responding to stdout/in In-Reply-To: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> References: <000501c6ec0e$fb1c7000$6401a8c0@gamebox> Message-ID: On 10/9/06, Ben Sgro (sk) wrote: > Hey all, > > I am attempting to run ssh (w/out the ssh2 module) by backticking commands > from the command line. > > $result = `ssh -l $userStr $hostStr`; > > This line causes the script to display the enter password and php seems to > let it go right to stdin/console. > Is there any way for php to catch this (since I know its comming) and enter > the password? > > Or must I install the ssh2 module and call ssh2_connect( )? > > Thanks! > > - Ben Depending on the situation, you could use SSH with key-based authentication instead of passwords, which would avoid the issue. But then you have to make sure your script (and the account that runs it) are both secure. -- Chris Snyder http://chxo.com/ From ajai at bitblit.net Tue Oct 10 17:34:38 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Tue, 10 Oct 2006 17:34:38 -0400 Subject: [nycphp-talk] mod_rewrite -- what's the big deal? In-Reply-To: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> References: <49222.192.168.1.70.1160441979.webmail@192.168.1.70> Message-ID: <452C11EE.2000801@bitblit.net> paul at devonianfarm.com wrote: > The overwhelming majority of the world's web sites are circling in a > holding pattern. They are held by domain name speculators, operators > of made-for-adsense empires, or display the default holding page of > domain name registrars. The Netcraft statistics are dominated by a > small number of operators who host tens of thousands of sites per > server -- a job which Apache is fantastic at. But still, among the "active domains", the number is 61% Apache. I think if a domain returns a page, it is "active" regardless of whether it is a "parked" page or some ad page. > If the "market" is the market for web applications (people who would > pay $$ to install your app on their server or people who would > download and install an open source app), So a static site should not be counted? That doesn't make sense. > I think that IIS owns more than 30% of the market, but I doubt more > than 50%. It's hard to get accurate numbers for this Netcraft look at the actual headers returned from an HTTP connection to a site - dont see anything wrong with sampling this way (at least, there's no humans involved and the whole thing is automated). -- A -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.com Tue Oct 10 09:59:45 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Tue, 10 Oct 2006 09:59:45 -0400 Subject: [nycphp-talk] Security and POP/IMAP/HTTPS In-Reply-To: <200610100921.57562.jellicle@gmail.com> References: <452B9185.7070205@email.smith.edu> <200610100921.57562.jellicle@gmail.com> Message-ID: <5B399E3B-FB88-4163-9554-4A1B8B45916C@jonbaer.com> OpenSSL is usually my bet for protecting PDFs ... (as you have more options to work w/) http://www.madboa.com/geek/openssl/#encrypt-simple - Jon On Oct 10, 2006, at 9:21 AM, Michael Sims wrote: > On Tuesday 10 October 2006 8:26 am, Aaron Fischer wrote: > >> Someone was proposing sending PDFs containing sensitive info over >> email. >> I was thinking of recommending against it, citing the lack of >> security >> in the POP/IMAP protocols. Is that a legitimate concern? > > Sure, but only if you make sure the solution is actually more secure. > >> An alternative would be to email them with a link to the PDF which >> would >> be protected with a login system (That's where the PHP would come >> in). > > And how did they get their username/password in the first place? Via > unencrypted email? See what I'm saying? > > If you send usernames/passwords via snail mail, and then have > people login > over https, that's pretty good security. But if the passwords are > going > out over email anyway, you might as well send the sensitive > document via > email too. > > > Michael Sims > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From jonbaer at jonbaer.com Wed Oct 11 22:45:40 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 11 Oct 2006 22:45:40 -0400 Subject: [nycphp-talk] Latest security alert ... CVE-2006-4812 Message-ID: <18C5EBB3-5742-4637-B830-DE067D493D0A@jonbaer.com> http://nvd.nist.gov/nvd.cfm?cvename=CVE-2006-4812 http://www.hardened-php.net/advisory_092006.133.html Looks like everyone should patch up no? ... BTW, does anyone run the hardened fork? Im a little wierded out by this statement ... -snip- The PHP 5 branch of the PHP source code lacks the protection against possible integer overflows inside ecalloc() that is present in the PHP 4 branch and also for several years part of our Hardening-Patch and our new Suhosin-Patch. -snip- Several years? - Jon From jonbaer at jonbaer.com Wed Oct 11 23:36:43 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 11 Oct 2006 23:36:43 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) Message-ID: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> Ehh my German is a little off :-) Anyone know if this book is available in English? Can't seem to find it around anywhere in English form ... is it only available in German? http://www.phpdesignpatterns.de/ - Jon From shiflett at php.net Wed Oct 11 23:39:43 2006 From: shiflett at php.net (Chris Shiflett) Date: Wed, 11 Oct 2006 23:39:43 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) In-Reply-To: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> References: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> Message-ID: <452DB8FF.4030506@php.net> Jon Baer wrote: > Anyone know if this book is available in English? Not yet, but O'Reilly is pretty good about translating books, if there's sufficient demand for it. (Which I imagine is the case, but that's speculation.) Chris -- Chris Shiflett http://shiflett.org/ From codebowl at gmail.com Thu Oct 12 06:51:39 2006 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 12 Oct 2006 06:51:39 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) In-Reply-To: <452DB8FF.4030506@php.net> References: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> <452DB8FF.4030506@php.net> Message-ID: <8d9a42800610120351i3bcae603l5900562931cc0362@mail.gmail.com> funny that the cover is in english :D -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Thu Oct 12 07:17:59 2006 From: ramons at gmx.net (David Krings) Date: Thu, 12 Oct 2006 07:17:59 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) In-Reply-To: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> References: <5DB3327B-E3BA-4656-AAAA-5B0543736170@jonbaer.com> Message-ID: <6.1.2.0.2.20061012071739.02c55c00@pop.gmx.net> You buy it for me and I translate it for you? At 11:36 PM 10/11/2006, you wrote: >Ehh my German is a little off :-) > >Anyone know if this book is available in English? Can't seem to find >it around anywhere in English form ... is it only available in German? > >http://www.phpdesignpatterns.de/ > >- Jon >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From RPastore at militaryservco.com Thu Oct 12 08:18:37 2006 From: RPastore at militaryservco.com (Ron Pastore) Date: Thu, 12 Oct 2006 08:18:37 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) Message-ID: Cool, I'll check it out... Ron Pastore LAMP Application Director Military Servco, Inc. (914) 576-1900 ext. 117 rpastore at militaryservco.com _____ From: Joseph Crawford [mailto:codebowl at gmail.com] Sent: Thursday, October 12, 2006 6:52 AM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Design Patterns - en? (Oreilly) funny that the cover is in english :D -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From RPastore at militaryservco.com Thu Oct 12 08:21:13 2006 From: RPastore at militaryservco.com (Ron Pastore) Date: Thu, 12 Oct 2006 08:21:13 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) Message-ID: oops... hit reply on the wrong message, sorry about that... Ron Pastore LAMP Application Director Military Servco, Inc. (914) 576-1900 ext. 117 rpastore at militaryservco.com _____ From: Ron Pastore Sent: Thursday, October 12, 2006 8:19 AM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Design Patterns - en? (Oreilly) Cool, I'll check it out... Ron Pastore LAMP Application Director Military Servco, Inc. (914) 576-1900 ext. 117 rpastore at militaryservco.com _____ From: Joseph Crawford [mailto:codebowl at gmail.com] Sent: Thursday, October 12, 2006 6:52 AM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Design Patterns - en? (Oreilly) funny that the cover is in english :D -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Thu Oct 12 08:24:20 2006 From: chsnyder at gmail.com (csnyder) Date: Thu, 12 Oct 2006 08:24:20 -0400 Subject: [nycphp-talk] Latest security alert ... CVE-2006-4812 In-Reply-To: <18C5EBB3-5742-4637-B830-DE067D493D0A@jonbaer.com> References: <18C5EBB3-5742-4637-B830-DE067D493D0A@jonbaer.com> Message-ID: On 10/11/06, Jon Baer wrote: > http://nvd.nist.gov/nvd.cfm?cvename=CVE-2006-4812 > http://www.hardened-php.net/advisory_092006.133.html > > Looks like everyone should patch up no? ... Yes, but from the way I read it, this is only an issue if you unserialize a string directly from user input. The authors give the example of an application that serializes some structure and stores it in a cookie value for deserialization on subsequent requests. The attack is based on constructing a fake serialized string that includes an array with a very large number of reported elements, something like "a:9999999999999999:{...}". I wouldn't be surprised to find that unserialize() is vulnerable to other, similar attacks, so if you're code is affected by this it would be much better to use some other mechanism (storing a record id in the cookie, or using php sessions). Or use hardened php, apparently. -- Chris Snyder http://chxo.com/ From lk613m at yahoo.com Thu Oct 12 10:18:11 2006 From: lk613m at yahoo.com (LK) Date: Thu, 12 Oct 2006 07:18:11 -0700 (PDT) Subject: [nycphp-talk] Eval question Message-ID: <20061012141811.98762.qmail@web53314.mail.yahoo.com> I want to evaluate the expression $x * $y (x times y). But when I run it thru the eval() function it returns "3 * 4" instead of "12". It seems to interpret * as a string instead of a multiplication operator. Any suggestions greatly appreciated Leo Kokin From jonbaer at jonbaer.com Thu Oct 12 10:26:32 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Thu, 12 Oct 2006 10:26:32 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <20061012141811.98762.qmail@web53314.mail.yahoo.com> References: <20061012141811.98762.qmail@web53314.mail.yahoo.com> Message-ID: <49D17220-74BF-433C-8D03-8B39B1898D83@jonbaer.com> You are quoting w/ a literal string ... try ... - Jon On Oct 12, 2006, at 10:18 AM, LK wrote: > $x = 3; > $y = 4; > $calc_str = '$x * $y'; > eval("echo \"$calc_str\";"); > ?> -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris at theyellowbox.com Thu Oct 12 10:26:43 2006 From: chris at theyellowbox.com (Chris Merlo) Date: Thu, 12 Oct 2006 10:26:43 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <20061012141811.98762.qmail@web53314.mail.yahoo.com> References: <20061012141811.98762.qmail@web53314.mail.yahoo.com> Message-ID: <946586480610120726p2c69ef04o3abf67e9fdfa8844@mail.gmail.com> On 10/12/06, LK wrote: > > $x = 3; > $y = 4; > $calc_str = '$x * $y'; > eval("echo \"$calc_str\";"); > ?> > > I want to evaluate the expression $x * $y (x times y). But when I run it > thru the eval() function it returns "3 * 4" instead of "12". It seems to > interpret * as a string instead of a multiplication operator. Any > suggestions greatly appreciated I haven't had my coffee yet, but I would guess that it has something to do with those single quotes. But there's a bigger question here: Why do you want to store the expression in a string? Just store the $x and the $y, and multiply them when you have to. If there's some larger issue at hand, like you have to read the expressions from a file or something, use the regexp functions to get the two operands and the operator, and then do the math you have to do. -c -------------- next part -------------- An HTML attachment was scrubbed... URL: From morgan at forsalebyowner.com Thu Oct 12 10:43:13 2006 From: morgan at forsalebyowner.com (Morgan Craft) Date: Thu, 12 Oct 2006 10:43:13 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) In-Reply-To: References: Message-ID: <452E5481.1040700@forsalebyowner.com> hhmm an O'reilly book on php design patterns probably a good read. If you are looking for a 'php patterns' book now and don't want to wait for a translation I recommend: http://www.amazon.com/PHP-5-Objects-Patterns-Practice/dp/1590593804/sr=8-17/qid=1160663568/ref=sr_1_17/102-3315688-6676925?ie=UTF8&s=books Great overview of php 5 language constructs, uml, and various design patterns with great examples ( several based on Sid Mier's Civilization). Haven't read the pattern book from PHP | Architect so can't comment on it. Enjoy, -Morgan Ron Pastore wrote: > > oops? hit reply on the wrong message, sorry about that? > > Ron Pastore > > LAMP Application Director > > Military Servco, Inc. > > (914) 576-1900 ext. 117 > > rpastore at militaryservco.com > > ------------------------------------------------------------------------ > > *From:* Ron Pastore > *Sent:* Thursday, October 12, 2006 8:19 AM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] PHP Design Patterns - en? (Oreilly) > > Cool, I?ll check it out? > > Ron Pastore > > LAMP Application Director > > Military Servco, Inc. > > (914) 576-1900 ext. 117 > > rpastore at militaryservco.com > > ------------------------------------------------------------------------ > > *From:* Joseph Crawford [mailto:codebowl at gmail.com] > *Sent:* Thursday, October 12, 2006 6:52 AM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] PHP Design Patterns - en? (Oreilly) > > funny that the cover is in english :D > > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > http://www.codebowl.com/ > Blog: http://www.josephcrawford.com/ > 1-802-671-2021 > codebowl at gmail.com > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From lk613m at yahoo.com Thu Oct 12 11:18:32 2006 From: lk613m at yahoo.com (LK) Date: Thu, 12 Oct 2006 08:18:32 -0700 (PDT) Subject: [nycphp-talk] Eval question Message-ID: <20061012151832.37336.qmail@web53302.mail.yahoo.com> The reason I used literal string is because that's how it is used on the official PHP site at http://www.php.net/manual/en/function.eval.php Also, in my haste I supplied a slightly incorrect example (apologies), it shoul be: Where the calc_str comes first at design time, while $x and $y are determined at run time. With this restriction using double quotes "$x * $y" in the proposed solution below will not work either. Leo ----- Original Message ---- From: Jon Baer To: NYPHP Talk Sent: Thursday, October 12, 2006 10:26:32 AM Subject: Re: [nycphp-talk] Eval question You are quoting w/ a literal string ... try ... - Jon On Oct 12, 2006, at 10:18 AM, LK wrote: _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris at theyellowbox.com Thu Oct 12 11:28:27 2006 From: chris at theyellowbox.com (Chris Merlo) Date: Thu, 12 Oct 2006 11:28:27 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <20061012151832.37336.qmail@web53302.mail.yahoo.com> References: <20061012151832.37336.qmail@web53302.mail.yahoo.com> Message-ID: <946586480610120828y32effa40m742903e3fa5e8657@mail.gmail.com> On 10/12/06, LK wrote: > Where the calc_str comes first at design time, while $x and $y are > determined at run time. > Again, if you know at design time what math needs to be done, then all you need to store are the arguments. I think this code can be simpler than you want it to be. -c -------------- next part -------------- An HTML attachment was scrubbed... URL: From lk613m at yahoo.com Thu Oct 12 11:30:28 2006 From: lk613m at yahoo.com (LK) Date: Thu, 12 Oct 2006 08:30:28 -0700 (PDT) Subject: [nycphp-talk] Eval question Message-ID: <20061012153028.13887.qmail@web53309.mail.yahoo.com> The reason I don't want to use regexp is because eventually I want to have an arbitrary formula for $calc_str, and I don't want to design my own evaluation compiler with regexp - that's what eval() is supposed to do, or so it seems. ----- Original Message ---- From: Chris Merlo To: NYPHP Talk Sent: Thursday, October 12, 2006 10:26:43 AM Subject: Re: [nycphp-talk] Eval question On 10/12/06, LK wrote: I want to evaluate the expression $x * $y (x times y). But when I run it thru the eval() function it returns "3 * 4" instead of "12". It seems to interpret * as a string instead of a multiplication operator. Any suggestions greatly appreciated I haven't had my coffee yet, but I would guess that it has something to do with those single quotes. But there's a bigger question here: Why do you want to store the expression in a string? Just store the $x and the $y, and multiply them when you have to. If there's some larger issue at hand, like you have to read the expressions from a file or something, use the regexp functions to get the two operands and the operator, and then do the math you have to do. -c _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From phil at bearingasset.com Thu Oct 12 11:31:15 2006 From: phil at bearingasset.com (Phil Duffy) Date: Thu, 12 Oct 2006 11:31:15 -0400 Subject: [nycphp-talk] PEAR Error Message Message-ID: <20061012153133.E74FFA87CB@virtu.nyphp.org> I have received the following PEAR error message, but can't interpret it because there are many places where I am using a 'get': MESSAGE: DB_DataObject Error: No Value specified for get TYPE: PEAR DEBUG INFO: CODE: -1 I have also tried bracketing the error, but that has not been helpful to this point. I recognize the Code = -1 as a failure signal, but the challenge is that there is no debug information accompanying it. The framework (Seagull) log gives no indication of an error. Have I failed to set an appropriate parameter to allow Debug Info to display, does PEAR have a unique log I am not seeing, or is there another way to investigate this error? Many thanks for your help. Phil Duffy -------------- next part -------------- An HTML attachment was scrubbed... URL: From tacofighter at gmail.com Thu Oct 12 11:31:37 2006 From: tacofighter at gmail.com (Aaron Deutsch) Date: Thu, 12 Oct 2006 11:31:37 -0400 Subject: [nycphp-talk] ssl on localhost Message-ID: How do you setup a dev environment and test pages that need https? My localhost is a pc. Follow up question, should all pages on an e-commerce site be htts or just during checkout? thanks, aaron d. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai at bitblit.net Thu Oct 12 11:54:20 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 12 Oct 2006 11:54:20 -0400 Subject: [nycphp-talk] PHP Design Patterns - en? (Oreilly) In-Reply-To: <452E5481.1040700@forsalebyowner.com> References: <452E5481.1040700@forsalebyowner.com> Message-ID: <452E652C.7050103@bitblit.net> Morgan Craft wrote: > hhmm an O'reilly book on php design patterns probably a good read. If > you are looking for a 'php patterns' book now and don't want to wait for > a translation I recommend: > > http://www.amazon.com/PHP-5-Objects-Patterns-Practice/dp/1590593804/sr=8-17/qid=1160663568/ref=sr_1_17/102-3315688-6676925?ie=UTF8&s=books > > Great overview of php 5 language constructs, uml, and various design > patterns with great examples ( several based on Sid Mier's > Civilization). Haven't read the pattern book from PHP | Architect so > can't comment on it. > Great! - I just bought this book before reading your message so that's good to know. I also bought O'Reilly's "Head First" patterns book and "AJAX and PHP" (http://www.packtpub.com/ajax_php/book). -- A From drydell at optonline.net Thu Oct 12 12:03:48 2006 From: drydell at optonline.net (drydell at optonline.net) Date: Thu, 12 Oct 2006 16:03:48 +0000 (GMT) Subject: [nycphp-talk] Eval question In-Reply-To: <20061012151832.37336.qmail@web53302.mail.yahoo.com> References: <20061012151832.37336.qmail@web53302.mail.yahoo.com> Message-ID: > Where the calc_str comes first at design time, while $x and $y > are determined at run time. With this restriction using double > quotes "$x * $y" in the proposed solution below will not work either. > you can escape the $ in double quotes to represent the literal $var instead of the variable $var - "\$x * \$y" -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at danhorning.com Thu Oct 12 12:07:14 2006 From: lists at danhorning.com (Dan Horning) Date: Thu, 12 Oct 2006 12:07:14 -0400 Subject: [nycphp-talk] ssl on localhost In-Reply-To: References: Message-ID: <452E6832.2090105@danhorning.com> XAMPP for windows http://www.apachefriends.org/en/xampp-windows.html install either the full or lite version both have SSL (openssl) Aaron Deutsch wrote: > How do you setup a dev environment and test pages that need https? > My localhost is a pc. > > Follow up question, should all pages on an e-commerce site be htts or > just during checkout? > > > thanks, > aaron d. > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Dan Horning - danhorning.com American Digital Services - americandigitalservices.com Where you are only limited by imagination. 1-866-493-4218 (direct) / 1-800-863-3854 (main number) From ken at secdat.com Thu Oct 12 14:10:49 2006 From: ken at secdat.com (Kenneth Downs) Date: Thu, 12 Oct 2006 14:10:49 -0400 Subject: [nycphp-talk] Andromeda Presentation: Ideas for sample app? Message-ID: <452E8529.2040000@secdat.com> Hello everyone, In a couple of weeks I will be presenting Andromeda, a framework for line-of-business apps. I am hoping to do a lot of hands-on stuff, with lots of code to show, and lots of examples. If anybody would like to suggest a sample app, I would be happy to do what I can to have something prepared that is relevant to conversations we have here. Can't promise anything of course, but I think that if some ideas come in it will let us show off some of things Andromeda does. If something suitable is suggested and worked out here, I will have the app working before the presentation so people can go look at it. The current plan is to show a time-tracking system and a fragment of a magazine distribution system. If anybody has other ideas for such line-of-business stuff, please feel free to reply here or off-list. I should say that there are certain apps that are very well done by other systems out there, so for instance we would not present a CMS or a messageboard. -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From jbaer at VillageVoice.com Thu Oct 12 14:24:37 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Thu, 12 Oct 2006 14:24:37 -0400 Subject: [nycphp-talk] PEAR Error Message In-Reply-To: <20061012153133.E74FFA87CB@virtu.nyphp.org> Message-ID: <4D2FAD9B00577645932AD7ED5FECA2450389858C@mail> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is your signature call the same (or can you sed it out + append), you can try appending something like echo __FILE__ .':' . __LINE__; Before the call. - - Jon - -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Duffy Sent: Thursday, October 12, 2006 11:31 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] PEAR Error Message I have received the following PEAR error message, but can't interpret it because there are many places where I am using a 'get': MESSAGE: DB_DataObject Error: No Value specified for get TYPE: PEAR DEBUG INFO: CODE: -1 I have also tried bracketing the error, but that has not been helpful to this point. I recognize the Code = -1 as a failure signal, but the challenge is that there is no debug information accompanying it. The framework (Seagull) log gives no indication of an error. Have I failed to set an appropriate parameter to allow Debug Info to display, does PEAR have a unique log I am not seeing, or is there another way to investigate this error? Many thanks for your help. Phil Duffy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFFLohl99e5DI8C/rsRAlukAJ9gMI8K1dBE9bd5jrs36t+zK7EY6QCgzRzE sMze1dvJH0xA49Y+TM99v5w= =Xr3V -----END PGP SIGNATURE----- From tim_lists at o2group.com Thu Oct 12 14:32:36 2006 From: tim_lists at o2group.com (Tim Lieberman) Date: Thu, 12 Oct 2006 12:32:36 -0600 Subject: [nycphp-talk] Eval question In-Reply-To: <20061012153028.13887.qmail@web53309.mail.yahoo.com> References: <20061012153028.13887.qmail@web53309.mail.yahoo.com> Message-ID: <452E8A44.9040107@o2group.com> You have an echo problem, not an eval problem. $x = 2; $y = 3; echo "Basic string interpolation: "; echo "$x * $y"; echo "
evaluate and echo results: "; echo $x * $y; echo "
See?"; Since the echo statement you're eval'ing has a single argument, a double-quoted string, PHP does the string interpolation. string interpolation does not evaluate expressions in the string, it simply converts variable names to the data they contain. If you pass an expression to echo, however, PHP will evaluate the expression, and output the result as a string. HTH -Tim LK wrote: > The reason I don't want to use regexp is because eventually I want to > have an arbitrary formula for $calc_str, and I don't want to design my > own evaluation compiler with regexp - that's what eval() is supposed > to do, or so it seems. > > ----- Original Message ---- > From: Chris Merlo > To: NYPHP Talk > Sent: Thursday, October 12, 2006 10:26:43 AM > Subject: Re: [nycphp-talk] Eval question > > On 10/12/06, *LK* > wrote: > > $x = 3; > $y = 4; > $calc_str = '$x * $y'; > eval("echo \"$calc_str\";"); > ?> > > I want to evaluate the expression $x * $y (x times y). But when I > run it thru the eval() function it returns "3 * 4" instead of > "12". It seems to interpret * as a string instead of a > multiplication operator. Any suggestions greatly appreciated > > > I haven't had my coffee yet, but I would guess that it has something > to do with those single quotes. > > But there's a bigger question here: Why do you want to store the > expression in a string? Just store the $x and the $y, and multiply > them when you have to. If there's some larger issue at hand, like you > have to read the expressions from a file or something, use the regexp > functions to get the two operands and the operator, and then do the > math you have to do. > -c > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > > From phil at bearingasset.com Thu Oct 12 14:40:45 2006 From: phil at bearingasset.com (Phil Duffy) Date: Thu, 12 Oct 2006 14:40:45 -0400 Subject: [nycphp-talk] PEAR Error Message In-Reply-To: <4D2FAD9B00577645932AD7ED5FECA2450389858C@mail> Message-ID: <20061012184056.66839A863B@virtu.nyphp.org> Jon, I received this as a response to my PEAR Error query. I am sorry, but I can't comprehend it. Phil > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Baer, Jon > Sent: Thursday, October 12, 2006 1:25 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PEAR Error Message > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Is your signature call the same (or can you sed it out + append), you > can try appending something like > > echo __FILE__ .':' . __LINE__; > > Before the call. > > - - Jon > > - -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Phil Duffy > Sent: Thursday, October 12, 2006 11:31 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] PEAR Error Message > > I have received the following PEAR error message, but can't interpret it > because there are many places where I am using a 'get': > > MESSAGE: DB_DataObject Error: No Value specified for get > TYPE: PEAR > DEBUG INFO: > CODE: -1 > > I have also tried bracketing the error, but that has not been helpful to > this point. > > I recognize the Code = -1 as a failure signal, but the challenge is that > there is no debug information accompanying it. The framework (Seagull) > log gives no indication of an error. Have I failed to set an > appropriate parameter to allow Debug Info to display, does PEAR have a > unique log I am not seeing, or is there another way to investigate this > error? > > Many thanks for your help. > > Phil Duffy > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (MingW32) > > iD8DBQFFLohl99e5DI8C/rsRAlukAJ9gMI8K1dBE9bd5jrs36t+zK7EY6QCgzRzE > sMze1dvJH0xA49Y+TM99v5w= > =Xr3V > -----END PGP SIGNATURE----- > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From tim_lists at o2group.com Thu Oct 12 14:44:10 2006 From: tim_lists at o2group.com (Tim Lieberman) Date: Thu, 12 Oct 2006 12:44:10 -0600 Subject: [nycphp-talk] PEAR Error Message In-Reply-To: <20061012153133.E74FFA87CB@virtu.nyphp.org> References: <20061012153133.E74FFA87CB@virtu.nyphp.org> Message-ID: <452E8CFA.1080302@o2group.com> Stick something like DB_DataObject::debugLevel(5); in a global config file, and then scan the output until you see something red. -Tim Phil Duffy wrote: > I have received the following PEAR error message, but can?t interpret > it because there are many places where I am using a ?get?: > > *MESSAGE*: DB_DataObject Error: No Value specified for get > *TYPE:* PEAR > *DEBUG INFO:* > *CODE:* -1 > > I have also tried bracketing the error, but that has not been helpful > to this point. > > I recognize the Code = -1 as a failure signal, but the challenge is > that there is no debug information accompanying it. The framework > (Seagull) log gives no indication of an error. Have I failed to set an > appropriate parameter to allow Debug Info to display, does PEAR have a > unique log I am not seeing, or is there another way to investigate > this error? > > Many thanks for your help. > > Phil Duffy > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > > From jbaer at VillageVoice.com Thu Oct 12 14:51:31 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Thu, 12 Oct 2006 14:51:31 -0400 Subject: [nycphp-talk] PEAR Error Message In-Reply-To: <20061012184056.66839A863B@virtu.nyphp.org> Message-ID: <4D2FAD9B00577645932AD7ED5FECA245038985A9@mail> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Were you looking for where the call was failing? I normally append that before the call to pinpoint where the function was called, but im sure there is a debug level you can set for PEAR to get more. As Tim points out DB_DataObject::debugLevel(5); should definatley work. APD is great to use (if you can compile/install it) though for debugging all around .. http://pecl.php.net/package/apd - - Jon - -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Duffy Sent: Thursday, October 12, 2006 2:41 PM To: 'NYPHP Talk' Subject: Re: [nycphp-talk] PEAR Error Message Jon, I received this as a response to my PEAR Error query. I am sorry, but I can't comprehend it. Phil > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Baer, Jon > Sent: Thursday, October 12, 2006 1:25 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PEAR Error Message > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Is your signature call the same (or can you sed it out + append), you > can try appending something like > > echo __FILE__ .':' . __LINE__; > > Before the call. > > - - Jon > > - -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Phil Duffy > Sent: Thursday, October 12, 2006 11:31 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] PEAR Error Message > > I have received the following PEAR error message, but can't interpret > it because there are many places where I am using a 'get': > > MESSAGE: DB_DataObject Error: No Value specified for get > TYPE: PEAR > DEBUG INFO: > CODE: -1 > > I have also tried bracketing the error, but that has not been helpful > to this point. > > I recognize the Code = -1 as a failure signal, but the challenge is > that there is no debug information accompanying it. The framework > (Seagull) log gives no indication of an error. Have I failed to set > an appropriate parameter to allow Debug Info to display, does PEAR > have a unique log I am not seeing, or is there another way to > investigate this error? > > Many thanks for your help. > > Phil Duffy > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (MingW32) > > iD8DBQFFLohl99e5DI8C/rsRAlukAJ9gMI8K1dBE9bd5jrs36t+zK7EY6QCgzRzE > sMze1dvJH0xA49Y+TM99v5w= > =Xr3V > -----END PGP SIGNATURE----- > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFFLo6z99e5DI8C/rsRAsh7AKCMN1yarlgyW0fOQGG7O2CTKtka4ACfRTaE v0ijacGvePN1nmj0stHdXzo= =lKJo -----END PGP SIGNATURE----- From jbaer at VillageVoice.com Thu Oct 12 14:54:08 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Thu, 12 Oct 2006 14:54:08 -0400 Subject: [nycphp-talk] ssl on localhost In-Reply-To: Message-ID: <4D2FAD9B00577645932AD7ED5FECA245038985AA@mail> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What are you using Windows/Mac/Linux? There are precompiled SSL enabled versions of Apache/PHP you can use to make SSL-apps .. http://www.apachefriends.org/en/xampp.html - - Jon - -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Aaron Deutsch Sent: Thursday, October 12, 2006 11:32 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] ssl on localhost How do you setup a dev environment and test pages that need https? My localhost is a pc. Follow up question, should all pages on an e-commerce site be htts or just during checkout? thanks, aaron d. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFFLo9Q99e5DI8C/rsRAqzHAJ9La8jKxxB62YQ2OSrPaywuJrVXZACg4n7b oDDZ9dU2q4sVC5yyqNXacvM= =kymj -----END PGP SIGNATURE----- From tacofighter at gmail.com Thu Oct 12 16:04:00 2006 From: tacofighter at gmail.com (Aaron Deutsch) Date: Thu, 12 Oct 2006 16:04:00 -0400 Subject: [nycphp-talk] ssl on localhost In-Reply-To: <4D2FAD9B00577645932AD7ED5FECA245038985AA@mail> References: <4D2FAD9B00577645932AD7ED5FECA245038985AA@mail> Message-ID: I'm using windows IIS server on my local machine. On 10/12/06, Baer, Jon wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > What are you using Windows/Mac/Linux? > > There are precompiled SSL enabled versions of Apache/PHP you can use to > make SSL-apps .. > > http://www.apachefriends.org/en/xampp.html > > - - Jon > > - -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Aaron Deutsch > Sent: Thursday, October 12, 2006 11:32 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] ssl on localhost > > How do you setup a dev environment and test pages that need https? My > localhost is a pc. > > Follow up question, should all pages on an e-commerce site be htts or > just during checkout? > > > thanks, > aaron d. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (MingW32) > > iD8DBQFFLo9Q99e5DI8C/rsRAqzHAJ9La8jKxxB62YQ2OSrPaywuJrVXZACg4n7b > oDDZ9dU2q4sVC5yyqNXacvM= > =kymj > -----END PGP SIGNATURE----- > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Thu Oct 12 16:07:14 2006 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 12 Oct 2006 16:07:14 -0400 (EDT) Subject: [nycphp-talk] Apache Con In-Reply-To: <2ca9ba910610061359v18b1e36fq9afc248045634a29@mail.gmail.com> References: <2ca9ba910610061359v18b1e36fq9afc248045634a29@mail.gmail.com> Message-ID: On Fri, 6 Oct 2006, Jeff Knight wrote: > Who's coming down to apache con next week? Contact me off list for best bars > & bbq. I am here in the big room, sitting at a round table with Andrei, Rasmus, and Laura Thompson. Overall, I think there are more PHP speakers (7) than attendees. :( -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From dmintz at davidmintz.org Thu Oct 12 16:12:05 2006 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 12 Oct 2006 16:12:05 -0400 (EDT) Subject: [nycphp-talk] Apache Con In-Reply-To: References: <2ca9ba910610061359v18b1e36fq9afc248045634a29@mail.gmail.com> Message-ID: On Thu, 12 Oct 2006, Adam Maccabee Trachtenberg wrote: > On Fri, 6 Oct 2006, Jeff Knight wrote: > > > Who's coming down to apache con next week? Contact me off list for best bars > > & bbq. > > I am here in the big room, sitting at a round table with Andrei, > Rasmus, and Laura Thompson. Please give them all our regards from the NYPHP crew! --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From phil at bearingasset.com Thu Oct 12 16:27:02 2006 From: phil at bearingasset.com (Phil Duffy) Date: Thu, 12 Oct 2006 16:27:02 -0400 Subject: [nycphp-talk] PEAR Error Message In-Reply-To: <452E8CFA.1080302@o2group.com> Message-ID: <20061012202718.86BD3A863B@virtu.nyphp.org> Tim and Jon, > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Tim Lieberman > Sent: Thursday, October 12, 2006 1:44 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PEAR Error Message > > Stick something like > DB_DataObject::debugLevel(5); > > in a global config file, and then scan the output until you see > something red. > > -Tim Thanks for making the attempt to bring me up to speed, but this issue appears to be beyond my level. I certainly understand the concept of configuration files and have edited them, but to my way of thinking there would be only one active PEAR configuration file. When I reviewed the PEAR Manual, I saw how configuration directives could be written, but could get no sense for where the file was located/what it was named. I came to the conclusion that I really didn't understand "Stick something like DB_DataObject::debugLevel(5); in a global config file" and I appreciate that if I can't understand that, I am over my head. Again, thanks for trying. Phil > > Phil Duffy wrote: > > > I have received the following PEAR error message, but can't interpret > > it because there are many places where I am using a 'get': > > > > *MESSAGE*: DB_DataObject Error: No Value specified for get > > *TYPE:* PEAR > > *DEBUG INFO:* > > *CODE:* -1 > > > > I have also tried bracketing the error, but that has not been helpful > > to this point. > > > > I recognize the Code = -1 as a failure signal, but the challenge is > > that there is no debug information accompanying it. The framework > > (Seagull) log gives no indication of an error. Have I failed to set an > > appropriate parameter to allow Debug Info to display, does PEAR have a > > unique log I am not seeing, or is there another way to investigate > > this error? > > > > Many thanks for your help. > > > > Phil Duffy > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >New York PHP Community Talk Mailing List > >http://lists.nyphp.org/mailman/listinfo/talk > > > >NYPHPCon 2006 Presentations Online > >http://www.nyphpcon.com > > > >Show Your Participation in New York PHP > >http://www.nyphp.org/show_participation.php > > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From phil at bearingasset.com Thu Oct 12 16:53:57 2006 From: phil at bearingasset.com (Phil Duffy) Date: Thu, 12 Oct 2006 16:53:57 -0400 Subject: [nycphp-talk] PEAR Error Message - Correction In-Reply-To: <452E8CFA.1080302@o2group.com> Message-ID: <20061012205404.B1BA9A863B@virtu.nyphp.org> Hi Jon and Tim, > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Tim Lieberman > Sent: Thursday, October 12, 2006 1:44 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PEAR Error Message > > Stick something like > DB_DataObject::debugLevel(5); > > in a global config file, and then scan the output until you see > something red. Just when I thought I was completely over my head, I decided to place the suggested statement in the PHP script in which the original error message occurred. That worked and the end of the debug message included the following lines: DataObjects_Info_item: GET: item_no Array ( [0] => item_no ) DataObjects_Info_item: ERROR: No Value specified for get I would interpret that as an error caused by item_no not being defined at that point. That would make sense, although I will need some time to come up with a correction. Again, thanks to both of you for both your help and your patience. Phil From hart at saturn.med.nyu.edu Thu Oct 12 23:26:21 2006 From: hart at saturn.med.nyu.edu (Joshua Hart) Date: Thu, 12 Oct 2006 23:26:21 -0400 Subject: [nycphp-talk] [Perhaps OT] Contract position rates? Message-ID: Hi! I've been asked to find out how much a contract programmer would cost for 6 months worth of work. This (at this point theoretical work) would be for several PHP/MySQL/Apache projects, it would require on site work, working 9-5.. We'd need this person on site, so telecommuting would not be acceptable. Thanks! Joshua From ramons at gmx.net Fri Oct 13 19:12:53 2006 From: ramons at gmx.net (David Krings) Date: Fri, 13 Oct 2006 19:12:53 -0400 Subject: [nycphp-talk] OT?: HTML question Message-ID: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> Hi, this may be a bit off topic, because it is really related to HTML, but I figured anyone doing PHP most likely knows HTML as well and often can't do without it. Well, here it goes. I have a page that contains three navigation buttons. Each button is inside its own form together with a hidden input and each form calls the same script. The hidden input basically just passes on a value via post. The buttons each act submit buttons for the forms. Maybe the code shows this better, so I attached it below. I also added some non breaking spaces to make some room between the buttons. My intention is to have all three buttons in one row, but they appear in three paragraphs sort of and that is not what I want. So, how do I get these buttons to be in the same row without using a table, which supposedly is a big no no for page layout. I looked around and sources recommend div tags, which I find to be excrutiatingly annoying to use. So, any ideas on how to get the result the easy way? Thanks in advance, David K.
   
   
From ps at pswebcode.com Fri Oct 13 19:51:36 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Fri, 13 Oct 2006 19:51:36 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> Message-ID: <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> I believe that this article gives you the divs layout setup and the CSS styles in a basic form exactly as you might need: http://alistapart.com/articles/holygrail I wouldn't hassle yourself with any other unique strategies. Divs are solid performers and every modern browser essentially handles them quite right. You can try something like:
form 1 elements
form 2 elements
form 3 elements
Using CSS you can make the position for main_div = absolute. Then position it with left and top. And even hard code the width to say 360. And then the internal divs can be relative or float, something like that. Or just use this:
form 1 elements
form 2 elements
form 3 elements
And then use CSS to absolutely position all three. And set each width to say 120px. And set the left and tops as 0,0 and 120,0 and 240,0. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings Sent: Friday, October 13, 2006 7:13 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] OT?: HTML question Hi, this may be a bit off topic, because it is really related to HTML, but I figured anyone doing PHP most likely knows HTML as well and often can't do without it. Well, here it goes. I have a page that contains three navigation buttons. Each button is inside its own form together with a hidden input and each form calls the same script. The hidden input basically just passes on a value via post. The buttons each act submit buttons for the forms. Maybe the code shows this better, so I attached it below. I also added some non breaking spaces to make some room between the buttons. My intention is to have all three buttons in one row, but they appear in three paragraphs sort of and that is not what I want. So, how do I get these buttons to be in the same row without using a table, which supposedly is a big no no for page layout. I looked around and sources recommend div tags, which I find to be excrutiatingly annoying to use. So, any ideas on how to get the result the easy way? Thanks in advance, David K.
   
   
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ramons at gmx.net Fri Oct 13 20:27:20 2006 From: ramons at gmx.net (David Krings) Date: Fri, 13 Oct 2006 20:27:20 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> References: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> Message-ID: <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> At 07:51 PM 10/13/2006, you wrote: >I believe that this article gives you the divs layout setup and the CSS >styles in a basic form exactly as you might need: >http://alistapart.com/articles/holygrail Thanks! I will take a look at it. >And then use CSS to absolutely position all three. And set each width to say >120px. >And set the left and tops as 0,0 and 120,0 and 240,0. Yea, that is what I don't see as "user friendly" when it comes to div. I have no idea where on the page these forms may end up, so I can't specifiy pixels or such. Maybe that article reveals more, but I really just want it to attach itself to what there is above on the same page. I want to position the buttons relative to each other, not relative to the page itself. I did look briefly at divs some time ago and found it to be useful when one wants to have centered and right justified text on the same row. Can't do that any other way. Maybe it is just one of these things where I need to push myself over the cliff. I did that with CSS and it is less scary now, but still IMHO more work than inline formatting. David K. From ps at pswebcode.com Fri Oct 13 21:16:50 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Fri, 13 Oct 2006 21:16:50 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> Message-ID: <002f01c6ef2e$6d738860$6701a8c0@SUNCODE1> By the way did you check if three forms just dropped in a div and each form separated by a non-breaking space symbol   might give you what you need? OR Try instead the same listapart site for this simpler CSS technique for floating elements in a group setting: http://alistapart.com/articles/practicalcss/ Or Examine these tuts closely and you may find a solution, such as the floating an image and caption: http://css.maxdesign.com.au/floatutorial/ Dreamweaver. Peter -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings Sent: Friday, October 13, 2006 8:27 PM To: NYPHP Talk Subject: Re: [nycphp-talk] OT?: HTML question At 07:51 PM 10/13/2006, you wrote: >I believe that this article gives you the divs layout setup and the CSS >styles in a basic form exactly as you might need: >http://alistapart.com/articles/holygrail Thanks! I will take a look at it. >And then use CSS to absolutely position all three. And set each width to say >120px. >And set the left and tops as 0,0 and 120,0 and 240,0. Yea, that is what I don't see as "user friendly" when it comes to div. I have no idea where on the page these forms may end up, so I can't specifiy pixels or such. Maybe that article reveals more, but I really just want it to attach itself to what there is above on the same page. I want to position the buttons relative to each other, not relative to the page itself. I did look briefly at divs some time ago and found it to be useful when one wants to have centered and right justified text on the same row. Can't do that any other way. Maybe it is just one of these things where I need to push myself over the cliff. I did that with CSS and it is less scary now, but still IMHO more work than inline formatting. David K. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From adam at trachtenberg.com Fri Oct 13 21:38:28 2006 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Fri, 13 Oct 2006 21:38:28 -0400 (EDT) Subject: [nycphp-talk] Apache Con In-Reply-To: References: <2ca9ba910610061359v18b1e36fq9afc248045634a29@mail.gmail.com> Message-ID: On Thu, 12 Oct 2006, David Mintz wrote: > On Thu, 12 Oct 2006, Adam Maccabee Trachtenberg wrote: > > I am here in the big room, sitting at a round table with Andrei, > > Rasmus, and Laura Thompson. > > > Please give them all our regards from the NYPHP crew! Done! -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From jonbaer at jonbaer.com Fri Oct 13 21:38:21 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Fri, 13 Oct 2006 21:38:21 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> References: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> Message-ID: <7CD6FD64-1C72-49E8-9A1B-6CE3672E7C1B@jonbaer.com> Another possible solution to the whole thing is to just use a named variable inside of the submit itself + switch on that instead of using 3 form blocks:
   
- Jon On Oct 13, 2006, at 8:27 PM, David Krings wrote: > At 07:51 PM 10/13/2006, you wrote: >> I believe that this article gives you the divs layout setup and >> the CSS >> styles in a basic form exactly as you might need: >> http://alistapart.com/articles/holygrail > > Thanks! I will take a look at it. > >> And then use CSS to absolutely position all three. And set each >> width to say >> 120px. >> And set the left and tops as 0,0 and 120,0 and 240,0. > > Yea, that is what I don't see as "user friendly" when it comes to > div. I > have no idea where on the page these forms may end up, so I can't > specifiy > pixels or such. Maybe that article reveals more, but I really just > want it > to attach itself to what there is above on the same page. I want to > position the buttons relative to each other, not relative to the > page itself. > > I did look briefly at divs some time ago and found it to be useful > when one > wants to have centered and right justified text on the same row. > Can't do > that any other way. > > Maybe it is just one of these things where I need to push myself > over the > cliff. I did that with CSS and it is less scary now, but still IMHO > more > work than inline formatting. > > > David K. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From cliff at pinestream.com Fri Oct 13 21:42:18 2006 From: cliff at pinestream.com (cliff) Date: Fri, 13 Oct 2006 20:42:18 -0500 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <7CD6FD64-1C72-49E8-9A1B-6CE3672E7C1B@jonbaer.com> References: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> <7CD6FD64-1C72-49E8-9A1B-6CE3672E7C1B@jonbaer.com> Message-ID: <20061014014218.M89888@pinestream.com> I do the exact same thing with buttons. But I don't use divs. All you need is some css that lets each form float the the right of the preceeding form. Just make a class like formfloat and then assign that class to the appropriate buttons. Cliff On Fri, 13 Oct 2006 21:38:21 -0400, Jon Baer wrote > Another possible solution to the whole thing is to just use a named > variable inside of the submit itself + switch on that instead of > using 3 form blocks: > >
> >   > >   > >
> > - Jon > > On Oct 13, 2006, at 8:27 PM, David Krings wrote: > > > At 07:51 PM 10/13/2006, you wrote: > >> I believe that this article gives you the divs layout setup and > >> the CSS > >> styles in a basic form exactly as you might need: > >> http://alistapart.com/articles/holygrail > > > > Thanks! I will take a look at it. > > > >> And then use CSS to absolutely position all three. And set each > >> width to say > >> 120px. > >> And set the left and tops as 0,0 and 120,0 and 240,0. > > > > Yea, that is what I don't see as "user friendly" when it comes to > > div. I > > have no idea where on the page these forms may end up, so I can't > > specifiy > > pixels or such. Maybe that article reveals more, but I really just > > want it > > to attach itself to what there is above on the same page. I want to > > position the buttons relative to each other, not relative to the > > page itself. > > > > I did look briefly at divs some time ago and found it to be useful > > when one > > wants to have centered and right justified text on the same row. > > Can't do > > that any other way. > > > > Maybe it is just one of these things where I need to push myself > > over the > > cliff. I did that with CSS and it is less scary now, but still IMHO > > more > > work than inline formatting. > > > > > > David K. > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825, www.pinestream.com From 1j0lkq002 at sneakemail.com Fri Oct 13 21:58:38 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Fri, 13 Oct 2006 18:58:38 -0700 Subject: [nycphp-talk] OT?: HTML question -- CSS stuff too In-Reply-To: <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> References: <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> Message-ID: <17607-72226@sneakemail.com> Peter Sawczynec ps-at-pswebcode.com |nyphp dev/internal group use| wrote: >I believe that this article gives you the divs layout setup and the CSS >styles in a basic form exactly as you might need: >http://alistapart.com/articles/holygrail > > Before you work with that article, be sure and consider the errata posted here http://www.infocraft.com/articles/holy_grail_on_a_list_apart/ It will save you some headaches, and maybe influence your commitment. Barring any big search /SEO news, there's a post appearing on my blog at johnon.com on the 15th that points at a few CSS resources that are IE7 compliant and fundamental (box models and such), plus good from a search engine optimization perspective. No big deal but might also save some hassles as CSS is a huge area on the web, and IMHO that ALA article is not your answer. -=john andrews -- ------------------------------------------------------------- Some say "Science is fact. Religion is faith. Magic is perception". I wonder, if what you witness is not reality, but your perception of reality, do you trust your perceptions as truth? Does that make the so-called scientist a religious magician? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From 1j0lkq002 at sneakemail.com Fri Oct 13 22:05:03 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Fri, 13 Oct 2006 19:05:03 -0700 Subject: [nycphp-talk] OT?: HTML question -- CSS stuff too, and gallery scripts! In-Reply-To: <17607-72226@sneakemail.com> References: <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> <17607-72226@sneakemail.com> Message-ID: <21071-16174@sneakemail.com> Sorry... it's now slated for the 17th but again, it's no big deal... just a blog post : http://blog.html.it/layoutgala/ http://www.cssplay.co.uk/ http://www.cssplay.co.uk/menu/menu_gallery.html "But I will suggest that if you look hard enough you will find plenty of quality CSS resources that are on the edge of /practical/ efficiency (as opposed to the theoretical edge of CSS, which I can't appreciate in my competitive work). A few resources I really enjoy are cssplay.co.uk for ideas (I liked it better before it got to 3.3 million page views per month, alas) and Layout Gala for box models. I know I will regret sending competitive webmasters to these resources, but did you get a load of Stu Nicholls latest CSS-only gallery script ? It's simply beautiful. Another photographer working in CSS and it really shows. And if you have any SEO sense about you look at the code. Add a Flash top nav bar and it's SEO heaven! " PS: We are way overdue for a talk on NYPHP gallery scripts... ModX LightBox and some of the cool new CSS ones are awesome.... -=john andrews http://www.johnon.com inforequest 1j0lkq002-at-sneakemail.com |nyphp dev/internal group use| wrote: >Peter Sawczynec ps-at-pswebcode.com |nyphp dev/internal group use| wrote: > > > >>I believe that this article gives you the divs layout setup and the CSS >>styles in a basic form exactly as you might need: >>http://alistapart.com/articles/holygrail >> >> >> >> >Before you work with that article, be sure and consider the errata >posted here >http://www.infocraft.com/articles/holy_grail_on_a_list_apart/ > >It will save you some headaches, and maybe influence your commitment. > >Barring any big search /SEO news, there's a post appearing on my blog at >johnon.com on the 15th that points at a few CSS resources that are IE7 >compliant and fundamental (box models and such), plus good from a >search engine optimization perspective. No big deal but might also save >some hassles as CSS is a huge area on the web, and IMHO that ALA >article is not your answer. > >-=john andrews > > > From ramons at gmx.net Sat Oct 14 07:48:11 2006 From: ramons at gmx.net (David Krings) Date: Sat, 14 Oct 2006 07:48:11 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <7CD6FD64-1C72-49E8-9A1B-6CE3672E7C1B@jonbaer.com> References: <6.1.2.0.2.20061013190247.02c55e50@pop.snet.yahoo.com> <002e01c6ef22$86659a90$6701a8c0@SUNCODE1> <6.1.2.0.2.20061013202117.02aaa7a0@pop.gmx.net> <7CD6FD64-1C72-49E8-9A1B-6CE3672E7C1B@jonbaer.com> Message-ID: <6.1.2.0.2.20061014074524.02aa9150@pop.gmx.net> At 09:38 PM 10/13/2006, you wrote: >Another possible solution to the whole thing is to just use a named >variable inside of the submit itself + switch on that instead of >using 3 form blocks: > >
> >  > >  > >
> >- Jon Yes!! This is what I was hoping for. Sweet, small, easy and on a level that I can comprehend. Look Ma! No DIVs needed! This is so straight forward that I am really annoyed that I didn't figure this out myself. Thank you very very very much! This makes my day and hopefully will get me through the trip to the IKEA store. :7 David K. From cliff at pinestream.com Sat Oct 14 08:05:43 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Sat, 14 Oct 2006 08:05:43 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <6.1.2.0.2.20061014074524.02aa9150@pop.gmx.net> Message-ID: <000901c6ef89$13682c30$12a8a8c0@HirschLaptop> To make it even better, separate the control logic from the presentation. That way, back could be reverse, etc. I do this in all my forms since application logic and presentation "word play" are two distinct things to me. This is what I use:
   
Then, you can have a simple routine that captures submit actions regardless of the presentation value. You check for the array submit -- count 1 and whitelist against the acceptable values. A multi-row table can expand upon the theme by using this: submit[edit_3], submit[delete_3]m submit[edit_5], etc. Cliff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Krings Sent: Saturday, October 14, 2006 6:48 AM To: NYPHP Talk Subject: Re: [nycphp-talk] OT?: HTML question At 09:38 PM 10/13/2006, you wrote: >Another possible solution to the whole thing is to just use a named >variable inside of the submit itself + switch on that instead of >using 3 form blocks: > >
> >  > >  > >
> >- Jon Yes!! This is what I was hoping for. Sweet, small, easy and on a level that I can comprehend. Look Ma! No DIVs needed! This is so straight forward that I am really annoyed that I didn't figure this out myself. Thank you very very very much! This makes my day and hopefully will get me through the trip to the IKEA store. :7 David K. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ramons at gmx.net Sat Oct 14 08:57:25 2006 From: ramons at gmx.net (David Krings) Date: Sat, 14 Oct 2006 08:57:25 -0400 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <000901c6ef89$13682c30$12a8a8c0@HirschLaptop> References: <6.1.2.0.2.20061014074524.02aa9150@pop.gmx.net> <000901c6ef89$13682c30$12a8a8c0@HirschLaptop> Message-ID: <6.1.2.0.2.20061014084611.02aa8910@pop.gmx.net> Yes, but since I have to do a comparison in the target script anyway, what difference does it make if I do a string compare with 'home' or 'no place like home'. Uh! Wait! Phase 6 of my project lists internationalization.....can't do it the way I have it now unless I want to add cases for every language string out there. Point well taken! So I guess with a simple isset() on the array element I get what I need without worrying what the value is. This is so clever! Really nice example that shows what people mean when they talk about seperating presentation from logic. I never got this until today. Thank you for this quick lesson! How come that you guys know all this? You must read books and attend classes 24x7. David K. At 08:05 AM 10/14/2006, you wrote: >To make it even better, separate the control logic from the >presentation. That way, back could be reverse, etc. I do this in all my >forms since application logic and presentation "word play" are two >distinct things to me. This is what I use: > >
> >  > >  > >
> >Then, you can have a simple routine that captures submit actions >regardless of the presentation value. You check for the array submit -- >count 1 and whitelist against the acceptable values. A multi-row table >can expand upon the theme by using this: submit[edit_3], >submit[delete_3]m submit[edit_5], etc. > >Cliff >-----Original Message----- >From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] >On Behalf Of David Krings >Sent: Saturday, October 14, 2006 6:48 AM >To: NYPHP Talk >Subject: Re: [nycphp-talk] OT?: HTML question > >At 09:38 PM 10/13/2006, you wrote: > >Another possible solution to the whole thing is to just use a named > >variable inside of the submit itself + switch on that instead of > >using 3 form blocks: > > > >
> > > >  > > > >  > > > >
> > > >- Jon > > >Yes!! This is what I was hoping for. Sweet, small, easy and on a level >that >I can comprehend. Look Ma! No DIVs needed! > >This is so straight forward that I am really annoyed that I didn't >figure >this out myself. > >Thank you very very very much! This makes my day and hopefully will get >me >through the trip to the IKEA store. :7 > > > David K. > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From cliff at pinestream.com Sat Oct 14 10:03:10 2006 From: cliff at pinestream.com (cliff) Date: Sat, 14 Oct 2006 09:03:10 -0500 Subject: [nycphp-talk] OT?: HTML question In-Reply-To: <6.1.2.0.2.20061014084611.02aa8910@pop.gmx.net> References: <6.1.2.0.2.20061014074524.02aa9150@pop.gmx.net> <000901c6ef89$13682c30$12a8a8c0@HirschLaptop> <6.1.2.0.2.20061014084611.02aa8910@pop.gmx.net> Message-ID: <20061014140310.M85707@pinestream.com> On Sat, 14 Oct 2006 08:57:25 -0400, David Krings wrote > Yes, but since I have to do a comparison in the target script anyway, > what difference does it make if I do a string compare with 'home' > or 'no place like home'. > > Uh! Wait! Phase 6 of my project lists internationalization.....can't EXACTLY! And never mind internationalization, what happens when Mr. Marketing tells you 'back' should be 'go back' or 'search' should be 'go'... Do you really want to change your application logic every time you have to do this? Another point regarding wrapping the buttons in one form. You may very well need three forms because each button could potentially require different hidden variables. A "Button Factory" function that creates a self-contained button with hidden elements, form action, etc. can be very useful. You just drop it into the presentation layer... > How come that you guys know all this? You must read books and attend > classes 24x7. You mean the $1,000 worth of books on my bookshelf? From skyline at publicmine.com Wed Oct 4 11:17:57 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Wed, 4 Oct 2006 11:17:57 -0400 Subject: [nycphp-talk] Open Source (php/mysql) RSVP software Message-ID: <006201c6e7c8$474111c0$6401a8c0@sickbox> Hello All, I'm currently working on a gig that requires end users the ability to RSVP for events. I wanted to know if there is a tested and trusted open source (php please) option? Does anyone have background using the software, complaints or comments? I would like php because I can edit and expand that language most easily (plus this is the PHP LIST!) = ] Thanks! - Ben From cliff at pinestream.com Sun Oct 15 08:29:50 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Sun, 15 Oct 2006 08:29:50 -0400 Subject: [nycphp-talk] Baffling PEAR mail_mime error Message-ID: <000c01c6f055$9c1c8900$12a8a8c0@HirschLaptop> I have been using Mail/mime for some time, but it recently started generating the following error. Has anyone seen this? I am completely stumped. ERRNO: 8 TEXT: Only variable references should be returned by reference LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 375, at October 15, 2006, 8:14 am Showing backtrace: Mail_mime._addAlternativePart(null) # line 505, file: C:\Program Files\xampp\php\pear\Mail\mime.php Mail_mime.get() # line 33, file: C:\kerbeez\include\email_handler.php EmailManager.MailMime("cliff at pinestream.com", "Order Confirmation", "Thank you for your order. ERRNO: 8 TEXT: Only variable references should be returned by reference LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 593, at October 15, 2006, 8:14 am Showing backtrace: Mail_mime.headers(Array[3]) # line 34, file: C:\kerbeez\include\email_handler.php EmailManager.MailMime("cliff at pinestream.com", " Order Confirmation", "Thank you for your order. Any ideas would be grateful. Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dell at sala.ca Sun Oct 15 09:55:23 2006 From: dell at sala.ca (Dell Sala) Date: Sun, 15 Oct 2006 09:55:23 -0400 Subject: [nycphp-talk] Baffling PEAR mail_mime error In-Reply-To: <000c01c6f055$9c1c8900$12a8a8c0@HirschLaptop> References: <000c01c6f055$9c1c8900$12a8a8c0@HirschLaptop> Message-ID: <1F56DA7B-F965-4107-B233-B71DA7AF4EC2@sala.ca> This is a new error notice that was added in php 4.4. You or your host must have just upgraded php to 4.4. The notice is generated for any functions that attempt to return the value of an expression as a reference. Apparently it doesn't work and the returned value will not be a reference, so the notice was added in php 4.4. PEAR Mail_Mime may have been have been updated to fix this problem. Make sure you upgrade to the latest version. Here's more info on the new notice: http://www.sitepoint.com/blogs/2005/07/30/php-44-minor-gotcha/ I'm curios to hear how others have been dealing with this issue. It's cause a lot of what I thought was well written code to start generating notices, (which in my mind are errors). -- Dell On Oct 15, 2006, at 8:29 AM, Cliff Hirsch wrote: > I have been using Mail/mime for some time, but it recently started > generating the following error. Has anyone seen this? I am > completely stumped. > > > > ERRNO: 8 > > TEXT: Only variable references should be returned by reference > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 375, > at October 15, 2006, 8:14 am > > Showing backtrace: > > Mail_mime._addAlternativePart(null) # line 505, file: C:\Program > Files\xampp\php\pear\Mail\mime.php > > Mail_mime.get() # line 33, file: C:\kerbeez\include > \email_handler.php > > EmailManager.MailMime("cliff at pinestream.com", "Order Confirmation", > "Thank you for your order? > > > > ERRNO: 8 > > TEXT: Only variable references should be returned by reference > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 593, > at October 15, 2006, 8:14 am > > Showing backtrace: > > Mail_mime.headers(Array[3]) # line 34, file: C:\kerbeez\include > \email_handler.php > > EmailManager.MailMime("cliff at pinestream.com", " Order > Confirmation", "Thank you for your order? > > > > Any ideas would be grateful. > > > > Cliff > > _______________________________ > Pinestream Communications, Inc. > Publisher of Semiconductor Times & Telecom Trends > 52 Pine Street, Weston, MA 02493 USA > Tel: 781.647.8800, Fax: 781.647.8825 > http://www.pinestream.com > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From cliff at pinestream.com Sun Oct 15 10:17:46 2006 From: cliff at pinestream.com (cliff) Date: Sun, 15 Oct 2006 09:17:46 -0500 Subject: [nycphp-talk] PEAR mail_mime error return by reference problem In-Reply-To: <1F56DA7B-F965-4107-B233-B71DA7AF4EC2@sala.ca> References: <000c01c6f055$9c1c8900$12a8a8c0@HirschLaptop> <1F56DA7B-F965-4107-B233-B71DA7AF4EC2@sala.ca> Message-ID: <20061015141746.M69460@pinestream.com> Interesting. But I am running 5.1.6 and have been running 5+ for some time. Maybe installing 5.1.6 changed my php.ini ENOTICE setting? But don't most factory patterns use return by refernce as in something like if ... return new objectA elseif return new objectB else return new objectC This would seem to create the same problem -- right? On Sun, 15 Oct 2006 09:55:23 -0400, Dell Sala wrote > This is a new error notice that was added in php 4.4. You or your > host must have just upgraded php to 4.4. > > The notice is generated for any functions that attempt to return the > value of an expression as a reference. Apparently it doesn't work > and the returned value will not be a reference, so the notice was > added in php 4.4. PEAR Mail_Mime may have been have been updated to > fix this problem. Make sure you upgrade to the latest version. > > Here's more info on the new notice: > > http://www.sitepoint.com/blogs/2005/07/30/php-44-minor-gotcha/ > > I'm curios to hear how others have been dealing with this issue. > It's cause a lot of what I thought was well written code to start > generating notices, (which in my mind are errors). > > -- Dell > > On Oct 15, 2006, at 8:29 AM, Cliff Hirsch wrote: > > > I have been using Mail/mime for some time, but it recently started > > generating the following error. Has anyone seen this? I am > > completely stumped. > > > > > > > > ERRNO: 8 > > > > TEXT: Only variable references should be returned by reference > > > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 375, > > at October 15, 2006, 8:14 am > > > > Showing backtrace: > > > > Mail_mime._addAlternativePart(null) # line 505, file: C:\Program > > Files\xampp\php\pear\Mail\mime.php > > > > Mail_mime.get() # line 33, file: C:\kerbeez\include > > \email_handler.php > > > > EmailManager.MailMime("cliff at pinestream.com", "Order Confirmation", > > "Thank you for your order > > > > > > > > ERRNO: 8 > > > > TEXT: Only variable references should be returned by reference > > > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 593, > > at October 15, 2006, 8:14 am > > > > Showing backtrace: > > > > Mail_mime.headers(Array[3]) # line 34, file: C:\kerbeez\include > > \email_handler.php > > > > EmailManager.MailMime("cliff at pinestream.com", " Order > > Confirmation", "Thank you for your order > > > > > > > > Any ideas would be grateful. > > > > > > > > Cliff > > > > _______________________________ > > Pinestream Communications, Inc. > > Publisher of Semiconductor Times & Telecom Trends > > 52 Pine Street, Weston, MA 02493 USA > > Tel: 781.647.8800, Fax: 781.647.8825 > > http://www.pinestream.com > > > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825, www.pinestream.com From cliff at pinestream.com Sun Oct 15 13:53:41 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Sun, 15 Oct 2006 13:53:41 -0400 Subject: [nycphp-talk] Baffling PEAR mail_mime error return by ref errors In-Reply-To: <1F56DA7B-F965-4107-B233-B71DA7AF4EC2@sala.ca> Message-ID: <000401c6f082$d9fb5620$12a8a8c0@HirschLaptop> I have the latest version of mail_mime and it still generates errors. I just modified the code, because I like E_NOTICE on during development. But I also changed my error handler to add the error type as follows: Error number: 8 Error type: e_notice Error number: 8 is meaningless to me -- and scary. Error type: e_notice is meaningful and lets me sleep better. Cliff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Dell Sala Sent: Sunday, October 15, 2006 8:55 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Baffling PEAR mail_mime error This is a new error notice that was added in php 4.4. You or your host must have just upgraded php to 4.4. The notice is generated for any functions that attempt to return the value of an expression as a reference. Apparently it doesn't work and the returned value will not be a reference, so the notice was added in php 4.4. PEAR Mail_Mime may have been have been updated to fix this problem. Make sure you upgrade to the latest version. Here's more info on the new notice: http://www.sitepoint.com/blogs/2005/07/30/php-44-minor-gotcha/ I'm curios to hear how others have been dealing with this issue. It's cause a lot of what I thought was well written code to start generating notices, (which in my mind are errors). -- Dell On Oct 15, 2006, at 8:29 AM, Cliff Hirsch wrote: > I have been using Mail/mime for some time, but it recently started > generating the following error. Has anyone seen this? I am > completely stumped. > > ERRNO: 8 > TEXT: Only variable references should be returned by reference > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 375, > at October 15, 2006, 8:14 am > > > ERRNO: 8 > TEXT: Only variable references should be returned by reference > > LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 593, > at October 15, 2006, 8:14 am From lists at zaunere.com Sun Oct 15 19:43:59 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 15 Oct 2006 19:43:59 -0400 Subject: [nycphp-talk] FW: UNIGROUP Meeting 19-OCT-2006: Steven Bellovin on Internet Security Message-ID: <00bd01c6f0b3$c9e86260$640aa8c0@MobileZ> All, A bit off-top, but Steven M. Bellovin is a highly regarded security author and internet expert - one of the great internet old timers. Probably his best known book: http://www.wilyhacker.com/ Web application security and internet security go hand in hand and you can't have the former without the later, so perhaps this is on-topic. See you there, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com Unigroup_of_NY wrote on Thursday, October 12, 2006 6:54 PM: > ==================================================================== > UNIGROUP OF NEW YORK - UNIX USERS GROUP - OCTOBER 2006 ANNOUNCEMENTS > ==================================================================== > > ---------------------------------------------------- > 1. UNIGROUP'S OCTOBER 2006 GENERAL MEETING ANNOUNCEMENT > ---------------------------------------------------- > > When: THURSDAY, October 19th, 2006 (3rd Thursday) > > Where: Alliance for Downtown NY Conference Facility > Downtown Center > 104 Washington Street > South West Corner of Wall Street Area > Downtown, New York City > ** Please RSVP (not mandatory) ** > > Time: 6:15 PM - 6:25 PM Registration > 6:25 PM - 6:45 PM Ask the Wizard, Questions, > Answers and Current Events > 6:45 PM - 7:00 PM Unigroup Business and Announcements > 7:00 PM - 9:30 PM Main Presentation > > ------------------------------------------- > Topic: Internet Security (topic to be fine tuned) > ------------------------------------------- > > Speaker: Steven M. Bellovin > > > > INTRODUCTION: > ------------- > > Unigroup is pleased to have Steven Bellovin as our speaker for > this month's presentation on Internet Security. It has been > over 10 years since Steve has addressed Unigroup, so we have > a lot to catch up on :-). > > (Note: We are still fine-tuning the meeting topic). > > ------------------------------------------------------------------- > > SPECIAL INSTRUCTIONS: > --------------------- > > To REGISTER for this event, please RSVP by using the Unigroup > Registration Page: > http://www.unigroup.org/unigroup-rsvp.html > > This will allow us to automate the registration process. > (Registration will also add you to our mailing list.) > Please avoid emailed RSVPs, if at all possible. > > Please continue to check the Unigroup web site and meeting page, > for any last minute updates concerning this meeting. If you > registered for this meeting, please check your email for any last > minute announcements as the meeting approaches. Also make sure > any anti-spam white-lists are updated to _ALLOW_ Unigroup traffic! > > Please try to RSVP as soon as possible. > > Note: RSVP is not mandatory for this location, but it does help > us to properly plan the meeting (food, drinks, handouts, > seating, etc.). > > ------------------------------------------------------------------- > > MAIN PRESENTATION OUTLINE: > -------------------------- > > To be finalized... but it is sure to be interesting! > > ------------------------------------------------------------------- > > Speaker Biography: > ------------------ > > See: > http://www.cs.columbia.edu/~smb/informal-bio.html > http://www.cs.columbia.edu/~smb/bio.txt > > Highlights: > - Unigroup Speaker back on 18-MAY-1995, > Topic: "Firewalls and Internet Security." > - Co-Author of "Firewalls and Internet Security: Repelling the > Wily Hacker" (1st and 2nd Editions). > - Professor at Columbia University. > - Researcher at AT&T Labs and Bell Labs. > - Recipient of the 1995 Usenix Lifetime Achievement Award > for his work helping to create UseNET and NetNews. > - Active in the IETF, was a member of the Internet Architecture > Board and Internet Engineering Steering Group (IESG). > - Member of the Science and Technology Advisory Committee of > the Department of Homeland Security. > - Patent holder on several cryptographic and network protocols. > - Well known Net Personality, Author and Researcher. > > ------------------------------------------------------------------- > > Giveaways: > ---------- > > O'Reilly has been kind enough to provide us with some of their > books, which we will continue to raffle off as giveaways at our > meetings. > > Addison-Wesley Professional/Prentice Hall PTR has been kind > enough to provide us with some of their books, which we will > continue to raffle off as giveaways at our meetings. > > Unigroup would like to thank both companies for the support > provided by their User Group programs. > > Note: The chances tend to be about 1 in 5, that any attendee of > our meeting will walk away with a fairly valuable giveaway > (ie. most books are valued between $30 and $60)! > > ------------------------------------------------------------------- > > Fee Schedule: > Yearly Membership (includes all meetings): $ 50.00 > Non-Member Single Meeting: $ 20.00 > Student Yearly Membership: $ 20.00 > Non-Member Student Single Meeting (with ID): $ 5.00 > Payment Methods: Cash, Check, American Express. > > ------------------------------------------------------------------- > > Complimentary Food and Refreshments will be served. This includes > "wraps" such as turkey, roast beef, chicken, tuna and grilled > vegetables as well as assorted salads (potato, tossed, > pasta, etc), cookies, bottled water and assorted beverages. > > ------------------------------------------------------------------- > > Directions: > > Alliance for Downtown NY Conference Facility > Downtown Center > 104 Washington Street > Wall Street Area > Downtown, New York City > > This building is located on the West side of the street, the > second building north of Rector Street. Cross Streets: > Between Rector (South) and Carlisle (North) Streets. > > Our meeting location is in the Lower West Corner of Downtown, > North of the Battery Tunnel, South of the Downtown Hotel, > East of West Street, and West of Greenwich Street. Walking West > on Rector Street from Broadway, you pass Church, Greenwich then > Washington Streets. > > There are multiple blocks of parking lots right there, between > Washington and Greenwich Streets, starting at the Battery Tunnel > and extending North for a number of blocks. > > Nearest mass transit stations, in order, are the '1/9' (Rector > Street), 'R/W' (Rector Street) and the '4/5' (Wall Street). > > ----- > > Please mark this meeting on your calendar and join us! > Please tell your friends about Unigroup! > > ---------------------------------------------------------------------------- > ---------------------------------------------------------------------------- > > ----------------- > 2. UPCOMING MEETINGS > ----------------- > > We have a series of meetings in the works: > > - Internet Security (Oct06) > - Field Trip to Sun - Solaris 10 Update and/or Networking Stack > (Nov06) > - Asterix / VoIP > - NO SPAM! (know any speakers on SPF and DNSrbl?) > - LAMP Part 2 - PHP > - Field Trip to HP - Invited > - Are there too many Linux Distributions? > - Unix 35th Birthday Celebration (Sun has offered to host this!) > - IPsec and IPv6 > - Samba > - DNS > - Unix Clusters and Clustered Databases > - Linux Clustering Part 3: Beowulf version 2 > - Building a Firewall using FreeBSD and Linux > - High Performance Internet Servers / Web Acceleration > - Unix Office Tools: Word Processors, Spreadsheets, Accounting > Packages. > - PKI > - GNU Development Environments > - iSCSI, Serial ATA, and other new peripheral technologies > > Please let us know about any other meeting topics that you may be > interested in. Potential speakers on Unix related technology > topics should contact the Unigroup Board. > > ---------------------------------------------------------------------------- > ---------------------------------------------------------------------------- > > -------------- > 3. PRIOR MEETINGS > -------------- > > July 2006: AJAX and other Advanced JavaScript Techniques > -------------------------------------------------------- > > Unigroup would like to thank Dan Phiffer, from ShiftSpace, for > his presentation talk about AJAX and JavsScript Techniques. > The discussion was lively and contained various interactive > demonstrations. It seems that AJAX can be found on many popular > web sites, particularly where increased "interactive-ness" and > responsiveness is needed. > > ---------------------------------------------------------------------------- > ---------------------------------------------------------------------------- > > ---------------------------- > 4. LOCAL EVENTS and TRADE SHOWS > ---------------------------- > > InfoSecurity 2006 > ----------------- > > When: October 24-25, 2006. > Where: Javits Center > > For show information visit: http://www.infosecurityevent.com > > ---------------------------------------------------------------------------- > ---------------------------------------------------------------------------- > > -------------------- > 5. UNIGROUP INFORMATION > -------------------- > > Unigroup is one of the oldest and largest Unix User's Groups > serving the Greater New York City Regional Area since the early > 1980s. Unigroup is a not-for-profit, vendor-neutral and member > funded volunteer organization. Unigroup holds regular and special > event meetings throughout the year on technical topics relating to > Unix and the Unix User Community. Unigroup is/was also the > Greater NYC Regional Area Affiliate of UniForum - an International > Unix Users Group. > > Unigroup holds regular meetings planned for (at a minimum) the > Third THURSDAY of Odd Months. We generally try to hold Field Trip > or Vendor Specific Meetings on the Even Months, although we do > have the ability to hold monthly meetings at our new downtown > meeting location. > > Planned regular meeting dates are: 10/19/2006, 11/16/2006, > 1/8/2007... Watch for our Special Event meetings at the various > trade shows in NYC as well as "Field Trips" to the facilities of > local hardware and software vendors. > > > > > > > ========================================================================= > = For Unigroup Information, Events and Meeting Announcements be sure > to = = visit our World Wide Web Home Page: > = = http://www.unigroup.org > = > ========================================================================= > > For further information or to get on the Unigroup Electronic Mail > Mailing List send an EMail message to: > unilist (-at-) unigroup.org > > To contact the Board of Directors of Unigroup, send an EMail > message to: uniboard (-at-) unigroup.org > > If you have recently attended a meeting and you are not receiving > Email announcements, please send us an Email and we will make > corrections to our lists. > > Please Email the Board with any suggestions, especially potential > meeting topics and speakers. Unigroup welcomes contributions and > content suggestions for our newsletter. Unigroup is a volunteer > organization and we need your assistance! Please let us know if > you can help! > > ---------------------------------------------------------------------------- > ---------------------------------------------------------------------------- > > I hope to see you all at our next meeting! > > -Rob Weiner > Unigroup Executive Director > unilist (-at-) unigroup.org > http://www.unigroup.org From rotsen at gmail.com Mon Oct 16 00:29:16 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Sun, 15 Oct 2006 21:29:16 -0700 Subject: [nycphp-talk] php/mysql on red hat system Message-ID: I am trying to get my php runnig in one of my red hat systems and I notice that I am missing php-mysql.so. I do have this file on my failover system(same red had OS). Can I just copy the php-mysql.so from one system to the other? N?stor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Mon Oct 16 00:32:55 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Sun, 15 Oct 2006 21:32:55 -0700 Subject: [nycphp-talk] php/mysql on red hat system In-Reply-To: References: Message-ID: Sorry, I am trying to run php/mysql/apache :-) On 10/15/06, N?stor wrote: > > I am trying to get my php runnig in one of my red hat systems > and I notice that I am missing php-mysql.so. I do have this file > on my failover system(same red had OS). > > Can I just copy the php-mysql.so from one system to the other? > > N?stor :-) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mariotti at fdcx.net Mon Oct 16 09:41:17 2006 From: r.mariotti at fdcx.net (R. Mariotti) Date: Mon, 16 Oct 2006 09:41:17 -0400 Subject: [nycphp-talk] Question Re: Intranet PHP central authentication??? Message-ID: <45338BFD.9080001@fdcx.net> Gentlemen; Subscribing and reading this list for some time now there is quite a bit of very valuable and useful info coming across. I value your professional responses and would like to call upon them at this time? In my position as primary designer/developer I have been challenged with designing/developing a new central authentication facility/mechanism for all applications on our Intranet. We run several departments/divisions that have access to both their own unique and common apps, all delivered via Apache. Currently each has its own style/type of authentication and authorizations and it has become very cumbersome and very unmanageable. I thought with this new challenge I could wipe the slate clean and design something that could be used for all new development and apps and also be retro fit into the old apps over time. Therefore I was wondering what other firms are doing to address this out there? Immediately I can come up with a multitude of ways, but what is the norm? What is the standard? what is scalable and trasportable? It is important to know that we are a 100% Linux and OSS shop with the exception of some 3rd party software and what ever is done must continue using oss. I was thinking of an LDAP solution and creating one or more php modules to allow central access (i.e.: an app requires user authentication: it includes_once or exec's the central module to accomplish then and stores a returned token or something with the session to determine successful authentication and permissions. I would appreciate ANY ideas that any of you may have to address this and links to any sampes, templates, etc that would help. Thank you again for any and all recommendations you can provide. Bob From dell at sala.ca Mon Oct 16 12:50:03 2006 From: dell at sala.ca (Dell Sala) Date: Mon, 16 Oct 2006 12:50:03 -0400 Subject: [nycphp-talk] Resolving Bus Errors Message-ID: <460A7B4D-3E3E-4928-A70D-1354F573212C@sala.ca> How should one go about resolving php bus errors and segfaults? I have a script that produces a bus error when I run it under my php4 setup, but runs fine under my php5. It appears that script becomes unstable after invoking the built-in xml parser with xml_parser_create (which is used behind the scenes in PEAR's XML_Serializer). After that point, calls to file related functions, like fopen() or file(), may or may not result in a bus error. I've tried to reproduce the problem in an isolated context, but without success. Should I even try to resolve this by modifying my php scripts, or am I just trying to catch a ghost? Is there a way to isolate these problems to come up with a work-around? Are there specific things one should look for that might be contributing to the instability, like not calling fclose() or xml_parser_free(), or something like that? -- Dell From ps at pswebcode.com Mon Oct 16 14:05:38 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Mon, 16 Oct 2006 14:05:38 -0400 Subject: [nycphp-talk] SQL Select Message-ID: <002f01c6f14d$af891410$6701a8c0@SUNCODE1> If I have a table with fields roughly like: ID NAME ADDRESS CITY STATE COUNTRY I would like to do a select that would give me output grouped like so (including the quantity): United States (1589) New York (1200) Los Angeles (200) Dallas (189) Maldives (1) France (123) Paris (111) Bordeaux (9) Orleans (3) etc. Thanks in advance if you've got this at your fingertips. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Mon Oct 16 14:13:13 2006 From: chsnyder at gmail.com (csnyder) Date: Mon, 16 Oct 2006 14:13:13 -0400 Subject: [nycphp-talk] Question Re: Intranet PHP central authentication??? In-Reply-To: <45338BFD.9080001@fdcx.net> References: <45338BFD.9080001@fdcx.net> Message-ID: On 10/16/06, R. Mariotti wrote: > Therefore I was wondering what other firms are doing to address this out > there? Immediately I can come up with a multitude of ways, but what is > the norm? What is the standard? what is scalable and trasportable? My workplace is primarily a Windows shop (on the workstation side of things), so LDAP was a natural solution as we already use Active Directory to manage user accounts. Active Directory is Microsoft's implementation of LDAP. Here's the code I use (as part of an authenticate( $username, $password ) method): if ( $ad = ldap_connect( 'ldap://'.$ldap_host.'/' ) ) { $adusername = $ldap_domain.'\\'.$username; if ( @ldap_bind($ad, $username, $password) ) { ldap_unbind( $ad ); $this->log( "User $username authenticated via LDAP." ); return TRUE; } } return FALSE; That's ActiveDirectory specific (note the DOMAIN\USERNAME syntax) but you'd do essentially the same thing with any other LDAP. If you're building your own from scratch, the biggest hurdle seems to be finding or creating a good interface for user/group administration. Authentication is the easy part! -- Chris Snyder http://chxo.com/ From 1j0lkq002 at sneakemail.com Mon Oct 16 16:13:15 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 16 Oct 2006 13:13:15 -0700 Subject: [nycphp-talk] Question Re: Intranet PHP central authentication??? In-Reply-To: <45338BFD.9080001@fdcx.net> References: <45338BFD.9080001@fdcx.net> Message-ID: <3411-08140@sneakemail.com> Out of my league, but you may want to look at what Yale has in place for single sign on /central auth of web apps/services: http://www.yale.edu/tp/auth/cas20.html http://www.ja-sig.org/products/cas/index.html -=john andrews http://www.johnon.com R. Mariotti r.mariotti-at-fdcx.net |nyphp dev/internal group use| wrote: >Gentlemen; > >Subscribing and reading this list for some time now there is quite a bit >of very valuable and useful info coming across. > >I value your professional responses and would like to call upon them at >this time? > >In my position as primary designer/developer I have been challenged with >designing/developing a new central authentication facility/mechanism for >all applications on our Intranet. We run several departments/divisions >that have access to both their own unique and common apps, all delivered >via Apache. > >Currently each has its own style/type of authentication and >authorizations and it has become very cumbersome and very unmanageable. > >I thought with this new challenge I could wipe the slate clean and >design something that could be used for all new development and apps and >also be retro fit into the old apps over time. > >Therefore I was wondering what other firms are doing to address this out >there? Immediately I can come up with a multitude of ways, but what is >the norm? What is the standard? what is scalable and trasportable? > >It is important to know that we are a 100% Linux and OSS shop with the >exception of some 3rd party software and what ever is done must continue >using oss. > >I was thinking of an LDAP solution and creating one or more php modules >to allow central access (i.e.: an app requires user authentication: it >includes_once or exec's the central module to accomplish then and stores >a returned token or something with the session to determine successful >authentication and permissions. > >I would appreciate ANY ideas that any of you may have to address this >and links to any sampes, templates, etc that would help. > >Thank you again for any and all recommendations you can provide. > > From 1j0lkq002 at sneakemail.com Mon Oct 16 16:16:21 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 16 Oct 2006 13:16:21 -0700 Subject: [nycphp-talk] SQL Select In-Reply-To: <002f01c6f14d$af891410$6701a8c0@SUNCODE1> References: <002f01c6f14d$af891410$6701a8c0@SUNCODE1> Message-ID: <30625-59901@sneakemail.com> I think I saw something very much like this on a website here: http://dev.mysql.com/doc/refman/5.0/en/index.html you may have to look around a bit. Peter Sawczynec ps-at-pswebcode.com |nyphp dev/internal group use| wrote: > If I have a table with fields roughly like: > > ID NAME ADDRESS CITY STATE COUNTRY > > I would like to do a select that would give me output grouped like so > (including the quantity): > > United States (1589) > New York (1200) > Los Angeles (200) > Dallas (189) > Maldives (1) > France (123) > Paris (111) > Bordeaux (9) > Orleans (3) > > etc. > > Thanks in advance if you've got this at your fingertips. > > > Warmest regards, > > Peter Sawczynec > Technology Director > PSWebcode > _Design & Interface > _Ecommerce > _Database Management > 646.316.3678 > ps at pswebcode.com > www.pswebcode.com > > >------------------------------------------------------------------------ > >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php > > -- ------------------------------------------------------------- Some say "Science is fact. Religion is faith. Magic is perception". I wonder, if what you witness is not reality, but your perception of reality, do you trust your perceptions as truth? Does that make the so-called scientist a religious magician? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From jknight at rootsilver.com Mon Oct 16 17:35:43 2006 From: jknight at rootsilver.com (Jeffrey Knight) Date: Mon, 16 Oct 2006 17:35:43 -0400 Subject: [nycphp-talk] SQL Select In-Reply-To: <002f01c6f14d$af891410$6701a8c0@SUNCODE1> References: <002f01c6f14d$af891410$6701a8c0@SUNCODE1> Message-ID: <4533FB2F.2020504@rootsilver.com> An HTML attachment was scrubbed... URL: From rob.notwicz at gmail.com Tue Oct 17 12:29:27 2006 From: rob.notwicz at gmail.com (Rob Notwicz) Date: Tue, 17 Oct 2006 12:29:27 -0400 Subject: [nycphp-talk] http authentication Message-ID: Hey all, I need to parse data from pages which are behind a login. Does anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and new to PHP, so anything at all will be helpful. (there is an http_request function listed on php.net, but the entry is sparse and I can't find any example code for it) thanks so much, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdailey at jaysec.com Tue Oct 17 12:32:09 2006 From: bdailey at jaysec.com (Brian Dailey) Date: Tue, 17 Oct 2006 12:32:09 -0400 Subject: [nycphp-talk] SQL Select Message-ID: <45350589.7090601@jaysec.com> I assume you're using MySQL? select count(ID), COUNTRY from tablename group by country; Hope that helps! - B. D. Date: Mon, 16 Oct 2006 14:05:38 -0400 From: "Peter Sawczynec" Subject: [nycphp-talk] SQL Select To: "'Org, Talk at Nyphp.'" Message-ID: <002f01c6f14d$af891410$6701a8c0 at SUNCODE1> Content-Type: text/plain; charset="iso-8859-1" If I have a table with fields roughly like: ID NAME ADDRESS CITY STATE COUNTRY I would like to do a select that would give me output grouped like so (including the quantity): United States (1589) New York (1200) Los Angeles (200) Dallas (189) Maldives (1) France (123) Paris (111) Bordeaux (9) Orleans (3) etc. Thanks in advance if you've got this at your fingertips. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com From chsnyder at gmail.com Tue Oct 17 13:35:19 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 17 Oct 2006 13:35:19 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: Message-ID: On 10/17/06, Rob Notwicz wrote: > Hey all, I need to parse data from pages which are behind a login. Does > anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and > new to PHP, so anything at all will be helpful. > > (there is an http_request function listed on php.net, but the entry is > sparse and I can't find any example code for it) > > thanks so much, > Rob If it's straight-up HTTP authentication (the kind where a standard dialog box pops up in the browser asking for a username and password), you can probably access it using something like: $data = file_get_contents( "http://username:password at example.com/path/to/data" ); If it's session-based authentication that was implemented in php or some other server-side language, you'll need to POST a login form, capture the session identifier (usually a cookie), and pass it back to the server with each request. -- Chris Snyder http://chxo.com/ From rob.notwicz at gmail.com Tue Oct 17 13:40:48 2006 From: rob.notwicz at gmail.com (Rob Notwicz) Date: Tue, 17 Oct 2006 13:40:48 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: Message-ID: Do you know where I might be able to find some sample code/walkthrough for the latter (POST)? thanks so much, Rob On 10/17/06, csnyder wrote: > > On 10/17/06, Rob Notwicz wrote: > > Hey all, I need to parse data from pages which are behind a login. Does > > anyone know how to do this? I'm kind of unfamiliar with HTTP protocol > and > > new to PHP, so anything at all will be helpful. > > > > (there is an http_request function listed on php.net, but the entry is > > sparse and I can't find any example code for it) > > > > thanks so much, > > Rob > > > If it's straight-up HTTP authentication (the kind where a standard > dialog box pops up in the browser asking for a username and password), > you can probably access it using something like: > > $data = file_get_contents( > "http://username:password at example.com/path/to/data" ); > > If it's session-based authentication that was implemented in php or > some other server-side language, you'll need to POST a login form, > capture the session identifier (usually a cookie), and pass it back to > the server with each request. > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Tue Oct 17 13:40:56 2006 From: ramons at gmx.net (David Krings) Date: Tue, 17 Oct 2006 13:40:56 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: Message-ID: <6.1.2.0.2.20061017133916.02dc2a58@pop.gmx.net> Hi, is this a standard login or a login within a form? You may try the username:password at URL format. That works for FTP, maybe it works for HTTP as well. Just a guess and worth a try, David K. At 12:29 PM 10/17/2006, you wrote: >Hey all, I need to parse data from pages which are behind a login. Does >anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and >new to PHP, so anything at all will be helpful. > >(there is an http_request function listed on php.net, but >the entry is sparse and I can't find any example code for it) > >thanks so much, > Rob >_______________________________________________ >New York PHP Community Talk Mailing List >http://lists.nyphp.org/mailman/listinfo/talk > >NYPHPCon 2006 Presentations Online >http://www.nyphpcon.com > >Show Your Participation in New York PHP >http://www.nyphp.org/show_participation.php From rob.notwicz at gmail.com Tue Oct 17 13:52:39 2006 From: rob.notwicz at gmail.com (Rob Notwicz) Date: Tue, 17 Oct 2006 13:52:39 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: <6.1.2.0.2.20061017133916.02dc2a58@pop.gmx.net> References: <6.1.2.0.2.20061017133916.02dc2a58@pop.gmx.net> Message-ID: login within a form On 10/17/06, David Krings wrote: > > Hi, > > is this a standard login or a login within a form? You may try > the > username:password at URL format. That works for FTP, maybe it works for HTTP > as well. > > Just a guess and worth a try, > > David K. > > At 12:29 PM 10/17/2006, you wrote: > >Hey all, I need to parse data from pages which are behind a login. Does > >anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and > >new to PHP, so anything at all will be helpful. > > > >(there is an http_request function listed on php.net, but > >the entry is sparse and I can't find any example code for it) > > > >thanks so much, > > Rob > >_______________________________________________ > >New York PHP Community Talk Mailing List > >http://lists.nyphp.org/mailman/listinfo/talk > > > >NYPHPCon 2006 Presentations Online > >http://www.nyphpcon.com > > > >Show Your Participation in New York PHP > >http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Tue Oct 17 15:16:43 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 17 Oct 2006 15:16:43 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: Message-ID: On 10/17/06, Rob Notwicz wrote: > Do you know where I might be able to find some sample code/walkthrough for > the latter (POST)? > > thanks so much, > Rob You might try this class: http://scripts.incutio.com/httpclient/index.php I've never used it, no idea if it is secure or not, but it seems to do what you're looking for... -- Chris Snyder http://chxo.com/ From ramons at gmx.net Tue Oct 17 16:13:20 2006 From: ramons at gmx.net (David Krings) Date: Tue, 17 Oct 2006 16:13:20 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: <6.1.2.0.2.20061017133916.02dc2a58@pop.gmx.net> Message-ID: <6.1.2.0.2.20061017160744.02dca138@pop.gmx.net> Any idea if it is posting or getting the form data? With a get you can craft the call to script fairly easily by passing the user name and password as parameters. Other than that...http_request...ah, yes, you already know about that one. This is getting a bit too advanced for me, but you may want to google for this as well. David K. At 01:52 PM 10/17/2006, you wrote: >login within a form > >On 10/17/06, David Krings <ramons at gmx.net> wrote: >Hi, > > is this a standard login or a login within a form? You may try the >username:password at URL format. That works for FTP, maybe it works for HTTP >as well. > > Just a guess and worth a try, > > David K. > >At 12:29 PM 10/17/2006, you wrote: > >Hey all, I need to parse data from pages which are behind a login. Does > >anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and > >new to PHP, so anything at all will be helpful. > > > >(there is an http_request function listed on > <http://php.net>php.net, but > >the entry is sparse and I can't find any example code for it) > > > >thanks so much, > > Rob From bdailey at jaysec.com Tue Oct 17 16:43:43 2006 From: bdailey at jaysec.com (Brian Dailey) Date: Tue, 17 Oct 2006 16:43:43 -0400 Subject: [nycphp-talk] http authentication In-Reply-To: References: Message-ID: <4535407F.2020403@jaysec.com> Rob, This Zend tutorial on curl may be helpful to you. http://www.zend.com/pecl/tutorials/curl.php - Brian Rob Notwicz wrote: > Hey all, I need to parse data from pages which are behind a login. Does > anyone know how to do this? I'm kind of unfamiliar with HTTP protocol and > new to PHP, so anything at all will be helpful. > > (there is an http_request function listed on php.net, but the entry is > sparse and I can't find any example code for it) > > thanks so much, > Rob > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From phil at bearingasset.com Wed Oct 18 08:54:14 2006 From: phil at bearingasset.com (Phil Duffy) Date: Wed, 18 Oct 2006 08:54:14 -0400 Subject: [nycphp-talk] Successor to the Web? Message-ID: <20061018125434.E74CEA8774@virtu.nyphp.org> I am sorry if this question appears to be off-topic, but perhaps someone can refer me to the correct forum. I had programmed in approximately a dozen languages previously before dabbling in PHP a couple years ago. Now that PHP 5 is truly object-oriented, I find it to be the most powerful of the languages with which I am familiar. As remarkable as the Web is, I am coming to the conclusion that it has some severe limitations for the kinds of complex applications that were the standard in the client/server days. I know that going back to client/server is not the answer and suspect that somewhere someone is working on an Internet-based system that could ultimately replace the page-oriented Web. Can anybody point me in that direction? My primary concern with the Web is that it seems to be a force-fit of page-orientation and statelessness to structured programming/object orientation, which I find to be inherently task-oriented. Applications that depend heavily upon related records require that users perform all kinds of browses. Under those circumstances, managing communication among objects becomes a nightmare because it requires the application programmer to predict communication paths to objects and manually handle session variables that are not task-scoped (they are by definition, session-scoped). It appears to me that there is a role for session variables, but it is not the task. The force-fit described above is particularly apparent when programming in an MVC and validate/process/display workflow environment. While many programmers have reservations about the need for these disciplines, it has been my experience that they become increasingly important as the size and complexity of an application system increases. Any thoughts will be appreciated. Phil Duffy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at pswebcode.com Wed Oct 18 10:01:49 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Wed, 18 Oct 2006 10:01:49 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> XML AJAX SOA RPC SOAP WDSL RSS VoIP Amazon Cloud EC2 Statelessness is the state. Network is the desktop. Warmest regards, Peter Sawczynec Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management 646.316.3678 ps at pswebcode.com www.pswebcode.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Duffy Sent: Wednesday, October 18, 2006 8:54 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Successor to the Web? I am sorry if this question appears to be off-topic, but perhaps someone can refer me to the correct forum. I had programmed in approximately a dozen languages previously before dabbling in PHP a couple years ago. Now that PHP 5 is truly object-oriented, I find it to be the most powerful of the languages with which I am familiar. As remarkable as the Web is, I am coming to the conclusion that it has some severe limitations for the kinds of complex applications that were the standard in the client/server days. I know that going back to client/server is not the answer and suspect that somewhere someone is working on an Internet-based system that could ultimately replace the page-oriented Web. Can anybody point me in that direction? My primary concern with the Web is that it seems to be a force-fit of page-orientation and statelessness to structured programming/object orientation, which I find to be inherently task-oriented. Applications that depend heavily upon related records require that users perform all kinds of browses. Under those circumstances, managing communication among objects becomes a nightmare because it requires the application programmer to predict communication paths to objects and manually handle session variables that are not task-scoped (they are by definition, session-scoped). It appears to me that there is a role for session variables, but it is not the task. The force-fit described above is particularly apparent when programming in an MVC and validate/process/display workflow environment. While many programmers have reservations about the need for these disciplines, it has been my experience that they become increasingly important as the size and complexity of an application system increases. Any thoughts will be appreciated. Phil Duffy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Wed Oct 18 10:40:38 2006 From: ramons at gmx.net (David Krings) Date: Wed, 18 Oct 2006 10:40:38 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <6.1.2.0.2.20061018101530.02e7d4d8@pop.gmx.net> Hi, I do not know of any particularly good sources that cover this topic. I just wonder what is wrong with client/server? After all, a browser and an http server is nothing else than a client/server structure in the classical sense. And with JavaScript the browser is becoming more a fat client. I personally prever a fat client as it allows a far better distribution of processing power. The browsers come around and do a lot of that with the XML/XSLT deal that puts the presentation tasks entirely in the lap of the browsers (which may not be a good thing in case of broken browsers like IE). One of the biggest limitations that I see in regards to the web/internet is that it is still too slow for heavy duty applications (or speedy connections are too expensive for the casual consumer use), that it is still too different from the fat clients, and that it is just too much of client/server (stateless). I work and worked on both fat client/server projects as well as web based projects and they each have their place. And each of them are by far not at the end of what can be done, one good example is the rising of AJAX, which combines technologies that are around for years and years already. I personally don't see the need to replace fat clients and the page oriented web. The page limitations are a good thing and make the developers think more. Why do we need a Web 3.0 when the vast majority cannot even properly handle Web 0.0.1beta? That is the same reson why many big companies still runn their mainframes using COBOL. Sure, that it so 60s, but it is well understood and just plain works. Can't say that about the next big thing after that, the (Windows) client/server. Depending on the tasks to be accomplished, going back to what you call "client/server" is in my opinion a very good idea. Far too many applications are being browser based or web enabled these days that clearly are way to complex and heavy to be handled by a dinky browser and a handful of markup code regardless of the new avenues with Ruby, AJAX, or PHP. I really lost you on the demand for a "new web". If the browser based approach does not work for the complex applications, there are solutions available that do the trick and when done right they do it quite well. Just my 2 ?. David K. At 08:54 AM 10/18/2006, you wrote: >I am sorry if this question appears to be off-topic, but perhaps someone >can refer me to the correct forum. I had programmed in approximately a >dozen languages previously before dabbling in PHP a couple years ago. Now >that PHP 5 is truly object-oriented, I find it to be the most powerful of >the languages with which I am familiar. As remarkable as the Web is, I am >coming to the conclusion that it has some severe limitations for the kinds >of complex applications that were the standard in the client/server >days. I know that going back to client/server is not the answer and >suspect that somewhere someone is working on an Internet-based system that >could ultimately replace the page-oriented Web. Can anybody point me in >that direction? > >My primary concern with the Web is that it seems to be a force-fit of >page-orientation and statelessness to structured programming/object >orientation, which I find to be inherently task-oriented. Applications >that depend heavily upon related records require that users perform all >kinds of browses. Under those circumstances, managing communication among >objects becomes a nightmare because it requires the application programmer >to predict communication paths to objects and manually handle session >variables that are not task-scoped (they are by definition, >session-scoped). It appears to me that there is a role for session >variables, but it is not the task. > >The force-fit described above is particularly apparent when programming in >an MVC and validate/process/display workflow environment. While many >programmers have reservations about the need for these disciplines, it has >been my experience that they become increasingly important as the size and >complexity of an application system increases. > >Any thoughts will be appreciated. > >Phil Duffy From krook at us.ibm.com Wed Oct 18 10:42:55 2006 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 18 Oct 2006 10:42:55 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: Phil, > ...As > remarkable as the Web is, I am coming to the conclusion > that it has some severe limitations for the kinds of > complex applications that were the standard in the > client/server days. I know that going back to > client/server is not the answer and suspect that somewhere > someone is working on an Internet-based system that could > ultimately replace the page-oriented Web. Can anybody > point me in that direction? ... > My primary concern with the Web is that it seems to be a > force-fit of page-orientation and statelessness to > structured programming/object orientation, which I find to > be inherently task-oriented. ... > While many programmers have > reservations about the need for these disciplines, it has been my > experience that they become increasingly important as the > size and complexity of an application system increases. > Any thoughts will be appreciated. > Phil Duffy There's an interesting article beginning a series at developerWorks which shares and addresses some of your concerns (using new technologies to eliminate the page-based Web while still adhering to the Web's fundamental roots): Ajax and REST, Part 1: Advantages of the Ajax/REST architectural style for immersive Web applications http://www.ibm.com/developerworks/web/library/wa-ajaxarch/ Some more information about REST principles: http://en.wikipedia.org/wiki/Representational_State_Transfer HTH, -Dan Daniel Krook, Content Tools Developer Global Production Services - Tools, ibm.com From jknight at rootsilver.com Wed Oct 18 10:51:06 2006 From: jknight at rootsilver.com (Jeffrey Knight) Date: Wed, 18 Oct 2006 10:51:06 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <45363F5A.3010107@rootsilver.com> An HTML attachment was scrubbed... URL: From ken at secdat.com Wed Oct 18 11:03:02 2006 From: ken at secdat.com (Kenneth Downs) Date: Wed, 18 Oct 2006 11:03:02 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <45364226.9090807@secdat.com> Phil Duffy wrote: > > I am sorry if this question appears to be off-topic, but perhaps > someone can refer me to the correct forum. > I hope you can come by and see the Andromeda presentation on Tuesday, because Andromeda is my answer to the questions you raise. Some of the answers I have come to lead me to call Andromeda the "un-framework", because the aim is very different from the MVC frameworks out there, in that I'm trying to preserve assets across architecture changes, and OO does not seem to be the way to do it, IMHO. > Now that PHP 5 is truly object-oriented, I find it to be the most > powerful of the languages with which I am familiar. n? > But be careful here. PHP 5 is subject to the Iron Law of Programming Languages: This Too Shall Pass. Therefore, the answer to a changing world architecture cannot be found in a language, because languages have a tendency to become powerful when there platform is growing, and to become weak as their platform wanes (Cobol for timeshare, visual foxpro for LAN, VB for C/S...) To preserve assets in a form that can be usable by any language on any platform requires that they be stored in a form that is easily transmutable, and this so happens to be data. If your crucial business rules are stored in data, so that code can be generated, you have made a huge practical leap not just towards platform-independence, but towards architecture-independence. > Applications that depend heavily upon related records require that > users perform all kinds of browses. Under those circumstances, > managing communication among objects becomes a nightmare because it > requires the application programmer to predict communication paths to > objects and manually handle session variables that are not task-scoped > (they are by definition, session-scoped). It appears to me that there > is a role for session variables, but it is not the task. > This results when the application is designed around coding principles and the database is expected to conform. Databases and programs have very different purposes and follow very different rules for virtuous design. Experience with customers leads to the conclusion that the guys who sign the checks pay for valid data, not UIs (the UI is important and is expected to work, but the database is what gets the attention). This becomes more true the larger the company. Therefore it seems only practical to design a framework based on the need to maintain valid data. I'll skip the detail on this point because that will be the main substance of the presentation on Tuesday. If you follow this line of reasoning, you end up concentrating first on getting the database specification to be complete and correct. Once this is done, the browser layer tends to come next in importance because of its role in user acceptance and productivity. This leaves to last, surprisingly, the PHP layer, serving as "mere" glue between the browser and the database. Because most frameworks begin with trying to establish coding practices for the PHP layer, which we can see here as being the least important, it is no surprise that they end up looking like a "force-fit" in the big picture. > While many programmers have reservations about the need for these > disciplines, it has been my experience that they become increasingly > important as the size and complexity of an application system increases. > My experience is that *some* sort of method is required, but that programming discipline is not the silver bullet, which is why I looked elsewhere and developed Andromeda, which is more about getting a complete database specification and implementing it with as little effort as possible. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From jonbaer at jonbaer.com Wed Oct 18 11:04:26 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 18 Oct 2006 11:04:26 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> References: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> Message-ID: I think he nailed it best ... MVC/AJAX/RPC interface, pluggable 3rd party API layers (even including authentication via open source identity servers), and literally "anywhere" storage. Changing world ... - Jon On Oct 18, 2006, at 10:01 AM, Peter Sawczynec wrote: > XML AJAX SOA RPC SOAP WDSL RSS VoIP Amazon Cloud EC2 > Statelessness is the state. > Network is the desktop. > > Warmest regards, > > Peter Sawczynec > Technology Director > PSWebcode > _Design & Interface > _Ecommerce > _Database Management > 646.316.3678 > ps at pswebcode.com > www.pswebcode.com > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] On Behalf Of Phil Duffy > Sent: Wednesday, October 18, 2006 8:54 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] Successor to the Web? > > I am sorry if this question appears to be off-topic, but perhaps > someone can refer me to the correct forum. I had programmed in > approximately a dozen languages previously before dabbling in PHP a > couple years ago. Now that PHP 5 is truly object-oriented, I find > it to be the most powerful of the languages with which I am > familiar. As remarkable as the Web is, I am coming to the > conclusion that it has some severe limitations for the kinds of > complex applications that were the standard in the client/server > days. I know that going back to client/server is not the answer > and suspect that somewhere someone is working on an Internet-based > system that could ultimately replace the page-oriented Web. Can > anybody point me in that direction? > > My primary concern with the Web is that it seems to be a force-fit > of page-orientation and statelessness to structured programming/ > object orientation, which I find to be inherently task-oriented. > Applications that depend heavily upon related records require that > users perform all kinds of browses. Under those circumstances, > managing communication among objects becomes a nightmare because it > requires the application programmer to predict communication paths > to objects and manually handle session variables that are not task- > scoped (they are by definition, session-scoped). It appears to me > that there is a role for session variables, but it is not the task. > > The force-fit described above is particularly apparent when > programming in an MVC and validate/process/display workflow > environment. While many programmers have reservations about the > need for these disciplines, it has been my experience that they > become increasingly important as the size and complexity of an > application system increases. > > Any thoughts will be appreciated. > > Phil Duffy > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Wed Oct 18 12:57:36 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Wed, 18 Oct 2006 09:57:36 -0700 Subject: [nycphp-talk] Upgrading PHP and MYSQL - duplicate name error Message-ID: I re-install PHP and MYSQL on my REHL 3 linux using: up2date -i php up2date -i mysql up2date -i php-mysql This morning I found the following error on my error.log file: PHP Warning: Function registration failed - duplicate name - mysql_dbname in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_tablename in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_table_name in Unknown on line 0 PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0 [Wed Oct 18 09:41:32 2006] [notice] Apache/2.0.46 (Red Hat) configured -- resuming normal operations I get a lot of 'Function registration failed - duplicate name" Any ideas what is the problem? Thanks, N?stor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From urb at e-government.com Wed Oct 18 13:32:03 2006 From: urb at e-government.com (Urb LeJeune) Date: Wed, 18 Oct 2006 13:32:03 -0400 Subject: [nycphp-talk] ASP to PHP In-Reply-To: References: Message-ID: <7.0.1.0.0.20061018133104.03bceb50@e-government.com> Does anyone have any experience with converting an ASP application to PHP using any of the conversion tools that are out there? Thanks Urb From jonbaer at jonbaer.com Wed Oct 18 13:36:03 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 18 Oct 2006 13:36:03 -0400 Subject: [nycphp-talk] Upgrading PHP and MYSQL - duplicate name error In-Reply-To: References: Message-ID: <6C5FD08D-F504-44FE-9E5A-13DCC47A20AD@jonbaer.com> Might be trying to load mysql extension more than once in your php.ini file? (guess) grep mysql /usr/local/lib/php.ini - Jon On Oct 18, 2006, at 12:57 PM, N?stor wrote: > I re-install PHP and MYSQL on my REHL 3 linux using: > up2date -i php > up2date -i mysql > up2date -i php-mysql > > This morning I found the following error on > my error.log file: > PHP Warning: Function registration failed - duplicate name - > mysql_dbname in Unknown on line 0 > PHP Warning: Function registration failed - duplicate name - > mysql_tablename in Unknown on line 0 > PHP Warning: Function registration failed - duplicate name - > mysql_table_name in Unknown on line 0 > PHP Warning: mysql: Unable to register functions, unable to load > in Unknown on line 0 > [Wed Oct 18 09:41:32 2006] [notice] Apache/2.0.46 (Red Hat) > configured -- resuming normal operations > > I get a lot of 'Function registration failed - duplicate name" > > Any ideas what is the problem? > > Thanks, > > N?stor :-) > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From chsnyder at gmail.com Wed Oct 18 17:11:53 2006 From: chsnyder at gmail.com (csnyder) Date: Wed, 18 Oct 2006 17:11:53 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: References: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> Message-ID: On 10/18/06, Jon Baer wrote: > > I think he nailed it best ... > > MVC/AJAX/RPC interface, pluggable 3rd party API layers (even including > authentication via open source identity servers), and literally "anywhere" > storage. > > Changing world ... > > - Jon > > On Oct 18, 2006, at 10:01 AM, Peter Sawczynec wrote: > > > XML AJAX SOA RPC SOAP WDSL RSS VoIP Amazon Cloud EC2 > Statelessness is the state. > Network is the desktop. > Maybe we just have very strong blinders on. :-) HTTP was designed for a certain flavor of application, the kind that involves discrete requests for content-bearing resources on remote servers. It turns out you can build a helluva lot of useful stuff with it, especially if you add a session mechanism and start automating/scripting the requests. But just because you _can_ build an application by cobbling together all these technologies, doesn't mean you _should_. I think the SecondLife example is a good one. Cyberspace made real. I also think that virtualization has made it a snap to create application "kiosks" where you use a VNC client rather than a web browser to connect to and interact with a system, even if (especially if!) that system is running on your own workstation. -- Chris Snyder http://chxo.com/ From bdailey at jaysec.com Wed Oct 18 17:17:30 2006 From: bdailey at jaysec.com (Brian Dailey) Date: Wed, 18 Oct 2006 17:17:30 -0400 Subject: [nycphp-talk] Ask NYCPHP: PHP Information Sources Message-ID: <453699EA.7050504@jaysec.com> As developers it's our responsibility to keep up with new technologies, techniques, and ideas. What sources do you find to be useful in the PHP community? Places where you see new techniques or ideas discussed and make you think, "Hey! That's pretty cool, I think I can use that somehow to make my life easier...." For me, lists like this are a great place to get new ideas, as are places like del.icio.us (del.icio.us/popular/php). What do you find to be most useful for staying on top of new developments? Thanks! - Brian From 1j0lkq002 at sneakemail.com Wed Oct 18 17:33:13 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 18 Oct 2006 14:33:13 -0700 Subject: [nycphp-talk] [OT] Re: Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <14600-38434@sneakemail.com> Phil Duffy phil-at-bearingasset.com |nyphp dev/internal group use| wrote: > I am sorry if this question appears to be off-topic, but perhaps > someone can refer me to the correct forum. I had programmed in > approximately a dozen languages previously before dabbling in PHP a > couple years ago. Now that PHP 5 is truly object-oriented, I find it > to be the most powerful of the languages with which I am familiar. As > remarkable as the Web is, I am coming to the conclusion that it has > some severe limitations for the kinds of complex applications that > were the standard in the client/server days. I know that going back > to client/server is not the answer and suspect that somewhere someone > is working on an Internet-based system that could ultimately replace > the page-oriented Web. Can anybody point me in that direction? > Whatever works will replace the web, one piece at a time. Just because people didn't understand how free information (truthful or not) would change their lives (and so they adopted the web), people don't know what else they need, either. Somebody has to show it to them (one piece at a time). It seems you are saying you want to build complex applications, and don't think PHP/web is a good way to do that. Seems clear. But if you are trying to bring those complex apps to the people, people are (right now) using the web. > My primary concern with the Web is that it seems to be a force-fit of > page-orientation and statelessness to structured programming/object > orientation, which I find to be inherently task-oriented. > Applications that depend heavily upon related records require that > users perform all kinds of browses. Under those circumstances, > managing communication among objects becomes a nightmare because it > requires the application programmer to predict communication paths to > objects and manually handle session variables that are not task-scoped > (they are by definition, session-scoped). It appears to me that there > is a role for session variables, but it is not the task. > Yes, doing it that way is hard. Much harder than it looks. Harder than people think it is. But it is also hard to travel around as a salesman, pitching Ginzu knives at mall cooking kiosks, flea markets, and Wal-mart stores 300 days per year. But somebody does that, and I met one guy who made a million bucks doing that in one year. All we see is some guy at the mall giving a great demo of a cheap knife cutting through a coke can. We have no idea how much work he does to bring that show around... and I doubt we care very much. As soon as he has a better way to cut out the middle man and keep 80% of his sales, I'm sure he'll choose that method. > The force-fit described above is particularly apparent when > programming in an MVC and validate/process/display workflow > environment. While many programmers have reservations about the need > for these disciplines, it has been my experience that they become > increasingly important as the size and complexity of an application > system increases. > I think you're seeing programmers (technicians) relying on tools (which they have to do, to keep up). "The best tool for the job" , is sometimes really "the best avalable tool for the job, as the customer understands the job". As you know, there is a difference. > Any thoughts will be appreciated. > You got em. -- ------------------------------------------------------------- Some say "Science is fact. Religion is faith. Magic is perception". I wonder, if what you witness is not reality, but your perception of reality, do you trust your perceptions as truth? Does that make the so-called scientist a religious magician? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From jknight at rootsilver.com Wed Oct 18 17:39:07 2006 From: jknight at rootsilver.com (Jeffrey Knight) Date: Wed, 18 Oct 2006 17:39:07 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: References: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> Message-ID: <45369EFB.8050403@rootsilver.com> An HTML attachment was scrubbed... URL: From matt at jobsforge.com Wed Oct 18 19:34:32 2006 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 18 Oct 2006 19:34:32 -0400 Subject: [nycphp-talk] Constructors and Message-ID: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Just want to bounce this off the OO gurus: Say you have a User object and sometimes you want to create existing users and other times new users. So you instantiate the object: $user = new User($username) and the object recognizes the user and grabs all the user data from the DB. . .or $user = new $User() and the object creates a new user in the db but constructors don't return values so there is no way to test that the second case in fact succeeded. So I'm thinking I must create a method like: public function init() { if ( $this->username == NULL) { createUser() } else { //get user data from db with $username } } so I can test whether my initilaization is successful. That's fine. Just seems cumbersome to create a new object and ALWAYS follow with a given method. I thought that's what constructors were for. And I know they are. What's the preferred methodology here? Thanks From jonbaer at jonbaer.com Wed Oct 18 22:34:31 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 18 Oct 2006 22:34:31 -0400 Subject: [nycphp-talk] Ask NYCPHP: PHP Information Sources In-Reply-To: <453699EA.7050504@jaysec.com> References: <453699EA.7050504@jaysec.com> Message-ID: <10D8438B-FC3F-42F7-B4A5-B6F33FEE5EFF@jonbaer.com> Yeah I think the "rollups" are pretty good info to have since it saves you work on finding everyones blog ... http://www.planet-php.org/ http://www.planetmysql.org/ - Jon On Oct 18, 2006, at 5:17 PM, Brian Dailey wrote: > As developers it's our responsibility to keep up with new > technologies, > techniques, and ideas. What sources do you find to be useful in the > PHP > community? Places where you see new techniques or ideas discussed and > make you think, "Hey! That's pretty cool, I think I can use that > somehow > to make my life easier...." > > For me, lists like this are a great place to get new ideas, as are > places like del.icio.us (del.icio.us/popular/php). > > What do you find to be most useful for staying on top of new > developments? > > Thanks! > - Brian > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From shiflett at php.net Wed Oct 18 22:58:49 2006 From: shiflett at php.net (Chris Shiflett) Date: Wed, 18 Oct 2006 22:58:49 -0400 Subject: [nycphp-talk] Ask NYCPHP: PHP Information Sources In-Reply-To: <10D8438B-FC3F-42F7-B4A5-B6F33FEE5EFF@jonbaer.com> References: <453699EA.7050504@jaysec.com> <10D8438B-FC3F-42F7-B4A5-B6F33FEE5EFF@jonbaer.com> Message-ID: <4536E9E9.4030403@php.net> Jon Baer wrote: > Yeah I think the "rollups" are pretty good info to have since it > saves you work on finding everyones blog ... > > http://www.planet-php.org/ > http://www.planetmysql.org/ We need a Planet NYPHP. Chris -- Chris Shiflett http://shiflett.org/ From chsnyder at gmail.com Wed Oct 18 23:05:35 2006 From: chsnyder at gmail.com (csnyder) Date: Wed, 18 Oct 2006 23:05:35 -0400 Subject: [nycphp-talk] Constructors and In-Reply-To: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Message-ID: On 10/18/06, Matthew Terenzio wrote: > Just seems cumbersome to create a new object and ALWAYS > follow with a given method. > I thought that's what constructors were for. I think it's good practice to keep actions out of the constructor. I typically end up wanting to change configuration or set some properties before I start calling methods on an object, maybe months or years after writing the class. $user = new User(); $user->useLDAP( $server, $domain ); $user->load( $username ); If the constructor starts doing stuff on instantiation, then you're potentially cut off from flexibility down the line. -- Chris Snyder http://chxo.com/ From 1j0lkq002 at sneakemail.com Wed Oct 18 23:07:22 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 18 Oct 2006 20:07:22 -0700 Subject: [nycphp-talk] Ask NYCPHP: PHP Information Sources In-Reply-To: <4536E9E9.4030403@php.net> References: <453699EA.7050504@jaysec.com> <10D8438B-FC3F-42F7-B4A5-B6F33FEE5EFF@jonbaer.com> <4536E9E9.4030403@php.net> Message-ID: <26920-08870@sneakemail.com> Chris Shiflett shiflett-at-php.net |nyphp dev/internal group use| wrote: >Jon Baer wrote: > > >>Yeah I think the "rollups" are pretty good info to have since it >>saves you work on finding everyones blog ... >> >>http://www.planet-php.org/ >>http://www.planetmysql.org/ >> >> > >We need a Planet NYPHP. > >Chris > > > Ahhh.. the "directory project". Isn't Chris H done with that yet? ;-) -=john -- ------------------------------------------------------------- Some say "Science is fact. Religion is faith. Magic is perception". I wonder, if what you witness is not reality, but your perception of reality, do you trust your perceptions as truth? Does that make the so-called scientist a religious magician? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From matt at jobsforge.com Wed Oct 18 23:16:39 2006 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 18 Oct 2006 23:16:39 -0400 Subject: [nycphp-talk] Constructors and In-Reply-To: References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Message-ID: On Oct 18, 2006, at 11:05 PM, csnyder wrote: > I think it's good practice to keep actions out of the constructor. Fair enough. Just wanted to make sure I wasn't either overthinking or underthinking it. ; ) From billy.reisinger at gmail.com Wed Oct 18 23:28:26 2006 From: billy.reisinger at gmail.com (Billy Reisinger) Date: Wed, 18 Oct 2006 22:28:26 -0500 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <45369EFB.8050403@rootsilver.com> References: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> <45369EFB.8050403@rootsilver.com> Message-ID: <74734AB6-325F-4061-90CE-24856B415A3A@gmail.com> Second Life is cool, but comparing it to teh interweb is not very enlightening. Second life is maintained by a private company, and you need their client on your computer to connect to their world. They are in control. With the web, nobody is really in control. Sure, new standards seem to take ages to be adopted by a majority of browsers (SVG? UML? CSS3?), but at least we are free to use whatever browser to access the web. ANother thing that the web has over a virtual world like second life is that it is (at the moment) much more practical for purposes like online shopping, searching, downloading documents, images, movies, etc. Everybody touts the economy of second life as pretty cool, and it is a cool thing - but it pales in comparison to the $$ spent on the web as a whole. RIght now, most major sites rely on some type of server farm to balance loads, so when they get like 10,000,000 hits in one hour, they can handle it ok. Second Life, OOTO, can't handle 60 avatars on the same sim. It really, really hurts performance. As far as having a virtual world instead of a flat, http world to browse, well hell, I would use that for sure. That is, if my 5 year old G4 could handle that sort of crap (which it can't). On Oct 18, 2006, at 4:39 PM, Jeffrey Knight wrote: > > > Check out the American Apparel store in second life. You can buy > shirts for your avatar and American Apparel gives you a discount to > buy the same item in real life. They also link items from their > second life to their website. You can already IM in second life > (I'm told it's being reworked to run over jabber), and listen to > music in second life. It has an economy. People give talks and > perform Shakespeare plays. And, yes, there's the porn. > > Once you can email, purchase products, browse the wikipedia > library, and ask google questions, what do you need the silly old > http internet for? > > Granted, SecondLife may not be the final answer (it has its issues, > to be sure), but something like SecondLife will be the http killer, > probably sooner than we think. (I'd like to think of it as a > version of SecondLife where my data isn't all on someone else's > server.) > > See also: http://www.libsecondlife.org/ > > -Jef > > > Jeffrey Knight > Root Silver Technology Consulting, New York NY > Ecommerce & Web Development > (aim) jefight | (msn) jefight at hotmail.com | (gtalk) > jeffrey.knight at gmail.com > (c) 646 236 3051 > > >> Maybe we just have very strong blinders on. :-) >> >> HTTP was designed for a certain flavor of application, the kind that >> involves discrete requests for content-bearing resources on remote >> servers. >> >> It turns out you can build a helluva lot of useful stuff with it, >> especially if you add a session mechanism and start >> automating/scripting the requests. >> >> But just because you _can_ build an application by cobbling together >> all these technologies, doesn't mean you _should_. >> >> I think the SecondLife example is a good one. Cyberspace made real. >> >> I also think that virtualization has made it a snap to create >> application "kiosks" where you use a VNC client rather than a web >> browser to connect to and interact with a system, even if (especially >> if!) that system is running on your own workstation. >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From dell at sala.ca Wed Oct 18 23:50:59 2006 From: dell at sala.ca (Dell Sala) Date: Wed, 18 Oct 2006 23:50:59 -0400 Subject: [nycphp-talk] Constructors and In-Reply-To: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Message-ID: <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> I think you've got the right idea. Loading the user data should occur outside the constructor so you can check for success. A little off topic: It looks like your moving towards a DataObject pattern and if you haven't explored this already it's worth a look. DataObjects typically have something like a get() method, or a find() method which is called after the object has been instantiated. $user = new DataObject('user'); $user->get($userId); When you instantiate the DataObject, it's just an empty shell. You either do a get() or find() to load data into the shell, or you populate it with your own data and then insert it into the db: $user = new DataObject('user'); $user->setName('John'); $user->setAge(34); $user->insert(); Here's a good article that covers the basics: http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html -- Dell On Oct 18, 2006, at 7:34 PM, Matthew Terenzio wrote: > Just want to bounce this off the OO gurus: > > Say you have a User object and sometimes you want to create existing > users and other times new users. > > So you instantiate the object: > > $user = new User($username) > > and the object recognizes the user and grabs all the user data from > the > DB. . .or > > $user = new $User() > > and the object creates a new user in the db > > but constructors don't return values so there is no way to test that > the second case in fact succeeded. > > So I'm thinking I must create a method like: > > public function init() { > if ( $this->username == NULL) { > createUser() > } else { > //get user data from db with $username > } > } > > so I can test whether my initilaization is successful. > > > That's fine. Just seems cumbersome to create a new object and ALWAYS > follow with a given method. > I thought that's what constructors were for. > > And I know they are. What's the preferred methodology here? > > Thanks From arzala at gmail.com Thu Oct 19 01:31:06 2006 From: arzala at gmail.com (Anirudh Zala) Date: Thu, 19 Oct 2006 11:01:06 +0530 Subject: [nycphp-talk] [OT] Re: Successor to the Web? In-Reply-To: <14600-38434@sneakemail.com> References: <20061018125434.E74CEA8774@virtu.nyphp.org> <14600-38434@sneakemail.com> Message-ID: <200610191101.06658.arzala@gmail.com> On Thursday 19 October 2006 03:03, inforequest wrote: > Phil Duffy phil-at-bearingasset.com |nyphp dev/internal group use| wrote: > > I am sorry if this question appears to be off-topic, but perhaps > > someone can refer me to the correct forum. I had programmed in > > approximately a dozen languages previously before dabbling in PHP a > > couple years ago. Now that PHP 5 is truly object-oriented, I find it > > to be the most powerful of the languages with which I am familiar. As > > remarkable as the Web is, I am coming to the conclusion that it has > > some severe limitations for the kinds of complex applications that > > were the standard in the client/server days. I know that going back > > to client/server is not the answer and suspect that somewhere someone > > is working on an Internet-based system that could ultimately replace > > the page-oriented Web. Can anybody point me in that direction? > > Whatever works will replace the web, one piece at a time. Just because > people didn't understand how free information (truthful or not) would > change their lives (and so they adopted the web), people don't know what > else they need, either. Somebody has to show it to them (one piece at a > time). Very true. People use web just as a part of fulfilling their requirements. That is why they don't pay much attention towards how they are being served. As soon as their purposes are fulfilled, they stop using web and continue doing other stuffs. Since they are not much aware of technologies on which web applications have been built and running, we can't rely much on their opinion to bring changes. Hence it is mostly our efforts to make any changes that we think it needs to bring. > > It seems you are saying you want to build complex applications, and > don't think PHP/web is a good way to do that. Seems clear. But if you > are trying to bring those complex apps to the people, people are (right > now) using the web. > > > My primary concern with the Web is that it seems to be a force-fit of > > page-orientation and statelessness to structured programming/object > > orientation, which I find to be inherently task-oriented. > > Applications that depend heavily upon related records require that > > users perform all kinds of browses. Under those circumstances, > > managing communication among objects becomes a nightmare because it > > requires the application programmer to predict communication paths to > > objects and manually handle session variables that are not task-scoped > > (they are by definition, session-scoped). It appears to me that there > > is a role for session variables, but it is not the task. > > Yes, doing it that way is hard. Much harder than it looks. Harder than > people think it is. But it is also hard to travel around as a salesman, > pitching Ginzu knives at mall cooking kiosks, flea markets, and Wal-mart > stores 300 days per year. But somebody does that, and I met one guy who > made a million bucks doing that in one year. All we see is some guy at > the mall giving a great demo of a cheap knife cutting through a coke > can. We have no idea how much work he does to bring that show around... > and I doubt we care very much. As soon as he has a better way to cut out > the middle man and keep 80% of his sales, I'm sure he'll choose that > method. > > > The force-fit described above is particularly apparent when > > programming in an MVC and validate/process/display workflow > > environment. While many programmers have reservations about the need > > for these disciplines, it has been my experience that they become > > increasingly important as the size and complexity of an application > > system increases. > > I think you're seeing programmers (technicians) relying on tools (which > they have to do, to keep up). "The best tool for the job" , is sometimes > really "the best avalable tool for the job, as the customer understands > the job". As you know, there is a difference. > > > Any thoughts will be appreciated. > > You got em. From arzala at gmail.com Thu Oct 19 02:40:55 2006 From: arzala at gmail.com (Anirudh Zala) Date: Thu, 19 Oct 2006 12:10:55 +0530 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <200610191210.55070.arzala@gmail.com> On Wednesday 18 October 2006 18:24, Phil Duffy wrote: > I am sorry if this question appears to be off-topic, but perhaps someone > can refer me to the correct forum. I had programmed in approximately a > dozen languages previously before dabbling in PHP a couple years ago. Now > that PHP 5 is truly object-oriented, I find it to be the most powerful of > the languages with which I am familiar. As remarkable as the Web is, I am > coming to the conclusion that it has some severe limitations for the kinds > of complex applications that were the standard in the client/server days. > I know that going back to client/server is not the answer and suspect that > somewhere someone is working on an Internet-based system that could > ultimately replace the page-oriented Web. Can anybody point me in that > direction? Web is made of lot of components like protocols, browsers, markup languages etc. where some of them are not co-ordinated or there lacks standardization of communication between client and server. Answer of this question lies in bringing changes in the way Web works by applying certain standards (communication, information interchange etc.) between applications. So client-server technology, according to me, can be replaced with client-agent-server technology where client and server do not communicate directly with each other like it is now. Agents will be similar like desktop application (like email clients etc.) that will fetch information from various servers according to user's requirement, will process those information and will finally present to user in easier way. But it is needs standardization between different servers about how to request query and fetch results. This can be explained best with the example of "Flight booking" system. For example a user wants to book a flight between 2 cities. Traditionally, at this moment, user has to go to various websites (in normal case, unless he/she has chosen single website as a favorite one) and browse various pages, fill in required information like source, destination, date, type of trip etc. ti book the flight. If user is not satisfied with date-time or fare he/she has to do almost same thing over other website. Here assume that we have an Agent application (assume "Flight booker" software) that can reside on client side that will have a common form to be filled up. Once required information is filled in, application will query different servers of airlines (using XML etc.) to obtain information that matches criteria of requirement, will fetch related information from there, if matches, and will present to user for further processing. But this system needs co-ordination and standardization between those airlines about how to avail information in standard way. This is lacking at this moment, maybe due to business point of view also, that is why users has to go to visit various websites. Advantage of Agent system is that here only related data is transfered through web which is only 30% compared to displaying whole page of the websites (where 70% of content is transfered to browser just as static information i.e HTML etc. about how to display that page). Another example is of email clients. Email system has standardization about sending and receiving mails that is why Email clients could be developed and can be kept at client side. But since users are not still Data centric, building such Agent applications for rest of web services will be difficult. Because people don't know what is best for them. So they would like animated Submit button more than traditional gray-black buttons. If other website provides more attractive stuff then people will go there. This thing hampers integration and co-ordination of web componenets. Another problem is that Web is not in hands of single governing body, that is why changes suggested takes lot of time to come into real implementation (however they are implemented but slowly). I might not be exactly answering your query, but this is how I see Web2 from user point of view. I want to write lot of things about this topic but due to time limitations, can't write much. But this was nice topic for discussion. Thanks Anirudh Zala > > My primary concern with the Web is that it seems to be a force-fit of > page-orientation and statelessness to structured programming/object > orientation, which I find to be inherently task-oriented. Applications > that depend heavily upon related records require that users perform all > kinds of browses. Under those circumstances, managing communication among > objects becomes a nightmare because it requires the application programmer > to predict communication paths to objects and manually handle session > variables that are not task-scoped (they are by definition, > session-scoped). It appears to me that there is a role for session > variables, but it is not the task. > > The force-fit described above is particularly apparent when programming in > an MVC and validate/process/display workflow environment. While many > programmers have reservations about the need for these disciplines, it has > been my experience that they become increasingly important as the size and > complexity of an application system increases. > > Any thoughts will be appreciated. > > Phil Duffy From randalrust at gmail.com Thu Oct 19 08:56:12 2006 From: randalrust at gmail.com (Randal Rust) Date: Thu, 19 Oct 2006 08:56:12 -0400 Subject: [nycphp-talk] Constructors and In-Reply-To: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Message-ID: On 10/18/06, Matthew Terenzio wrote: > Just want to bounce this off the OO gurus: By no means am I one of those, but here is how I do it: $user =& new User; $user->viewUser($rec);//gets the data for the user I want $user->addUser();//adds new user based on the data collected from the form $user->updateUser($rec);//updates -- Randal Rust R.Squared Communications www.r2communications.com From dmintz at davidmintz.org Thu Oct 19 11:18:52 2006 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 19 Oct 2006 11:18:52 -0400 (EDT) Subject: [nycphp-talk] Constructors and In-Reply-To: References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> Message-ID: Odd, I have seen examples in well-known and respected books that said things like class User { function __construct($userId=null) { if ($userId) { // load data from db and // throw Exception if not found } else { // expect an insert } } } --- David Mintz http://davidmintz.org/ En Nueva York el tr?nsito de la belleza a la desolaci?n sucede siempre expeditivamente, como si el principio universal de m?xima eficiencia hubiera aconsejado la supresi?n de gradaciones intermedias. -- Antonio Mu?oz Molina, Ventanas de Manhattan From dmintz at davidmintz.org Thu Oct 19 12:42:32 2006 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 19 Oct 2006 12:42:32 -0400 (EDT) Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> Message-ID: > $user->insert(); > > Here's a good article that covers the basics: > > http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html > Quite good, thanks. Now, a question about http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html?page=3 What if you want to find a record WHERE $object->someProp LIKE 'M%' (as opposed to " = ")? The first crude thing that comes to mind is, if you want LIKE, say $user = 'Jane%' and have your find() method look for '%' and do LIKE if it's found. Thoughts? --- David Mintz http://davidmintz.org/ En Nueva York el tr?nsito de la belleza a la desolaci?n sucede siempre expeditivamente, como si el principio universal de m?xima eficiencia hubiera aconsejado la supresi?n de gradaciones intermedias. -- Antonio Mu?oz Molina, Ventanas de Manhattan From skyline at publicmine.com Thu Oct 19 12:47:09 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Thu, 19 Oct 2006 12:47:09 -0400 Subject: [nycphp-talk] Textarea formatting Message-ID: <005301c6f3a2$03612ef0$6401a8c0@gamebox> Hello all, I have a textarea field that can .. store text. I'm using it to save emails for example w/a form. I grab the posted data and call addslashes( ) then stick it into the database, varchar(1024). (this is a calendar app for my own use). Now, when I pull it out, its not formatted and displaying it on the screen is just one long line. How can I keep newlines/r and formatting from the text that is input into the textarea box? Thanks. - Ben From kenrbnsn at rbnsn.com Thu Oct 19 13:23:47 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Thu, 19 Oct 2006 13:23:47 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <005301c6f3a2$03612ef0$6401a8c0@gamebox> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> Message-ID: <7.0.1.0.2.20061019132302.0b0e3ff8@rbnsn.com> At 12:47 PM 10/19/2006, Ben Sgro (sk) wrote: >Hello all, > >I have a textarea field that can .. store text. > >I'm using it to save emails for example w/a form. >I grab the posted data and call addslashes( ) then stick it into the >database, varchar(1024). (this is a calendar app for my own use). > >Now, when I pull it out, its not formatted and displaying it on the screen >is just one long line. > >How can I keep newlines/r and formatting from the text that is input into >the textarea box? Use the nl2br() function when displaying the data. Ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From felix.shnir at gmail.com Thu Oct 19 13:24:56 2006 From: felix.shnir at gmail.com (Felix Shnir) Date: Thu, 19 Oct 2006 13:24:56 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <005301c6f3a2$03612ef0$6401a8c0@gamebox> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> Message-ID: Well, if you are talking about displaying in HTML then you should replace \n\r with a
Felix. On 10/19/06, Ben Sgro (sk) wrote: > > Hello all, > > I have a textarea field that can .. store text. > > I'm using it to save emails for example w/a form. > I grab the posted data and call addslashes( ) then stick it into the > database, varchar(1024). (this is a calendar app for my own use). > > Now, when I pull it out, its not formatted and displaying it on the screen > is just one long line. > > How can I keep newlines/r and formatting from the text that is input into > the textarea box? > > Thanks. > > - Ben > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dell at sala.ca Thu Oct 19 13:37:47 2006 From: dell at sala.ca (Dell Sala) Date: Thu, 19 Oct 2006 13:37:47 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> Message-ID: <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> This is where DataObjects can start to grow in complexity. What you're doing here is creating a wrapper for your database, so that each table maps to an class, and has a nice, clean interface. But how do you keep your interface clean and still have access to the fancy functionality of your database? A simple solution to your example below: you might at an argument to your find() method. function find ($useLike = true) { ... } But you'll quickly come across more complex scenarios, and you will either end up with too many methods or too many arguments for your methods... I've heard Object Relational Mapping described as the "Vietnam" of software development. http://en.wikipedia.org/wiki/Object_Relational_Mapping A more flexible solution is to have a query() method that allows you to supply your own custom SQL. While this removes some of the abstraction, it does give you lots of flexibility. And besides, sometimes it is important to write your own optimized SQL for a particular query. Here's an example: $user = new DataObject('user'); $user->query('SELECT * FROM user WHERE name LIKE '%john%' AND age < 35'); The other possibility is to look into existing DataObject frameworks that have already implemented the fancy stuff for you. I've used PEAR's DB_DataObject. It's a bit of a pain to get up an running, but it's solid. There are quite a few others -- here are a few: http://pear.php.net/package/DB_DataObject/ http://propel.phpdb.org/trac/ and CakePHP implements its own ActiveRecord http://cakephp.org/ -- Dell On Oct 19, 2006, at 12:42 PM, David Mintz wrote: >> $user->insert(); >> >> Here's a good article that covers the basics: >> >> http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html >> > > Quite good, thanks. Now, a question about > http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html?page=3 > > What if you want to find a record WHERE $object->someProp LIKE 'M > %' (as > opposed to " = ")? > > The first crude thing that comes to mind is, if you want LIKE, say > > $user = 'Jane%' > > and have your find() method look for '%' and do LIKE if it's found. > > Thoughts? From cliff at pinestream.com Thu Oct 19 14:06:14 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 19 Oct 2006 14:06:14 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: Message-ID: <000001c6f3a9$44c372c0$12a8a8c0@HirschLaptop> Thoughts? My though is that "one offs" is where all the fancy schmancy models start to fall apart... I just outsourced a big project to a firm that had a nice MVC framework. My how clean the code was. My how short all the scripts were. Until I opened a few "catch-all" files that went on forever dealing with the "one-offs" -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Thursday, October 19, 2006 11:43 AM To: NYPHP Talk Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) > $user->insert(); > > Here's a good article that covers the basics: > > http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html > Quite good, thanks. Now, a question about http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html?page=3 What if you want to find a record WHERE $object->someProp LIKE 'M%' (as opposed to " = ")? The first crude thing that comes to mind is, if you want LIKE, say $user = 'Jane%' and have your find() method look for '%' and do LIKE if it's found. Thoughts? --- David Mintz http://davidmintz.org/ From cliff at pinestream.com Thu Oct 19 14:08:05 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 19 Oct 2006 14:08:05 -0400 Subject: [nycphp-talk] call_user_func equivalent in Javascript? Message-ID: <000101c6f3a9$86588a90$12a8a8c0@HirschLaptop> Is there an equivalent to call_user_func equivalent in Javascript? I'd rather not use eval for security purposes. Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From skyline at publicmine.com Thu Oct 19 14:10:54 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Thu, 19 Oct 2006 14:10:54 -0400 Subject: [nycphp-talk] Textarea formatting References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> Message-ID: <007701c6f3a9$ec8f1360$6401a8c0@gamebox> Felix, Sure, that is helpful, but what about tabs, lists and all the other elements that could exist in an email message. I'm looking for a canned function or class that will do the work. Thanks. - Ben ....some code..... $details = str_replace("\n\r", "
", $cellSet[0]['info']); ----- Original Message ----- From: Felix Shnir To: NYPHP Talk Sent: Thursday, October 19, 2006 1:24 PM Subject: Re: [nycphp-talk] Textarea formatting Well, if you are talking about displaying in HTML then you should replace \n\r with a
Felix. On 10/19/06, Ben Sgro (sk) < skyline at publicmine.com> wrote: Hello all, I have a textarea field that can .. store text. I'm using it to save emails for example w/a form. I grab the posted data and call addslashes( ) then stick it into the database, varchar(1024). (this is a calendar app for my own use). Now, when I pull it out, its not formatted and displaying it on the screen is just one long line. How can I keep newlines/r and formatting from the text that is input into the textarea box? Thanks. - Ben _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php ------------------------------------------------------------------------------ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdailey at jaysec.com Thu Oct 19 14:15:58 2006 From: bdailey at jaysec.com (Brian Dailey) Date: Thu, 19 Oct 2006 14:15:58 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> Message-ID: <4537C0DE.1000006@jaysec.com> Just as a side note, the Object->query function is pretty much exactly how CakePHP handles that question. - Brian Dell Sala wrote: > This is where DataObjects can start to grow in complexity. What > you're doing here is creating a wrapper for your database, so that > each table maps to an class, and has a nice, clean interface. But how > do you keep your interface clean and still have access to the fancy > functionality of your database? > > A simple solution to your example below: you might at an argument to > your find() method. > > function find ($useLike = true) { > ... > } > > But you'll quickly come across more complex scenarios, and you will > either end up with too many methods or too many arguments for your > methods... I've heard Object Relational Mapping described as the > "Vietnam" of software development. > > http://en.wikipedia.org/wiki/Object_Relational_Mapping > > A more flexible solution is to have a query() method that allows you > to supply your own custom SQL. While this removes some of the > abstraction, it does give you lots of flexibility. And besides, > sometimes it is important to write your own optimized SQL for a > particular query. Here's an example: > > $user = new DataObject('user'); > $user->query('SELECT * FROM user WHERE name LIKE '%john%' AND age < > 35'); > > The other possibility is to look into existing DataObject frameworks > that have already implemented the fancy stuff for you. I've used > PEAR's DB_DataObject. It's a bit of a pain to get up an running, but > it's solid. There are quite a few others -- here are a few: > > http://pear.php.net/package/DB_DataObject/ > http://propel.phpdb.org/trac/ > and CakePHP implements its own ActiveRecord http://cakephp.org/ > > > -- Dell > > > > On Oct 19, 2006, at 12:42 PM, David Mintz wrote: > >>> $user->insert(); >>> >>> Here's a good article that covers the basics: >>> >>> http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html >>> >> Quite good, thanks. Now, a question about >> http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html?page=3 >> >> What if you want to find a record WHERE $object->someProp LIKE 'M >> %' (as >> opposed to " = ")? >> >> The first crude thing that comes to mind is, if you want LIKE, say >> >> $user = 'Jane%' >> >> and have your find() method look for '%' and do LIKE if it's found. >> >> Thoughts? > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From kenrbnsn at rbnsn.com Thu Oct 19 14:28:41 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Thu, 19 Oct 2006 14:28:41 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <007701c6f3a9$ec8f1360$6401a8c0@gamebox> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> <007701c6f3a9$ec8f1360$6401a8c0@gamebox> Message-ID: <7.0.1.0.2.20061019142741.0603e598@rbnsn.com> At 02:10 PM 10/19/2006, Ben Sgro (sk) wrote: >Felix, > >Sure, that is helpful, but what about tabs, lists and all the other >elements that could exist in an email message. >I'm looking for a canned function or class that will do the work. You can try displaying the text between
 tags.

Ken 



From dmintz at davidmintz.org  Thu Oct 19 14:29:59 2006
From: dmintz at davidmintz.org (David Mintz)
Date: Thu, 19 Oct 2006 14:29:59 -0400 (EDT)
Subject: [nycphp-talk] DataObject implementation (was Re: Constructors
 and)
In-Reply-To: <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca>
References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com>
	<9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca>
	
	<7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca>
Message-ID: 

On Thu, 19 Oct 2006, Dell Sala wrote:

>
> The other possibility is to look into existing DataObject frameworks
> that have already implemented the fancy stuff for you. I've used
> PEAR's DB_DataObject. It's a bit of a pain to get up an running, but
> it's solid. There are quite a few others -- here are a few:
>
> http://pear.php.net/package/DB_DataObject/
> http://propel.phpdb.org/trac/
> and CakePHP implements its own ActiveRecord  http://cakephp.org/
>

I was gonna say -- but didn't, for brevity's sake -- that I have spent
several+ hours with Cake, and it does seem mighty cool, yet I've run into
enough snags to wonder about the name. Like findAll() not fetching the
data that I need and having to write custom SQL anyway.

Then I looked at DB_DataObject and quickly noticed the pain part that you
refer to. I realize I don't quite get it and that's surely part of my
problem, but still I think the docs and examples on
http://pear.php.net/manual/en/package.database.db-dataobject.php are kind
of abstruse.

I might end up coming full circle and hand-coding a lot of stuff. I recall
the words of one great sage on this list:

"SQL is a language. Love it."

---
David Mintz
http://davidmintz.org/

En Nueva York el tr?nsito de la belleza a la desolaci?n sucede
siempre expeditivamente, como si el principio universal
de m?xima eficiencia hubiera aconsejado la supresi?n de
gradaciones intermedias.

  -- Antonio Mu?oz Molina, Ventanas de Manhattan




From skyline at publicmine.com  Thu Oct 19 14:31:41 2006
From: skyline at publicmine.com (Ben Sgro (sk))
Date: Thu, 19 Oct 2006 14:31:41 -0400
Subject: [nycphp-talk] Textarea formatting
References: <005301c6f3a2$03612ef0$6401a8c0@gamebox><007701c6f3a9$ec8f1360$6401a8c0@gamebox>
	<7.0.1.0.2.20061019142741.0603e598@rbnsn.com>
Message-ID: <008a01c6f3ac$d40b1b60$6401a8c0@gamebox>

Ken, 

Great, that's exactly what I need. 
Thanks all!

- Ben
----- Original Message ----- 
From: "Ken Robinson" 
To: "NYPHP Talk" 
Sent: Thursday, October 19, 2006 2:28 PM
Subject: Re: [nycphp-talk] Textarea formatting


At 02:10 PM 10/19/2006, Ben Sgro (sk) wrote:
>Felix,
>
>Sure, that is helpful, but what about tabs, lists and all the other 
>elements that could exist in an email message.
>I'm looking for a canned function or class that will do the work.

You can try displaying the text between 
 tags.

Ken 

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php




From dmintz at davidmintz.org  Thu Oct 19 14:34:27 2006
From: dmintz at davidmintz.org (David Mintz)
Date: Thu, 19 Oct 2006 14:34:27 -0400 (EDT)
Subject: [nycphp-talk] DataObject implementation (was Re: Constructors
 and)
In-Reply-To: 
References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com>
	<9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca>
	
	<7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca>
	
Message-ID: 


PS: Don't want to seem too much of a whiner. DB_DataObject looks promising
and I want to figure it out. I am a little stuck on JOIN but if I come up
with an intelligent question I will take the liberty...

On Thu, 19 Oct 2006, David Mintz wrote:

> Then I looked at DB_DataObject and quickly noticed the pain part that you
> refer to. I realize I don't quite get it and that's surely part of my
> problem, but still I think the docs and examples on
> http://pear.php.net/manual/en/package.database.db-dataobject.php are kind
> of abstruse.

---
David Mintz
http://davidmintz.org/

En Nueva York el tr?nsito de la belleza a la desolaci?n sucede
siempre expeditivamente, como si el principio universal
de m?xima eficiencia hubiera aconsejado la supresi?n de
gradaciones intermedias.

  -- Antonio Mu?oz Molina, Ventanas de Manhattan




From r.mariotti at fdcx.net  Thu Oct 19 14:39:42 2006
From: r.mariotti at fdcx.net (R. Mariotti)
Date: Thu, 19 Oct 2006 14:39:42 -0400
Subject: [nycphp-talk] Image w/Text Methods??
Message-ID: <4537C66E.4030900@fdcx.net>

Fellow PHP'ers;

As a developer, most times for a professional site the graphical 
components might be conveniently delivered by the design person.  This 
makes for very easy reference and literally plug-in.

However, like today, there is often the occasion where someone desires a 
change in some of the text that is already part of an image.   The 
technique I usually use is to make a copy of the image then use gimp to 
cut-out the undesired portion then add the new text to the image and 
move it around finally flattening it, saving it then uploading to the 
site.  Most times it works reasonably well (sort of!)

But, the clarity and precision of these resulting images are certainly 
not up to the quality that the original displayed.  I don't know the 
real reason because I'm not a graphics designer/artist.  It appears that 
the fonts, even though anti-aliased, are not as sharp as the original.

So, what other techniques do most of you use to accomplish the same? 
Surely not everyone has an in-house graphics artist.  I know I never 
had.  What programs and/or techniques are customarily used to accomplish 
this feat?

While this is not entirely a php question, it certainly is php developer 
related so that's why I though of posting to this list.

Thank you all.

B


From jbaer at VillageVoice.com  Thu Oct 19 14:44:40 2006
From: jbaer at VillageVoice.com (Baer, Jon)
Date: Thu, 19 Oct 2006 14:44:40 -0400
Subject: [nycphp-talk] Image w/Text Methods??
In-Reply-To: <4537C66E.4030900@fdcx.net>
Message-ID: <4D2FAD9B00577645932AD7ED5FECA24503898D84@mail>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In some cases (depending on the complexity of the "images") you could
get away with just using a rich HTML editor like FckEditor
(http://www.fckeditor.net/) which would give them a WYSIWYG type and
feel over a given section.  You would give a cell a given background
template image and let them work around.  This of course does not give
you the Photoshop layering capabilities to a precise layout but like I
said depending on the complexity will leave them "happy enough" :-)

Also that editor supports upload + file browsing which is pretty nice.  

- - Jon

- -----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of R. Mariotti
Sent: Thursday, October 19, 2006 2:40 PM
To: talk at lists.nyphp.org
Subject: [nycphp-talk] Image w/Text Methods??

Fellow PHP'ers;

As a developer, most times for a professional site the graphical
components might be conveniently delivered by the design person.  This
makes for very easy reference and literally plug-in.

However, like today, there is often the occasion where someone desires a

change in some of the text that is already part of an image.   The 
technique I usually use is to make a copy of the image then use gimp to
cut-out the undesired portion then add the new text to the image and
move it around finally flattening it, saving it then uploading to the
site.  Most times it works reasonably well (sort of!)

But, the clarity and precision of these resulting images are certainly
not up to the quality that the original displayed.  I don't know the
real reason because I'm not a graphics designer/artist.  It appears that
the fonts, even though anti-aliased, are not as sharp as the original.

So, what other techniques do most of you use to accomplish the same? 
Surely not everyone has an in-house graphics artist.  I know I never
had.  What programs and/or techniques are customarily used to accomplish
this feat?

While this is not entirely a php question, it certainly is php developer
related so that's why I though of posting to this list.

Thank you all.

B
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFFN8eY99e5DI8C/rsRAoYcAJ9QUtDd/B/3Fqi1IZ1nxvehgFEK6ACgpHmP
bTHtsmqZIbkLqT2gky9PqbA=
=ATqs
-----END PGP SIGNATURE-----


From bdailey at jaysec.com  Thu Oct 19 14:52:57 2006
From: bdailey at jaysec.com (Brian Dailey)
Date: Thu, 19 Oct 2006 14:52:57 -0400
Subject: [nycphp-talk] Image w/Text Methods??
In-Reply-To: <4537C66E.4030900@fdcx.net>
References: <4537C66E.4030900@fdcx.net>
Message-ID: <4537C989.2020608@jaysec.com>

One thing you might want to keep in mind is that the original file might 
have been done in Photoshop. If you replace the text with Gimp, the text 
may look a little different because each program has different ways of 
handling anti-aliasing.

In my experience, that sort of problem is best answered by keeping the 
original layered (PSD or Gimp equivalent) files on hand somewhere. That 
makes it infinitely easier (and less time consuming) to modify the image 
at a later date.

- Brian

R. Mariotti wrote:
> Fellow PHP'ers;
> 
> As a developer, most times for a professional site the graphical 
> components might be conveniently delivered by the design person.  This 
> makes for very easy reference and literally plug-in.
> 
> However, like today, there is often the occasion where someone desires a 
> change in some of the text that is already part of an image.   The 
> technique I usually use is to make a copy of the image then use gimp to 
> cut-out the undesired portion then add the new text to the image and 
> move it around finally flattening it, saving it then uploading to the 
> site.  Most times it works reasonably well (sort of!)
> 
> But, the clarity and precision of these resulting images are certainly 
> not up to the quality that the original displayed.  I don't know the 
> real reason because I'm not a graphics designer/artist.  It appears that 
> the fonts, even though anti-aliased, are not as sharp as the original.
> 
> So, what other techniques do most of you use to accomplish the same? 
> Surely not everyone has an in-house graphics artist.  I know I never 
> had.  What programs and/or techniques are customarily used to accomplish 
> this feat?
> 
> While this is not entirely a php question, it certainly is php developer 
> related so that's why I though of posting to this list.
> 
> Thank you all.
> 
> B
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 


From cliff at pinestream.com  Thu Oct 19 14:56:07 2006
From: cliff at pinestream.com (Cliff Hirsch)
Date: Thu, 19 Oct 2006 14:56:07 -0400
Subject: [nycphp-talk] Textarea formatting
In-Reply-To: <008a01c6f3ac$d40b1b60$6401a8c0@gamebox>
Message-ID: <000001c6f3b0$3c616f90$12a8a8c0@HirschLaptop>

Ah, hate to be a killjoy, but does that mean you just echo that field
back to the screen? Big security hole. The tricky part is how to escape
the output while still allowing the special characters that you want.

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Ben Sgro (sk)
Sent: Thursday, October 19, 2006 1:32 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Textarea formatting

Ken, 

Great, that's exactly what I need. 
Thanks all!

- Ben
----- Original Message ----- 
From: "Ken Robinson" 
To: "NYPHP Talk" 
Sent: Thursday, October 19, 2006 2:28 PM
Subject: Re: [nycphp-talk] Textarea formatting


At 02:10 PM 10/19/2006, Ben Sgro (sk) wrote:
>Felix,
>
>Sure, that is helpful, but what about tabs, lists and all the other 
>elements that could exist in an email message.
>I'm looking for a canned function or class that will do the work.

You can try displaying the text between 
 tags.

Ken 

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php



From dell at sala.ca  Thu Oct 19 15:06:06 2006
From: dell at sala.ca (Dell Sala)
Date: Thu, 19 Oct 2006 15:06:06 -0400
Subject: [nycphp-talk] DataObject implementation (was Re: Constructors
	and)
In-Reply-To: 
References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com>
	<9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca>
	
	<7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca>
	
	
Message-ID: <7D0E56CF-AF33-41C1-8350-34CA757A16F5@sala.ca>

JOINs are a bear with the DataObject pattern. I basically never use  
the DB_DataObject::join() method. If I need a join, I just use the  
query() method instead. I think the documentation even recommends  
this for all but the simplest JOIN queries.

DB_DataObject was actually my first introduction to DataObjects  
(trial by fire!), and after using it for a while I really enjoy the  
simplicity of Darryl Patterson's article. Why not take a lightweight  
framework like he has described and just extend it as needed on a  
case-by-case basis?

-- Dell


On Oct 19, 2006, at 2:34 PM, David Mintz wrote:

> PS: Don't want to seem too much of a whiner. DB_DataObject looks  
> promising
> and I want to figure it out. I am a little stuck on JOIN but if I  
> come up
> with an intelligent question I will take the liberty...
>
> On Thu, 19 Oct 2006, David Mintz wrote:
>
>> Then I looked at DB_DataObject and quickly noticed the pain part  
>> that you
>> refer to. I realize I don't quite get it and that's surely part of my
>> problem, but still I think the docs and examples on
>> http://pear.php.net/manual/en/package.database.db-dataobject.php  
>> are kind
>> of abstruse.



From support at dailytechnology.net  Thu Oct 19 15:27:44 2006
From: support at dailytechnology.net (Brian Dailey)
Date: Thu, 19 Oct 2006 15:27:44 -0400
Subject: [nycphp-talk] IT Policies
Message-ID: 

Another "Ask the NYC PHP Crowd" question...

I've been given the responsibility of developing a policy for a small
(and growing) team of developers. By "policy" I mean defining how
"development" code becomes "live" code. The point is to minimize
problems in the program itself and the database behind it.

How do you balance flexibility with minimizing risk? I've talked to a
few of my fellow developers, and a few of them have talked about the
usefulness of code review. That seems to be good idea, as does
allowing only or two people to place development code on the live side
(less cooks in the kitchen).

Any suggestions on stuff I should think about?

- Brian


From ps at pswebcode.com  Thu Oct 19 15:38:29 2006
From: ps at pswebcode.com (Peter Sawczynec)
Date: Thu, 19 Oct 2006 15:38:29 -0400
Subject: [nycphp-talk] [OT]  Re:  Successor to the Web?
In-Reply-To: <200610191101.06658.arzala@gmail.com>
Message-ID: <004201c6f3b6$273cc7d0$6701a8c0@SUNCODE1>

Maybe the next big advance is not going to be in software, but in the pipe. 

A simple elegant cheaply manufactured ubiquitous massive wireless pipe 
(even faster, wider than fiber optic to the desktop) that will be always on 
the grid computing cloud network and handle anything. 

Simultaneously moving multiple DVD-quality streams, thousands of
personal/family bots, 
dozens of local desktop and/or network/internet applications blind to any
language or framework 
regardless of how bloated, intricate or overloaded with dependencies.

It is highly doubtful (and possibly not even desirable) that all the
disparate 
software standards, languages, applications, and techniques will be 100%
standardized 
and 100% interface abele. 

More likely I think in the future, more and more, entities like the
government, defense, 
banks, medical, brokers (likely, even wealthy individuals) will require --
absolutely must have -- 
their software written in a completely custom, highly-non-interfacing, 
enigmatic, highly-obscured language not in use anywhere else in the world.

I believe, in fact, that the US gov and defense already do write custom
software/apps 
with no known commercial equivilancy.

It is more likely that software will continue to branch and customize and
specialize moving 
more towards an infinite complexity handled by quantum and organic
processors allowing 
every person to get their own idiosyncratic signature language set of
instructions 
for their individual personal data storage and retreival all saved on a
single well-worn 
Life-ling multi-terabyte universal smart ID card that can maintain state
indefinately and 
only interfaces with the network when activated and plugged in or wiped.

Warmest regards, 
 
Peter Sawczynec 
Technology Director 
PSWebcode 
_Design & Interface 
_Ecommerce 
_Database Management 
646.316.3678 
ps at pswebcode.com 
www.pswebcode.com 



 

 


-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Anirudh Zala
Sent: Thursday, October 19, 2006 1:31 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] [OT] Re: Successor to the Web?


On Thursday 19 October 2006 03:03, inforequest wrote:
> Phil Duffy phil-at-bearingasset.com |nyphp dev/internal group use| wrote:
> > I am sorry if this question appears to be off-topic, but perhaps
> > someone can refer me to the correct forum.  I had programmed in
> > approximately a dozen languages previously before dabbling in PHP a
> > couple years ago.  Now that PHP 5 is truly object-oriented, I find it
> > to be the most powerful of the languages with which I am familiar.  As
> > remarkable as the Web is, I am coming to the conclusion that it has
> > some severe limitations for the kinds of complex applications that
> > were the standard in the client/server days.  I know that going back
> > to client/server is not the answer and suspect that somewhere someone
> > is working on an Internet-based system that could ultimately replace
> > the page-oriented Web.  Can anybody point me in that direction?
>
> Whatever works will replace the web, one piece at a time. Just because
> people didn't understand how free information (truthful or not) would
> change their lives (and so they adopted the web), people don't know what
> else they need, either. Somebody has to show it to them (one piece at a
> time).

Very true. People use web just as a part of fulfilling their requirements. 
That is why they don't pay much attention towards how they are being served.

As soon as their purposes are fulfilled, they stop using web and continue 
doing other stuffs. Since they are not much aware of technologies on which 
web applications have been built and running, we can't rely much on their  
opinion to bring changes. Hence it is mostly our efforts to make any changes

that we think it needs to bring.

>
> It seems you are saying you want to build complex applications, and
> don't think PHP/web is a good way to do that. Seems clear. But if you
> are trying to bring those complex apps to the people, people are (right
> now) using the web.
>
> > My primary concern with the Web is that it seems to be a force-fit of
> > page-orientation and statelessness to structured programming/object
> > orientation, which I find to be inherently task-oriented.
> > Applications that depend heavily upon related records require that
> > users perform all kinds of browses.  Under those circumstances,
> > managing communication among objects becomes a nightmare because it
> > requires the application programmer to predict communication paths to
> > objects and manually handle session variables that are not task-scoped
> > (they are by definition, session-scoped).  It appears to me that there
> > is a role for session variables, but it is not the task.
>
> Yes, doing it that way is hard. Much harder than it looks. Harder than
> people think it is. But it is also hard to travel around as a salesman,
> pitching Ginzu knives at mall cooking kiosks, flea markets, and Wal-mart
> stores 300 days per year. But somebody does that, and I met one guy who
> made a million bucks doing that in one year. All we see is some guy at
> the mall giving a great demo of a cheap knife cutting through a coke
> can. We have no idea how much work he does to bring that show around...
> and I doubt we care very much. As soon as he has a better way to cut out
> the middle man and keep 80% of his sales,  I'm sure he'll choose that
> method.
>
> > The force-fit described above is particularly apparent when
> > programming in an MVC and validate/process/display workflow
> > environment.  While many programmers have reservations about the need
> > for these disciplines, it has been my experience that they become
> > increasingly important as the size and complexity of an application
> > system increases.
>
> I think you're seeing programmers (technicians) relying on tools (which
> they have to do, to keep up). "The best tool for the job" , is sometimes
> really "the best avalable tool for the job, as the customer understands
> the job". As you know, there is a difference.
>
> > Any thoughts will be appreciated.
>
> You got em.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php



From skyline at publicmine.com  Thu Oct 19 15:43:38 2006
From: skyline at publicmine.com (Ben Sgro (sk))
Date: Thu, 19 Oct 2006 15:43:38 -0400
Subject: [nycphp-talk] IT Policies
References: 
Message-ID: <00a201c6f3b6$e0d990b0$6401a8c0@gamebox>

I think code reviews are great, they give people a change to highlight well 
done code and
point out errors and common pitfalls.

Plus people can't sneak kludges in as easily.

Having a document that states comment style, code style etc can help as 
well.
At my previous job it was required all new highers read the doc.
Having code reviews made sure the guidelines laid out in the doc where 
followed.

As you stated, speaking to the other developers to find out what the 
standards will be is the best idea,
they hopefully you can avoid disagreements with what style will be 
used..since those involved will be
able to voice their opinions.

Less cooks is better, unless it means people are waiting to check stuff in 
on live.
If they have a development server that mimics live then its not really a 
problem,
they can test and feel pretty condfident about their code before they check 
it in.

If you dont have a development server that mimics the live server, I would 
get one ASAP.

good luck!

- Ben
----- Original Message ----- 
From: "Brian Dailey" 
To: 
Sent: Thursday, October 19, 2006 3:27 PM
Subject: [nycphp-talk] IT Policies


Another "Ask the NYC PHP Crowd" question...

I've been given the responsibility of developing a policy for a small
(and growing) team of developers. By "policy" I mean defining how
"development" code becomes "live" code. The point is to minimize
problems in the program itself and the database behind it.

How do you balance flexibility with minimizing risk? I've talked to a
few of my fellow developers, and a few of them have talked about the
usefulness of code review. That seems to be good idea, as does
allowing only or two people to place development code on the live side
(less cooks in the kitchen).

Any suggestions on stuff I should think about?

- Brian
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php




From jface at mercenarylabs.com  Thu Oct 19 15:50:03 2006
From: jface at mercenarylabs.com (Jonathan Face)
Date: Thu, 19 Oct 2006 15:50:03 -0400
Subject: [nycphp-talk] IT Policies
In-Reply-To: <00a201c6f3b6$e0d990b0$6401a8c0@gamebox>
References: 
	<00a201c6f3b6$e0d990b0$6401a8c0@gamebox>
Message-ID: <4537D6EB.3050204@mercenarylabs.com>

In this vein, determine a standard syntax for variable naming.

IE, $this_variable versus $thisVariable.

Less confusing that way.

Ben Sgro (sk) wrote:

>I think code reviews are great, they give people a change to highlight well 
>done code and
>point out errors and common pitfalls.
>
>Plus people can't sneak kludges in as easily.
>
>Having a document that states comment style, code style etc can help as 
>well.
>At my previous job it was required all new highers read the doc.
>Having code reviews made sure the guidelines laid out in the doc where 
>followed.
>
>As you stated, speaking to the other developers to find out what the 
>standards will be is the best idea,
>they hopefully you can avoid disagreements with what style will be 
>used..since those involved will be
>able to voice their opinions.
>
>Less cooks is better, unless it means people are waiting to check stuff in 
>on live.
>If they have a development server that mimics live then its not really a 
>problem,
>they can test and feel pretty condfident about their code before they check 
>it in.
>
>If you dont have a development server that mimics the live server, I would 
>get one ASAP.
>
>good luck!
>
>- Ben
>----- Original Message ----- 
>From: "Brian Dailey" 
>To: 
>Sent: Thursday, October 19, 2006 3:27 PM
>Subject: [nycphp-talk] IT Policies
>
>
>Another "Ask the NYC PHP Crowd" question...
>
>I've been given the responsibility of developing a policy for a small
>(and growing) team of developers. By "policy" I mean defining how
>"development" code becomes "live" code. The point is to minimize
>problems in the program itself and the database behind it.
>
>How do you balance flexibility with minimizing risk? I've talked to a
>few of my fellow developers, and a few of them have talked about the
>usefulness of code review. That seems to be good idea, as does
>allowing only or two people to place development code on the live side
>(less cooks in the kitchen).
>
>Any suggestions on stuff I should think about?
>
>- Brian
>_______________________________________________
>New York PHP Community Talk Mailing List
>http://lists.nyphp.org/mailman/listinfo/talk
>
>NYPHPCon 2006 Presentations Online
>http://www.nyphpcon.com
>
>Show Your Participation in New York PHP
>http://www.nyphp.org/show_participation.php
>
>
>_______________________________________________
>New York PHP Community Talk Mailing List
>http://lists.nyphp.org/mailman/listinfo/talk
>
>NYPHPCon 2006 Presentations Online
>http://www.nyphpcon.com
>
>Show Your Participation in New York PHP
>http://www.nyphp.org/show_participation.php
>  
>



From ramons at gmx.net  Thu Oct 19 18:38:56 2006
From: ramons at gmx.net (David Krings)
Date: Thu, 19 Oct 2006 18:38:56 -0400
Subject: [nycphp-talk] Textarea formatting
In-Reply-To: 
References: <005301c6f3a2$03612ef0$6401a8c0@gamebox>
	
Message-ID: <4537FE80.90806@gmx.net>

And for XHTML that would be 
. Felix Shnir wrote: > Well, if you are talking about displaying in HTML then you should > replace \n\r with a
> > Felix. From ramons at gmx.net Thu Oct 19 18:56:50 2006 From: ramons at gmx.net (David Krings) Date: Thu, 19 Oct 2006 18:56:50 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <007701c6f3a9$ec8f1360$6401a8c0@gamebox> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> <007701c6f3a9$ec8f1360$6401a8c0@gamebox> Message-ID: <453802B2.2070405@gmx.net> Hi, you can't display tab in HTML and the textarea box takes just plain ASCII. So any fancy spacing, indenting or such will either be stripped or shown as single spaces. And HTML also cannot display an arry of simple white space. You would need to convert that to non-breaking spaces. But isn't there a function that translates all kinds of things to the equivalent HTML code? Ben Sgro (sk) wrote: > Felix, > > Sure, that is helpful, but what about tabs, lists and all the other > elements that could exist in an email message. > I'm looking for a canned function or class that will do the work. > > Thanks. > > - Ben > > ....some code..... > $details = str_replace("\n\r", "
", $cellSet[0]['info']); From ramons at gmx.net Thu Oct 19 19:12:12 2006 From: ramons at gmx.net (David Krings) Date: Thu, 19 Oct 2006 19:12:12 -0400 Subject: [nycphp-talk] IT Policies In-Reply-To: References: Message-ID: <4538064C.5060301@gmx.net> Hi, so you want to create high quality software. That is not only a task of developing. You want to address quality issues way before writing or even testing code. That would be during the design phase. Does the application design specify explicitly things such as input checking (what to check and what is to be considered OK), user interface design, modularization as much as possible, and things like that. Also, you want to tell your developers that any code passed on to QA has to be tested against a good set of test cases by the developer. Claiming that it compiles is not sufficient. Also, you want to come up with some coding convention and demand fully commented source code (which means comments for each line that have a code word or an operation in them). Also, see that you ideally get a tester to developer ratio of 1:1, not 1:20 as it is common in most places. I think 1:3 is reasonable (one tester for three developers). Include the testers, the developers, support, and customers in the design decisions. None of your developers will use the software on a regular basis, your customers will, so they have to say what flies and what not. From my experience, when the developer isn't absolutely and entirely sure that the code delivered is good code, there is no reason to make a tester suffer. And listen to the people at the front line, mainly support and the customers themselves. Uh, and get developers who know the industry and not just the latest tricks in coding. You can get to that by giving the developers plenty of training. And, put the developers into the support department for at least one day each month. Nothing straightens out a developer more than a bitching customer. Most developers need to experience the pain first hand to be convinced that their code is crap. Besides that, you can read my MS thesis about just this topic. ;) David K. Brian Dailey wrote: > Another "Ask the NYC PHP Crowd" question... > > I've been given the responsibility of developing a policy for a small > (and growing) team of developers. By "policy" I mean defining how > "development" code becomes "live" code. The point is to minimize > problems in the program itself and the database behind it. > > How do you balance flexibility with minimizing risk? I've talked to a > few of my fellow developers, and a few of them have talked about the > usefulness of code review. That seems to be good idea, as does > allowing only or two people to place development code on the live side > (less cooks in the kitchen). > > Any suggestions on stuff I should think about? > > - Brian > > > From randalrust at gmail.com Thu Oct 19 21:28:36 2006 From: randalrust at gmail.com (Randal Rust) Date: Thu, 19 Oct 2006 21:28:36 -0400 Subject: [nycphp-talk] Help converting MySQL datetime to month Message-ID: I have a function that does what I want, I just find it hard to believe that there isn't something better. So any pointers would be greatly appreciated. function convertDatetime($value){ $value=explode(" ", $value); $value=explode("-", $value[0]); $y=$value[0]; $m=$value[1]; $d=$value[2]; switch($m){ case '01': $m='January'; break; case '02': $m='February'; break; case '03': $m='March'; break; case '04': $m='April'; break; case '05': $m='May'; break; case '06': $m='June'; break; case '07': $m='July'; break; case '08': $m='August'; break; case '09': $m='September'; break; case '10': $m='October'; break; case '11': $m='November'; break; case '12': $m='December'; break; } $dt=$m.' '.$d.', '.$y; $value=$dt; return $value; } -- Randal Rust R.Squared Communications www.r2communications.com From chsnyder at gmail.com Thu Oct 19 21:39:49 2006 From: chsnyder at gmail.com (csnyder) Date: Thu, 19 Oct 2006 21:39:49 -0400 Subject: [nycphp-talk] Help converting MySQL datetime to month In-Reply-To: References: Message-ID: On 10/19/06, Randal Rust wrote: > I have a function that does what I want, I just find it hard to > believe that there isn't something better. So any pointers would be > greatly appreciated. linux/unix only I think: function convertDatetime($value){ return date( 'F d, Y', strtotime( $value ) ); } -- Chris Snyder http://chxo.com/ From randalrust at gmail.com Thu Oct 19 21:52:21 2006 From: randalrust at gmail.com (Randal Rust) Date: Thu, 19 Oct 2006 21:52:21 -0400 Subject: [nycphp-talk] Help converting MySQL datetime to month In-Reply-To: References: Message-ID: On 10/19/06, csnyder wrote: > linux/unix only I think: > > function convertDatetime($value){ > return date( 'F d, Y', strtotime( $value ) ); > } thanks, chris. it works on windows too:) at least it's working here. -- Randal Rust R.Squared Communications www.r2communications.com From support at dailytechnology.net Thu Oct 19 23:17:43 2006 From: support at dailytechnology.net (Brian Dailey) Date: Thu, 19 Oct 2006 23:17:43 -0400 Subject: [nycphp-talk] IT Policies In-Reply-To: References: <4538064C.5060301@gmx.net> Message-ID: So, David, where can I get a copy of your thesis? :P - Brian > > On 10/19/06, David Krings wrote: > > Hi, > > > > so you want to create high quality software. That is not only a task > > of developing. You want to address quality issues way before writing or > > even testing code. That would be during the design phase. Does the > > application design specify explicitly things such as input checking > > (what to check and what is to be considered OK), user interface design, > > modularization as much as possible, and things like that. Also, you want > > to tell your developers that any code passed on to QA has to be tested > > against a good set of test cases by the developer. Claiming that it > > compiles is not sufficient. Also, you want to come up with some coding > > convention and demand fully commented source code (which means comments > > for each line that have a code word or an operation in them). Also, see > > that you ideally get a tester to developer ratio of 1:1, not 1:20 as it > > is common in most places. I think 1:3 is reasonable (one tester for > > three developers). Include the testers, the developers, support, and > > customers in the design decisions. None of your developers will use the > > software on a regular basis, your customers will, so they have to say > > what flies and what not. > > > > From my experience, when the developer isn't absolutely and entirely > > sure that the code delivered is good code, there is no reason to make a > > tester suffer. And listen to the people at the front line, mainly > > support and the customers themselves. Uh, and get developers who know > > the industry and not just the latest tricks in coding. You can get to > > that by giving the developers plenty of training. And, put the > > developers into the support department for at least one day each month. > > Nothing straightens out a developer more than a bitching customer. Most > > developers need to experience the pain first hand to be convinced that > > their code is crap. > > > > Besides that, you can read my MS thesis about just this topic. ;) > > > > David K. > > > > Brian Dailey wrote: > > > Another "Ask the NYC PHP Crowd" question... > > > > > > I've been given the responsibility of developing a policy for a small > > > (and growing) team of developers. By "policy" I mean defining how > > > "development" code becomes "live" code. The point is to minimize > > > problems in the program itself and the database behind it. > > > > > > How do you balance flexibility with minimizing risk? I've talked to a > > > few of my fellow developers, and a few of them have talked about the > > > usefulness of code review. That seems to be good idea, as does > > > allowing only or two people to place development code on the live side > > > (less cooks in the kitchen). > > > > > > Any suggestions on stuff I should think about? > > > > > > - Brian > > > > > > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > From jonbaer at jonbaer.com Thu Oct 19 23:57:58 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Thu, 19 Oct 2006 23:57:58 -0400 Subject: [nycphp-talk] Help converting MySQL datetime to month In-Reply-To: References: Message-ID: <5F07C901-34AC-4C35-8994-579B6280E6F3@jonbaer.com> You can also now do it directly in MySQL ... might be available as UDF on older versions. mysql> select monthname('2006-10-19') as month; +---------+ | month | +---------+ | October | +---------+ 1 row in set (0.00 sec) - Jon On Oct 19, 2006, at 9:28 PM, Randal Rust wrote: > I have a function that does what I want, I just find it hard to > believe that there isn't something better. So any pointers would be > greatly appreciated. > > function convertDatetime($value){ > $value=explode(" ", $value); > $value=explode("-", $value[0]); > $y=$value[0]; > $m=$value[1]; > $d=$value[2]; > switch($m){ > case '01': > $m='January'; > break; > case '02': > $m='February'; > break; > case '03': > $m='March'; > break; > case '04': > $m='April'; > break; > case '05': > $m='May'; > break; > case '06': > $m='June'; > break; > case '07': > $m='July'; > break; > case '08': > $m='August'; > break; > case '09': > $m='September'; > break; > case '10': > $m='October'; > break; > case '11': > $m='November'; > break; > case '12': > $m='December'; > break; > } > $dt=$m.' '.$d.', '.$y; > $value=$dt; > return $value; > } > > -- > Randal Rust > R.Squared Communications > www.r2communications.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From 1j0lkq002 at sneakemail.com Fri Oct 20 00:28:50 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 19 Oct 2006 21:28:50 -0700 Subject: [nycphp-talk] Image w/Text Methods?? In-Reply-To: <4537C66E.4030900@fdcx.net> References: <4537C66E.4030900@fdcx.net> Message-ID: <18495-61168@sneakemail.com> I feel your pain, but I have to either be able to get it done myself or have a really good relationship with an always-online and willing PS expert. It's really a client problem, so having a friend anxious to quote on-demand work is probably the best way to go. Why should it be "free"? R. Mariotti r.mariotti-at-fdcx.net |nyphp dev/internal group use| wrote: >Fellow PHP'ers; > >As a developer, most times for a professional site the graphical >components might be conveniently delivered by the design person. This >makes for very easy reference and literally plug-in. > >However, like today, there is often the occasion where someone desires a >change in some of the text that is already part of an image. The >technique I usually use is to make a copy of the image then use gimp to >cut-out the undesired portion then add the new text to the image and >move it around finally flattening it, saving it then uploading to the >site. Most times it works reasonably well (sort of!) > >But, the clarity and precision of these resulting images are certainly >not up to the quality that the original displayed. I don't know the >real reason because I'm not a graphics designer/artist. It appears that >the fonts, even though anti-aliased, are not as sharp as the original. > >So, what other techniques do most of you use to accomplish the same? >Surely not everyone has an in-house graphics artist. I know I never >had. What programs and/or techniques are customarily used to accomplish >this feat? > >While this is not entirely a php question, it certainly is php developer >related so that's why I though of posting to this list. > >Thank you all. > >B > From 1j0lkq002 at sneakemail.com Fri Oct 20 00:33:05 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 19 Oct 2006 21:33:05 -0700 Subject: [nycphp-talk] IT Policies In-Reply-To: References: <4538064C.5060301@gmx.net> Message-ID: <15719-83749@sneakemail.com> Brian Dailey support-at-dailytechnology.net |nyphp dev/internal group use| wrote: >So, David, where can I get a copy of your thesis? :P > >- Brian > > > I'd like to read it as well. Thanks for offering. I think that a code review stage is great if done right, because it can create a quality expectation that basically reminds people to "fix it or it will never pass code review". On the flip side, it's a significant management program and you have to expect it to take time if itis expected to be worthwhile. One of those things... "why do we have that cop on the corner? He just stands there all day long doing nothing...." From ken at secdat.com Fri Oct 20 11:46:45 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 20 Oct 2006 11:46:45 -0400 Subject: [nycphp-talk] First Demo App for Tuesday Presentation Message-ID: <4538EF65.3020700@secdat.com> We have put up a demo app that demonstrates Andromeda. The URL is: http://dhost2.secdat.com/demo_peds The username and password are both "guest". Please feel free to look around. Feel free to make any changes you want to, beat it up, etc. This guest user is actually an "admin" user, so you have full powers in the app, short of creating new users. We will be looking at the code used to produce this app at the presentation on Tuesday. -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From ken at secdat.com Fri Oct 20 11:54:11 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 20 Oct 2006 11:54:11 -0400 Subject: [nycphp-talk] Second demo site pending... Message-ID: <4538F123.4050101@secdat.com> ...we also will have a time tracking program available for demo. The programmer is actually tweaking a few things now, and it will likely be online later today or tomorrow. -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From rotsen at gmail.com Fri Oct 20 11:58:02 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Fri, 20 Oct 2006 08:58:02 -0700 Subject: [nycphp-talk] Second demo site pending... In-Reply-To: <4538F123.4050101@secdat.com> References: <4538F123.4050101@secdat.com> Message-ID: I look at the site and it looks good!!! Good job!!! On 10/20/06, Kenneth Downs wrote: > > ...we also will have a time tracking program available for demo. The > programmer is actually tweaking a few things now, and it will likely be > online later today or tomorrow. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Fri Oct 20 11:58:08 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 20 Oct 2006 11:58:08 -0400 Subject: [nycphp-talk] Slides for Oct 24th now available for preview Message-ID: <4538F210.5040508@secdat.com> If you would like a preview of the slides for Tuesday's presentation, here is a direct link: http://www.secdat.com/NYPHP-2004.10.19.odp Please note the slides refer to two demo apps. The doctor's office app is up, but the time billing will be later today or tomorrow. -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From rotsen at gmail.com Fri Oct 20 12:03:00 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Fri, 20 Oct 2006 09:03:00 -0700 Subject: [nycphp-talk] Slides for Oct 24th now available for preview In-Reply-To: <4538F210.5040508@secdat.com> References: <4538F210.5040508@secdat.com> Message-ID: Kenneth, what do you open a .odp file with? :-) On 10/20/06, Kenneth Downs wrote: > > If you would like a preview of the slides for Tuesday's presentation, > here is a direct link: > > http://www.secdat.com/NYPHP-2004.10.19.odp > > Please note the slides refer to two demo apps. The doctor's office app > is up, but the time billing will be later today or tomorrow. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Fri Oct 20 12:09:04 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 20 Oct 2006 12:09:04 -0400 Subject: [nycphp-talk] Slides for Oct 24th now available for preview In-Reply-To: References: <4538F210.5040508@secdat.com> Message-ID: <4538F4A0.7060902@secdat.com> N?stor wrote: > Kenneth, > > what do you open a .odp file with? OpenOffice. > > :-) > > On 10/20/06, *Kenneth Downs* > > wrote: > > If you would like a preview of the slides for Tuesday's presentation, > here is a direct link: > > http://www.secdat.com/NYPHP-2004.10.19.odp > > Please note the slides refer to two demo apps. The doctor's > office app > is up, but the time billing will be later today or tomorrow. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From phil at bearingasset.com Fri Oct 20 13:15:43 2006 From: phil at bearingasset.com (Phil Duffy) Date: Fri, 20 Oct 2006 13:15:43 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <001f01c6f2bd$f4d81360$6701a8c0@SUNCODE1> Message-ID: <20061020171610.01A4EA88AA@virtu.nyphp.org> I would like to express my appreciation to those in the NYPHP community (I counted 13 responses) who responded to my question about a potential successor to the Web. It will take me a while to analyze these responses, but the picture that was communicated was already useful to me. I found the references provided by Dan Krook particularly useful for my purposes: Ajax and REST, Part 1: Advantages of the Ajax/REST architectural style for immersive Web applications http://www.ibm.com/developerworks/web/library/wa-ajaxarch/ Some more information about REST principles: http://en.wikipedia.org/wiki/Representational_State_Transfer My goal was to check my development direction, to be sure that I had not become too attached to my current set of development tools only to find that serious successors were already emerging and the work I was doing would soon become obsolete. My impression at this point is that my general direction is reasonable, but requires some modification. I should have described the application characteristics in more detail. They must run over the Internet or a public equivalent. They must blend content management with data management. Perhaps this is one of the reasons that I seem to be encountering force-fits because as at least one contributor to this discussion pointed out, the Web is stateless by design intent. If I have encountered some difficulties in dealing with statelessness for the applications I am developing, it is not because of any difficulties I am encountering in PHP. I am impressed with PHP, but it is not the whole picture. Again, many thanks for the contributions that were made to this discussion. They have saved me a great deal of research effort. Phil Duffy -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Fri Oct 20 14:47:17 2006 From: chsnyder at gmail.com (csnyder) Date: Fri, 20 Oct 2006 14:47:17 -0400 Subject: [nycphp-talk] First Demo App for Tuesday Presentation In-Reply-To: <4538EF65.3020700@secdat.com> References: <4538EF65.3020700@secdat.com> Message-ID: On 10/20/06, Kenneth Downs wrote: > We have put up a demo app that demonstrates Andromeda. The URL is: > > http://dhost2.secdat.com/demo_peds > > The username and password are both "guest". Please feel free to look > around. Feel free to make any changes you want to, beat it up, etc. > > This guest user is actually an "admin" user, so you have full powers in > the app, short of creating new users. > > We will be looking at the code used to produce this app at the > presentation on Tuesday. > Please don't hate me, Ken, but your sample application is vulnerable to cross-site scripting attacks. It seems you're not properly escaping values in forms? Or at least, not in this form: http://dhost2.secdat.com/demo_peds/index.php?gp_skey=6 -- Chris Snyder http://chxo.com/ From agfische at email.smith.edu Fri Oct 20 15:17:51 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 20 Oct 2006 15:17:51 -0400 Subject: [nycphp-talk] Unsetting array elements Message-ID: <453920DF.4070903@email.smith.edu> Hi, I'd like to cycle through an array and destroy some elements (and leave some intact). What's the "best" way to do that? Here's what I put together so far (which shows my array ignorance) =) "yes" , "name" => "joe" , "sort" => "ascending") while (list ($k, $v) = each ($test)) { if ($k == "auth") {} else { unset($k[$v]); } } ?> That produces an error because of the unset($k[$v]; line. Thanks! -Aaron From kenrbnsn at rbnsn.com Fri Oct 20 15:32:22 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Fri, 20 Oct 2006 15:32:22 -0400 Subject: [nycphp-talk] Unsetting array elements In-Reply-To: <453920DF.4070903@email.smith.edu> References: <453920DF.4070903@email.smith.edu> Message-ID: <7.0.1.0.2.20061020153011.0be80718@rbnsn.com> At 03:17 PM 10/20/2006, Aaron Fischer wrote: >Hi, > >I'd like to cycle through an array and destroy some elements (and leave >some intact). What's the "best" way to do that? > >Here's what I put together so far (which shows my array ignorance) =) > > >$test=array("auth" => "yes" , "name" => "joe" , "sort" => "ascending") > >while (list ($k, $v) = each ($test)) > { > if ($k == "auth") {} > else { unset($k[$v]); } > } > >?> > >That produces an error because of the unset($k[$v]; line. You need to unset the index in the test array not in the $k array, so the unset line should look like: else unset($test[$k]); Ken From agfische at email.smith.edu Fri Oct 20 15:48:49 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 20 Oct 2006 15:48:49 -0400 Subject: [nycphp-talk] Unsetting array elements In-Reply-To: <453920DF.4070903@email.smith.edu> References: <453920DF.4070903@email.smith.edu> Message-ID: <45392821.8020206@email.smith.edu> I fixed that line and it's working now: else { unset($test[$k]); } However I would be interested to hear if anyone thinks there is a better or more efficient approach to how I am doing it. Cheers, -Aaron Aaron Fischer wrote: > Hi, > > I'd like to cycle through an array and destroy some elements (and leave > some intact). What's the "best" way to do that? > > Here's what I put together so far (which shows my array ignorance) =) > > > $test=array("auth" => "yes" , "name" => "joe" , "sort" => "ascending") > > while (list ($k, $v) = each ($test)) > { > if ($k == "auth") {} > else { unset($k[$v]); } > } > > ?> > > That produces an error because of the unset($k[$v]; line. > > Thanks! > > -Aaron > _______________________________________________ From ken at secdat.com Fri Oct 20 15:49:21 2006 From: ken at secdat.com (Kenneth Downs) Date: Fri, 20 Oct 2006 15:49:21 -0400 Subject: [nycphp-talk] First Demo App for Tuesday Presentation In-Reply-To: References: <4538EF65.3020700@secdat.com> Message-ID: <45392841.2080209@secdat.com> csnyder wrote: > On 10/20/06, Kenneth Downs wrote: > >> We have put up a demo app that demonstrates Andromeda. The URL is: >> >> http://dhost2.secdat.com/demo_peds >> >> The username and password are both "guest". Please feel free to look >> around. Feel free to make any changes you want to, beat it up, etc. >> >> This guest user is actually an "admin" user, so you have full powers in >> the app, short of creating new users. >> >> We will be looking at the code used to produce this app at the >> presentation on Tuesday. >> >> > > Please don't hate me, Ken, but your sample application is vulnerable > to cross-site scripting attacks. It seems you're not properly escaping > values in forms? > As an open-source developer, I'm always happy when somebody reviews and comments :) > Or at least, not in this form: > http://dhost2.secdat.com/demo_peds/index.php?gp_skey=6 > > You are right. We do "escape when sending", and the htmlentities() call was missing from the library routine. Thanks, good catch, it is fixed now. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From agfische at email.smith.edu Fri Oct 20 16:02:07 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 20 Oct 2006 16:02:07 -0400 Subject: [nycphp-talk] Unsetting array elements In-Reply-To: <7.0.1.0.2.20061020153011.0be80718@rbnsn.com> References: <453920DF.4070903@email.smith.edu> <7.0.1.0.2.20061020153011.0be80718@rbnsn.com> Message-ID: <45392B3F.8060908@email.smith.edu> Thanks Ken. Unfortunately I figured that out AFTER I sent the original question. =) -Aaron Ken Robinson wrote: > At 03:17 PM 10/20/2006, Aaron Fischer wrote: > >>Hi, >> >>I'd like to cycle through an array and destroy some elements (and leave >>some intact). What's the "best" way to do that? >> >>Here's what I put together so far (which shows my array ignorance) =) >> >>> >>$test=array("auth" => "yes" , "name" => "joe" , "sort" => "ascending") >> >>while (list ($k, $v) = each ($test)) >> { >> if ($k == "auth") {} >> else { unset($k[$v]); } >> } >> >>?> >> >>That produces an error because of the unset($k[$v]; line. > > > > You need to unset the index in the test array not in the $k array, so > the unset line should look like: > else unset($test[$k]); > > Ken > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From chsnyder at gmail.com Fri Oct 20 16:05:57 2006 From: chsnyder at gmail.com (csnyder) Date: Fri, 20 Oct 2006 16:05:57 -0400 Subject: [nycphp-talk] First Demo App for Tuesday Presentation In-Reply-To: <45392841.2080209@secdat.com> References: <4538EF65.3020700@secdat.com> <45392841.2080209@secdat.com> Message-ID: On 10/20/06, Kenneth Downs wrote: > Thanks, good catch, it is fixed now. Good to know. That's one of the big advantages of using a framework, fix the code in one place and the entire app is secured. Otherwise it might have been a long weekend, putting all those htmlentities() calls in, eh? See you Tuesday. -- Chris Snyder http://chxo.com/ From brian at mexny.com Fri Oct 20 17:20:03 2006 From: brian at mexny.com (brian at mexny.com) Date: Fri, 20 Oct 2006 14:20:03 -0700 Subject: [nycphp-talk] PHP page to Excel Message-ID: <1161379203.45393d83896eb@webmail.mexny.com> Guess what, i'm crazy for this, The company where i work wanna to pass the php page that gimme the results to a excel sheet, and the second request is they want the exactly colors, formats, width column, height column, etc that excel offers. I just want to know if somebody could gimme any idea to do this..i want to create a button that convert me php results into a excel sheet exactly as they need. thank u so much. From ajai at bitblit.net Fri Oct 20 17:34:26 2006 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 20 Oct 2006 17:34:26 -0400 (EDT) Subject: [nycphp-talk] PHP page to Excel In-Reply-To: <1161379203.45393d83896eb@webmail.mexny.com> References: <1161379203.45393d83896eb@webmail.mexny.com> Message-ID: <32223.64.124.21.211.1161380066.squirrel@webmail.bitblit.net> > Guess what, i'm crazy for this, The company where i work wanna to pass > the php page that gimme the results to a excel sheet, and the second > request is they want the exactly colors, formats, width column, height > column, etc that excel offers. > > I just want to know if somebody could gimme any idea to do this..i want > to create a button that convert me php results into a excel sheet > exactly as they need. http://pear.php.net/package/Spreadsheet_Excel_Writer -- Aj. Systems Administrator / Developer From craig at juxtadigital.com Fri Oct 20 17:42:17 2006 From: craig at juxtadigital.com (Craig Thomas) Date: Fri, 20 Oct 2006 17:42:17 -0400 Subject: [nycphp-talk] PHP page to Excel In-Reply-To: <32223.64.124.21.211.1161380066.squirrel@webmail.bitblit.net> References: <1161379203.45393d83896eb@webmail.mexny.com> <32223.64.124.21.211.1161380066.squirrel@webmail.bitblit.net> Message-ID: <453942B9.6080609@juxtadigital.com> Ajai Khattri wrote: >> Guess what, i'm crazy for this, The company where i work wanna to pass >> the php page that gimme the results to a excel sheet, and the second >> request is they want the exactly colors, formats, width column, height >> column, etc that excel offers. >> >> I just want to know if somebody could gimme any idea to do this..i want >> to create a button that convert me php results into a excel sheet >> exactly as they need. > > > http://pear.php.net/package/Spreadsheet_Excel_Writer +1 Also just forcing a download using html tables and content-type application/excel can work with excel and openoffice-calc. The 's are the columns. This is not as full featured and robust as the PEAR package, but does seem to work for simple, single sheet spreadsheets. And it's fast to code if you already have the html tables ready (: From vugranam at us.ibm.com Sat Oct 21 06:38:46 2006 From: vugranam at us.ibm.com (Vugranam Sreedhar) Date: Sat, 21 Oct 2006 06:38:46 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <8F794CE1-13E4-4735-A6C8-7A32BC2B23B0@gmail.com> Message-ID: I have studying thread-safety issue with PHP and Apache2. I know PHP does not have a thread model (like Java). I cannot seem to find real document/code that clearly explains the problem. I am looking at building tool that will scan PHP code and tell me whether it is thread-safe or not. Would anyone be interested in such a tool ;-) With regards, Sreedhar ------------------------------------------------------------------------------------------------------------------- Research Staff Member TJ Watson Research Center T/L 863-7325 Ext: 914-784-7325 From edwardpotter at gmail.com Sat Oct 21 09:05:38 2006 From: edwardpotter at gmail.com (edward potter) Date: Sat, 21 Oct 2006 09:05:38 -0400 Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new thang?) :-) Message-ID: yipes! Has anyone played with this yet? Can I hook it into mySQL? "OpenLaszlo is an open source platform for creating zero-install web applications with the user interface capabilities of desktop client software. OpenLaszlo programs are written in XML and JavaScript and transparently compiled to Flash and soon DHTML. The OpenLaszlo APIs provide animation, layout, data binding, server communication, and declarative UI. An OpenLaszlo application can be as short as a single source file, or factored into multiple files that define reusable classes and libraries. OpenLaszlo is write once run everywhere. An OpenLaszlo application developed on one machine will run on all leading Web browsers on all leading desktop operating systems." more info here; http://www.xml.com/pub/a/2006/10/11/introducing-open-laszlo.html -- the Blog: http://www.utopiaparkway.com the Karma: http://www.coderswithconscience.com the Projects: http://flickr.com/photos/86842405 at N00/ the Store: http://astore.amazon.com/httpwwwutopic-20 From mwithington at PLMresearch.com Sat Oct 21 09:17:08 2006 From: mwithington at PLMresearch.com (Mark Withington) Date: Sat, 21 Oct 2006 09:17:08 -0400 Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new t hang?):-) Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE35801692AF1@network.PLMresearch.com> FYI - if you're near Boston next Tuesday or Wednesday the AJAX Experience (and OpenLaszlo) is showing. Alternatively, BostonPHP is hosting an AJAX presentation 10/25 @ 6:30 where Max Carlson (Co-Founder OpenLaszlo.org) will provide and update on his 2/06 presentation: The Road to AJAX - In the past, OpenLaszlo been regarded as a Flash-only tool. In fact, OpenLaszlo is a powerful language for rich, custom declarative user interface programming that's been under development for over 5 years. It's a powerful framework, and it has an exciting future as a single (OpenSource) language that can target Flash, DHTML and soon,other runtimes. In this talk Max will talk about the process of making OpenLaszlo a runtime-independent platform, including the first year of AJAX. He will give an overview of the current multi-runtime architecture, including techniques for using and extending it. See an overview of the language, and talk about the future of OpenLaszlo as an AJAX platform. All BostonPHP events are free as in "beer" and open [to all] as in "source". More info here (http://www.bostonphp.org/component/option,com_gigcal/task,details/gigcal_gi gs_id,21/) Hope you can make it, Mark ------------------------------------------- Mark L. Withington Benevolent Dictator and acting President BostonPHP.org "supporting the PHP/OSS community" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 ext. 704 f: 508-746-4973 v: 508-746-2383/508-570-2285 m: 508-801-0181 http://www.BostonPHP.org AIM: BostonPHP > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of edward potter > Sent: Saturday, October 21, 2006 9:06 AM > To: NYPHP Talk > Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new > thang?):-) > > > yipes! Has anyone played with this yet? Can I hook it into mySQL? > > "OpenLaszlo is an open source platform for creating zero-install web > applications with the user interface capabilities of desktop client > software. > > OpenLaszlo programs are written in XML and JavaScript and > transparently compiled to Flash and soon DHTML. The OpenLaszlo APIs > provide animation, layout, data binding, server communication, and > declarative UI. An OpenLaszlo application can be as short as a single > source file, or factored into multiple files that define reusable > classes and libraries. > > OpenLaszlo is write once run everywhere. An OpenLaszlo application > developed on one machine will run on all leading Web browsers on all > leading desktop operating systems." > > more info here; > http://www.xml.com/pub/a/2006/10/11/introducing-open-laszlo.html > > -- > the Blog: http://www.utopiaparkway.com > the Karma: http://www.coderswithconscience.com > the Projects: http://flickr.com/photos/86842405 at N00/ > the Store: http://astore.amazon.com/httpwwwutopic-20 > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From lists at danhorning.com Sat Oct 21 09:35:49 2006 From: lists at danhorning.com (Dan Horning) Date: Sat, 21 Oct 2006 09:35:49 -0400 Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new t hang?):-) In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE35801692AF1@network.PLMresearch.com> References: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE35801692AF1@network.PLMresearch.com> Message-ID: <453A2235.6060000@danhorning.com> out of personal curiosity, why aren't they using their own dev tool for their own front end? http://www.openlaszlo.org/ If for flash it's great then that's awesome by itself, but what applications has it been used in? the demos are pretty awesome, but all seem to revolve around flash. has anyone actually used it that's on this list? what's your dev timeline been with OpenLaszlo vs other frameworks? I really like the concepts behind OpenLaszlo and would like to chat with a few people who've used it. -dan horning Mark Withington wrote: > FYI - if you're near Boston next Tuesday or Wednesday the AJAX Experience > (and OpenLaszlo) is showing. Alternatively, BostonPHP is hosting an AJAX > presentation 10/25 @ 6:30 where Max Carlson (Co-Founder OpenLaszlo.org) will > provide and update on his 2/06 presentation: > > The Road to AJAX - In the past, OpenLaszlo been regarded as a Flash-only > tool. In fact, OpenLaszlo is a powerful language for rich, custom > declarative user interface programming that's been under development for > over 5 years. It's a powerful framework, and it has an exciting future as a > single (OpenSource) language that can target Flash, DHTML and soon,other > runtimes. > > In this talk Max will talk about the process of making OpenLaszlo a > runtime-independent platform, including the first year of AJAX. He will give > an overview of the current multi-runtime architecture, including techniques > for using and extending it. See an overview of the language, and talk about > the future of OpenLaszlo as an AJAX platform. > > All BostonPHP events are free as in "beer" and open [to all] as in "source". > More info here > (http://www.bostonphp.org/component/option,com_gigcal/task,details/gigcal_gi > gs_id,21/) > > Hope you can make it, > > Mark > > ------------------------------------------- > Mark L. Withington > Benevolent Dictator and acting President > BostonPHP.org > "supporting the PHP/OSS community" > PO Box 1354 > Plymouth, MA 02362 > o: 800-310-3992 ext. 704 > f: 508-746-4973 > v: 508-746-2383/508-570-2285 > m: 508-801-0181 > http://www.BostonPHP.org > AIM: BostonPHP > > > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org >> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of edward potter >> Sent: Saturday, October 21, 2006 9:06 AM >> To: NYPHP Talk >> Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new >> thang?):-) >> >> >> yipes! Has anyone played with this yet? Can I hook it into mySQL? >> >> "OpenLaszlo is an open source platform for creating zero-install web >> applications with the user interface capabilities of desktop client >> software. >> >> OpenLaszlo programs are written in XML and JavaScript and >> transparently compiled to Flash and soon DHTML. The OpenLaszlo APIs >> provide animation, layout, data binding, server communication, and >> declarative UI. An OpenLaszlo application can be as short as a single >> source file, or factored into multiple files that define reusable >> classes and libraries. >> >> OpenLaszlo is write once run everywhere. An OpenLaszlo application >> developed on one machine will run on all leading Web browsers on all >> leading desktop operating systems." >> >> more info here; >> http://www.xml.com/pub/a/2006/10/11/introducing-open-laszlo.html >> >> -- >> the Blog: http://www.utopiaparkway.com >> the Karma: http://www.coderswithconscience.com >> the Projects: http://flickr.com/photos/86842405 at N00/ >> the Store: http://astore.amazon.com/httpwwwutopic-20 >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Dan Horning - danhorning.com American Digital Services - americandigitalservices.com Where you are only limited by imagination. 1-866-493-4218 (direct) / 1-800-863-3854 (main number) From lists at zaunere.com Sat Oct 21 10:04:20 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sat, 21 Oct 2006 10:04:20 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: Message-ID: <001e01c6f519$d24e1d40$2002a8c0@MobileZ> Hi, Vugranam Sreedhar wrote on Saturday, October 21, 2006 6:39 AM: > I have studying thread-safety issue with PHP and Apache2. I know PHP > does not have a thread model (like Java). I cannot seem to find real > document/code > that clearly explains the problem. I am looking at building tool that > will scan PHP code and tell me whether it is thread-safe or not. > Would anyone be interested in such a tool ;-) Others on this list can perhaps provide more detail, but here's a run down... PHP cannot do threading itself - it can only fork(). However, PHP's core itself can be compiled to run in a threaded environment (for instance under Apache 2's various MPMs). So PHP itself isn't creating threads - Apache is handling user requests in a threaded manner, which in turn makes PHP run in a threaded way. The problem really is not thread safe code written in the PHP language, but rather the environment in which PHP runs in. Now PHP can be compiled for thread safety (TSRM, for instance http://us2.php.net/tsrm). However, because PHP is often linked against so many external libraries (gd/jpeg/xml/etc) it cannot be considered safe to execute in a threaded environment. This is the real problem and one of PHP's greatest strengths and unfortunate faults. So, writing an application that scans PHP code for thread safety wouldn't be useful. However, writing an application that would scan the C code of the libraries used in PHP's extensions, would be of great value - then we could determine which PHP configuration combinations are thread safe, and which are not. For instance, I had once run PHP only with the MySQL and Oracle extensions compiled, under Apache 2 with threading - it was stable for years. Rasmus had once started to document which libraries were thread safe and which were not, but I think it hasn't been actively maintained. Hopefully this somewhat clarifies a confusing issue. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From mwithington at PLMresearch.com Sat Oct 21 11:50:53 2006 From: mwithington at PLMresearch.com (Mark Withington) Date: Sat, 21 Oct 2006 11:50:53 -0400 Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it the new t hang?):-) Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE35801692AFA@network.PLMresearch.com> Dan, Please see my brother's response (principal on the Openlaszlo team) below. Mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks. My 2 cents below. Feel free to forward back to your list (which I am not on). > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Dan Horning > Subject: Re: [nycphp-talk] XML.com: Introducing OpenLaszlo (is it > the new > t hang?):-) > > out of personal curiosity, > why aren't they using their own dev tool for their own front end? > http://www.openlaszlo.org/ Openlaszlo is for creating web apps, not web sites. The clock on the home page is an openlaszlo app embedded in an html page. The openlaszlo site is just using appropriate (open source) technology for the task at hand. If you want to see a site with larger openlaszlo applications, you should visit the [commercial website](http://www.laszlosystems.com/) to see some of the customers that are using the technology and their applications. To see a full 'web 2.0'-style application running in openlaszlo, sign up for a free [LaszloMail](http://www.laszlomail.com/ lzmail/) account and try it out. > If for flash it's great then that's awesome by itself, but what > applications has it been used in? > the demos are pretty awesome, but all seem to revolve around flash. The current runtime is the SWF player, yes, but there is no Flash in the demos, they are all built from straight Openlaszlo. Openlaszlo's strength is to build rich web clients, which can be backed by any xml content management system, such as php+sql. If you go to the [demos](http://www.openlaszlo.org/demos), you can see previews of several of the demos that run _either_ in Flash or DHTML. Look for the links that say 'Launch Flash Application' and 'Launch DHTML Application'. This is the same source code, compiled to run either on the Flash player or in browser DHTML. (You can tell the difference by right-clicking over the app -- you will see either the Flash player menu or the browser menu.) > has anyone actually used it that's on this list? what's your dev > timeline been with OpenLaszlo vs other frameworks? > I really like the concepts behind OpenLaszlo and would like to chat > with > a few people who've used it. Try the [introduction](http://tinyurl.com/ympnpx). Join the [mailing list](mailto:laszlo-user-request at openlaszlo.org). One last thing: The article on xml.com by Pillai is a great article, but it focuses on using the Eclipse-based IDE for laszlo, which is not _required_ to develop openlaszlo. You can develop openlaszlo with any text editor (an xml-aware one is useful), the download from the openlaszlo site, and your favorite web browser. It is very easy to just edit your openlaszlo source, save it out, and reload the page in your browser to see how it works. P T Withington OpenLazslo.ORG mailto:ptw at openlaszlo.org skype:ptwithy aim:ptw at mac.com > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Dan Horning > Sent: Saturday, October 21, 2006 9:36 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] XML.com: Introducing OpenLaszlo (is > it the new > t hang?):-) > > > out of personal curiosity, > why aren't they using their own dev tool for their own front end? > http://www.openlaszlo.org/ > If for flash it's great then that's awesome by itself, but what > applications has it been used in? > the demos are pretty awesome, but all seem to revolve around flash. > > has anyone actually used it that's on this list? what's your dev > timeline been with OpenLaszlo vs other frameworks? > I really like the concepts behind OpenLaszlo and would like > to chat with > a few people who've used it. > > -dan horning > > > Mark Withington wrote: > > FYI - if you're near Boston next Tuesday or Wednesday the > AJAX Experience > > (and OpenLaszlo) is showing. Alternatively, BostonPHP is > hosting an AJAX > > presentation 10/25 @ 6:30 where Max Carlson (Co-Founder > OpenLaszlo.org) will > > provide and update on his 2/06 presentation: > > > > The Road to AJAX - In the past, OpenLaszlo been regarded as > a Flash-only > > tool. In fact, OpenLaszlo is a powerful language for rich, custom > > declarative user interface programming that's been under > development for > > over 5 years. It's a powerful framework, and it has an > exciting future as a > > single (OpenSource) language that can target Flash, DHTML > and soon,other > > runtimes. > > > > In this talk Max will talk about the process of making OpenLaszlo a > > runtime-independent platform, including the first year of > AJAX. He will give > > an overview of the current multi-runtime architecture, > including techniques > > for using and extending it. See an overview of the > language, and talk about > > the future of OpenLaszlo as an AJAX platform. > > > > All BostonPHP events are free as in "beer" and open [to > all] as in "source". > > More info here > > > (http://www.bostonphp.org/component/option,com_gigcal/task,det > ails/gigcal_gi > > gs_id,21/) > > > > Hope you can make it, > > > > Mark > > > > ------------------------------------------- > > Mark L. Withington > > Benevolent Dictator and acting President > > BostonPHP.org > > "supporting the PHP/OSS community" > > PO Box 1354 > > Plymouth, MA 02362 > > o: 800-310-3992 ext. 704 > > f: 508-746-4973 > > v: 508-746-2383/508-570-2285 > > m: 508-801-0181 > > http://www.BostonPHP.org > > AIM: BostonPHP > > > > > > > >> -----Original Message----- > >> From: talk-bounces at lists.nyphp.org > >> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of edward potter > >> Sent: Saturday, October 21, 2006 9:06 AM > >> To: NYPHP Talk > >> Subject: [nycphp-talk] XML.com: Introducing OpenLaszlo (is > it the new > >> thang?):-) > >> > >> > >> yipes! Has anyone played with this yet? Can I hook it into mySQL? > >> > >> "OpenLaszlo is an open source platform for creating > zero-install web > >> applications with the user interface capabilities of desktop client > >> software. > >> > >> OpenLaszlo programs are written in XML and JavaScript and > >> transparently compiled to Flash and soon DHTML. The OpenLaszlo APIs > >> provide animation, layout, data binding, server communication, and > >> declarative UI. An OpenLaszlo application can be as short > as a single > >> source file, or factored into multiple files that define reusable > >> classes and libraries. > >> > >> OpenLaszlo is write once run everywhere. An OpenLaszlo application > >> developed on one machine will run on all leading Web > browsers on all > >> leading desktop operating systems." > >> > >> more info here; > >> http://www.xml.com/pub/a/2006/10/11/introducing-open-laszlo.html > >> > >> -- > >> the Blog: http://www.utopiaparkway.com > >> the Karma: http://www.coderswithconscience.com > >> the Projects: http://flickr.com/photos/86842405 at N00/ > >> the Store: http://astore.amazon.com/httpwwwutopic-20 > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> NYPHPCon 2006 Presentations Online > >> http://www.nyphpcon.com > >> > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > >> > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > -- > Dan Horning - danhorning.com > American Digital Services - americandigitalservices.com > Where you are only limited by imagination. > 1-866-493-4218 (direct) / 1-800-863-3854 (main number) > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From paul at devonianfarm.com Sat Oct 21 22:29:15 2006 From: paul at devonianfarm.com (Paul Houle) Date: Sat, 21 Oct 2006 22:29:15 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <001e01c6f519$d24e1d40$2002a8c0@MobileZ> References: <001e01c6f519$d24e1d40$2002a8c0@MobileZ> Message-ID: <453AD77B.8080906@devonianfarm.com> Hans Zaunere wrote: > The problem really is not thread safe code written in the PHP language, but > rather the environment in which PHP runs in. Now PHP can be compiled for > thread safety (TSRM, for instance http://us2.php.net/tsrm). However, > because PHP is often linked against so many external libraries > (gd/jpeg/xml/etc) it cannot be considered safe to execute in a threaded > environment. This is the real problem and one of PHP's greatest strengths > and unfortunate faults. > This is also a problem for Perl, Python and many other languages which are advertised as thread-safe. Java runtimes are threadsafe because of a general xenophobia: the Java runtimes link in a limited number of C libraries, and Java programmers don't really believe in linking in C libraries... Though I have to admit that I've had good luck linking Java to Fortran. Lacking threads, the big disadvantage of PHP is that it consumes more memory. Data structures need to be replicated for each copy of PHP. That said, RAM is getting cheaper, and PHP is parsimonious in it's memory use, so most of us do just fine running PHP in processes instead of threads. From cliff at pinestream.com Sun Oct 22 07:08:11 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Sun, 22 Oct 2006 07:08:11 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? Message-ID: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> Is serializing/unserializing object/arrays for storage/retrieval in a MySQL db truly reliable? It would be awfully handy, but the PHP manual notes list various issues that make me wary. Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vugranam at us.ibm.com Sun Oct 22 07:23:53 2006 From: vugranam at us.ibm.com (Vugranam Sreedhar) Date: Sun, 22 Oct 2006 07:23:53 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <001e01c6f519$d24e1d40$2002a8c0@MobileZ> Message-ID: Thanks for the explanation...This definitely clarifies many things to me. Now supposing PHP 7 or greater decides to become multithreading (as Java) What do you think will be the main issues in the legacy PHP3 to PHP6 with respect to multithreading ;-) With regards, Sreedhar ------------------------------------------------------------------------------------------------------------------- Research Staff Member TJ Watson Research Center T/L 863-7325 Ext: 914-784-7325 "Hans Zaunere" To Sent by: "'NYPHP Talk'" talk-bounces at list s.nyphp.org cc Subject 10/21/2006 10:04 Re: [nycphp-talk] thread-safety AM analysis... Please respond to NYPHP Talk Hi, Vugranam Sreedhar wrote on Saturday, October 21, 2006 6:39 AM: > I have studying thread-safety issue with PHP and Apache2. I know PHP > does not have a thread model (like Java). I cannot seem to find real > document/code > that clearly explains the problem. I am looking at building tool that > will scan PHP code and tell me whether it is thread-safe or not. > Would anyone be interested in such a tool ;-) Others on this list can perhaps provide more detail, but here's a run down... PHP cannot do threading itself - it can only fork(). However, PHP's core itself can be compiled to run in a threaded environment (for instance under Apache 2's various MPMs). So PHP itself isn't creating threads - Apache is handling user requests in a threaded manner, which in turn makes PHP run in a threaded way. The problem really is not thread safe code written in the PHP language, but rather the environment in which PHP runs in. Now PHP can be compiled for thread safety (TSRM, for instance http://us2.php.net/tsrm). However, because PHP is often linked against so many external libraries (gd/jpeg/xml/etc) it cannot be considered safe to execute in a threaded environment. This is the real problem and one of PHP's greatest strengths and unfortunate faults. So, writing an application that scans PHP code for thread safety wouldn't be useful. However, writing an application that would scan the C code of the libraries used in PHP's extensions, would be of great value - then we could determine which PHP configuration combinations are thread safe, and which are not. For instance, I had once run PHP only with the MySQL and Oracle extensions compiled, under Apache 2 with threading - it was stable for years. Rasmus had once started to document which libraries were thread safe and which were not, but I think it hasn't been actively maintained. Hopefully this somewhat clarifies a confusing issue. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From vugranam at us.ibm.com Sun Oct 22 07:35:11 2006 From: vugranam at us.ibm.com (Vugranam Sreedhar) Date: Sun, 22 Oct 2006 07:35:11 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <453AD77B.8080906@devonianfarm.com> Message-ID: Thanks for the nice explanation... Would PHP ever become multithreaded... Since Apache 2+ will continue to course of multithreading I am sure PHP will eventually have to catch up the multithreading direction... With regards, Sreedhar ------------------------------------------------------------------------------------------------------------------- Research Staff Member TJ Watson Research Center T/L 863-7325 Ext: 914-784-7325 Paul Houle To Sent by: NYPHP Talk talk-bounces at list cc s.nyphp.org Subject Re: [nycphp-talk] thread-safety 10/21/2006 10:29 analysis... PM Please respond to NYPHP Talk Hans Zaunere wrote: > The problem really is not thread safe code written in the PHP language, but > rather the environment in which PHP runs in. Now PHP can be compiled for > thread safety (TSRM, for instance http://us2.php.net/tsrm). However, > because PHP is often linked against so many external libraries > (gd/jpeg/xml/etc) it cannot be considered safe to execute in a threaded > environment. This is the real problem and one of PHP's greatest strengths > and unfortunate faults. > This is also a problem for Perl, Python and many other languages which are advertised as thread-safe. Java runtimes are threadsafe because of a general xenophobia: the Java runtimes link in a limited number of C libraries, and Java programmers don't really believe in linking in C libraries... Though I have to admit that I've had good luck linking Java to Fortran. Lacking threads, the big disadvantage of PHP is that it consumes more memory. Data structures need to be replicated for each copy of PHP. That said, RAM is getting cheaper, and PHP is parsimonious in it's memory use, so most of us do just fine running PHP in processes instead of threads. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From lists at zaunere.com Sun Oct 22 10:53:16 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 22 Oct 2006 10:53:16 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <453AD77B.8080906@devonianfarm.com> Message-ID: <00b101c6f5e9$ceb71d50$650aa8c0@MobileZ> Hi Paul, Paul Houle wrote on Saturday, October 21, 2006 10:29 PM: > Hans Zaunere wrote: > > The problem really is not thread safe code written in the PHP > > language, but rather the environment in which PHP runs in. Now PHP > > can be compiled for thread safety (TSRM, for instance > > http://us2.php.net/tsrm). However, because PHP is often linked > > against so many external libraries (gd/jpeg/xml/etc) it cannot be > > considered safe to execute in a threaded environment. This is the > > real problem and one of PHP's greatest strengths and unfortunate > > faults. > > > This is also a problem for Perl, Python and many other languages > which are advertised as thread-safe. Java runtimes are threadsafe > because of a general xenophobia: the Java runtimes link in a limited > number of C libraries, and Java programmers don't really believe in > linking in C libraries... Though I have to admit that I've had good > luck linking Java to Fortran. Agreed; Java is threaded, from the ground up for the most part. > Lacking threads, the big disadvantage of PHP is that it consumes > more memory. Data structures need to be replicated for each copy of > PHP. That said, RAM is getting cheaper, and PHP is parsimonious in > it's memory use, so most of us do just fine running PHP in processes > instead of threads. This I disagree with. One of the primary reasons Java is built to be threaded from the ground up is that it has to be. I couldn't imagine having a separate process instance of Java for every request - there isn't a server on the planet with that much RAM - whereas PHP/Apache can happily live in 15-25mb of RAM or less. Long story short, PHP is fair lighter than Java, threads or no threads. But there are certainly other advantages of threads, and I do hope that in the near future core PHP configurations can begin to take advantage of them. While creating threads in PHP isn't as important in my opinion for the typical web application, being able to run in a thread-aware environment, could be. Unfortunately, this is a chicken and egg problem, since no one wants to put the development time in until they see some justification... oh wait, I covered this once already: http://www.zend.com/zend/week/week217.php --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Sun Oct 22 12:00:49 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 22 Oct 2006 12:00:49 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> Message-ID: <00b501c6f5f3$3df60830$650aa8c0@MobileZ> Hi Cliff, Cliff Hirsch wrote on Sunday, October 22, 2006 7:08 AM: > Is serializing/unserializing object/arrays for storage/retrieval in a > MySQL db truly reliable? It would be awfully handy, but the PHP > manual notes list various issues that make me wary. I would frankly recommend against it. While it's possible if you're careful, there can be a lot of surprises, such as: -- unserialized objects aren't quite what you may expect them to be (ie, the definition of the class either has changed or doesn't exist) -- it's slow -- it doesn't give you any type of normalization - ie, the object's data is relationally useless - and you end up having to do text matching to find anything There are some other options, that may be better: http://us3.php.net/wddx Although it has it's downfalls too. End of the day, I'd try to avoid serializing objects - serializing arrays and scalar types, though not optimized in PHP (ie, slow), is much more reliable. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From paul at devonianfarm.com Sun Oct 22 13:08:04 2006 From: paul at devonianfarm.com (Paul Houle) Date: Sun, 22 Oct 2006 13:08:04 -0400 Subject: [nycphp-talk] thread-safety analysis... In-Reply-To: <00b101c6f5e9$ceb71d50$650aa8c0@MobileZ> References: <00b101c6f5e9$ceb71d50$650aa8c0@MobileZ> Message-ID: <453BA574.4060609@devonianfarm.com> Hans Zaunere wrote: > This I disagree with. One of the primary reasons Java is built to be > threaded from the ground up is that it has to be. I couldn't imagine having > a separate process instance of Java for every request - there isn't a server > on the planet with that much RAM - whereas PHP/Apache can happily live in > 15-25mb of RAM or less. Long story short, PHP is fair lighter than Java, > threads or no threads In the limit of low load and small memory consumption per process, you're right. Java often takes 50 MB to just get started. Under the real-world circumstances of most developers, PHP is remarkably efficient. In most cases, my understanding is that PHP burns up about 2 M per process -- it takes 25 of those to equal an idle Java process, and you can still fit 1000 processes in 2 GB, a typical amount of memory for a small server. When considering details, it gets more complicated. It's not just a matter of the cost of the runtime system, but also the cost of memory that your application uses. In a language like Java, you can create a really big data structure, say, 200 MB in RAM; you might load it out of a file when your application starts. Thousands of threads can share that data structure, getting excellent performance with low memory consumption. This is one way Java can win for large systems. Java has it's own problems that surface in large systems. Java uses 16-bit characters internally, which is a bad choice. Java puffs up English text by a factor of two, but can't handle Chinese text correctly. In my book, Lucene is a toy. When I'm handling 5 GB of text, I dont need to have my storage requirements doubled. From danielc at analysisandsolutions.com Mon Oct 23 08:20:48 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 23 Oct 2006 08:20:48 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061018125434.E74CEA8774@virtu.nyphp.org> References: <20061018125434.E74CEA8774@virtu.nyphp.org> Message-ID: <20061023122048.GB16099@panix.com> Phil: XUL and JSON. Allows creation of a light but quite powerful client that communicates via JSON over HTTP to a PHP backend. --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 Oct 23 08:35:07 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 23 Oct 2006 08:35:07 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <00b501c6f5f3$3df60830$650aa8c0@MobileZ> Message-ID: <005001c6f69f$acdc75c0$12a8a8c0@HirschLaptop> Thanks. Sounds like it would be wise to go with a more conventional approach. -----Original Message----- Subject: Re: [nycphp-talk] Is serializing object/arrays for MySQL reliable? Hi Cliff, Cliff Hirsch wrote on Sunday, October 22, 2006 7:08 AM: > Is serializing/unserializing object/arrays for storage/retrieval in a > MySQL db truly reliable? It would be awfully handy, but the PHP > manual notes list various issues that make me wary. I would frankly recommend against it. While it's possible if you're careful, there can be a lot of surprises, such as: -- unserialized objects aren't quite what you may expect them to be (ie, the definition of the class either has changed or doesn't exist) -- it's slow -- it doesn't give you any type of normalization - ie, the object's data is relationally useless - and you end up having to do text matching to find anything There are some other options, that may be better: http://us3.php.net/wddx Although it has it's downfalls too. End of the day, I'd try to avoid serializing objects - serializing arrays and scalar types, though not optimized in PHP (ie, slow), is much more reliable. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From chsnyder at gmail.com Mon Oct 23 11:03:58 2006 From: chsnyder at gmail.com (csnyder) Date: Mon, 23 Oct 2006 11:03:58 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <00b501c6f5f3$3df60830$650aa8c0@MobileZ> References: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> <00b501c6f5f3$3df60830$650aa8c0@MobileZ> Message-ID: > Cliff Hirsch wrote: > Is serializing/unserializing object/arrays for storage/retrieval in a > MySQL db truly reliable? It would be awfully handy, but the PHP > manual notes list various issues that make me wary. I do this to allow for an extendable data model. Aside from the usual indexed fields (title, created, author) content tables also get a php field, that stores a serialized standard object. When the record is loaded, the php field is converted into a property on the object: $object->local. So developers can write business logic that sets $object->local->color, and that will persist and be available every time the object is loaded. As Hans points out, you have to be careful, and it isn't particularly portable, but it has benefits in the areas of rapid prototyping and systems that can adapt to changing needs. Hans Zaunere wrote: > -- unserialized objects aren't quite what you may expect them to be (ie, the > definition of the class either has changed or doesn't exist) Using standard objects is a good idea. > -- it's slow No doubt. > -- it doesn't give you any type of normalization - ie, the object's data is > relationally useless - and you end up having to do text matching to find > anything Yep. And you end up writing a function to generate a carefully crafted LIKE statement to match key=value: function phplike( $key, $value ) { $like = '%"'.$this->esc($key).'";s:'.strlen($value).':"'.$this->esc($value).'"%'; return $like; } There is an understanding that local properties aren't going to be indexed by the database, so aren't really useful in queries. The brute force method encoded above is only for situations where you _really_ need to lookup objects by local property. Not for the feint of heart, but also very useful. -- Chris Snyder http://chxo.com/ From danielc at analysisandsolutions.com Mon Oct 23 11:25:04 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 23 Oct 2006 11:25:04 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <20061012141811.98762.qmail@web53314.mail.yahoo.com> References: <20061012141811.98762.qmail@web53314.mail.yahoo.com> Message-ID: <20061023152503.GA672@panix.com> On Thu, Oct 12, 2006 at 07:18:11AM -0700, LK wrote: > $x = 3; > $y = 4; > $calc_str = '$x * $y'; > eval("echo \"$calc_str\";"); > I want to evaluate the expression $x * $y (x times y). But when I run it > thru the eval() function it returns "3 * 4" instead of "12". Because you are asking PHP to evaluate the quoted string. What you want to do is: eval("echo $calc_str;"); BUT, you are hereby warned that eval() is generaly a very bad idea for security reasons. --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 alex at pilgrimstudio.com Mon Oct 23 09:19:12 2006 From: alex at pilgrimstudio.com (Alexander) Date: Mon, 23 Oct 2006 13:19:12 +0000 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> References: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> Message-ID: <453CC150.1090807@pilgrimstudio.com> We are using MySQL5 to store serialized and compressed(gzip) page state data for the PRADO framework. After some magic with tables and application configuration, everything is working smooth and fast(knocking on the wood :) Before, we were saving uncompressed serialized objects, size of which were reaching 100kb. We've faced no major problems with that, except for(of course) performance issue... Cliff Hirsch wrote: > > Is serializing/unserializing object/arrays for storage/retrieval in a > MySQL db truly reliable? It would be awfully handy, but the PHP manual > notes list various issues that make me wary. > > > > Cliff > > _______________________________ > *Pinestream Communications, Inc.* > Publisher of /Semiconductor Times/ & /Telecom Trends/ > 52 Pine Street, Weston, MA 02493 USA > Tel: 781.647.8800, Fax: 781.647.8825 > http://www.pinestream.com > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From danielc at analysisandsolutions.com Mon Oct 23 13:37:14 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 23 Oct 2006 13:37:14 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> References: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> Message-ID: <20061023173714.GA28824@panix.com> Hi Cliff: On Sun, Oct 22, 2006 at 07:08:11AM -0400, Cliff Hirsch wrote: > Is serializing/unserializing object/arrays for storage/retrieval in a > MySQL db truly reliable? Depends on what you're doing. We use them to store history. For example, our update method finds the diff between the old and new data. The diff contains the old values that are about to be changed, in an associative array format with column names as the keys. We then serialize that and store it in a history table along with the record id and table name. --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 dcech at phpwerx.net Mon Oct 23 13:58:35 2006 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 23 Oct 2006 13:58:35 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <20061023173714.GA28824@panix.com> References: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> <20061023173714.GA28824@panix.com> Message-ID: <453D02CB.4030005@phpwerx.net> Daniel Convissor wrote: > Hi Cliff: > > On Sun, Oct 22, 2006 at 07:08:11AM -0400, Cliff Hirsch wrote: >> Is serializing/unserializing object/arrays for storage/retrieval in a >> MySQL db truly reliable? > > Depends on what you're doing. We use them to store history. For example, > our update method finds the diff between the old and new data. The diff > contains the old values that are about to be changed, in an associative > array format with column names as the keys. We then serialize that and > store it in a history table along with the record id and table name. This is a pretty common use of serialized data, and one it is fairly well suited to. That said, I tend to use a simple xml format for storing these kinds of fields, for a few reasons. 1. UTF-8 encoding is easy in XML 2. XML is easy to read/edit manually if needed 3. It's harder to break and when you do, easier to fix Dan From ken at secdat.com Mon Oct 23 14:31:03 2006 From: ken at secdat.com (Kenneth Downs) Date: Mon, 23 Oct 2006 14:31:03 -0400 Subject: [nycphp-talk] Is serializing object/arrays for MySQL reliable? In-Reply-To: <453D02CB.4030005@phpwerx.net> References: <000901c6f5ca$5d0fe700$12a8a8c0@HirschLaptop> <20061023173714.GA28824@panix.com> <453D02CB.4030005@phpwerx.net> Message-ID: <453D0A67.2080900@secdat.com> Dan Cech wrote: > Daniel Convissor wrote: > >> Hi Cliff: >> >> On Sun, Oct 22, 2006 at 07:08:11AM -0400, Cliff Hirsch wrote: >> >>> Is serializing/unserializing object/arrays for storage/retrieval in a >>> MySQL db truly reliable? >>> >> Depends on what you're doing. We use them to store history. For example, >> our update method finds the diff between the old and new data. The diff >> contains the old values that are about to be changed, in an associative >> array format with column names as the keys. We then serialize that and >> store it in a history table along with the record id and table name. >> > > This is a pretty common use of serialized data, and one it is fairly > well suited to. > > That said, I tend to use a simple xml format for storing these kinds of > fields, for a few reasons. > > 1. UTF-8 encoding is easy in XML > 2. XML is easy to read/edit manually if needed > 3. It's harder to break and when you do, easier to fix > > I suppose somebody should chime in and point out that you can also store the historical data in POTS (plain old tables), on the theory that tabular information works best in tables. Easier to write, easier to read. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From tboyden at supercoups.com Mon Oct 23 16:35:33 2006 From: tboyden at supercoups.com (Timothy Boyden) Date: Mon, 23 Oct 2006 16:35:33 -0400 Subject: [nycphp-talk] FPDI Message-ID: Does anyone have a link to a forum or newsgroup for support and or questions on the FPDI library? I'm using the FPDI library to encrypt existing PDF documents on the fly but they all ouput to A4 or Letter size pages rather than the size of the original document (3" x 8"). I need help to figure out how to change the size of the outputted document. Thanks, Tim --------------------------- Timothy Boyden Network Administrator tboyden at supercoups.com SuperCoups(r) | 350 Revolutionary Drive | E. Taunton, MA 02718 508-977-2034 | www.supercoups.com --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tboyden at supercoups.com Mon Oct 23 16:35:33 2006 From: tboyden at supercoups.com (Timothy Boyden) Date: Mon, 23 Oct 2006 16:35:33 -0400 Subject: [nycphp-talk] FPDI Message-ID: Does anyone have a link to a forum or newsgroup for support and or questions on the FPDI library? I'm using the FPDI library to encrypt existing PDF documents on the fly but they all ouput to A4 or Letter size pages rather than the size of the original document (3" x 8"). I need help to figure out how to change the size of the outputted document. Thanks, Tim --------------------------- Timothy Boyden Network Administrator tboyden at supercoups.com SuperCoups(r) | 350 Revolutionary Drive | E. Taunton, MA 02718 508-977-2034 | www.supercoups.com --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.com Mon Oct 23 21:01:22 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Mon, 23 Oct 2006 21:01:22 -0400 Subject: [nycphp-talk] Successor to the Web? In-Reply-To: <20061023122048.GB16099@panix.com> References: <20061018125434.E74CEA8774@virtu.nyphp.org> <20061023122048.GB16099@panix.com> Message-ID: Yeah if Songbird doesn't convince you, nothing will ... perfect model ... http://www.songbirdnest.com On Oct 23, 2006, at 8:20 AM, Daniel Convissor wrote: > Phil: > > XUL and JSON. Allows creation of a light but quite powerful client > that communicates via JSON over HTTP to a PHP backend. > > --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 Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From ken at secdat.com Mon Oct 23 22:04:42 2006 From: ken at secdat.com (Kenneth Downs) Date: Mon, 23 Oct 2006 22:04:42 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> Message-ID: <453D74BA.80208@secdat.com> David Mintz wrote: > On Thu, 19 Oct 2006, Dell Sala wrote: > > >> The other possibility is to look into existing DataObject frameworks >> that have already implemented the fancy stuff for you. I've used >> PEAR's DB_DataObject. It's a bit of a pain to get up an running, but >> it's solid. There are quite a few others -- here are a few: >> >> http://pear.php.net/package/DB_DataObject/ >> http://propel.phpdb.org/trac/ >> and CakePHP implements its own ActiveRecord http://cakephp.org/ >> >> > > I was gonna say -- but didn't, for brevity's sake -- that I have spent > several+ hours with Cake, and it does seem mighty cool, yet I've run into > enough snags to wonder about the name. Like findAll() not fetching the > data that I need and having to write custom SQL anyway. > I'm at pains to ask at this point if we should question some of the basic assumptions of the MVC model. Underneath MVC is usually an ORM philosophy, whether it is stated or implied. The ORM philosophy tries to cast tables into OO terms, and IMHO this is why the approach tends to produce at least as much work as it eliminates. In fact, the data tables are fully encapsulated by the database server and do not need to be encapsulated further into classes. Doing so introduces obfuscations which then must be un-obfuscated, so author ends up doing work to do accomplish an unnecessary goal, which then requires further work to undo. By contrast, a generalized query-by-form is far easier to write by approaching it as a simple function that need only know a table name, and the column types and widths. It does the same thing for every table otherwise. You can put it into a class if you like, but it works just as well as a library routine. As an example of this, check out one of the apps we will be demoing at Tuesday's Andromeda presentation: http://dhost2.secdat.com/demo_peds Username and password are both "guest". Look at the menu on the left, skip the first two entries "ProcedureDiagnosis X Ref" and "Claims" and look at the next few entries, "Procedure Codes", "Prodedure Groups" and so forth. Each of these tables is pure zero-code, not even a three-line class declaration went into any of them. Other more interesting tables are much lower on the menu, particularly "Carriers", which contains real data, and "Families". We're loading fake data to the "Families" and "Family Members" also. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From rotsen at gmail.com Mon Oct 23 19:58:59 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Mon, 23 Oct 2006 16:58:59 -0700 Subject: [nycphp-talk] FILE() Message-ID: I am trying to create a file that will print a web page and using the following code the below statement contains the sam einformation: $from = $_SERVER['HTTP_REFERER']; print "refer=|" . $_SERVER['HTTP_REFERER'] . "|
\n"; print "from=|" . $from . "|
\n"; --- refer=|http://maggie.sdcwa.org/eng/project/view_project.phtml| form=|http://maggie.sdcwa.org/eng/project/view_project.phtml| The problem is that if I use the code below to read the file then $lines is empty. $lines = file("$from"); If I use the code below, $lines contains the file: $lines = file(' http://maggie.sdcwa.org/eng/project/client_view_project.phtml'); I do not know why it will read the file when I spell the actual URL compare compare to when I read the URL using the $_SERVER['HTTP_REFERER']. Thanks, N?stor ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gayatri_delphi at yahoo.co.in Tue Oct 24 01:53:28 2006 From: gayatri_delphi at yahoo.co.in (Gayatri Delphi) Date: Tue, 24 Oct 2006 06:53:28 +0100 (BST) Subject: [nycphp-talk] Hi all Message-ID: <20061024055328.25872.qmail@web7802.mail.in.yahoo.com> Hi all, Let me introduce first. I am Sinu from India. I am working as Senior Software Engineer in an US based company . I have more than 6 years of experience in developing softwares in Delphi . I started with Delphi 1 and now I am working in Delphi 7. I have worked in different domains like Finance , Hospital Management , Hotel management , Remitter processing , Admin and ITS(Intelligent Transport Systems). I have already developed many freelance projects. I am interested to take any more freelance work in Delphi. Kindly let me know if any of you have any specific work. Regards, Sinu --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Tue Oct 24 09:22:24 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 09:22:24 -0400 Subject: [nycphp-talk] Tonight: bring wireless, smartphone, get account Message-ID: <453E1390.7000802@secdat.com> For tonight's demo of Andromeda, we will have a wireless router and you will be able to connect into the demo apps if you have a wireless adapter. One of our demos, a time tracker, works much better if you have a login account. If you want to get an account just email the list with a desired userid before 3:30pm and we'll have the account created when the show begins. Or you can get to the show early, and we will be creating accounts from 6:15pm - 6:30pm. Also, we will be demonstrating *very* limited smartphone stuff if time permits. If you have a wi-fi enabled smartphone bring that along too and you can see a thing or two. -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From codebowl at gmail.com Tue Oct 24 09:29:27 2006 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 24 Oct 2006 09:29:27 -0400 Subject: [nycphp-talk] Tonight: bring wireless, smartphone, get account In-Reply-To: <453E1390.7000802@secdat.com> References: <453E1390.7000802@secdat.com> Message-ID: <8d9a42800610240629q604a8f86pc786b654b5e97a78@mail.gmail.com> which Andromeda are you going to demo tonight? Is there a url? I wont be able to attend but am curious and may checkout the slides once done ;D Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Tue Oct 24 09:43:20 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 09:43:20 -0400 Subject: [nycphp-talk] Tonight: bring wireless, smartphone, get account In-Reply-To: <8d9a42800610240629q604a8f86pc786b654b5e97a78@mail.gmail.com> References: <453E1390.7000802@secdat.com> <8d9a42800610240629q604a8f86pc786b654b5e97a78@mail.gmail.com> Message-ID: <453E1878.1090307@secdat.com> Joseph Crawford wrote: > which Andromeda are you going to demo tonight? Is there a url? The url is: http://docs.secdat.com The slides are here: http://www.secdat.com/NYPHP-2004.10.19.odp they will be altered slightly this afternoon, but not substantially. > > I wont be able to attend but am curious and may checkout the slides > once done ;D > > Thanks, > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > http://www.codebowl.com/ > Blog: http://www.josephcrawford.com/ > 1-802-671-2021 > codebowl at gmail.com > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From dell at sala.ca Tue Oct 24 09:51:13 2006 From: dell at sala.ca (Dell Sala) Date: Tue, 24 Oct 2006 09:51:13 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: <453D74BA.80208@secdat.com> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> <453D74BA.80208@secdat.com> Message-ID: <5CCA4D59-1A3A-4E70-A26D-EE2461F17F6E@sala.ca> Kenneth Downs wrote: > I'm at pains to ask at this point if we should question some of the > basic assumptions of the MVC model. > > Underneath MVC is usually an ORM philosophy, whether it is stated > or implied. The ORM philosophy tries to cast tables into OO terms, > and IMHO this is why the approach tends to produce at least as much > work as it eliminates. To be honest, I've really just fallen into an MVC approach as I've learned, so I can't really compare it to anything other than the chaotic php/sql/html I used to write when I got started. I suppose I agree that ORM and MVC may not save time in the short-term, but I've found it can have a huge impact on the maintainability of my code. It does not mean I write less code -- it just gives me structured buckets to put it in. I also find the code becomes very expressive with MVC and ORM. I can glance at it 6 months later and know exactly what I was trying to do. > In fact, the data tables are fully encapsulated by the database > server and do not need to be encapsulated further into classes. > Doing so introduces obfuscations which then must be un-obfuscated, > so author ends up doing work to do accomplish an unnecessary goal, > which then requires further work to undo. This is interesting. I've thought about this before, but haven't heard anyone else express it. But a table is just data, no? I've found it useful to wrap tables in classes so that I can attach business logic to them. > By contrast, a generalized query-by-form is far easier to write by > approaching it as a simple function that need only know a table > name, and the column types and widths. It does the same thing for > every table otherwise. You can put it into a class if you like, > but it works just as well as a library routine. I can't quite visualize it. I'm looking forward to seeing some examples at your presentation this evening. I'm always look for a better way... -- Dell From ken at secdat.com Tue Oct 24 11:19:17 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 11:19:17 -0400 Subject: [nycphp-talk] DataObject implementation (was Re: Constructors and) In-Reply-To: <5CCA4D59-1A3A-4E70-A26D-EE2461F17F6E@sala.ca> References: <3503e561a956764ef4b7e5dbe1398d70@jobsforge.com> <9D5F7096-CD8E-473A-BFAC-835DFE8E7E4C@sala.ca> <7EB77E45-7E68-49C7-8AC8-EBC2D685B92B@sala.ca> <453D74BA.80208@secdat.com> <5CCA4D59-1A3A-4E70-A26D-EE2461F17F6E@sala.ca> Message-ID: <453E2EF5.2030403@secdat.com> Dell Sala wrote: >> In fact, the data tables are fully encapsulated by the database >> server and do not need to be encapsulated further into classes. >> Doing so introduces obfuscations which then must be un-obfuscated, >> so author ends up doing work to do accomplish an unnecessary goal, >> which then requires further work to undo. >> > > This is interesting. I've thought about this before, but haven't > heard anyone else express it. But a table is just data, no? I've > found it useful to wrap tables in classes so that I can attach > business logic to them. > A table is, at minimum, data. But the table is also the most natural home of biz logic. You can attach triggers (server-side programs) that automatically fire on the three actions of insert, update, delete, and these triggers can contain all of your business logic. Consider this: code attached to the table is as simple as the world can get. Any other situation, such as putting the code out in the web layer, is a *complication*, and will always have drawbacks. The first is of course that your database is now helpless to defend itself against rogue apps. This is very important because the better the businessman you are, the more likely your software will be deployed by an IT department that demands access to the database. The second big problem is the ORM classes will always be more complex than the triggers they are by definition oxy-moronic: code that is by definition always attached to a specific table, yet by no possible mechanism can be positively synchronized with that table. Thirdly of course is performance, since application code is farther away from the server than trigger code, many functions will be forever doomed to be slower. Now, if you are on mySQL, some or much of this may not be possible. This explains why people will say that mySQL, despite ongoing improvements, is not a "real" database. So why don't people do it this way? Several reasons. First, they simply don't know they can. There is a second reason that is more justifiable, which is that it turns out to be a royal PITA to diddle around with triggers the way we do so effortlessly with our piles of PHP files. Another reason, which is harder to get into in an email, is an inclination to remain "platform independent" by avoiding coding in the proprietary language of a server product. Coders don't want their biz logic "locked" into Oracle syntax, or Postgres syntax, and so forth. The Andromeda solution is to store the database spec in a plaintext file and to generate the table definitions and triggers. This gives the Andromeda programmer: -> Simple editing of biz rules in a text file -> Platform independence, as we can generate SQL for multiple back-ends (this is only true in principle, we target only PostgreSQL at this time) -> All biz logic in the web server, its natural home -> All kinds of whiz-bang install/upgrade stuff -> Huge reduction in coding Hope this helps, and looking forward to seeing you this evening! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From ken at secdat.com Tue Oct 24 11:55:57 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 11:55:57 -0400 Subject: [nycphp-talk] Final slides now available for download Message-ID: <453E378D.3070909@secdat.com> The final version of tonight's slides are available here: http://www.secdat.com/NYPHP-2004.10.19.odp -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From rolan at omnistep.com Tue Oct 24 13:11:25 2006 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 24 Oct 2006 13:11:25 -0400 Subject: [nycphp-talk] Final slides now available for download In-Reply-To: <453E378D.3070909@secdat.com> References: <453E378D.3070909@secdat.com> Message-ID: <453E493D.7090102@omnistep.com> Just installed open office now so I'm not sure if the problem is on my end, but when I open the document, all I see is a blank page. ~Rolan Kenneth Downs wrote: > The final version of tonight's slides are available here: > > http://www.secdat.com/NYPHP-2004.10.19.odp > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From andrew at plexpod.com Tue Oct 24 13:15:31 2006 From: andrew at plexpod.com (Andrew Yochum) Date: Tue, 24 Oct 2006 13:15:31 -0400 Subject: [nycphp-talk] Final slides now available for download In-Reply-To: <453E493D.7090102@omnistep.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> Message-ID: <453E4A33.2040603@plexpod.com> Kenneth, Perhaps you can generate a neutral version? HTML or PDF? Andrew Rolan Yang wrote: > Just installed open office now so I'm not sure if the problem is on my > end, but when I open the document, all I see is a blank page. > > ~Rolan > > Kenneth Downs wrote: > >> The final version of tonight's slides are available here: >> >> http://www.secdat.com/NYPHP-2004.10.19.odp >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From ken at secdat.com Tue Oct 24 13:25:10 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 13:25:10 -0400 Subject: [nycphp-talk] Final slides now available for download In-Reply-To: <453E493D.7090102@omnistep.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> Message-ID: <453E4C76.6030705@secdat.com> Rolan Yang wrote: > Just installed open office now so I'm not sure if the problem is on my > end, but when I open the document, all I see is a blank page. > I've saved a PDF: http://www.secdat.com/NYPHP-2004.10.19.pdf But for my own curiosity, what version of OOo? Linux or Win? > ~Rolan > > Kenneth Downs wrote: > >> The final version of tonight's slides are available here: >> >> http://www.secdat.com/NYPHP-2004.10.19.odp >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From ken at secdat.com Tue Oct 24 13:38:22 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 13:38:22 -0400 Subject: [nycphp-talk] PDF slides are posted In-Reply-To: <453E4A33.2040603@plexpod.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> <453E4A33.2040603@plexpod.com> Message-ID: <453E4F8E.1070800@secdat.com> Andrew Yochum wrote: > Kenneth, > > Perhaps you can generate a neutral version? HTML or PDF? > Yup, that occurred to me as soon as I saw Rolan's trouble. It is at: http://www.secdat.com/NYPHP-2004.10.19.pdf > Andrew > > Rolan Yang wrote: > >> Just installed open office now so I'm not sure if the problem is on my >> end, but when I open the document, all I see is a blank page. >> >> ~Rolan >> >> Kenneth Downs wrote: >> >> >>> The final version of tonight's slides are available here: >>> >>> http://www.secdat.com/NYPHP-2004.10.19.odp >>> >>> >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> NYPHPCon 2006 Presentations Online >>> http://www.nyphpcon.com >>> >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >>> >>> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> NYPHPCon 2006 Presentations Online >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From natrindex at yahoo.com Tue Oct 24 14:30:39 2006 From: natrindex at yahoo.com (charlie wang) Date: Tue, 24 Oct 2006 11:30:39 -0700 (PDT) Subject: [nycphp-talk] Tonight's meeting Message-ID: <20061024183039.71929.qmail@web90413.mail.mud.yahoo.com> I RSVPed a few minutes ago. It says I should RSVPed yesterday before 3PM. Am I too late for today's meeting. I don't want drive 2 hour from upstate to NYC and then blocked out of door by IBM security. Thanks in advance for any advise. Charlie --------------------------------- How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Tue Oct 24 14:56:05 2006 From: ken at secdat.com (Kenneth Downs) Date: Tue, 24 Oct 2006 14:56:05 -0400 Subject: [nycphp-talk] Tonight's meeting In-Reply-To: <20061024183039.71929.qmail@web90413.mail.mud.yahoo.com> References: <20061024183039.71929.qmail@web90413.mail.mud.yahoo.com> Message-ID: <453E61C5.2010300@secdat.com> charlie wang wrote: > I RSVPed a few minutes ago. It says I should RSVPed yesterday before > 3PM. Am I too late for today's meeting. I don't want drive 2 hour from > upstate to NYC and then blocked out of door by IBM security. > > Thanks in advance for any advise. I have forgotten to RSVP at least once myself, I showed photo ID and they let me in. > > > Charlie > > ------------------------------------------------------------------------ > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call > rates. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From rolan at omnistep.com Tue Oct 24 15:18:39 2006 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 24 Oct 2006 15:18:39 -0400 Subject: [nycphp-talk] Final slides now available for download In-Reply-To: <453E4C76.6030705@secdat.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> <453E4C76.6030705@secdat.com> Message-ID: <453E670F.3080104@omnistep.com> win. Kenneth Downs wrote: > Rolan Yang wrote: >> Just installed open office now so I'm not sure if the problem is on my >> end, but when I open the document, all I see is a blank page. >> > > I've saved a PDF: > > http://www.secdat.com/NYPHP-2004.10.19.pdf > > But for my own curiosity, what version of OOo? Linux or Win? > From rolan at omnistep.com Tue Oct 24 15:58:41 2006 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 24 Oct 2006 15:58:41 -0400 Subject: [nycphp-talk] Final slides now available for download In-Reply-To: <453E670F.3080104@omnistep.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> <453E4C76.6030705@secdat.com> <453E670F.3080104@omnistep.com> Message-ID: <453E7071.7090105@omnistep.com> The presentation opened up fine in linux. ~Rolan Rolan Yang wrote: > win. > > Kenneth Downs wrote: > >> Rolan Yang wrote: >> >>> Just installed open office now so I'm not sure if the problem is on my >>> end, but when I open the document, all I see is a blank page. >>> >>> >> I've saved a PDF: >> >> http://www.secdat.com/NYPHP-2004.10.19.pdf >> >> But for my own curiosity, what version of OOo? Linux or Win? >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From rotsen at gmail.com Tue Oct 24 19:39:41 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Tue, 24 Oct 2006 16:39:41 -0700 Subject: [nycphp-talk] PROBLEM: passing variables to FILE() Message-ID: HI people, I am trying to read a file using "file" and I am passing the following string for the input file parameter: http://maggie.sdcwa.org/eng/list/client_find_project_list.phtml?proj_name=CATHODICPROTECTION OF RAMONA PIPELINE PHASE 2&show=1 phpinfo shows: _GET["proj_name"] CATHODIC _SERVER["SERVER_PROTOCOL"] PROTECTION OF RAMONA PIPELINE PHASE 2&show=1 HTTP/1.0 Somehow the variables data being passed as an argument are split. Anyone ran into this before? thanks, N?stor :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Tue Oct 24 20:53:43 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 24 Oct 2006 20:53:43 -0400 Subject: [nycphp-talk] FILE() In-Reply-To: References: Message-ID: <20061025005342.GA5463@panix.com> Hi Nestor: On Mon, Oct 23, 2006 at 04:58:59PM -0700, N?stor wrote: > $from = $_SERVER['HTTP_REFERER']; > print "refer=|" . $_SERVER['HTTP_REFERER'] . "|
\n"; > print "from=|" . $from . "|
\n"; > --- > refer=|http://maggie.sdcwa.org/eng/project/view_project.phtml| > form=|http://maggie.sdcwa.org/eng/project/view_project.phtml| > > The problem is that if I use the code below to read the file then > $lines is empty. > $lines = file("$from"); First, let me say this is a VERY VERY VERY bad idea for security reasons. Never use user input for stuff like that. Second, from the typos you have above, it is clear your example shown here is produced by typing rather than not copying and pasting. So we can't diagnose what's really happening. Third, putting the quotes around $from in that last line is not necessary. Fourth, it seems like it's actually working because the call to file() is not throwing an error, right? [Or are you going to pull one of those "Oh, yeah, I forgot to say, the Check Engine light is on" situations that happened on "Car Talk" a few weeks ago?] Thus if $lines is empty, the file is empty. --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 michael.southwell at nyphp.org Tue Oct 24 23:15:30 2006 From: michael.southwell at nyphp.org (Michael Southwell) Date: Tue, 24 Oct 2006 23:15:30 -0400 Subject: [nycphp-talk] PROBLEM: passing variables to FILE() In-Reply-To: References: Message-ID: <6.2.3.4.2.20061024231306.027ff950@pop.nyphp.com> An HTML attachment was scrubbed... URL: From kenrbnsn at rbnsn.com Tue Oct 24 23:21:34 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Tue, 24 Oct 2006 23:21:34 -0400 Subject: [nycphp-talk] PROBLEM: passing variables to FILE() In-Reply-To: <6.2.3.4.2.20061024231306.027ff950@pop.nyphp.com> References: <6.2.3.4.2.20061024231306.027ff950@pop.nyphp.com> Message-ID: <7.0.1.0.2.20061024231943.09ea7888@rbnsn.com> At 11:15 PM 10/24/2006, Michael Southwell wrote: >At 07:39 PM 10/24/2006, you wrote: >>HI people, >> >>I am trying to read a file using "file" and I am passing the following string >>for the input file parameter: >>http://maggie.sdcwa.org/eng/list/client_find_project_list.phtml?proj_name=CATHODIC >>PROTECTION OF RAMONA PIPELINE PHASE 2&show=1 >> >>phpinfo shows: >>_GET["proj_name"] CATHODIC >> >>_SERVER["SERVER_PROTOCOL"] PROTECTION OF RAMONA PIPELINE PHASE >>2&show=1 HTTP/1.0 >> >>Somehow the variables data being passed as an argument are split. > >You can't pass a space, so you need to replace all spaces in the >argument with the html entity equivalent, in this case %20, before >you try to pass it. You can do this with str_replace(). No, you shouldn't use the htmlentities() function, since that will not encode spaces. You should use the urlencode() function, since that will. Ken From gayatri_delphi at yahoo.co.in Wed Oct 25 03:03:33 2006 From: gayatri_delphi at yahoo.co.in (Gayatri Delphi) Date: Wed, 25 Oct 2006 08:03:33 +0100 (BST) Subject: [nycphp-talk] Interested in freelance work : Delphi In-Reply-To: <453E1390.7000802@secdat.com> Message-ID: <20061025070333.91536.qmail@web7811.mail.in.yahoo.com> Hi Adam , I would like to talk to you regarding the freelance work. Can you send me your email id. Regards, Sinu Kenneth Downs wrote: For tonight's demo of Andromeda, we will have a wireless router and you will be able to connect into the demo apps if you have a wireless adapter. One of our demos, a time tracker, works much better if you have a login account. If you want to get an account just email the list with a desired userid before 3:30pm and we'll have the account created when the show begins. Or you can get to the show early, and we will be creating accounts from 6:15pm - 6:30pm. Also, we will be demonstrating *very* limited smartphone stuff if time permits. If you have a wi-fi enabled smartphone bring that along too and you can see a thing or two. begin:vcard fn:Kenneth Downs n:Downs;Kenneth adr;dom:;;347 Main Street;East Setauket;NY;11733 email;internet:ken at secdat.com tel;work:631-689-7200 tel;fax:631-689-0527 tel;cell:631-379-0010 x-mozilla-html:FALSE url:http://www.secdat.com version:2.1 end:vcard _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Wed Oct 25 10:53:39 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Wed, 25 Oct 2006 07:53:39 -0700 Subject: [nycphp-talk] FILE() In-Reply-To: <20061025005342.GA5463@panix.com> References: <20061025005342.GA5463@panix.com> Message-ID: Daniel thanks for your help. I can tell you that this is not user input but I was printing variable to try to debug the problem. I do not know what typos you are referring to since those lines of code worked, can you tell me what typos you are talking about. Putting the quotes around the $form is not necessary but is not ilegal. The problem I found in calling the "FIle($file)". $file will include a file to check for session information and it will send the page to a login page. I found the problem as soon as I went home when I was thinking about it while eating dinner (ha, ha,..) Thanks for your help, N?stor :-) On 10/24/06, Daniel Convissor wrote: > > Hi Nestor: > > On Mon, Oct 23, 2006 at 04:58:59PM -0700, N?stor wrote: > > $from = $_SERVER['HTTP_REFERER']; > > print "refer=|" . $_SERVER['HTTP_REFERER'] . "|
\n"; > > print "from=|" . $from . "|
\n"; > > --- > > refer=|http://maggie.sdcwa.org/eng/project/view_project.phtml| > > form=|http://maggie.sdcwa.org/eng/project/view_project.phtml| > > > > The problem is that if I use the code below to read the file then > > $lines is empty. > > $lines = file("$from"); > > First, let me say this is a VERY VERY VERY bad idea for security > reasons. Never use user input for stuff like that. > > Second, from the typos you have above, it is clear your example shown > here is produced by typing rather than not copying and pasting. So we > can't diagnose what's really happening. > > Third, putting the quotes around $from in that last line is not > necessary. > > Fourth, it seems like it's actually working because the call to file() > is not throwing an error, right? [Or are you going to pull one of > those "Oh, yeah, I forgot to say, the Check Engine light is on" > situations that happened on "Car Talk" a few weeks ago?] Thus if > $lines is empty, the file is empty. > > --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 Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Wed Oct 25 11:38:50 2006 From: rotsen at gmail.com (=?ISO-8859-1?Q?N=E9stor?=) Date: Wed, 25 Oct 2006 08:38:50 -0700 Subject: [nycphp-talk] PROBLEM: passing variables to FILE() In-Reply-To: <7.0.1.0.2.20061024231943.09ea7888@rbnsn.com> References: <6.2.3.4.2.20061024231306.027ff950@pop.nyphp.com> <7.0.1.0.2.20061024231943.09ea7888@rbnsn.com> Message-ID: Michael + Ken Using urlencode did the trick. I was surprise that $_GET will urldecode the variables automatically. Thanks!!!! N?stor :-) On 10/24/06, Ken Robinson wrote: > > At 11:15 PM 10/24/2006, Michael Southwell wrote: > >At 07:39 PM 10/24/2006, you wrote: > >>HI people, > >> > >>I am trying to read a file using "file" and I am passing the following > string > >>for the input file parameter: > >> > http://maggie.sdcwa.org/eng/list/client_find_project_list.phtml?proj_name=CATHODIC > >>PROTECTION OF RAMONA PIPELINE PHASE 2&show=1 > >> > >>phpinfo shows: > >>_GET["proj_name"] CATHODIC > >> > >>_SERVER["SERVER_PROTOCOL"] PROTECTION OF RAMONA PIPELINE PHASE > >>2&show=1 HTTP/1.0 > >> > >>Somehow the variables data being passed as an argument are split. > > > >You can't pass a space, so you need to replace all spaces in the > >argument with the html entity equivalent, in this case %20, before > >you try to pass it. You can do this with str_replace(). > > No, you shouldn't use the htmlentities() function, since that will > not encode spaces. You should use the urlencode() function, since that > will. > > Ken > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Wed Oct 25 13:59:10 2006 From: chsnyder at gmail.com (csnyder) Date: Wed, 25 Oct 2006 13:59:10 -0400 Subject: [nycphp-talk] FILE() In-Reply-To: References: <20061025005342.GA5463@panix.com> Message-ID: On 10/25/06, N?stor wrote: > I can tell you that this is not user input but I was printing > variable to try to debug the problem. HTTP_REFERER is considered user input, becuase it is built from HTTP headers. Just make sure you implicitly trust anybody who is able to execute the script. One could send a referrer that looks like "file:///etc/passwd" or something. There's no reason that $lines = file( $from ) wouldn't work, provided $from is actually set. So either this is a PHP bug, which is _extremely_ unlikely, or you have a typo somewhere in your code. Are you sure you didn't set $form? Are you sure that the referrer is being sent? Are you checking for an error raised by the file() call? -- Chris Snyder http://chxo.com/ From suzerain at suzerain.com Wed Oct 25 14:34:28 2006 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 25 Oct 2006 14:34:28 -0400 Subject: [nycphp-talk] user input (was Re: FILE() ) In-Reply-To: References: <20061025005342.GA5463@panix.com> Message-ID: <450023D8-2562-4D3A-B3AD-05F861CFBFB9@suzerain.com> Hey Chris: Just wondering about this...what kind of filter would you recommend passing over the HTTP_REFERER in order to verify it's (reasonably) kosher? Cheers, Marc http://www.suzerain.com Le 25 oct. 06 ? 13:59, csnyder a ?crit : > On 10/25/06, N?stor wrote: > >> I can tell you that this is not user input but I was printing >> variable to try to debug the problem. > > HTTP_REFERER is considered user input, becuase it is built from HTTP > headers. Just make sure you implicitly trust anybody who is able to > execute the script. One could send a referrer that looks like > "file:///etc/passwd" or something. > > There's no reason that $lines = file( $from ) wouldn't work, provided > $from is actually set. So either this is a PHP bug, which is > _extremely_ unlikely, or you have a typo somewhere in your code. Are > you sure you didn't set $form? Are you sure that the referrer is being > sent? Are you checking for an error raised by the file() call? > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From chsnyder at gmail.com Wed Oct 25 15:01:29 2006 From: chsnyder at gmail.com (csnyder) Date: Wed, 25 Oct 2006 15:01:29 -0400 Subject: [nycphp-talk] user input (was Re: FILE() ) In-Reply-To: <450023D8-2562-4D3A-B3AD-05F861CFBFB9@suzerain.com> References: <20061025005342.GA5463@panix.com> <450023D8-2562-4D3A-B3AD-05F861CFBFB9@suzerain.com> Message-ID: On 10/25/06, Marc Antony Vose wrote: > Hey Chris: > > Just wondering about this...what kind of filter would you recommend > passing over the HTTP_REFERER in order to verify it's (reasonably) > kosher? > > Cheers, > > Marc > http://www.suzerain.com > At minimum you'd want to make sure the referrer starts with "http://" or "https://", which will cut off local filesystem access. Include ftp:// if you need to, but who passes ftp urls in the referrer? If your server can potentially access other systems inside a firewall, it would be a darn good idea to write some sort of host-based blacklist, with localhost included. Being comprehensive could be difficult, maybe just better to disallow LAN access to any server that runs this kind of code. Of course, if the value is output into markup, you want to convert it using htmlentities(). Anyone think of anything else? -- Chris Snyder http://chxo.com/ From gatzby3jr at gmail.com Wed Oct 25 16:07:34 2006 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Wed, 25 Oct 2006 16:07:34 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <20061023152503.GA672@panix.com> References: <20061012141811.98762.qmail@web53314.mail.yahoo.com> <20061023152503.GA672@panix.com> Message-ID: <29da5d150610251307h6e29a7d7xa2986d3b9e085463@mail.gmail.com> Is it a bad idea with user input, or in general? And if in general, why so? On 10/23/06, Daniel Convissor wrote: > > > On Thu, Oct 12, 2006 at 07:18:11AM -0700, LK wrote: > > $x = 3; > > $y = 4; > > $calc_str = '$x * $y'; > > eval("echo \"$calc_str\";"); > > > I want to evaluate the expression $x * $y (x times y). But when I run it > > thru the eval() function it returns "3 * 4" instead of "12". > > Because you are asking PHP to evaluate the quoted string. What you want > to do is: > > eval("echo $calc_str;"); > > BUT, you are hereby warned that eval() is generaly a very bad idea for > security reasons. > > --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 Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Brian O'Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Wed Oct 25 16:20:25 2006 From: tom at supertom.com (Tom Melendez) Date: Wed, 25 Oct 2006 16:20:25 -0400 Subject: [nycphp-talk] Eval question In-Reply-To: <29da5d150610251307h6e29a7d7xa2986d3b9e085463@mail.gmail.com> References: <20061012141811.98762.qmail@web53314.mail.yahoo.com> <20061023152503.GA672@panix.com> <29da5d150610251307h6e29a7d7xa2986d3b9e085463@mail.gmail.com> Message-ID: <117286890610251320p1c52dabj10d534c66db1df2@mail.gmail.com> When I'm faced with using an eval, I usually stop and ask myself "How did I end up in this situation?". The answer tends to be that I made a mistake or assumption earlier on that now has forced me into needing an eval to continue. I don't think eval is bad, but rather, it is a glaring reminder of the mistake I made previously. Nonetheless, it is there, and there may be valid reasons for using it depending on your situation. Tom http://www.liphp.org On 10/25/06, Brian O'Connor wrote: > Is it a bad idea with user input, or in general? And if in general, why so? > > On 10/23/06, Daniel Convissor < > danielc at analysisandsolutions.com> wrote: > > > > On Thu, Oct 12, 2006 at 07:18:11AM -0700, LK wrote: > > > $x = 3; > > > $y = 4; > > > $calc_str = '$x * $y'; > > > eval("echo \"$calc_str\";"); > > > > > I want to evaluate the expression $x * $y (x times y). But when I run it > > > thru the eval() function it returns "3 * 4" instead of "12". > > > > Because you are asking PHP to evaluate the quoted string. What you want > > to do is: > > > > eval("echo $calc_str;"); > > > > BUT, you are hereby warned that eval() is generaly a very bad idea for > > security reasons. > > > > --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 Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > NYPHPCon 2006 Presentations Online > > http://www.nyphpcon.com > > > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > > -- > Brian O'Connor > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From natrindex at yahoo.com Wed Oct 25 19:15:12 2006 From: natrindex at yahoo.com (charlie wang) Date: Wed, 25 Oct 2006 16:15:12 -0700 (PDT) Subject: [nycphp-talk] Tonight's meeting In-Reply-To: <453E61C5.2010300@secdat.com> Message-ID: <20061025231512.10243.qmail@web90402.mail.mud.yahoo.com> Hi, Kenneth: I didn't make it last night. I reviewed your slides. It's very interesting. Could you give me a username/password to access the online demo. I'm chemist working for a small manufacturer in upstate. I also write software for my company using PHP and mySQL. I believe your system has very good application small business environment. I wish could attend your future presentation. Regards, Chunlin Wang, Ph.D. Kenneth Downs wrote: charlie wang wrote: I RSVPed a few minutes ago. It says I should RSVPed yesterday before 3PM. Am I too late for today's meeting. I don't want drive 2 hour from upstate to NYC and then blocked out of door by IBM security. Thanks in advance for any advise. I have forgotten to RSVP at least once myself, I showed photo ID and they let me in. Charlie --------------------------------- How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates. --------------------------------- _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php begin:vcard fn:Kenneth Downs n:Downs;Kenneth adr;dom:;;347 Main Street;East Setauket;NY;11733 email;internet:ken at secdat.com tel;work:631-689-7200 tel;fax:631-689-0527 tel;cell:631-379-0010 x-mozilla-html:FALSE url:http://www.secdat.com version:2.1 end:vcard _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Wed Oct 25 21:46:18 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 25 Oct 2006 21:46:18 -0400 Subject: [nycphp-talk] FILE() In-Reply-To: References: <20061025005342.GA5463@panix.com> Message-ID: <20061026014618.GA15659@panix.com> On Wed, Oct 25, 2006 at 07:53:39AM -0700, N?stor wrote: > > I do not know what typos you are referring to since those lines > of code worked, can you tell me what typos you are talking about. print "refer=|" . $_SERVER['HTTP_REFERER'] . "|
\n"; print "from=|" . $from . "|
\n"; ^^ refer=|http://maggie.sdcwa.org/eng/project/view_project.phtml| form=|http://maggie.sdcwa.org/eng/project/view_project.phtml| ^^ > Putting the quotes around the $form is not necessary but is not ilegal. Didn't say it was. It's just wasteful. --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 jonbaer at jonbaer.com Wed Oct 25 23:55:16 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Wed, 25 Oct 2006 23:55:16 -0400 Subject: [nycphp-talk] Native MySQL driver in PHP6 Message-ID: Ahh more of the "if its not broke fix it anyway to add more confusion" PHP :-) Well Im sure the licensing thing is one item left to be resolved but these are 2 nice improvements ... http://www.planetmysql.org/kaj/?p=69 * we intend to add support for client-side query caching in the PHP driver for MySQL, probably already to MySQL 5.1 Community Server * we intend to add support for a Prepared Statements cache to the PHP driver for MySQL, also implemented on the MySQL Server Is that a memory-based cache being discussed or file-based? Has anyone tried the memcache/MySQL engine? - Jon From ken at secdat.com Thu Oct 26 12:00:45 2006 From: ken at secdat.com (Kenneth Downs) Date: Thu, 26 Oct 2006 12:00:45 -0400 Subject: [nycphp-talk] Tonight's meeting In-Reply-To: <20061025231512.10243.qmail@web90402.mail.mud.yahoo.com> References: <20061025231512.10243.qmail@web90402.mail.mud.yahoo.com> Message-ID: <4540DBAD.40102@secdat.com> charlie wang wrote: > Hi, Kenneth: > > I didn't make it last night. I reviewed your slides. It's very > interesting. Could you give me a username/password to access the > online demo. Hello Chunlin, You can use the username "jones" and password "jones" for the demo at this site: dhost2.secdat.com/demo_time You can also look at the medical billing program if you like, it has quite a bit more going on, the username and password are both "guest" and it is here: dhost2.secdat.com/demo_peds Don't hesitate to email me if you have any questions about the system. > > I'm chemist working for a small manufacturer in upstate. I also write > software for my company using PHP and mySQL. I believe your system has > very good application small business environment. > > I wish could attend your future presentation. > > Regards, > > > Chunlin Wang, Ph.D. > > */Kenneth Downs /* wrote: > > charlie wang wrote: >> I RSVPed a few minutes ago. It says I should RSVPed yesterday >> before 3PM. Am I too late for today's meeting. I don't want drive >> 2 hour from upstate to NYC and then blocked out of door by IBM >> security. >> >> Thanks in advance for any advise. > I have forgotten to RSVP at least once myself, I showed photo ID > and they let me in. >> >> >> Charlie >> ------------------------------------------------------------------------ >> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone >> call rates. >> >> >> >> ------------------------------------------------------------------------ >> _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 >> Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php > > begin:vcard > fn:Kenneth Downs > n:Downs;Kenneth > adr;dom:;;347 Main Street;East Setauket;NY;11733 > email;internet:ken at secdat.com > tel;work:631-689-7200 > tel;fax:631-689-0527 > tel;cell:631-379-0010 > x-mozilla-html:FALSE > url:http://www.secdat.com > version:2.1 > end:vcard > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > ------------------------------------------------------------------------ > Do you Yahoo!? > Get on board. You're invited > > to try the new Yahoo! Mail. > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ken.vcf Type: text/x-vcard Size: 261 bytes Desc: not available URL: From greg.rundlett at gmail.com Thu Oct 26 22:26:55 2006 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Thu, 26 Oct 2006 22:26:55 -0400 Subject: [nycphp-talk] PDF slides are posted In-Reply-To: <453E4F8E.1070800@secdat.com> References: <453E378D.3070909@secdat.com> <453E493D.7090102@omnistep.com> <453E4A33.2040603@plexpod.com> <453E4F8E.1070800@secdat.com> Message-ID: <5e2aaca40610261926i4526677uab865736b96c4c0d@mail.gmail.com> > Perhaps you can generate a neutral version? HTML or PDF? > > http://www.secdat.com/NYPHP-2004.10.19.pdf > > > The final version of tonight's slides are available here: > > http://www.secdat.com/NYPHP-2004.10.19.odp The slideshow opens just fine on my system using OpenOffice 2 -- just fyi http://www.openoffice.org/ From abracadabra13 at gmail.com Fri Oct 27 10:18:24 2006 From: abracadabra13 at gmail.com (AbraCadab Ra) Date: Fri, 27 Oct 2006 10:18:24 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <453802B2.2070405@gmx.net> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> <007701c6f3a9$ec8f1360$6401a8c0@gamebox> <453802B2.2070405@gmx.net> Message-ID: <316533590610270718v439cc691ha3d5ac6a763fde00@mail.gmail.com> I had a similar issue and this is the solution i came up with. I have often wondered if this is the right way of doing it or not, but I'm by far not a PHP guru, just learning. before inserting into the database I encode the data using the htmlspecialchars() function. $encReq = htmlspecialchars($req, ENT_QUOTES); when I'm displaying it back to the user i had to use the following function to convert it back into HTML. function unhtmlspecialchars( $string ) { $string = str_replace ( '&', '&', $string ); $string = str_replace ( ''', '\'', $string ); $string = str_replace ( '"', '"', $string ); $string = str_replace ( '<', '<', $string ); $string = str_replace ( '>', '>', $string ); return $string; } This is something i came across after doing some reading though the PHP manual and some of the user comments on the subject. If anything knows of a more effective and efficient method, I'd love to know about it. Thanks, Yusuf. On 10/19/06, David Krings wrote: > > Hi, > > you can't display tab in HTML and the textarea box takes just plain > ASCII. So any fancy spacing, indenting or such will either be stripped > or shown as single spaces. And HTML also cannot display an arry of > simple white space. You would need to convert that to non-breaking > spaces. But isn't there a function that translates all kinds of things > to the equivalent HTML code? > > Ben Sgro (sk) wrote: > > Felix, > > > > Sure, that is helpful, but what about tabs, lists and all the other > > elements that could exist in an email message. > > I'm looking for a canned function or class that will do the work. > > > > Thanks. > > > > - Ben > > > > ....some code..... > > $details = str_replace("\n\r", "
", $cellSet[0]['info']); > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Fri Oct 27 10:27:37 2006 From: shiflett at php.net (Chris Shiflett) Date: Fri, 27 Oct 2006 10:27:37 -0400 Subject: [nycphp-talk] Textarea formatting In-Reply-To: <316533590610270718v439cc691ha3d5ac6a763fde00@mail.gmail.com> References: <005301c6f3a2$03612ef0$6401a8c0@gamebox> <007701c6f3a9$ec8f1360$6401a8c0@gamebox> <453802B2.2070405@gmx.net> <316533590610270718v439cc691ha3d5ac6a763fde00@mail.gmail.com> Message-ID: <45421759.1010909@php.net> AbraCadab Ra wrote: > before inserting into the database I encode the data using the > htmlspecialchars() function. > > $encReq = htmlspecialchars($req, ENT_QUOTES); > > when I'm displaying it back to the user i had to use the > following function to convert it back into HTML. Sounds like you're trying to write this: http://php.net/html_entity_decode When you think you need to remove the escaping from something, you're almost always doing something wrong. Escaping preserves data in another context, so if you ever need to remove it, it's a good indication that either you didn't need it in the first place, or you've chosen the wrong escaping function for a particular context (e.g., htmlspecialchars() for an SQL query). Hope that helps. Chris -- Chris Shiflett http://shiflett.org/ From codebowl at gmail.com Sun Oct 29 17:21:02 2006 From: codebowl at gmail.com (Joseph Crawford) Date: Sun, 29 Oct 2006 17:21:02 -0500 Subject: [nycphp-talk] PHP Throwdown Message-ID: <8d9a42800610291421g6824b4c0l6455c234c00d5d6e@mail.gmail.com> Guys, check this out it may be of interest to you. Please digg this so it get's to the front page and get's some exposure. I am still in the air as to whether or not i will join in but sounds fun ;) http://www.josephcrawford.com/2006/10/29/php-throwdown-you-got-what-it-takes/ -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tuon1 at netzero.net Mon Oct 30 18:21:24 2006 From: tuon1 at netzero.net (tuon1 at netzero.net) Date: Mon, 30 Oct 2006 23:21:24 GMT Subject: [nycphp-talk] Mysql question! Message-ID: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From edwardpotter at gmail.com Mon Oct 30 18:52:04 2006 From: edwardpotter at gmail.com (edward potter) Date: Mon, 30 Oct 2006 18:52:04 -0500 Subject: [nycphp-talk] Mysql question! In-Reply-To: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> References: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> Message-ID: The overhead of a table that you may not use is about zero. Why not just create the table and assume it's already there. That way you can forget the test all together. Just another crazy idea! :-) -ed On 10/30/06, tuon1 at netzero.net wrote: > > > Hi, everybody! > > I want to ask you all to help me out in solving my database question. > > Here is what I want to accomplish: > > I want to add my users, one by one, to my Mysql database via a registration > form. > > When a user fills out a registration form, my script should gather all the > information > > and add them to the database. I pretty much got all that part working, but I > want my > > script to check to see whether a table exists or not. If it doesn't exist, > my script > > should create a table and then proceed to add the information to the > database; > > and if it does exist, then it should not create one and proceed to use the > existed table. > > 1) Is there a php function that take care of this job that I can use? > > I tried to use: if exists(mytablename) > > but, it doesn't work. > > Here is my code: (some codes are left out for illustration purpose.) > > include("dbinfo.inc.php"); > class TableInfo > { > function _construct() //A Constructor > { > /* Initialize database */ > mysql_connect($localhost,$username,$password); > @mysql_select_db($database) or die( "Unable to select > database"); > if exists(!Customer_Info) //Here it doesn't work, error!!!! > { > $query = "CREATE TABLE Customer_Info > ( > FirstNameCol VARCHAR(15) NOT NULL, > LastNameCol VARCHAR(20) NOT NULL, > AddressCol VARCHAR(40) NOT NULL, > CityCol VARCHAR(20) NOT NULL, > StateCol VARCHAR(20) NOT NULL, > ZipCodeCol INT(5) NOT NULL, > AreaCodeCol INT(3) NOT NULL, > PhoneCol INT(15) NOT NULL, > EmailCol VARCHAR(30) NOT NULL, > LoginNameCol VARCHAR(20) NOT NULL, > PasswordCol VARCHAR(20) NOT NULL > )"; > mysql_query($query); > } > > //Add new customer to database > function AddNewCustomer($FirstName, $LastName, $Address, > $City, $State, $ZipCode, > $AreaCode, $Phone, $Email, > $WebsiteURL, $LoginName, $Password > ) > { > $query = 'INSERT INTO Customer_Info (FirstNameCol, > LastNameCol, AddressCol, CityCol, StateCol, > ZipCodeCol, AreaCodeCol, PhoneCol, > EmailCol, WebsiteURLCol, > LoginNameCol, PasswordCol > ) > VALUES ("'. $FirstName . '", "' . $LastName . '", > "' . $Address . '", "' . $City . '", > "' . $State . '", "' . $ZipCode . '", > "' . $AreaCode . '", "' . $Phone . '", > "' . $Email . '", > "' . $WebsiteURL . '", "' . $LoginName . '", > "' . SHA1($Password) . '")'; > } > > Feel free to correct my code and give suggestions for better techniques. > > Thanks! > > Paul > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > -- the Blog: http://www.utopiaparkway.com the Karma: http://www.coderswithconscience.com the Projects: http://flickr.com/photos/86842405 at N00/ the Store: http://astore.amazon.com/httpwwwutopic-20 From skyline at publicmine.com Mon Oct 30 18:57:14 2006 From: skyline at publicmine.com (Ben Sgro (sk)) Date: Mon, 30 Oct 2006 18:57:14 -0500 Subject: [nycphp-talk] Mysql question! References: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> Message-ID: <019301c6fc7f$20e48090$6401a8c0@gamebox> Hello Paul if exists(!Customer_Info) //Here it doesn't work, error!!!! Is 'Customer_Info' a constant? Otherwise I dont see how this works, its not a function (), its not a variable $..I'm not big on OOPHP some if that is some sorta construct ignore my message. - Ben ps: These are some wrappers I use to make my code simpler to look at. /* DBAS_MySQLConnect $sqlInfo is an array that holds values particular to the app this is used in. ex: $sqlInfo = array('databaseUser' => mysql, 'databasePass' => 's3cr3t'); */ function DBAS_MySQLConnect(&$db, $sqlInfo) { $cIp = $_SERVER["REMOTE_ADDR"]; $dbName = $sqlInfo['databaseUser']; $dbPass = $sqlInfo['databasePass']; $db = mysql_pconnect("", $dbName, $dbPass); if ( $db ) { error_log("DBAS: $cIp connected to mysql server"); } else { error_log("DBAS: error connecting to mysql server"); } } /* DBAS_MySQLUseDB */ function DBAS_MySQLUseDB($dbName, $db) { $res = mysql_select_db($dbName, $db); if ( $res ) { error_log("DBAS: using database $dbName"); } else { error_log("DBAS: cannot use database $dbName"); } } /* DBAS_MySQLQuery */ function DBAS_MySQLQuery($query, $db) { $result = mysql_query($query, $db); if ( !$result ) { $errorStr = mysql_error( $db ); $errorNum = mysql_errno( $db ); $errorStr = "error($errorStr):error no($errorNum)"; error_log("DBAS: MySQL $errorStr"); } return $result; } ----- Original Message ----- From: tuon1 at netzero.net To: talk at lists.nyphp.org Sent: Monday, October 30, 2006 6:21 PM Subject: [nycphp-talk] Mysql question! Hi, everybody! I want to ask you all to help me out in solving my database question. Here is what I want to accomplish: I want to add my users, one by one, to my Mysql database via a registration form. When a user fills out a registration form, my script should gather all the information and add them to the database. I pretty much got all that part working, but I want my script to check to see whether a table exists or not. If it doesn't exist, my script should create a table and then proceed to add the information to the database; and if it does exist, then it should not create one and proceed to use the existed table. 1) Is there a php function that take care of this job that I can use? I tried to use: if exists(mytablename) but, it doesn't work. Here is my code: (some codes are left out for illustration purpose.) From dmintz at davidmintz.org Mon Oct 30 21:06:45 2006 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 30 Oct 2006 21:06:45 -0500 (EST) Subject: [nycphp-talk] Mysql question! In-Reply-To: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> References: <20061030.152214.4551.1147273@webmail25.nyc.untd.com> Message-ID: On Mon, 30 Oct 2006, tuon1 at netzero.net wrote: > class TableInfo > { > function _construct() //A Constructor > { This isn't a propos of your question, but that ain't a constructor. You need two leading underscores: function __construct() { } --- David Mintz http://davidmintz.org/ En Nueva York el tr?nsito de la belleza a la desolaci?n sucede siempre expeditivamente, como si el principio universal de m?xima eficiencia hubiera aconsejado la supresi?n de gradaciones intermedias. -- Antonio Mu?oz Molina, Ventanas de Manhattan From cliff at pinestream.com Mon Oct 30 21:18:26 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Mon, 30 Oct 2006 21:18:26 -0500 Subject: [nycphp-talk] Processing, please wait logic flow question Message-ID: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> Many web sites display a "processing please wait" page after submitting an order, request, etc. and then display the final confirmation page when it's available. I'm confused by how that works. Does the server-side script spit out a "processing" page by flushing the output buffer and then redirect when the script is completed? Or does the client-side JavaScript display the "processing" page while the server script goes about its business? Cliff _______________________________ Pinestream Communications, Inc. Publisher of Semiconductor Times & Telecom Trends 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcech at phpwerx.net Mon Oct 30 22:01:07 2006 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 30 Oct 2006 22:01:07 -0500 Subject: [nycphp-talk] Processing, please wait logic flow question In-Reply-To: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> References: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> Message-ID: <4546BC73.3090901@phpwerx.net> Cliff Hirsch wrote: > Many web sites display a "processing please wait" page after submitting > an order, request, etc. and then display the final confirmation page > when it's available. > > I'm confused by how that works. Does the server-side script spit out a > "processing" page by flushing the output buffer and then redirect when > the script is completed? Or does the client-side JavaScript display the > "processing" page while the server script goes about its business? You can do this a few ways, depending on how involved you want to get. The simplest is just to use some javascript to replace the content of the current page with a 'processing....' message while the server does its business. This works pretty well but doesn't give the user any feedback about what's going on. The more complicated approach is to launch the actual processing script in the background, the refresh a 'processing...' page until it finishes. With this method you can show the status of the background task, but it takes a lot more effort to get it right (eg, using a wrapper script to allow communication between the 'backend' and 'frontend' scripts. I use both of these methods with good success, it really depends on the kind of task you are performing. That said, there are myriad other ways to achieve this, and I'm sure everyone on the list has their own favorite. Dan From dell at sala.ca Mon Oct 30 22:12:18 2006 From: dell at sala.ca (Dell Sala) Date: Mon, 30 Oct 2006 22:12:18 -0500 Subject: [nycphp-talk] Processing, please wait logic flow question In-Reply-To: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> References: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> Message-ID: <28E0211C-FF23-458A-AE5B-56733724A65A@sala.ca> Cliff, I believe the most common solution is to have the your processing script launch a sub-process to run in the background, and then return a response page that periodically refreshes (via javascript) to poll the server for some flag indicating that the process has completed. (Ex: checking for the existence of a file or something like that). You launch the sub-process using exec() or some other function in that family. http://us3.php.net/manual/en/ref.exec.php The trick with these functions is that the calling script halts when the function is called and waits for the sub-process to complete and return a result. You can prevent this by setting the sub-process to run in the background and redirecting its output (STDERR _and_ STDOUT) to go to a file (or nowhere). Here's an example: exec("php takes-a-long-time.php > /dev/null 2>&1 &"); takes-a-long-time.php would do something time-consuming, and when it completed, would deposit a file somewhere or add a line to a file to indicate that it was complete. There are lots of related comments in the user contributed notes on the exec page that I linked to above. I guess there are some potential problems with trying to do this on a windows server -- I've only done this on unix servers. The other gotcha I've run into is that that php goes CRAZY if you try this on a server that is running php as a CGI. If you call a php sub- process from a php page it goes into a recursive loop and eventually chokes. I'd be curious to hear if others have run into this problem. Any solutions? *** I believe there is another way to tackle this issue which involves some fancy output buffering. The page only partially downloads and then keeps the connection open while it waits for the rest of the script complete. Anyone else familiar with this technique? -- Dell On Oct 30, 2006, at 9:18 PM, Cliff Hirsch wrote: > Many web sites display a ?processing please wait? page after > submitting an order, request, etc. and then display the final > confirmation page when it?s available. > > I?m confused by how that works. Does the server-side script spit > out a ?processing? page by flushing the output buffer and then > redirect when the script is completed? Or does the client-side > JavaScript display the ?processing? page while the server script > goes about its business? > > Cliff From 1j0lkq002 at sneakemail.com Mon Oct 30 23:01:19 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 30 Oct 2006 20:01:19 -0800 Subject: [nycphp-talk] Processing, please wait logic flow question In-Reply-To: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> References: <000001c6fc92$d969eb60$12a8a8c0@HirschLaptop> Message-ID: <20690-13457@sneakemail.com> Cliff Hirsch cliff-at-pinestream.com |nyphp dev/internal group use| wrote: > Many web sites display a ?processing please wait? page after > submitting an order, request, etc. and then display the final > confirmation page when it?s available. > > I?m confused by how that works. Does the server-side script spit out a > ?processing? page by flushing the output buffer and then redirect when > the script is completed? Or does the client-side JavaScript display > the ?processing? page while the server script goes about its business? > > Cliff > I saw everything I wanted to know about this over on Joe's blog: http://www.josephcrawford.com/2006/09/28/php-upload-progress-extension-yay/ -=john andrews -- ------------------------------------------------------------- Some say "Science is fact. Religion is faith. Magic is perception". I wonder, if what you witness is not reality, but your perception of reality, do you trust your perceptions as truth? Does that make the so-called scientist a religious magician? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From tuon1 at netzero.net Mon Oct 30 23:03:43 2006 From: tuon1 at netzero.net (tuon1 at netzero.net) Date: Tue, 31 Oct 2006 04:03:43 GMT Subject: [nycphp-talk] Mysql question! Message-ID: <20061030.200427.13415.792063@webmail45.nyc.untd.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From ariel.kulkin at gmail.com Mon Oct 30 23:25:53 2006 From: ariel.kulkin at gmail.com (Ariel Kulkin) Date: Mon, 30 Oct 2006 23:25:53 -0500 Subject: [nycphp-talk] Passing parameters with the click of a button. Message-ID: <556034ce0610302025j10592888g2d2b1b41a61ef5bf@mail.gmail.com> Problem Statement: With the click of a button, I need to open a new window (to capture "user referrals"), and pass to it a parameter that will be used to track the user id of the individual who originated those referrals. I have no problems opening the window with the button click: I can't quite get the syntax, however, to pass the user_id parameter... How do I go about passing the user_id parameter to the newly open window? CODE: Do you know anybody who may benefit from using XYZ System?