From yury at heavenspa.com Tue Feb 1 11:48:58 2005 From: yury at heavenspa.com (Yury Rush) Date: Tue, 1 Feb 2005 11:48:58 -0500 Subject: [nycphp-talk] Help php on windows In-Reply-To: <8d9a42800501200845e331852@mail.gmail.com> Message-ID: Hi folks.. I have 2 servers I work on: - cobalt raq 3 - ensim redhat I wanted to install some type of php/apache/mySQL services on my laptop so i can hack up some php stuff.. Can someone make a recommendation of a bundle for windows XP which will work on both the platforms above.. I'm postive both have legacy issues ( php 4.xxx/mySQL 3.xxx ) etc.. so grabbing a bundle with the newest php/mySQL etc might be overkill plus result in certain issues not working once they get off the laptop and onto either one of the servers... I've used firepages in the past and really enjoyed it.. but the bundle was usually the newest stuff and i ran into the legacy issues... http://www.firepages.com.au/ any advice? regards yury From codebowl at gmail.com Tue Feb 1 12:00:24 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 1 Feb 2005 12:00:24 -0500 Subject: [nycphp-talk] Help php on windows In-Reply-To: References: <8d9a42800501200845e331852@mail.gmail.com> Message-ID: <8d9a4280050201090033e7c087@mail.gmail.com> XAMPP might be a possibility, not sure if they archive previous versions on thier site or not however i think they too use the latest stuff http://www.xampp.org -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From dmintz at davidmintz.org Tue Feb 1 12:52:10 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 1 Feb 2005 12:52:10 -0500 (EST) Subject: [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: References: <41FE648A.3090901@bitblit.net> Message-ID: I have squandered the last several minutes trying to determine how old dirt actually is, i.e., how long "dirt" itself has been in existence (on Earth). I know it's gotta be older than PHP. Perhaps one of you clever NYPHPistas you knows some geology can help us out. On Mon, 31 Jan 2005, John Nunez wrote: > It's better than RedHat Enterprise 3 which uses 4.2 (might be 4.3.1) > Anyway, I need to re-compile every time I install a RH ES box. > > Thanks, > John Nunez > > On Jan 31, 2005, at 1:38 PM, csnyder wrote: > > >> Yes indeed -- in some cases, Apache/PHP that is older than dirt. > >> Well, ok, > >> I exaggerate... > > > > No, you aren't exaggerating -- I think the default for 10.3 was PHP > > 4.3.6 > > The latest update from Apple ( 2005-001 ) finally bumped PHP to 4.3.10. --- David Mintz http://davidmintz.org/ "Don't let the liberal media tell you what to think and feel. If you have hatred in your heart, let it out." -- Clayton Bigsby, black white supremacist From hans at cyberxdesigns.com Tue Feb 1 13:11:48 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Tue, 01 Feb 2005 13:11:48 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: References: <41FE648A.3090901@bitblit.net> Message-ID: <41FFC664.3050304@cyberxdesigns.com> I think "dirt" is pretty old: Dirt: Middle English, variant of drit, /excrement, filth, mud/, from Old Norse. -- Hans C. Kaspersetz Cyber X Designs http://www.cyberxdesigns.com David Mintz wrote: >I have squandered the last several minutes trying to determine how old >dirt actually is, i.e., how long "dirt" itself has been in existence (on >Earth). I know it's gotta be older than PHP. > >Perhaps one of you clever NYPHPistas you knows some geology can help us >out. > > >On Mon, 31 Jan 2005, John Nunez wrote: > > > >>It's better than RedHat Enterprise 3 which uses 4.2 (might be 4.3.1) >>Anyway, I need to re-compile every time I install a RH ES box. >> >>Thanks, >>John Nunez >> >>On Jan 31, 2005, at 1:38 PM, csnyder wrote: >> >> >> >>>>Yes indeed -- in some cases, Apache/PHP that is older than dirt. >>>>Well, ok, >>>>I exaggerate... >>>> >>>> >>>No, you aren't exaggerating -- I think the default for 10.3 was PHP >>>4.3.6 >>>The latest update from Apple ( 2005-001 ) finally bumped PHP to 4.3.10. >>> >>> >--- >David Mintz >http://davidmintz.org/ > >"Don't let the liberal media tell you what to think >and feel. If you have hatred in your heart, let it out." > > -- Clayton Bigsby, black white supremacist >_______________________________________________ >New York PHP Talk >Supporting AMP Technology (Apache/MySQL/PHP) >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org > > > > > From dmintz at davidmintz.org Tue Feb 1 13:20:27 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 1 Feb 2005 13:20:27 -0500 (EST) Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: <41FFC664.3050304@cyberxdesigns.com> References: <41FE648A.3090901@bitblit.net> <41FFC664.3050304@cyberxdesigns.com> Message-ID: On Tue, 1 Feb 2005, Hans C. Kaspersetz wrote: > I think "dirt" is pretty old: > > Dirt: Middle English, variant of drit, /excrement, filth, mud/, from Old > Norse. No, not the word "dirt," but its referent -- the substance itself! (-: > > David Mintz wrote: > > >I have squandered the last several minutes trying to determine how old > >dirt actually is, i.e., how long "dirt" itself has been in existence (on > >Earth). I know it's gotta be older than PHP. > > > >Perhaps one of you clever NYPHPistas you knows some geology can help us > >out. --- David Mintz http://davidmintz.org/ "Don't let the liberal media tell you what to think and feel. If you have hatred in your heart, let it out." -- Clayton Bigsby, black white supremacist From rahmin at insite-out.com Tue Feb 1 13:24:13 2005 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Tue, 1 Feb 2005 13:24:13 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips Message-ID: <200502011824.j11IODUJ023126@webmail4.megamailservers.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From tgales at tgaconnect.com Tue Feb 1 13:56:47 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 1 Feb 2005 13:56:47 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips Message-ID: <200502011856.j11Iul024156@tgaconnect.com> > > > David Mintz wrote: > No, not the word "dirt," but its referent -- the substance itself! (-: > (how old is dirt?) Recent archaelogical investigations have shed some light on this question. Dirt was invented in Egypt around 6023 BC. Before this time farmers had to grow their crops directly on top of rocks, resulting in poor yields. The Egyptians discovered, quite accidentally during the construction of the Great Pyramids, that plants grow better in ground- up rock than on solid rock. This ground-up rock, which we now call "sand", was the first dirt. So successful was the idea that rock- grinding became a huge new industry in Egypt in only a decade. Too huge, in fact, and an industry-wide shakeout put nearly 80 percent of the rock-grinders out of business. Their excess stock can still be seen today in the Sahara Desert. What experts recognize as the first modern dirt was developed about 1000 years later in Assyria, when the eldest son of a struggling rock grinder named Zom (now called the "Father of Dirt") fell into the rock grinding machine. The resulting mix of sand and organic material proved to be far more potent as a plant growing medium, and the old-fashioned sand soon was obsolete. Unfortunately the Assyrian civiliation collapsed soon thereafter, what with all the children being ground up to make dirt, but in neighboring Babylon the idea was taken up and further developed. The Babylonians realized it wasn't necessary to grind up their own children; they could obtain equally good results simply by grinding up other people's children. This discovery paved the way for the Babylonian Empire. In Rome circa 2044 BC, inefficiencies in the collection and grinding of dead children led to the discovery of the next leap forward, compost. With this improvement, Roman dirt became the world standard, and it was produced with such efficiency that we still use it today. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From hans at cyberxdesigns.com Tue Feb 1 14:19:10 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Tue, 01 Feb 2005 14:19:10 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. Message-ID: <41FFD62E.9060603@cyberxdesigns.com> I am working on migrating a site from one server to another today. On the old server there were multiple domains pointing at one virtual site eg: www.domain.com, domain.com, www.domain.org and domain.org all point to the same virtual site and therefore the same content. (Duplicate content.) I am trying to devise a migration strategy that will include 301 redirects and DNS. Do the search engines handle A records and CNAME records differently? If www is a CNAME to domain.org, is that the same as two A records www.domain.org and domain.org as far as search engines are concerned? Is that subject to the duplicate content penalty? Do I need to create 2 distinct virtual sites one for www and one for domain.org and have one of them redirect to the other? Hans -- Hans C. Kaspersetz Cyber X Designs http://www.cyberxdesigns.com From 1j0lkq002 at sneakemail.com Tue Feb 1 14:23:27 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 01 Feb 2005 14:23:27 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: <200502011856.j11Iul024156@tgaconnect.com> References: <200502011856.j11Iul024156@tgaconnect.com> Message-ID: <32512-96621@sneakemail.com> Tim Gales tgales-at-tgaconnect.com |nyphp dev/internal group use| wrote: > > >>>>David Mintz wrote: >>>> >>>> > > > > >>No, not the word "dirt," but its referent -- the substance itself! (-: >> >> >> > (how old is dirt?) >Recent archaelogical investigations have shed some light on this >question. Dirt was invented in Egypt around 6023 BC. Before this time > > Hey Tim, thanks for the dirt on dirt. -=john From mitch.pirtle at gmail.com Tue Feb 1 14:25:41 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 1 Feb 2005 14:25:41 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <41FFD62E.9060603@cyberxdesigns.com> References: <41FFD62E.9060603@cyberxdesigns.com> Message-ID: <330532b605020111252c71609@mail.gmail.com> With apache you can use the Alias directive, meaning that anything pointed at an entry under Alias will get fed to the virtual host silently. You could also use redirects for each vhost, so everyone eventually learns where the consolidated site lives. -- Mitch On Tue, 01 Feb 2005 14:19:10 -0500, Hans C. Kaspersetz wrote: > I am working on migrating a site from one server to another today. On > the old server there were multiple domains pointing at one virtual site > eg: www.domain.com, domain.com, www.domain.org and domain.org all point > to the same virtual site and therefore the same content. (Duplicate > content.) I am trying to devise a migration strategy that will include > 301 redirects and DNS. > > Do the search engines handle A records and CNAME records differently? > If www is a CNAME to domain.org, is that the same as two A records > www.domain.org and domain.org as far as search engines are concerned? > Is that subject to the duplicate content penalty? Do I need to create 2 > distinct virtual sites one for www and one for domain.org and have one > of them redirect to the other? > > Hans > > -- > Hans C. Kaspersetz > Cyber X Designs > > http://www.cyberxdesigns.com > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From 1j0lkq002 at sneakemail.com Tue Feb 1 14:33:16 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 01 Feb 2005 14:33:16 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <41FFD62E.9060603@cyberxdesigns.com> References: <41FFD62E.9060603@cyberxdesigns.com> Message-ID: <1673-34608@sneakemail.com> Hans C. Kaspersetz hans-at-cyberxdesigns.com |nyphp dev/internal group use| wrote: > I am working on migrating a site from one server to another today. On > the old server there were multiple domains pointing at one virtual > site eg: www.domain.com, domain.com, www.domain.org and domain.org > all point to the same virtual site and therefore the same content. > (Duplicate content.) I am trying to devise a migration strategy that > will include 301 redirects and DNS. > Do the search engines handle A records and CNAME records differently? > If www is a CNAME to domain.org, is that the same as two A records > www.domain.org and domain.org as far as search engines are concerned? > Is that subject to the duplicate content penalty? Do I need to create > 2 distinct virtual sites one for www and one for domain.org and have > one of them redirect to the other? > > Hans I'd like to see what others have to say on this as well. An A record assigns an IP to the domain, so that's not the issue w/respect to search engines. Your issue is in the virtual hosting or C name/alias configuration. Your means of implementing a C name (alias) will determine if it is "appropriate" or not. For example I have seen cpanel implementations (older) deploying 302 redirects, and I have seen cpanel (newer) implementing c names as a transparent alias (Apache simply generates 200OK plus the site content), which appears to the search engines as a completely separate site (hence duplicate content). With a modern cpanel set the c name alias and then put a 301 in place at that location for each additional domain to feed the primary domain. I guess that is the same as you called "Do I need to create 2 distinct virtual sites one for www and one for domain.org and have one of them redirect to the other? ". That is what I do. It is always best to test and examine headers. Avoid 302's and if yu have multiple domains serving the same content make sure all but one are robots.txt for noindex (as a mirror). -=john andrews From chsnyder at gmail.com Tue Feb 1 14:48:16 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 1 Feb 2005 14:48:16 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <1673-34608@sneakemail.com> References: <41FFD62E.9060603@cyberxdesigns.com> <1673-34608@sneakemail.com> Message-ID: I can't see how A vs. CNAME records can possibly make a difference to crawlers. CNAME is simply a matter of convenience within DNS -- it allows you to change the IP address on one A record and have it apply to many hostnames. It has nothing to do with HTTP or Redirects at all. That said, all of John's comments apply at a higher level, which is where you should be concerned if multiple virtual hosts point to the same content. From andrew at plexpod.com Tue Feb 1 15:05:46 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Tue, 1 Feb 2005 15:05:46 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <1673-34608@sneakemail.com> References: <41FFD62E.9060603@cyberxdesigns.com> <1673-34608@sneakemail.com> Message-ID: <20050201200459.GQ12956@zoidberg.digitalpulp.com> On Tue, Feb 01, 2005 at 02:33:16PM -0500, inforequest wrote: > Hans C. Kaspersetz hans-at-cyberxdesigns.com |nyphp dev/internal group > use| wrote: > > >I am working on migrating a site from one server to another today. On > >the old server there were multiple domains pointing at one virtual > >site eg: www.domain.com, domain.com, www.domain.org and domain.org > >all point to the same virtual site and therefore the same content. > >(Duplicate content.) I am trying to devise a migration strategy that > >will include 301 redirects and DNS. > >Do the search engines handle A records and CNAME records differently? > >If www is a CNAME to domain.org, is that the same as two A records > >www.domain.org and domain.org as far as search engines are concerned? > >Is that subject to the duplicate content penalty? Do I need to create > >2 distinct virtual sites one for www and one for domain.org and have > >one of them redirect to the other? > > > >Hans > > > I'd like to see what others have to say on this as well. > > An A record assigns an IP to the domain, so that's not the issue > w/respect to search engines. Your issue is in the virtual hosting or C > name/alias configuration. > > Your means of implementing a C name (alias) will determine if it is > "appropriate" or not. For example I have seen cpanel implementations > (older) deploying 302 redirects, and I have seen cpanel (newer) > implementing c names as a transparent alias (Apache simply generates > 200OK plus the site content), which appears to the search engines as a > completely separate site (hence duplicate content). With a modern cpanel > set the c name alias and then put a 301 in place at that location for > each additional domain to feed the primary domain. I guess that is the > same as you called "Do I need to create 2 distinct virtual sites one for > www and one for domain.org and have one of them redirect to the other? > ". That is what I do. > > It is always best to test and examine headers. Avoid 302's and if yu > have multiple domains serving the same content make sure all but one are > robots.txt for noindex (as a mirror). > > -=john andrews I do something similar. I have all domains point an A record at the same IP, which normally would cause duplicate content. To solve that I have an include that goes in the my prepend of every site that looks something like: $Config['Hostname'] = 'www.somedomain.com' if ($_SERVER['HTTP_HOST'] != $Config['Hostname']) { Header("HTTP/1.1 301 Moved Permanently"); Header("Location: http://" . $Config['Hostname'] . $_SERVER['PHP_SELF'] . (StrLen($_SERVER['QUERY_STRING'])? "?".$_SERVER['QUERY_STRING'] : '')); exit(); } ... which ensures that the hostname being used to access the requested page is the one we want to be called by... "I'm not Drew, I'm Andrew!" I call this "hostname assertion". Regards, Andrew From dmintz at davidmintz.org Tue Feb 1 15:45:53 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 1 Feb 2005 15:45:53 -0500 (EST) Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: <200502011824.j11IODUJ023126@webmail4.megamailservers.com> References: <200502011824.j11IODUJ023126@webmail4.megamailservers.com> Message-ID: On Tue, 1 Feb 2005, Rahmin Pavlovic wrote: > > On Tue, 1 Feb 2005 13:20 , David Mintz sent: > > >No, not the word "dirt," but its referent -- the substance itself! (-: > > > > I've thought about this, and I can't mentally separate 'dirt' from 'the earth'. > So, assuming our planet was as torrential as venus, I would assume that 'dirt' > came into existence once the storms died down. Yeah, I would assume that the very early Earth is too hot for dirt to exist as such, and that it forms some time after things cool down, and that there's a technical term for that period -- a term one could throw around next time someone uses the expression "older than dirt" (-: --- David Mintz http://davidmintz.org/ "Don't let the liberal media tell you what to think and feel. If you have hatred in your heart, let it out." -- Clayton Bigsby, black white supremacist From jlacey at att.net Tue Feb 1 15:53:15 2005 From: jlacey at att.net (John Lacey) Date: Tue, 01 Feb 2005 13:53:15 -0700 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: References: <200502011824.j11IODUJ023126@webmail4.megamailservers.com> Message-ID: <41FFEC3B.4050005@att.net> I'm shocked, SHOCKED!! at all this dirt[y] talk on a family-oriented list :P David Mintz wrote: > On Tue, 1 Feb 2005, Rahmin Pavlovic wrote: > > >>On Tue, 1 Feb 2005 13:20 , David Mintz sent: >> >> >>>No, not the word "dirt," but its referent -- the substance itself! (-: >>> >> >>I've thought about this, and I can't mentally separate 'dirt' from 'the earth'. >>So, assuming our planet was as torrential as venus, I would assume that 'dirt' >>came into existence once the storms died down. > > > > Yeah, I would assume that the very early Earth is too hot for dirt to > exist as such, and that it forms some time after things cool down, and > that there's a technical term for that period -- a term one could throw > around next time someone uses the expression "older than dirt" (-: > From 1j0lkq002 at sneakemail.com Tue Feb 1 16:38:09 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 1 Feb 2005 16:38:09 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. Message-ID: <21503-89624@sneakemail.com> > Original Message: ----------------- From: Andrew Yochum andrew-at-plexpod.com |nyphp dev/internal group use| Date: Tue, 1 Feb 2005 15:05:46 -0500 To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Maybe [ot] Duplicate Content. I do something similar. I have all domains point an A record at the same IP, which normally would cause duplicate content. To solve that I have an include that goes in the my prepend of every site that looks something like: $Config['Hostname'] = 'www.somedomain.com' if ($_SERVER['HTTP_HOST'] != $Config['Hostname']) { Header("HTTP/1.1 301 Moved Permanently"); Header("Location: http://" . $Config['Hostname'] . $_SERVER['PHP_SELF'] . (StrLen($_SERVER['QUERY_STRING'])? "?".$_SERVER['QUERY_STRING'] : '')); exit(); } ... which ensures that the hostname being used to access the requested page is the one we want to be called by... "I'm not Drew, I'm Andrew!" I call this "hostname assertion". Regards, Andrew < Interesting to see PHP used to "bypass" Apache config...sort of (?) What I wonder is why this might be a good thing to do? It won't get called unless Apache says it belongs (hence you still have to set all the A records) and then this has to tell apache to redirect anyway (which it would have done if properly configured). Maybe I ammissing something or maybe it's like mountain climbing? -=john -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From kushner at gmail.com Tue Feb 1 18:41:54 2005 From: kushner at gmail.com (Daniel Kushner) Date: Tue, 1 Feb 2005 15:41:54 -0800 Subject: [nycphp-talk] Zend Studio and Server In-Reply-To: <7b65ded830927af35597745cdcbe368a@email.smith.edu> References: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358D69F09@network.PLMresearch.com> <20050126153328.73F2AA85F0@virtu.nyphp.org> <7ac626ed05012614183489a2e1@mail.gmail.com> <6D9DF9EA-700B-11D9-9C48-000D93B7E95A@cyber-ny.com> <7b65ded830927af35597745cdcbe368a@email.smith.edu> Message-ID: <7ac626ed05020115417dfd5308@mail.gmail.com> The OS X version will only be available with the final release - Feb 23rd. Best, Daniel On Thu, 27 Jan 2005 09:36:59 -0500, Aaron Fischer wrote: > I'll be interested in checking it out as well when it is available on > OS X. > > -Aaron > > On Jan 26, 2005, at 9:30 PM, John Nunez wrote: > > > When will the 4.0 Beta for Mac OS X come out? Just got an iBook for > > XMas and wanted to switch over. > > > > Thanks, > > John Nunez > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From mitch.pirtle at gmail.com Tue Feb 1 19:58:49 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue, 1 Feb 2005 19:58:49 -0500 Subject: [nycphp-talk] Mambo security patch released Message-ID: <330532b6050201165872badaf9@mail.gmail.com> Hi gang, Hope this isn't too off-topic, but there's plenty of Mambo users here and this is only to help - We just fixed a problem with sites that run with register_globals enabled, and it allows for a particularly nasty remote PHP injection attack to occur. You can get patches and a new release (4.5.1b) here: http://mamboforge.net/frs/?group_id=5 -- Mitch, with never a dull moment! From jeff at geeksociety.com Tue Feb 1 20:04:24 2005 From: jeff at geeksociety.com (Jeffrey O.Stevison) Date: Tue, 1 Feb 2005 19:04:24 -0600 Subject: [nycphp-talk] Zend Studio and Server In-Reply-To: <7ac626ed05020115417dfd5308@mail.gmail.com> References: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358D69F09@network.PLMresearch.com> <20050126153328.73F2AA85F0@virtu.nyphp.org> <7ac626ed05012614183489a2e1@mail.gmail.com> <6D9DF9EA-700B-11D9-9C48-000D93B7E95A@cyber-ny.com> <7b65ded830927af35597745cdcbe368a@email.smith.edu> <7ac626ed05020115417dfd5308@mail.gmail.com> Message-ID: OH NO. We have to wait three more weeks. Thats the pits. On Feb 1, 2005, at 5:41 PM, Daniel Kushner wrote: > The OS X version will only be available with the final release - Feb > 23rd. > > Best, > Daniel > > > On Thu, 27 Jan 2005 09:36:59 -0500, Aaron Fischer > wrote: >> I'll be interested in checking it out as well when it is available on >> OS X. >> >> -Aaron >> >> On Jan 26, 2005, at 9:30 PM, John Nunez wrote: >> >>> When will the 4.0 Beta for Mac OS X come out? Just got an iBook for >>> XMas and wanted to switch over. >>> >>> Thanks, >>> John Nunez >> >> _______________________________________________ >> New York PHP Talk >> Supporting AMP Technology (Apache/MySQL/PHP) >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org >> > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > Jeffrey O. Stevison Network Administrator/Software Engineer From matt at jiffycomp.com Tue Feb 1 22:36:48 2005 From: matt at jiffycomp.com (Matt Morgan) Date: Tue, 01 Feb 2005 22:36:48 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: References: <41FE648A.3090901@bitblit.net> <41FFC664.3050304@cyberxdesigns.com> Message-ID: <42004AD0.9010202@jiffycomp.com> David Mintz wrote: > >On Tue, 1 Feb 2005, Hans C. Kaspersetz wrote: > > > >>I think "dirt" is pretty old: >> >>Dirt: Middle English, variant of drit, /excrement, filth, mud/, from Old >>Norse. >> >> > >No, not the word "dirt," but its referent -- the substance itself! (-: > > > > >>David Mintz wrote: >> >> >> >>>I have squandered the last several minutes trying to determine how old >>>dirt actually is, i.e., how long "dirt" itself has been in existence (on >>>Earth). I know it's gotta be older than PHP. >>> >>>Perhaps one of you clever NYPHPistas you knows some geology can help us >>>out. >>> >>> Hey, I'm a geologist (by academic training, anyway). Dirt comes from rock. The oldest possible dirt would then be about 3.5 billion years old, since the oldest rocks on the planet are about that old; but any dirt formed that long ago would have become rock again at some point in its history. Given the periodicity of subduction/orogeny, probably no dirt ever gets to be more than a couple hundred million years old before being washed out to sea, sedimented to the ocean floor, and either compressed into sedimentary rock, or failing that, subducted and either remelted (becoming igneous rock upon cooling) or metamorphosed. Of course most dirt would turn into sedimentary rock much more quickly than that: sedimentary rocks form on scales on the order of hundreds of thousands to millions of years, rather than tens or hundreds of millions. There are places where, theoretically, dirt could last longer--I'm thinking of the trailing edges of the continental shields, like the east coasts of North and South America (among others). Those places are stable, at least until the worldwide pattern of plate tectonics collapses into some other pattern. That happens roughly every 500 million years or so (don't quote me on that--but I bet I'm right within a factor of 2). But really most dirt would get buried and turn into sedimentary rock relatively quickly, anyway. Thanks for asking!! --Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Tue Feb 1 22:42:23 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 01 Feb 2005 22:42:23 -0500 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: <42004AD0.9010202@jiffycomp.com> References: <41FE648A.3090901@bitblit.net> <41FFC664.3050304@cyberxdesigns.com> <42004AD0.9010202@jiffycomp.com> Message-ID: <10097-13276@sneakemail.com> Matt Morgan matt-at-jiffycomp.com |nyphp dev/internal group use| wrote: > dirt could last longer--I'm thinking of the trailing edges of the > continental shields, like the east coasts of North and South America > (among others). Those places are stable Yeah, East Coast dirt ROCKS! From jlacey at att.net Wed Feb 2 00:39:04 2005 From: jlacey at att.net (John Lacey) Date: Tue, 01 Feb 2005 22:39:04 -0700 Subject: [ot] [nycphp-talk] [frivolous re] MAMP setup tips In-Reply-To: <42004AD0.9010202@jiffycomp.com> References: <41FE648A.3090901@bitblit.net> <41FFC664.3050304@cyberxdesigns.com> <42004AD0.9010202@jiffycomp.com> Message-ID: <42006778.6020407@att.net> Matt Morgan wrote: > Hey, I'm a geologist (by academic training, anyway). Dirt comes from > rock. The oldest possible dirt would then be about 3.5 billion years > old, since the oldest rocks on the planet are about that old; but any > dirt formed that long ago would have become rock again at some point in > its history. > > Given the periodicity of subduction/orogeny, probably no dirt ever gets > to be more than a couple hundred million years old before being washed > out to sea, sedimented to the ocean floor, and either compressed into > sedimentary rock, or failing that, subducted and either remelted > (becoming igneous rock upon cooling) or metamorphosed. Of course most > dirt would turn into sedimentary rock much more quickly than that: > sedimentary rocks form on scales on the order of hundreds of thousands > to millions of years, rather than tens or hundreds of millions. > > There are places where, theoretically, dirt could last longer--I'm > thinking of the trailing edges of the continental shields, like the east > coasts of North and South America (among others). Those places are > stable, at least until the worldwide pattern of plate tectonics > collapses into some other pattern. That happens roughly every 500 > million years or so (don't quote me on that--but I bet I'm right within > a factor of 2). But really most dirt would get buried and turn into > sedimentary rock relatively quickly, anyway. > > Thanks for asking!! > > --Matt > One day, a Pretty Sharp Guy decided to ask God about some stories he'd heard. [PSG] umm... Hi God, what's happenin'? [G] The Usual... [PSG] Mind if I ask you a coupla questions? [G] Shoot, you've got the floor. [PSG] Is it true you can make stuff? [G] What kind of stuff do you mean? [PSG] You know, "stuff". o O (if he's God, he should know what I mean) [G] I know what you mean, but I like when people ask me specifics. [PSG] o O (how did he know what I was thinking?) [G] waits... [PSG] Well, I heard you can make things. Ants, bugs n' stuff like that. [G] This is True. [PSG] And bigger n' more complicated things like dogs and platypusses. [G] Well, I just slapped the platypus together real quick. [PSG] I even hear that you make donkeys. [G] Yep. [PSG] Donkeys are pretty stupid. I could probably make one myself. [G] You think? [PSG] Sure, it's just a matter of puttin' the ingredients together. It can't be THAT hard to do. [G] You're right. It's easy. [PSG] I think I'll just show you how it's done. (goes to get some dirt) [G] WAIT!! [PSG] What? [G] Get your own dirt. From danielc at analysisandsolutions.com Wed Feb 2 02:06:51 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 2 Feb 2005 02:06:51 -0500 Subject: [nycphp-talk] SecurityFocus Newsletter #284 Message-ID: <20050202070651.GA13158@panix.com> PHP Stuff in SecurityFocus Newsletter #284 ------------------------------------------ WoltLab Burning Board Lite Form Mail Script Cross-Site Scrip... http://www.securityfocus.com/bid/12199 WoltLab Burning Board Lite ADDENTRY.PHP SQL Injection Vulner... http://www.securityfocus.com/bid/12214 Invision Community Blog EID Parameter SQL Injection Vulnerab... http://www.securityfocus.com/bid/12205 Zeroboard DIR Parameter Remote File Include Vulnerabilities http://www.securityfocus.com/bid/12206 Zeroboard Multiple File Disclosure Vulnerabilities http://www.securityfocus.com/bid/12257 Zeroboard Print_Category.PHP Remote File Include Vulnerabili... http://www.securityfocus.com/bid/12258 PHPWind Board Remote File Include Vulnerability http://www.securityfocus.com/bid/12207 PRADO Page Parameter Remote File Include Vulnerability http://www.securityfocus.com/bid/12209 VideoDB Unspecified SQL Injection Vulnerability http://www.securityfocus.com/bid/12219 VideoDB Unspecified HTML Injection Vulnerability http://www.securityfocus.com/bid/12221 VideoDB Unauthorized Access Vulnerability http://www.securityfocus.com/bid/12224 SquirrelMail Vacation Plugin FTPFile Input Validation Vulner... http://www.securityfocus.com/bid/12222 BiTBOARD IMG BBCode Tag JavaScript Injection Vulnerability http://www.securityfocus.com/bid/12248 SGallery Module For PHPNuke SQL Injection Vulnerability http://www.securityfocus.com/bid/12249 IlohaMail Insecure Default Installation Information Disclosu... http://www.securityfocus.com/bid/12252 Horde Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/12255 MPM Guestbook Header Input Validation Vulnerability http://www.securityfocus.com/bid/12266 Siteman Page Parameter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12267 Other Things ------------ MySQL MaxDB WebAgent WebSQL Password Parameter Remote Buffer... http://www.securityfocus.com/bid/12265 -- 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 g8909183 at knight.fcu.edu.tw Wed Feb 2 03:36:34 2005 From: g8909183 at knight.fcu.edu.tw (lee) Date: Wed, 2 Feb 2005 16:36:34 +0800 Subject: [nycphp-talk] How to use the php_openssl_verify function Message-ID: <000d01c50902$4e44e650$8a19868c@educazb611iscs> Hi : This is my php program. I have some questions in line ?$ok = openssl_verify($datar, $signature, $pubkeyid);?. I don?t know how to extract the $data and $ signature value from my user certificate (04.pem). Please tell me how to do it. Thank you very much. Best regards Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From henry at beewh.com Wed Feb 2 11:02:46 2005 From: henry at beewh.com (Henry Ponce) Date: Wed, 2 Feb 2005 13:02:46 -0300 Subject: [nycphp-talk] question, need help Message-ID: <200502021302.46718.henry@beewh.com> Hello: I've been looking in google for a way to incorporate sound to my webpage. It is a chess page and I need to add a way for a player to "send" or "play" different noises while they play chess. Can anyone please point me in the right direction or tell me if I should use flash for this, or javascript, etc. Thank you very much. Henry From ajai at bitblit.net Wed Feb 2 11:12:55 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Wed, 02 Feb 2005 11:12:55 -0500 Subject: [nycphp-talk] question, need help In-Reply-To: <200502021302.46718.henry@beewh.com> References: <200502021302.46718.henry@beewh.com> Message-ID: <4200FC07.5020802@bitblit.net> Henry Ponce wrote: >Hello: > >I've been looking in google for a way to incorporate sound to my webpage. It >is a chess page and I need to add a way for a player to "send" or "play" >different noises while they play chess. > >Can anyone please point me in the right direction or tell me if I should use >flash for this, or javascript, etc. > You could use PHP to generate a different page depending on what a user clicks on but this would require a round-trip to the server for every change. I would say Flash is a better way to go in this case. -- Aj. Systems Administrator / Developer From mitch.pirtle at gmail.com Wed Feb 2 11:11:46 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Wed, 2 Feb 2005 11:11:46 -0500 Subject: [nycphp-talk] question, need help In-Reply-To: <200502021302.46718.henry@beewh.com> References: <200502021302.46718.henry@beewh.com> Message-ID: <330532b6050202081142441159@mail.gmail.com> I'd say an attractive idea would be to create a flash animation that allowed one to select what music/sounds to hear, and toggle that sound on/off. This would degrade gracefully, as folks with flash turned off wouldn't see any errors IIRC. -- Mitch On Wed, 2 Feb 2005 13:02:46 -0300, Henry Ponce wrote: > Hello: > > I've been looking in google for a way to incorporate sound to my webpage. It > is a chess page and I need to add a way for a player to "send" or "play" > different noises while they play chess. > > Can anyone please point me in the right direction or tell me if I should use > flash for this, or javascript, etc. From codebowl at gmail.com Wed Feb 2 12:08:11 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Feb 2005 12:08:11 -0500 Subject: [nycphp-talk] PHP5 Static Classes Message-ID: <8d9a428005020209086d8b80d9@mail.gmail.com> Can anyone here explain or point me to a good description of what a static class is. My assumption is that it is an instance of a class that will be available for many users on the site, say user a goes to the site, they can use the static class, it increments users to 3 then user a leaves the site, the object still exists, user b goes to the site and it increments users to 4 etc... i have been told by a few people that static classes are only static while that one user is on the site, so each user get's thier own static object. here is what i am thinking. I have been wanting to create an online game such as worldofhatred.com and pimpkane.com but i wanted to make my game much more in depth and maybe create a framework that can be used for many games at one time. the underlying engine would need to be a static class so that it could keep track of how many players are playing, game settings etc... if the object is created with each user visit this will not work, however if it is created when the very first person goes to the site and stays going after the very last person leaves (basically until i tell it to destroy) then this could work -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From tgales at tgaconnect.com Wed Feb 2 12:12:05 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 2 Feb 2005 12:12:05 -0500 Subject: [nycphp-talk] question, need help Message-ID: <200502021712.j12HC5x20877@tgaconnect.com> Henry Ponce writes: > I've been looking in google for a way to incorporate sound to my webpage. It is a chess page and I need to add a way for a player to "send" or "play" different noises while they play chess. > > Can anyone please point me in the right direction or tell me if I > should use flash for this, or javascript, etc. Are you building a decision making system in PHP? (otherwise I don't see what this has to do with this list) Anyway -- there are lots of javascripts out there. e.g. http://javascript.internet.com/games/javascript-chess-with-cpu-oppo.html T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From danielc at analysisandsolutions.com Wed Feb 2 13:20:35 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 2 Feb 2005 13:20:35 -0500 Subject: [nycphp-talk] PHP5 Static Classes In-Reply-To: <8d9a428005020209086d8b80d9@mail.gmail.com> References: <8d9a428005020209086d8b80d9@mail.gmail.com> Message-ID: <20050202182034.GA5008@panix.com> Joseph: On Wed, Feb 02, 2005 at 12:08:11PM -0500, Joseph Crawford wrote: > Can anyone here explain or point me to a good description of what a > static class is. I didn't read your whole inquiry, but let's answer what I think you're asking. Static has to do with how it can be used. In object oriented programming, when using a class, one normally instantiates a class into an object variable, like this: $o = new SomeClass(); $o->someMethod(); But, when a class is being used statically, you can use the method directly: SomeClass::someMethod(); But, be aware that functionality is limited when using classes statically because $this is not available inside the methods. http://us3.php.net/manual/en/language.oop5.static.php --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From henry at beewh.com Wed Feb 2 13:43:39 2005 From: henry at beewh.com (Henry Ponce) Date: Wed, 2 Feb 2005 15:43:39 -0300 Subject: [nycphp-talk] question, need help In-Reply-To: <200502021712.j12HC5x20877@tgaconnect.com> References: <200502021712.j12HC5x20877@tgaconnect.com> Message-ID: <200502021543.39649.henry@beewh.com> Of course it is PHP, otherwise I wouldn't have posted. The whole chess site is in PHP. Henry On Wednesday 02 February 2005 14:12, Tim Gales wrote: > Henry Ponce writes: > > I've been looking in google for a way to incorporate sound to my > > webpage. It is a chess page and I need to add a way for a player > to "send" or "play" different noises while they play chess. > > > Can anyone please point me in the right direction or tell me if I > > should use flash for this, or javascript, etc. > > Are you building a decision making system in PHP? > (otherwise I don't see what this has to do with this list) > > Anyway -- there are lots of javascripts out there. > e.g. > http://javascript.internet.com/games/javascript-chess-with-cpu-oppo.html > > > T. Gales & Associates > 'Helping People Connect with Technology' > > http://www.tgaconnect.com > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From dcech at phpwerx.net Wed Feb 2 14:07:47 2005 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 02 Feb 2005 14:07:47 -0500 Subject: [nycphp-talk] PHP5 Static Classes In-Reply-To: <8d9a428005020209086d8b80d9@mail.gmail.com> References: <8d9a428005020209086d8b80d9@mail.gmail.com> Message-ID: <42012503.5050607@phpwerx.net> Joseph Crawford wrote: > I have been wanting to create an online game such as worldofhatred.com > and pimpkane.com but i wanted to make my game much more in depth and > maybe create a framework that can be used for many games at one time. Fair enough. > the underlying engine would need to be a static class so that it could > keep track of how many players are playing, game settings etc... This is what a database is for. > if the object is created with each user visit this will not work, > however if it is created when the very first person goes to the site > and stays going after the very last person leaves (basically until i > tell it to destroy) then this could work All you need to do is store the data you want to be global in the database and access it from each client. So long as you write your SQL to avoid problems with concurrent users this will work 100% fine. Dan From patrick.fee at baesystems.com Wed Feb 2 14:12:24 2005 From: patrick.fee at baesystems.com (Fee, Patrick J (US SSA)) Date: Wed, 2 Feb 2005 14:12:24 -0500 Subject: [nycphp-talk] Virtual Box Office Modules or Open Source App? Message-ID: <728813C3358BF04CB3A3DA2341D44A71015E61C0@e2k11.na.baesystems.com> Fellow PHP Folk, I've seen postings for shopping carts and online catalogs in the past. I've just been asked for something similar, but with a twist. I have a new client who is a theatre with a very small budget. They have recently gotten credit card set up through a local bank and want to sell tickets online. The current web host already has a certificate so there is no cost associated with secure https access to certain pages in the existing site. They want to collect orders and run cc's manually with their new cc machine. As all seats are General Admission, there is no need for immediate cc processing online. So... does anyone know of an open source, or low cost, app or module (e.g.Xoops) that I could set up and make appropriate cosmetic changes? The budget is so small I can't see many billable hours here. As always, your input is greatly appreciated, PJF Patrick J. Fee 901 D. St, SW. Suite 850 Washington, DC. 20024 202-646-5858 (desk) 240-401-6820 (cell) Patrick.Fee at BAESystems.com From john at cyber-ny.com Wed Feb 2 14:43:49 2005 From: john at cyber-ny.com (John Nunez) Date: Wed, 2 Feb 2005 14:43:49 -0500 Subject: [nycphp-talk] Virtual Box Office Modules or Open Source App? In-Reply-To: <728813C3358BF04CB3A3DA2341D44A71015E61C0@e2k11.na.baesystems.com> References: <728813C3358BF04CB3A3DA2341D44A71015E61C0@e2k11.na.baesystems.com> Message-ID: <018da499866fff4f8ddcdf9e2ab7b070@cyber-ny.com> Hey Patrick, You can try osCommerce. You might need to setup each show as a product and then stock count to maximum seating per show. I have heard about Mambo's PHPShop? But I haven't tried it yet. Thanks, John Nunez Cyber-NY Interactive 212-475-2721 www.cyber-ny.com john at cyber-ny.com On Feb 2, 2005, at 2:12 PM, Fee, Patrick J (US SSA) wrote: > Fellow PHP Folk, > > I've seen postings for shopping carts and online catalogs in the past. > I've just been asked for something similar, but with a twist. > > I have a new client who is a theatre with a very small budget. They > have recently gotten credit card set up through a local bank and want > to sell tickets online. > > The current web host already has a certificate so there is no cost > associated with secure https access to certain pages in the existing > site. > > They want to collect orders and run cc's manually with their new cc > machine. As all seats are General Admission, there is no need for > immediate cc processing online. > > So... does anyone know of an open source, or low cost, app or module > (e.g.Xoops) that I could set up and make appropriate cosmetic changes? > The budget is so small I can't see many billable hours here. > > As always, your input is greatly appreciated, > > PJF > > Patrick J. Fee > 901 D. St, SW. Suite 850 > Washington, DC. 20024 > 202-646-5858 (desk) > 240-401-6820 (cell) > Patrick.Fee at BAESystems.com > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From matt at jobsforge.com Wed Feb 2 17:20:22 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 2 Feb 2005 17:20:22 -0500 Subject: [nycphp-talk] PHP5 Static Classes In-Reply-To: <20050202182034.GA5008@panix.com> References: <8d9a428005020209086d8b80d9@mail.gmail.com> <20050202182034.GA5008@panix.com> Message-ID: <46a6c72c99446a87a43e4e7f79085160@jobsforge.com> On Feb 2, 2005, at 1:20 PM, Daniel Convissor wrote: > But, when a class is being used statically, you can use the method > directly: > > SomeClass::someMethod(); > > But, be aware that functionality is limited when using classes > statically > because $this is not available inside the methods. It may help (or not) to think of these objects and methods like static web pages, being the same for everyone. Which is why you can't use $this, because it is not particular to an instance of the object, but to the whole class of objects. Likewise, static methods do not operate on an instance Object->method(); but as shown in the previous post above, and often taking some action on a parameter fed to the method like this worthless example class MyMathClass { ?? public static function squareroot($num) { ?? ? ? return sqrt($num); ?? } } MyMathClass::squareroot(4); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2677 bytes Desc: not available URL: From codebowl at gmail.com Wed Feb 2 17:25:07 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 2 Feb 2005 17:25:07 -0500 Subject: [nycphp-talk] PHP5 Static Classes In-Reply-To: <46a6c72c99446a87a43e4e7f79085160@jobsforge.com> References: <8d9a428005020209086d8b80d9@mail.gmail.com> <20050202182034.GA5008@panix.com> <46a6c72c99446a87a43e4e7f79085160@jobsforge.com> Message-ID: <8d9a428005020214254e8c46d3@mail.gmail.com> my question is how long will the object reside on the server though? i understand that the object is the same for all users, but what if the site has 0 users, does the object still exist? does it still retain all the information? when another visitor comes, does it continue to use that instance or create a new instance -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From adam at trachtenberg.com Wed Feb 2 17:38:25 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 2 Feb 2005 17:38:25 -0500 (EST) Subject: [nycphp-talk] PHP5 Static Classes In-Reply-To: <8d9a428005020214254e8c46d3@mail.gmail.com> References: <8d9a428005020209086d8b80d9@mail.gmail.com> <20050202182034.GA5008@panix.com> <46a6c72c99446a87a43e4e7f79085160@jobsforge.com> <8d9a428005020214254e8c46d3@mail.gmail.com> Message-ID: On Wed, 2 Feb 2005, Joseph Crawford wrote: > my question is how long will the object reside on the server though? You are confused. Static objects are constant within the request, but they do not persist between requests. > i understand that the object is the same for all users, but what if > the site has 0 users, does the object still exist? does it still > retain all the information? when another visitor comes, does it > continue to use that instance or create a new instance A new instance. Here is a better way of thinking of static in an OO context. Static properties are similar to namespaced global variables; static methods are similar to namespaced functions. You can refer to them anywhere within a script without worrying that they might vary from instance to instance. (i.e. based on specific instance data.) You cannot set a value in one request and then access it in a second one. As Dan says, that's what a database is for. -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 Consult at CovenantEDesign.com Wed Feb 2 19:02:50 2005 From: Consult at CovenantEDesign.com (Edward) Date: Wed, 2 Feb 2005 19:02:50 -0500 Subject: [nycphp-talk] OSC Download module References: <200502011856.j11Iul024156@tgaconnect.com> Message-ID: <000501c50983$b42a3d40$45896e41@ced> I'm just about done wrapping up a face lift on OSC. But whenever the a person tries to purchase an MP3 they get a windows dialog error pop-up that says "can not download file *********************** from www.lofjbooks.com, unable to connect to site" Or something to that extent. I've gone ve the fils for downloading an nothign seems corrupted or wrong, I've vaied myself to http:forums.oscommerce.com and have had no luck either, so if anyone is well vers ith OSC ould you point me in the direcion I should be looking to diagnose this problem. -Edward P.S. the downloads were working fine three weeks ago, heh. From krook at us.ibm.com Wed Feb 2 19:49:49 2005 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 2 Feb 2005 19:49:49 -0500 Subject: [nycphp-talk] Configuring IBM HTTP Server with PHP 5 (LAMP/J2EE box) Message-ID: Hey folks, I've put together a walk through on configuring an existing IBM HTTP Server - WebSphere Application Server - DB2 UDB Enterprise Server Edition installation to work with PHP 5. For good measure, I added a little MySQL 4.1 configuration as well. Configuring PHP 5 with IBM HTTP Server, WebSphere Application Server, and DB2 UDB http://krook.net/os/php-ihs-websphere-db2-mysql.txt I was surprised that this all went down pretty smoothly, but since IHS is really Apache under the hood, I guess it was always easy to do, though no Googling fetched results on anyone else who went through the process. Hopefully this helps out others looking to set up an all-in-one LAMP/J2EE development box. The tutorial assumes that you have a Linux box already set up with IHS, WAS, DB2 and MySQL which all have pretty good installation instructions from their respective sources. Please let me know if you have any improvements I can make on any part of this. Thanks, -Dan Daniel Krook, Application Developer WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From chsnyder at gmail.com Wed Feb 2 19:56:57 2005 From: chsnyder at gmail.com (csnyder) Date: Wed, 2 Feb 2005 19:56:57 -0500 Subject: [nycphp-talk] Configuring IBM HTTP Server with PHP 5 (LAMP/J2EE box) In-Reply-To: References: Message-ID: my favorite step: > 2. Expand the Environment twistie. Is there a patent on that? From krook at us.ibm.com Wed Feb 2 20:00:47 2005 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 2 Feb 2005 20:00:47 -0500 Subject: [nycphp-talk] Configuring IBM HTTP Server with PHP 5 (LAMP/J2EE box) In-Reply-To: Message-ID: > my favorite step: > >> 2. Expand the Environment twistie. > > Is there a patent on that? I've already filed for it :) Daniel Krook, Application Developer WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From andrew at plexpod.com Wed Feb 2 22:20:22 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Wed, 2 Feb 2005 22:20:22 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <21503-89624@sneakemail.com> References: <21503-89624@sneakemail.com> Message-ID: <20050203032010.GH18603@desario.homelinux.net> On Tue, Feb 01, 2005 at 04:38:09PM -0500, inforequest wrote: > > > Original Message: > ----------------- > From: Andrew Yochum andrew-at-plexpod.com |nyphp dev/internal group use| > Date: Tue, 1 Feb 2005 15:05:46 -0500 > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Maybe [ot] Duplicate Content. > I do something similar. I have all domains point an A record at the > same IP, which normally would cause duplicate content. To solve that I > have an include that goes in the my prepend of every site that looks > something like: > > $Config['Hostname'] = 'www.somedomain.com' > > if ($_SERVER['HTTP_HOST'] != $Config['Hostname']) { > Header("HTTP/1.1 301 Moved Permanently"); > Header("Location: http://" . $Config['Hostname'] . > $_SERVER['PHP_SELF'] . (StrLen($_SERVER['QUERY_STRING'])? > "?".$_SERVER['QUERY_STRING'] : '')); > exit(); > } > > ... which ensures that the hostname being used to access the requested > page is the one we want to be called by... "I'm not Drew, I'm Andrew!" > I call this "hostname assertion". > > Regards, > Andrew > < > > Interesting to see PHP used to "bypass" Apache config...sort of (?) > > What I wonder is why this might be a good thing to do? It won't get called > unless Apache says it belongs (hence you still have to set all the A > records) and then this has to tell apache to redirect anyway (which it > would have done if properly configured). There are quite a few reasons why I don't let Apache do this. Its extremely useful in various situations and for various reasons. In general, its a consistent method that works for me and its part of my usual framework. If you're on a shared host, you don't always have control over Apache. For instance, as you pointed out earlier newer CPanel versions park domains w/ an A record pointed at the same IP, creating dupe content. On a dedicated box w/ control of Apache you might still use this to allow less technical people to have a method of managing requested URLs, add new domains on-the-fly (you actually don't need to have it configed in Apache if there is only one site on the box), etc. Having a more complex version than the simple example above lets you manage how these alternate domains are handled - either by redirecting to the same desired domain with the same requested path & query string, or maybe to a specific page. Think of a site called paintstore.com who buys latexpaint.com and wants the latter to redirect to paintstore.com/latex - easily managed if its all handled by your PHP application. Or, paintstore.com buys paint.com and wants to convert that to their main domain. This is a challenge to perform properly to maintain your SEP. You can even transition a user's session between old and new domain so that there is no interruption for users at the time of the cutover. If you have code in there to inspect and manage the requested URLs you can globally implement 301s, create hooks, etc. Let your imagination go. There is a lot more power in having PHP in there than just Apache, IMO. Sure, some of this can be done in mod rewrite. And I do use some mod rewrite stuff to complement this and even have some PHP to manage mod rewrite rules. Your thoughts on this? > Maybe I ammissing something or maybe it's like mountain climbing? Well, I don't know about mountain climbing. Maybe its like taking the road less traveled? Regards, Andrew From 1j0lkq002 at sneakemail.com Thu Feb 3 00:39:41 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 03 Feb 2005 00:39:41 -0500 Subject: [nycphp-talk] Maybe [ot] Duplicate Content. In-Reply-To: <20050203032010.GH18603@desario.homelinux.net> References: <21503-89624@sneakemail.com> <20050203032010.GH18603@desario.homelinux.net> Message-ID: <29283-80124@sneakemail.com> Andrew Yochum andrew-at-plexpod.com |nyphp dev/internal group use| wrote: > If you have code in there to inspect and manage the > >requested URLs you can globally implement 301s, create hooks, etc. Let >your imagination go. There is a lot more power in having PHP in there >than just Apache, IMO. > > > Absolutely. Not only do I agree, but I practice it to a much greater extreme than your example. I just wondered why you did it your way, since you didn't go to as far an extreme, and you have to configure the Apache directories anyway. >Sure, some of this can be done in mod rewrite. And I do use some mod >rewrite stuff to complement this and even have some PHP to manage mod >rewrite rules. > >Your thoughts on this? > > I avoid mod rewrite whenever possible because it is just that - re-writing. Via PHP, you can "write" correctly, and avoid having to "re-write what you wrote". The big IF is IF you have total control over all aspects of the site. IF you do, you can do amazing things. IF you do not, you may end up rewriting. Of course it must be driven by strategy. The power is in having a clear strategy when the site is conceptualized, so that the architecture can be designed to support the objectives. I don't know of too many business objectives that are directly met with a "design the look and feel of the display of the content and then code a back end to support it" approach. That's bass ackwards. So is "code a back end to serve up the data we will need on each page, and then design the display of that data" approach. Both cases for some reason assume as a requirement that the site must be made of interlinked pages which are rendered at run time as a linear combination of content and style. That may have been the case in 1996 but it is not the case for most business websites today. Neither considers the user interaction with the site data or pages to be the primary factor to accommodate, and especially when that "user" is a search engine. As you suggested, if you can free yourself from that restrictive mindset, all sorts of possibilities come into view. >>Maybe I ammissing something or maybe it's like mountain climbing? >> >> > >Well, I don't know about mountain climbing. Maybe its like taking the >road less traveled? > > I meant the old "why do you climb the mountain?".. "because it is there" thing. -=john andrews From tgales at tgaconnect.com Thu Feb 3 06:46:33 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 3 Feb 2005 06:46:33 -0500 Subject: [nycphp-talk] Configuring IBM HTTP Server with PHP 5 (LAMP/J2EE box) In-Reply-To: Message-ID: <001a01c509e6$02561090$d0893818@oberon1> Daniel Krook writes: > I've put together a walk through on configuring an existing IBM HTTP > Server - WebSphere Application Server - DB2 UDB Enterprise > Server Edition > Please let me know if you have any improvements I can make on > any part of this. You might want to mention (as a reminder) that you can optionally run 'make test' in step 6. of section II. I liked the reminder to run 'apachectl configtest' to make sure that no errors have crept into the Apache config file. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From krook at us.ibm.com Thu Feb 3 13:58:06 2005 From: krook at us.ibm.com (Daniel Krook) Date: Thu, 3 Feb 2005 13:58:06 -0500 Subject: [nycphp-talk] Configuring IBM HTTP Server with PHP 5 (LAMP/J2EE box) In-Reply-To: <001a01c509e6$02561090$d0893818@oberon1> Message-ID: > You might want to mention (as a reminder) that you can optionally > run 'make test' in step 6. of section II. Tim, Thanks for the tip, I've added that to the document. Daniel Krook, Application Developer WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From matt at jobsforge.com Thu Feb 3 21:12:50 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Thu, 3 Feb 2005 21:12:50 -0500 Subject: [nycphp-talk] PHP popularity vs. strength Message-ID: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> Quick story: I work for a local newspaper website, but we are a big News Corporation. Lots of money and lots of Java technology. We are about a month behind schedule for a launch of a hosted obituaries solution with an outside vendor. The IT department was working on a feed script. I asked how it was going. "We are really busy. we may have to hire someone from outside to write it. " I heard this as "it's tougher than I thought, I don't know regular expressions very well." I don't know this worker well, though I heard he is a Solaris snob. (I have nothing against Solaris, only his disregard for FreeBSD and Linux) "Do you want to take a look at it?" they asked. "Okay, " I said, "what platform is it running on.?" "Unix or Mac OS X." (lots of Macs in the Printing business) That was at ten a.m. By the time I left, PHP had it working. I probably could have done it without preg_match , but I used it anyway as it made it more flexible. Now I probably saved the company a thousand dollars, the IT project manager a headache, and myself some drudgery, since we upload the obits manually every day till this gets launched. But I won't even get a free lunch. It's running on an OS X server, so PHP was installed already. I saw the IT director. "hey, did you hear about that script I wrote for you guys? blah blah" "really, what did you write it in?" "PHP." "What's that?" "OOooh that hurts." From 1j0lkq002 at sneakemail.com Thu Feb 3 21:15:59 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 03 Feb 2005 21:15:59 -0500 Subject: [nycphp-talk] PHP popularity vs. strength In-Reply-To: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> References: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> Message-ID: <27612-23772@sneakemail.com> Matthew Terenzio matt-at-jobsforge.com |nyphp dev/internal group use| wrote: > It's running on an OS X server, so PHP was installed already. > I saw the IT director. > "hey, did you hear about that script I wrote for you guys? blah blah" > "really, what did you write it in?" > "PHP." > "What's that?" "Personal Home Page" lol Thanks for sharing the story, and congrats on succeeding in the trenches. -=john andrews From rrust at r2communications.com Thu Feb 3 21:24:14 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 03 Feb 2005 21:24:14 -0500 Subject: [nycphp-talk] PHP popularity vs. strength References: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> Message-ID: <4202DCCE.6070709@r2communications.com> Matthew Terenzio wrote: > I work for a local newspaper website, but we are a big News Corporation. > Lots of money and lots of Java technology. I work for a big IT consultant, and we are 98% a Java shop. About two years ago, I turned one of our guys onto PHP. He loves it. He's always complaining now about how he can do things in 2-3 lines of PHP that take so much more effort in frameworks like Struts. -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From dmintz at davidmintz.org Thu Feb 3 22:01:08 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 3 Feb 2005 22:01:08 -0500 (EST) Subject: [nycphp-talk] MercuryBoard: opinions? Message-ID: Does anyone have anything to say about MercuryBoard (http://www.mercuryboard.com/)? I've been playing with it. Some aspects of the UI seem a little obtuse, but it certainly feels fast. I've found a couple of security issues in my googling, but they were reportedly addressed in the latest version. Judging from their website it appears they are completely delighted with themselves, but ain't nothing wrong with that (-: --- David Mintz http://davidmintz.org/ "Don't let the liberal media tell you what to think and feel. If you have hatred in your heart, let it out." -- Clayton Bigsby, black white supremacist From shiflett at php.net Fri Feb 4 01:32:27 2005 From: shiflett at php.net (Chris Shiflett) Date: Thu, 3 Feb 2005 22:32:27 -0800 (PST) Subject: [nycphp-talk] Spoofing Forms Message-ID: <20050204063227.21944.qmail@web52801.mail.yahoo.com> I saw a reference to this on another site: http://education.nyphp.org/phundamentals/PH_spoofed_submission.php Actually, I saw it quoted, and here is the part that was quoted: -- One implementation would be to store the secret in the user's session: $secret = md5(time()); $_SESSION['secret'] = $secret; -- Yikes! That sure is a weak secret. I'm sure the date for edits has passed, but would anyone mind if we changed this to the following? $secret = md5(uniqid(rand(), true)); Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ From chsnyder at gmail.com Fri Feb 4 08:25:05 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 4 Feb 2005 08:25:05 -0500 Subject: [nycphp-talk] PHP popularity vs. strength In-Reply-To: <4202DCCE.6070709@r2communications.com> References: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> <4202DCCE.6070709@r2communications.com> Message-ID: Don't worry, Matthew -- someday they'll find a Java application that they can write in one day, and then you can take *them* to lunch. From lists at zaunere.com Fri Feb 4 10:38:22 2005 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 4 Feb 2005 10:38:22 -0500 Subject: [nycphp-talk] PHP popularity vs. strength In-Reply-To: <2b8737e830d5bdcfc16b0e5127942bbe@jobsforge.com> Message-ID: <20050204153407.9A89799B2@mailrelay.t-mobile.com> That's a great story; another example of simple sometimes is better. H > -----Original Message----- > From: Matthew Terenzio [mailto:matt at jobsforge.com] > Sent: Thursday, February 03, 2005 9:13 PM > To: NYPHP Talk > Subject: [nycphp-talk] PHP popularity vs. strength > > Quick story: > > I work for a local newspaper website, but we are a big News > Corporation. Lots of money and lots of Java technology. > > We are about a month behind schedule for a launch of a hosted > obituaries solution with an outside vendor. > > The IT department was working on a feed script. I asked how it was > going. > > "We are really busy. we may have to hire someone from outside to write > it. " > I heard this as "it's tougher than I thought, I don't know regular > expressions very well." > I don't know this worker well, though I heard he is a Solaris snob. (I > have nothing against Solaris, only his disregard for FreeBSD and Linux) > > "Do you want to take a look at it?" they asked. > "Okay, " I said, "what platform is it running on.?" > "Unix or Mac OS X." (lots of Macs in the Printing business) > > That was at ten a.m. > By the time I left, PHP had it working. > I probably could have done it without preg_match , but I used it anyway > as it made it more flexible. > > Now I probably saved the company a thousand dollars, the IT project > manager a headache, and myself some drudgery, since we upload the obits > manually every day till this gets launched. > > But I won't even get a free lunch. > > It's running on an OS X server, so PHP was installed already. > I saw the IT director. > "hey, did you hear about that script I wrote for you guys? blah blah" > "really, what did you write it in?" > "PHP." > "What's that?" > > "OOooh that hurts." > > > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From ajai at bitblit.net Fri Feb 4 10:42:31 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Fri, 04 Feb 2005 10:42:31 -0500 Subject: [nycphp-talk] PHP popularity vs. strength In-Reply-To: <20050204153407.9A89799B2@mailrelay.t-mobile.com> References: <20050204153407.9A89799B2@mailrelay.t-mobile.com> Message-ID: <420397E7.2070803@bitblit.net> Hans Zaunere wrote: >That's a great story; another example of simple sometimes is better. > Probably should put these into the database at clientcopia.com :-) -- Aj. Systems Administrator / Developer From lists at zaunere.com Fri Feb 4 14:31:04 2005 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 4 Feb 2005 14:31:04 -0500 Subject: [nycphp-talk] PHP-SEO Meeting Presentation In-Reply-To: Message-ID: <20050204193107.C3EF5A862F@virtu.nyphp.org> > The S.E.O. presentation this Tuesday was interesting, too bad it was a > little rushed toward the end. Is the presentation up yet? The audio and ActiveGrid presentation is online; the SEO presentation will be online shortly. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org From matt at jobsforge.com Sat Feb 5 00:41:52 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Sat, 5 Feb 2005 00:41:52 -0500 Subject: [nycphp-talk] Re: [nycbug-talk] mysql lisc. question In-Reply-To: <20050205000045.GA15754@finn.nomadlogic.org> References: <20050204232804.GA15563@finn.nomadlogic.org> <8c50a3c3050204154972a56a7a@mail.gmail.com> <20050205000045.GA15754@finn.nomadlogic.org> Message-ID: <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> On Feb 4, 2005, at 7:00 PM, Pete Wright wrote: > "The MySql Rep. explained to me that by installing the database on more > that one computer, even if it is for you own use, it is considered a > distributed piece of software and should be licenced." I'm no license expert. But I plan to be one in the coming months/years. But this seems like a point of contention between different OS licenses that might become divisive for certain causes. From matt at jobsforge.com Sat Feb 5 00:43:01 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Sat, 5 Feb 2005 00:43:01 -0500 Subject: [nycphp-talk] Re: [nycbug-talk] mysql lisc. question In-Reply-To: <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> References: <20050204232804.GA15563@finn.nomadlogic.org> <8c50a3c3050204154972a56a7a@mail.gmail.com> <20050205000045.GA15754@finn.nomadlogic.org> <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> Message-ID: <6688a044e1981cfa7d4af997368efef5@jobsforge.com> Please excuse this post. It was meant for another list. Sorry. On Feb 5, 2005, at 12:41 AM, Matthew Terenzio wrote: > > On Feb 4, 2005, at 7:00 PM, Pete Wright wrote: > >> "The MySql Rep. explained to me that by installing the database on >> more >> that one computer, even if it is for you own use, it is considered a >> distributed piece of software and should be licenced." > > I'm no license expert. But I plan to be one in the coming months/years. > > But this seems like a point of contention between different OS > licenses that might become divisive for certain causes. > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From tgales at tgaconnect.com Sat Feb 5 08:48:28 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 5 Feb 2005 08:48:28 -0500 Subject: [nycphp-talk] Re: [nycbug-talk] mysql lisc. question In-Reply-To: <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> Message-ID: <022201c50b89$5fbe9dc0$d0893818@oberon1> Matthew Terenzio writes: > I'm no license expert. But I plan to be one in the coming > months/years. Yes, unfortunately many independent software developers are going to have to become para-legals in this area. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From hans at cyberxdesigns.com Sat Feb 5 09:10:49 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Sat, 05 Feb 2005 09:10:49 -0500 Subject: [nycphp-talk] Re: [nycbug-talk] mysql lisc. question In-Reply-To: <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> References: <20050204232804.GA15563@finn.nomadlogic.org> <8c50a3c3050204154972a56a7a@mail.gmail.com> <20050205000045.GA15754@finn.nomadlogic.org> <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> Message-ID: <4204D3E9.9030905@cyberxdesigns.com> I would like to hear the answer to this question, if there are any knowledgeable folk on the list. ;) Matthew, do you mean by using replication? Can you give us some more information about the case you are describing? Hans K Matthew Terenzio wrote: > > On Feb 4, 2005, at 7:00 PM, Pete Wright wrote: > >> "The MySql Rep. explained to me that by installing the database on more >> that one computer, even if it is for you own use, it is considered a >> distributed piece of software and should be licenced." > > > I'm no license expert. But I plan to be one in the coming months/years. > > But this seems like a point of contention between different OS > licenses that might become divisive for certain causes. > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > > -- Hans Kaspersetz Cyber X Designs http://www.cyberxdesigns.com From chsnyder at gmail.com Sat Feb 5 12:55:40 2005 From: chsnyder at gmail.com (csnyder) Date: Sat, 5 Feb 2005 12:55:40 -0500 Subject: [nycphp-talk] Re: [nycbug-talk] mysql lisc. question In-Reply-To: <4204D3E9.9030905@cyberxdesigns.com> References: <20050204232804.GA15563@finn.nomadlogic.org> <8c50a3c3050204154972a56a7a@mail.gmail.com> <20050205000045.GA15754@finn.nomadlogic.org> <75f618f45648e9b7dfa414872a9fcd3e@jobsforge.com> <4204D3E9.9030905@cyberxdesigns.com> Message-ID: On Sat, 05 Feb 2005 09:10:49 -0500, Hans C. Kaspersetz wrote: > Matthew, do you mean by using replication? Can you give us some more > information about the case you are describing? Hans -- this got cross posted from the NYCBUG list, so a little background might be in order. He's referring (I think) to this post on FreeBSD-Questions: http://tinyurl.com/3z98f It's about Clustering, not Replication. The claim is that the cost to license MySQL Cluster for non-GPL'd applications is ~$5,000 per cpu. Which limits the market somewhat, but probably addresses some real support and implementation costs on MySQL's end. One suspects that as the tech matures the price will come down. Either that, or we're going to be seeing a lot of GPL'd cluster implementations that just happen to be accidentally used for commercial purposes. Oops. From matt at jobsforge.com Sun Feb 6 11:05:24 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Sun, 6 Feb 2005 11:05:24 -0500 Subject: [nycphp-talk] sending errors to Emacs/browser Message-ID: <0a87d92dc73b4c9eb029ec75de965395@jobsforge.com> Allow me to ramble a bit. i know it's no revelation and I'm not sure I have a point. I don't think anyone at my Super Bowl party will care. :^) A few months back we had a discussion about errors. I think everyone was in agreement about E_ALL and numerous other details, but I never quite fully bought in to the danger of sending errors to the browser during development, though of course I understand hiding them from the end user. You just instead tail -f the error log, which is fine. But anyway, that's not why I started this thread. I was testing my shiny FreeBSD 5.3, PHP 5.2, PostgreSQL 7.4 install on a web page trying to connect to the DB. I have the file open in Emacs and making edits, saving and testing in the browser. I noticed errors get displayed in Emacs. True also of Vi. I'm not sure whether I like this or not. Also happens when errors are only being logged and not displayed. I guess it was never an issue because I usually save and close, then test, or if working remotely, use a local editor and transfer files. Not as dangerous if you are working locally on the server, but if SSH'd in, then the ease of Mac cut and paste could accidentally write the errors to a source file. From danielc at analysisandsolutions.com Sun Feb 6 11:13:15 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 6 Feb 2005 11:13:15 -0500 Subject: [nycphp-talk] security focus 286 Message-ID: <20050206161315.GA8855@panix.com> SecurityFocus Newsletter #286 (from this week) SquirrelMail Multiple Remote Input Validation Vulnerabilitie... http://www.securityfocus.com/bid/12337 Exponent CMS Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/12358 MercuryBoard Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/12359 Bribble Unspecified Remote Authentication Bypass Vulnerabili... http://www.securityfocus.com/bid/12361 PHPEventCalendar Multiple Remote HTML Injection Vulnerabilit... http://www.securityfocus.com/bid/12363 Comdev eCommerce INDEX.PHP Multiple Cross-Site Scripting Vul... http://www.securityfocus.com/bid/12382 CoolForum Multiple Input Validation Vulnerabilities http://www.securityfocus.com/bid/12392 -- 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 kigathi at gmail.com Mon Feb 7 16:19:21 2005 From: kigathi at gmail.com (Eric Kigathi) Date: Mon, 7 Feb 2005 16:19:21 -0500 Subject: [nycphp-talk] PHP-SEO Meeting Presentation In-Reply-To: <20050204193107.C3EF5A862F@virtu.nyphp.org> References: <20050204193107.C3EF5A862F@virtu.nyphp.org> Message-ID: Thanks Hans, looking forward to it. On Fri, 4 Feb 2005 14:31:04 -0500, Hans Zaunere wrote: > > > The S.E.O. presentation this Tuesday was interesting, too bad it was a > > little rushed toward the end. Is the presentation up yet? > > The audio and ActiveGrid presentation is online; the SEO presentation will be online shortly. > > --- > Hans Zaunere > President, Founder > New York PHP > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From codebowl at gmail.com Mon Feb 7 16:20:29 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 16:20:29 -0500 Subject: [nycphp-talk] PHP 5 and IIS Message-ID: <8d9a428005020713206410a55b@mail.gmail.com> guys i have installed PHP using the ISAPI modules however i am having problems... i have specified the extension_dir in php.ini to reflect extension_dir = "c:/php/ext/" but whenever i restart iis it tells me that it is unable to load the c:/php/ext/php_mysql.dll because it doesnt exist. I have physically checked and the dll is there. any help would be appreciated. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Mon Feb 7 16:23:29 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 16:23:29 -0500 Subject: [nycphp-talk] Re: PHP 5 and IIS In-Reply-To: <8d9a428005020713206410a55b@mail.gmail.com> References: <8d9a428005020713206410a55b@mail.gmail.com> Message-ID: <8d9a4280050207132331408626@mail.gmail.com> ignore this email i found an answer on php.net docs saying i had to copy libmysql.dll to the windows system dir. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Mon Feb 7 17:54:04 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 17:54:04 -0500 Subject: [nycphp-talk] Odd Results Message-ID: <8d9a428005020714544101ffba@mail.gmail.com> Hey Everyone, i recently setup php 5 on my windows machine and moved a site from a linux machine to this machine. I am having an odd problem. On the linux machine everything works, the registration form submits does all the error checking etc.. On the windows maching though, nothing works, i mean the pages all load fine but when i submit the login or registration form (only 2 forms completed as of yet) it just reloads the page. doesnt show any errors or anything, also i have an if( isset( $_POST['submit'] ) ) { and i added an echo 'here' for debugging and it doesnt echo so it's not executing the on post code. I am not sure why i would get this, i have register_globals turned off. Is there some setting in the php.ini that would be stopping this and causing this effect? -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From jlacey at att.net Mon Feb 7 18:05:36 2005 From: jlacey at att.net (John Lacey) Date: Mon, 07 Feb 2005 16:05:36 -0700 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a428005020714544101ffba@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> Message-ID: <4207F440.4000403@att.net> Joseph Crawford wrote: > Hey Everyone, > > i recently setup php 5 on my windows machine and moved a site from a > linux machine to this machine. I am having an odd problem. On the > linux machine everything works, the registration form submits does all > the error checking etc.. On the windows maching though, nothing works, > i mean the pages all load fine but when i submit the login or > registration form (only 2 forms completed as of yet) it just reloads > the page. doesnt show any errors or anything, also i have an if( > isset( $_POST['submit'] ) ) { and i added an echo 'here' for debugging > and it doesnt echo so it's not executing the on post code. > > I am not sure why i would get this, i have register_globals turned > off. Is there some setting in the php.ini that would be stopping this > and causing this effect? > A while back I heard of some weird things with IE relative to testing for 'submit'. Try putting a hidden field in the form and setting it to a value of "1". eg. a field named "go". Then the test would be: if (isset($_POST['submit']) || isset($_POST['go'])) { // stuff... see if that changes anything.. HTH, John From codebowl at gmail.com Mon Feb 7 18:37:14 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 18:37:14 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <4207F440.4000403@att.net> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> Message-ID: <8d9a428005020715373303a664@mail.gmail.com> that would be fine but i am not using IE, i havent tried that one yet, i have been using Firefox -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Mon Feb 7 18:38:00 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 18:38:00 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a428005020715373303a664@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> Message-ID: <8d9a4280050207153829375597@mail.gmail.com> just tried IE and both browsers are giving the same results -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From danielc at analysisandsolutions.com Mon Feb 7 18:57:56 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 7 Feb 2005 18:57:56 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a4280050207153829375597@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> Message-ID: <20050207235755.GA23516@panix.com> Joseph: I strongly suspect print_r($_POST); will provide you some insight in the matter. If that doesn't set off any lights in your head, check phpinfo() from both machines and compare the settings (and don't you DARE post the phpinfo() output here :) ). --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 codebowl at gmail.com Mon Feb 7 20:02:26 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Mon, 7 Feb 2005 20:02:26 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <20050207235755.GA23516@panix.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> Message-ID: <8d9a42800502071702c885ac3@mail.gmail.com> very odd, $_POST is an empty array even after the form submission, nothing is getting set, what could be causing this? -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From danielc at analysisandsolutions.com Mon Feb 7 21:04:29 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 7 Feb 2005 21:04:29 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a42800502071702c885ac3@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> Message-ID: <20050208020429.GA23018@panix.com> Hey: On Mon, Feb 07, 2005 at 08:02:26PM -0500, Joseph Crawford wrote: > very odd, $_POST is an empty array even after the form submission, > nothing is getting set, what could be causing this? As I said, look at the differences between phpinfo() from your old and new machines. --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 andrew at plexpod.com Mon Feb 7 22:17:05 2005 From: andrew at plexpod.com (Andrew Yochum) Date: Mon, 7 Feb 2005 22:17:05 -0500 Subject: [nycphp-talk] GD TTF text kerning Message-ID: <20050208031658.GC8013@desario.homelinux.net> I've got a situation where I need to adjust the kerning on some text generated by the GD ImageTTFText function. Anybody else run into this? I'm pretty sure I know what needs to be done and know I don't have the time nor patience to code it. I was hoping that someone could point me at a OS library/class/function that does this? I've had no luck. Thanks! Andrew From codebowl at gmail.com Tue Feb 8 07:25:07 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 07:25:07 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <20050208020429.GA23018@panix.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> Message-ID: <8d9a428005020804254d0e7c8d@mail.gmail.com> i am not seeing anything out of the ordinary in my phpinfo on my windows machine, atleast nothing that would cause $_POST to never get set http://codebowl.homelinux.net:8001/et/info.php -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Tue Feb 8 09:01:37 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 09:01:37 -0500 Subject: [nycphp-talk] [ OT ] - PHP Web Hosting.. Connecting to MSSQL remotely Message-ID: <8d9a428005020806017e40eaa1@mail.gmail.com> Hello everyone, i have been struggling with using a windows host so that i can connect to a MSSQL remote database, i have this all working using COM to do so, however i would really like to get away from the windows hosting platform. does anyone here have a host that they currently use to connect to a MSSQL database using either FreeTDS or some other method where you can use the mssql_* functions? i am really tired of COM already and the support from the web host is unbelievable. They are having problems with MMap being able to read the file that is executing and they are telling me that i need to tell them what configs to change in order for them to fix the problem.... I dunno what kind of web host will change anything a client says, nor one that doesnt know how to setup thier own machines. If anyone here knows of a good linux host that they have used or currently use and CAN connect to a remote MSSQL database, please reply to this. We need a new host!! -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From keithjr at gmail.com Tue Feb 8 09:02:27 2005 From: keithjr at gmail.com (Keith Richardson) Date: Tue, 8 Feb 2005 09:02:27 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a428005020804254d0e7c8d@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> Message-ID: <4e1a9bc0502080602b2c16a2@mail.gmail.com> (sorry if this shows up twice, gmail timed out while I tried to send this response) I have had issues with this at my previous job - their intranet server was an IIS machine running on a 2000 server. If I had a protected directory for user logins, say phpmyadmin (because they wanted root access to all of the IT personel, which then used IIS built-in auth). It posted fine, but once your browser session went to view php pages that werent in protected pages, the $_POST variables would not send at all. It took me a while to figure out that it was going in and out of the protected pages - as I would edit pages & have phpmyadmin loaded. I am not sure what caused this, or what the fix is, but all I had to do was close my browser and re-open. I dont know if anything else can cause this, but that is how I saw those issues come up. -- Keith Richardson keith at keithjr.net On Tue, 8 Feb 2005 07:25:07 -0500, Joseph Crawford wrote: > i am not seeing anything out of the ordinary in my phpinfo on my > windows machine, atleast nothing that would cause $_POST to never get > set > > http://codebowl.homelinux.net:8001/et/info.php > > -- > Joseph Crawford Jr. > Codebowl Solutions > codebowl at gmail.com > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From codebowl at gmail.com Tue Feb 8 09:05:31 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 09:05:31 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <4e1a9bc0502080602b2c16a2@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> <4e1a9bc0502080602b2c16a2@mail.gmail.com> Message-ID: <8d9a4280050208060579d03d6d@mail.gmail.com> i have closed the browser over and over, i havent been browsing secure pages, i still get the same errors, i am about to say hell with IIS and just install apache :D or run them both since i am learning C# as well. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From jlacey at att.net Tue Feb 8 09:18:05 2005 From: jlacey at att.net (John Lacey) Date: Tue, 08 Feb 2005 07:18:05 -0700 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a4280050208060579d03d6d@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <4207F440.4000403@att.net> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> <4e1a9bc0502080602b2c16a2@mail.gmail.com> <8d9a4280050208060579d03d6d@mail.gmail.com> Message-ID: <4208CA1D.1020706@att.net> Joseph Crawford wrote: > i have closed the browser over and over, i havent been browsing secure > pages, i still get the same errors, i am about to say hell with IIS > and just install apache :D or run them both since i am learning C# as > well. > if it's just learning C# that you're running IIS for... take a look at mono: http://www.mono-project.com/about/index.html http://www.csharphelp.com/archives2/archive317.html Also, can you tell us a little bit about the windows setup like what o/s (and SP)? From codebowl at gmail.com Tue Feb 8 09:23:42 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 09:23:42 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <4208CA1D.1020706@att.net> References: <8d9a428005020714544101ffba@mail.gmail.com> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> <4e1a9bc0502080602b2c16a2@mail.gmail.com> <8d9a4280050208060579d03d6d@mail.gmail.com> <4208CA1D.1020706@att.net> Message-ID: <8d9a4280050208062331fdc12d@mail.gmail.com> locally on this machine i am running windows xp pro sp2 and there are currently no updates for my computer. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From jlacey at att.net Tue Feb 8 09:40:11 2005 From: jlacey at att.net (John Lacey) Date: Tue, 08 Feb 2005 07:40:11 -0700 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a4280050208062331fdc12d@mail.gmail.com> References: <8d9a428005020714544101ffba@mail.gmail.com> <8d9a428005020715373303a664@mail.gmail.com> <8d9a4280050207153829375597@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> <4e1a9bc0502080602b2c16a2@mail.gmail.com> <8d9a4280050208060579d03d6d@mail.gmail.com> <4208CA1D.1020706@att.net> <8d9a4280050208062331fdc12d@mail.gmail.com> Message-ID: <4208CF4B.6000105@att.net> Joseph Crawford wrote: > locally on this machine i am running windows xp pro sp2 and there are > currently no updates for my computer. > ok, I've had trouble running XAMPP at a place that just installed SP2 on XP. I've not run IIS for a long while, but it may be something that SP2 is doing to you. Is it safe to assume that PHP5 works fine with Apache on your windows box? From codebowl at gmail.com Tue Feb 8 10:28:48 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 10:28:48 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <4208CF4B.6000105@att.net> References: <8d9a428005020714544101ffba@mail.gmail.com> <20050207235755.GA23516@panix.com> <8d9a42800502071702c885ac3@mail.gmail.com> <20050208020429.GA23018@panix.com> <8d9a428005020804254d0e7c8d@mail.gmail.com> <4e1a9bc0502080602b2c16a2@mail.gmail.com> <8d9a4280050208060579d03d6d@mail.gmail.com> <4208CA1D.1020706@att.net> <8d9a4280050208062331fdc12d@mail.gmail.com> <4208CF4B.6000105@att.net> Message-ID: <8d9a4280050208072877eff429@mail.gmail.com> i am going to test taht theory now :D -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From 1j0lkq002 at sneakemail.com Tue Feb 8 10:31:33 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 8 Feb 2005 10:31:33 -0500 Subject: [nycphp-talk] Odd Results Message-ID: <18753-41247@sneakemail.com> John, I run 4 systems in my office and now avoid SP2 on all but the notebook. XAMPP worked flawlessly on every one except the one that had SP2. I didn't play with it I just wiped it and re-installed w/everything BUT SP2 and it works fine. Anectodal evidence, but backed up by a friend who just reported XAMPP failure after accepting SP2. XAMPP should be easy uninstall, no registry hooks, but a re-install didn't work either. Not solid evidence by limited experience. I have had no trouble with direct installs of PHP5/MySQL/Apache2 on XP either but again, I don't use SP2. For the record I just now received a video card driver update from ATI to fix SP2-related problems on XP. That's what, 8 months later? Now if I could just eliminate the VIEWMGR.EXE crashes I just started getting... -=john andrews Original Message: ----------------- From: John Lacey jlacey-at-att.net |nyphp dev/internal group use| ... Date: Tue, 08 Feb 2005 07:40:11 -0700 To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Odd Results Joseph Crawford wrote: > locally on this machine i am running windows xp pro sp2 and there are > currently no updates for my computer. > ok, I've had trouble running XAMPP at a place that just installed SP2 on XP. I've not run IIS for a long while, but it may be something that SP2 is doing to you. Is it safe to assume that PHP5 works fine with Apache on your windows box? _______________________________________________ New York PHP Talk Supporting AMP Technology (Apache/MySQL/PHP) http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From codebowl at gmail.com Tue Feb 8 10:33:31 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 10:33:31 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <18753-41247@sneakemail.com> References: <18753-41247@sneakemail.com> Message-ID: <8d9a4280050208073322bb8810@mail.gmail.com> ok so even using apache in xampp doesnt work at all, i dont understand this... phpmyadmin works just fine and that uses form posts..... why is my code not working? $_POST is just not getting set. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Tue Feb 8 10:35:30 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 10:35:30 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a4280050208073322bb8810@mail.gmail.com> References: <18753-41247@sneakemail.com> <8d9a4280050208073322bb8810@mail.gmail.com> Message-ID: <8d9a428005020807355f24feb8@mail.gmail.com> just for show you can see http://codebowl.homelinux.net:8001/phpmyadmin/ it works fine however my other forms dont work at all :( -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From jlacey at att.net Tue Feb 8 10:44:02 2005 From: jlacey at att.net (John Lacey) Date: Tue, 08 Feb 2005 08:44:02 -0700 Subject: [nycphp-talk] Odd Results In-Reply-To: <18753-41247@sneakemail.com> References: <18753-41247@sneakemail.com> Message-ID: <4208DE42.4030009@att.net> inforequest wrote: > John, > > I run 4 systems in my office and now avoid SP2 on all but the notebook. > XAMPP worked flawlessly on every one except the one that had SP2. I didn't > play with it I just wiped it and re-installed w/everything BUT SP2 and it > works fine. > > Anectodal evidence, but backed up by a friend who just reported XAMPP > failure after accepting SP2. XAMPP should be easy uninstall, no registry > hooks, but a re-install didn't work either. > > Not solid evidence by limited experience. I have had no trouble with direct > installs of PHP5/MySQL/Apache2 on XP either but again, I don't use SP2. > > For the record I just now received a video card driver update from ATI to > fix SP2-related problems on XP. That's what, 8 months later? Now if I could > just eliminate the VIEWMGR.EXE crashes I just started getting... > yeah, I've got a note scribbled on my whiteboard that I just glanced at "xampp xp sp2" -- it's on my todo list to have a look at. Although I run XP Pro, I do not have SP2 installed. I did do some preliminary poking around with Google and saved this note: *************************************************************** File Name: WindowsXP-KB884020-x86-enu.exe Download Size: 507 KB Date Published: 9/17/2004 Version: 884020 Overview This update helps resolve an issue on computers running Windows XP Service Pack 2. Programs that connect to IP addresses in the loopback address range may not work as expected and you may receive an error message indicating you cannot establish a connection. After you install this item, you may have to restart your computer. ************************************************************************ This does not sound like the problem Joseph is experiencing though. He didn't mention an error and I got an error when I tried it. My backup plan when I go into a place to deliver a class is Knoppix and USB drives. Thanks for the info, J From codebowl at gmail.com Tue Feb 8 10:45:57 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 10:45:57 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <4208DE42.4030009@att.net> References: <18753-41247@sneakemail.com> <4208DE42.4030009@att.net> Message-ID: <8d9a428005020807454d3385d9@mail.gmail.com> no i get no errors the pages load just fine, i am using a dyndns domain http://codebowl.dontexist.net/info.php the only problem i have is posting forms, i will setup an example here http://codebowl.dontexist.net/form.php in a second. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Tue Feb 8 10:50:29 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 10:50:29 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <8d9a428005020807454d3385d9@mail.gmail.com> References: <18753-41247@sneakemail.com> <4208DE42.4030009@att.net> <8d9a428005020807454d3385d9@mail.gmail.com> Message-ID: <8d9a4280050208075057ef1405@mail.gmail.com> now this is very odd, my test form works but my real code form doesnt work, this is making me think it is something in my coding that is halting this but i am not sure what it could be. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From danielc at analysisandsolutions.com Tue Feb 8 11:04:02 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 8 Feb 2005 11:04:02 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <18753-41247@sneakemail.com> References: <18753-41247@sneakemail.com> Message-ID: <20050208160402.GA19142@panix.com> On Tue, Feb 08, 2005 at 10:31:33AM -0500, inforequest wrote: > > I run 4 systems in my office and now avoid SP2 on all but the notebook. > XAMPP worked flawlessly on every one except the one that had SP2. I've got SP2 going and have no problems with using MySQL 4.0.x and 4.1.x, Apache 1.3.x and PHP 4 & 5 (all installed separately). --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 codebowl at gmail.com Tue Feb 8 12:02:06 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 12:02:06 -0500 Subject: [nycphp-talk] Odd Results In-Reply-To: <20050208160402.GA19142@panix.com> References: <18753-41247@sneakemail.com> <20050208160402.GA19142@panix.com> Message-ID: <8d9a4280050208090262c6c5ba@mail.gmail.com> i found the culprit, / * if( get_magic_quotes_gpc() ) { if( isset( $_GET )) { $_GET = array_map( 'ArrayStripSlashes', $_GET ); } if( isset( $_POST ) ) { $_POST = array_map( 'ArrayStripSlashes', $_POST ); } if( isset( $_COOKIES ) ) { $_COOKIES = array_map( 'ArrayStripSlashes', $_COOKIES ); } if( isset( $_REQUEST ) ) { $_REQUEST = array_map( 'ArrayStripSlashes', $_REQUEST ); } } // just a recursive function to strip slashes from variables/arrays function ArrayStripSlashes( $val ) { if( is_array( $val ) ) { return array_map( 'ArrayStripSlashes', $val ); } else return stripslashes( $val ); } */ some reason that code was hindering the super global variables. -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From scott at crisscott.com Tue Feb 8 12:29:47 2005 From: scott at crisscott.com (Scott Mattocks) Date: Tue, 08 Feb 2005 12:29:47 -0500 Subject: [nycphp-talk] xml_parse and CDATA Message-ID: <4208F70B.8000308@crisscott.com> Hello, I am having some trouble parsing XML files and determining what is text between two elements (Some text) and what is text inside . xml_parse() is giving both types of text to the function I set as the cdata handler but it doesn't give any indication of whether or not in was inside a CDATA tag. It acts as if the References: <4208F70B.8000308@crisscott.com> Message-ID: On Tue, 8 Feb 2005, Scott Mattocks wrote: > I am having some trouble parsing XML files and determining what is text > between two elements (Some text) and what is text inside > . xml_parse() is giving both types of text to the > function I set as the cdata handler but it doesn't give any indication > of whether or not in was inside a CDATA tag. It acts as if the part wasn't there at all. This is a known bug and marked as Won't Fix. http://bugs.php.net/bug.php?id=31779 -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 nestorflorez at earthlink.net Tue Feb 8 14:40:44 2005 From: nestorflorez at earthlink.net (Nestor Florez) Date: Tue, 8 Feb 2005 11:40:44 -0800 (GMT-08:00) Subject: [nycphp-talk] [ OT ] - PHP Web Hosting.. Connecting to MSSQL remotely Message-ID: <29503856.1107891644248.JavaMail.root@skeeter.psp.pas.earthlink.net> Joseph, did you try asking in the FreeTDS user group. They probably been thru it and can give you an answer. I used to be a member of that list and they were very helpful. Nestor :-) -----Original Message----- From: Joseph Crawford Sent: Feb 8, 2005 6:01 AM To: NYPHP Talk Subject: [nycphp-talk] [ OT ] - PHP Web Hosting.. Connecting to MSSQL remotely Hello everyone, i have been struggling with using a windows host so that i can connect to a MSSQL remote database, i have this all working using COM to do so, however i would really like to get away from the windows hosting platform. does anyone here have a host that they currently use to connect to a MSSQL database using either FreeTDS or some other method where you can use the mssql_* functions? i am really tired of COM already and the support from the web host is unbelievable. They are having problems with MMap being able to read the file that is executing and they are telling me that i need to tell them what configs to change in order for them to fix the problem.... I dunno what kind of web host will change anything a client says, nor one that doesnt know how to setup thier own machines. If anyone here knows of a good linux host that they have used or currently use and CAN connect to a remote MSSQL database, please reply to this. We need a new host!! -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com _______________________________________________ New York PHP Talk Supporting AMP Technology (Apache/MySQL/PHP) http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From codebowl at gmail.com Tue Feb 8 20:27:49 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 20:27:49 -0500 Subject: [nycphp-talk] PHP 5 Menu Objects Message-ID: <8d9a428005020817275575a397@mail.gmail.com> Hello Everyone, I have been working with PHP 5 for a while now and i have attempted to create a Menu Object that i will extend at a later time to have one object load and hold all of my site menu's throught a session. The problem i am having is this $et->Menu()->Group( "Group1" ) $g1index = $et->Menu()-GetIndex( "Group1" ); $et->Menu()->Group( $g1index )->Item( )->Title( "Item1" ); $i1index = $et->Menu()->Group( $g1index )->GetIndex( $i1index ); /* this should go through and set the link for the correct item. */ $et->Menu()->Group( $g1index )->Item()->Title( $i1index )->Link( "page.php" ); $et->Menu()->Draw(); it is not drawing the menu, and i dont think the correct items are getting set as they should be. the code for the classes you will find below, the reason i am doing this is so that i can eventually implement a user system and have the menu's either dynamically generated from database content and also hide or show certain menu's for different user levels. class Menu { static private $_groups; public function __construct() { $this->_groups = array(); } public function GetIndex( $title ) { foreach( self::$_groups as $key => $group ) { if( strtolower( $group->Title() ) == strtolower( $title ) ) { return $key; } } return -1; } static public function Group( $index = 0 ) { if( ( $index == 0 ) && ( count( self::$_groups ) != 0 ) ) $index = count( self::$_groups ); if( self::$_groups[$index] == null ) { self::$_groups[$index] = new MenuGroup(); } return self::$_groups[$index]; } public function Draw() { foreach( $this->_groups as $gkey => $group ) { echo $group->Title().'
'; foreach( $group->_items as $ikey => $item ) { echo '   '.$item->Title().'
'; } } } } class MenuGroup { static private $_items; private $_order; private $_title; public function __construct( ) { self::$_items = array(); } public function Title( $var = "" ) { if( $var != "" ) { $this->_title = $var; } return $this->_title; } public function GetIndex( $title ) { foreach( self::$_items as $key => $item ) { if( strtolower( $item->Title() ) == strtolower( $title ) ) { return $key; } } return -1; } static public function Item( $index = 0 ) { if( ( $index == 0 ) && ( count( self::$_items ) != 0 ) ) $index = count( self::$_items ); if( self::$_items[$index] == null ) { self::$_items[$index] = new MenuItem(); } return self::$_items[$index]; } } class MenuItem { private $_order; private $_title; private $_link; public function __construct( $order = 0 ) { $this->_order = $order; } public function Title( $var = "" ) { if( $var != "" ) { $this->_title = $var; } return $this->_title; } public function Link( $var = "" ) { if( $var != "" ) { $this->_link = $var; } return $this->_link; } } -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Tue Feb 8 21:12:39 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 8 Feb 2005 21:12:39 -0500 Subject: [nycphp-talk] Re: PHP 5 Menu Objects In-Reply-To: <8d9a428005020817275575a397@mail.gmail.com> References: <8d9a428005020817275575a397@mail.gmail.com> Message-ID: <8d9a428005020818123c531fd3@mail.gmail.com> ok so i didnt get it exactly how i wanted it to work but here is the working example. http://www.weberdev.com/get_example-4071.html -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From codebowl at gmail.com Wed Feb 9 10:54:38 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 9 Feb 2005 10:54:38 -0500 Subject: [nycphp-talk] Re: PHP 5 Menu Objects In-Reply-To: <8d9a428005020818123c531fd3@mail.gmail.com> References: <8d9a428005020817275575a397@mail.gmail.com> <8d9a428005020818123c531fd3@mail.gmail.com> Message-ID: <8d9a4280050209075476738c57@mail.gmail.com> Ok i am having some problems with this now. I have tracked down where it is going wrong but i cannot see why it is doing so. You will find all of my code at the bottom of this email. $et->Menu()->Draw( $et->User()->Level() ); this will basically call the constructor for the Menu.class.php file. the constructor will use a database connection to grab all menu groups, and for each of the groups grab all the items for that group. The issue i am having is that it seems to set the items and thier properties, but when i retrieve them with the Draw method it shows them as empty objects. here is the results printed to the screen (from the Draw Method) General Files Community Control Panel when i do a count( $items ) it returns 0 for some reason :( General 0Files 0Community 0Control Panel 0 Here is my code. class Menu { static private $_groups; public function __construct( $db ) { $this->_groups = array(); $res = $db->Query( "SELECT id, title, req_level, display_order FROM menu_groups" ); // make sure there are some groups in the database if( $db->NumRows( $res ) > 0 ) { // loop through the groups and add them to the menu while( $group = $db->FetchArray( $res ) ) { // add the group and set the info $g = $this->Group( ); $g->Title( $group['title'] ); $g->Level( $group['req_level'] ); // get all items for this group $qry = $db->Query( "SELECT id, title, req_level, display_order FROM menu_items WHERE mgroup=".$group['id'] ); // make sure there are some menu items in this group if( $db->NumRows( $qry ) > 0 ) { // loop and add the items while( $item = $db->FetchArray( $qry ) ) { // add the item. $i = $g->Item( ); $i->Title( $item['title'] ); $i->Link( $item['link'] ); $i->Level( $item['req_level'] ); } } } } } static public function Group( $index = -1 ) { if( ( $index == -1 ) && ( count( self::$_groups ) != 0 ) ) $index = count( self::$_groups ); else $index = 0; if( self::$_groups[$index] == null ) { self::$_groups[$index] = new MenuGroup(); } return self::$_groups[$index]; } public function Draw( $level ) { foreach( self::$_groups as $group ) { // make sure the user has req level for this menu group if( $level >= $group->Level() ) { echo $group->Title().'
'; $items = $group->GetItems(); echo count($items); foreach( $items as $item ) { // make sure the user has req level for this menu item if( $level >= $item->Level() ) { echo '   '.$item->Title().'
'; } } } } } } class MenuGroup { static private $_items; private $_order; private $_title; private $_level; public function __construct( ) { self::$_items = array(); } public function Title( $var = "" ) { if( $var != "" ) { $this->_title = $var; } return $this->_title; } static public function Item( $index = -1 ) { if( ( $index == -1 ) && ( count( self::$_items ) != 0 ) ) $index = count( self::$_items ); else $index = 0; if( self::$_items[$index] == null ) { self::$_items[$index] = new MenuItem(); } return self::$_items[$index]; } public function GetItems() { return self::$_items; } public function Level( $level = -1 ) { if( $level != -1 ) { $this->_level = $level; } return $this->_level; } } class MenuItem { private $_order; private $_title; private $_link; private $_level; public function __construct( ) { } public function Title( $var = "" ) { if( $var != "" ) { $this->_title = $var; } return $this->_title; } public function Link( $var = "" ) { if( $var != "" ) { $this->_link = $var; } return $this->_link; } public function Level( $level = -1 ) { if( $level != -1 ) { $this->_level = $level; } return $this->_level; } } -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From lists at zaunere.com Wed Feb 9 15:01:31 2005 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 9 Feb 2005 15:01:31 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors Message-ID: <20050209200136.889A1A85F0@virtu.nyphp.org> Hi all, All PHP 5 code examples I've seen show try/catch pairs like this: try { $obj = new MyClass; $obj->DoSomething(); } catch( Exception $e ) { echo $e->getMessage(); } I am the only one in thinking that these examples are incorrect 99% of the time? Based on other languages, like Java, exceptions should very very rarely be thrown from a class' constructor. The simple reason, as in PHP 5, is that the object never gets created if an exception is thrown in the constructor. Is there something particular to PHP 5 that I'm missing? While it could be considered pedantic, PHP 5 code examples should be as: $obj = new MyClass; try { $obj->DoSomething(); } catch( Exception $e ) { echo $e->getMessage(); } In fact, in PHP 5 I cannot find anyway to determine the "return" value of the new operator. This leads me to believe that PHP 5's concept of proper OO is to always assume the object is created successfully, unless a catastrophic event happens, in which case an exception is thrown, and the object isn't created at all. This of course makes sense, but then I'm confused as to why the code samples all seem a bit incorrect. Interested in hearing thoughts on this... --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org From adam at trachtenberg.com Wed Feb 9 15:27:18 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 9 Feb 2005 15:27:18 -0500 (EST) Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <20050209200136.889A1A85F0@virtu.nyphp.org> References: <20050209200136.889A1A85F0@virtu.nyphp.org> Message-ID: On Wed, 9 Feb 2005, Hans Zaunere wrote: > All PHP 5 code examples I've seen show try/catch pairs like this: > > try { > $obj = new MyClass; > $obj->DoSomething(); > } catch( Exception $e ) { > echo $e->getMessage(); > } > This is correct. > I am the only one in thinking that these examples are incorrect 99% > of the time? Based on other languages, like Java, exceptions should > very very rarely be thrown from a class' constructor. The simple > reason, as in PHP 5, is that the object never gets created if an > exception is thrown in the constructor. PHP is not Java. :) > Is there something particular to PHP 5 that I'm missing? While it > could be considered pedantic, PHP 5 code examples should be as: > $obj = new MyClass; > > try { > $obj->DoSomething(); > } catch( Exception $e ) { > echo $e->getMessage(); > } > This is incorrect. > In fact, in PHP 5 I cannot find anyway to determine the "return" > value of the new operator. This leads me to believe that PHP 5's > concept of proper OO is to always assume the object is created > successfully, unless a catastrophic event happens, in which case an > exception is thrown, and the object isn't created at all. This of > course makes sense, but then I'm confused as to why the code samples > all seem a bit incorrect. In PHP 5, the way to signal failure in a constructor is to throw an exception. There is no other way to communicate errors. As "new" will not return "false". Exceptions do not have to occur due to catastrophic failures, such as lack of memory. This can also occur due to bad input parameters. For example, passing the wrong number of parameters, or if you try to create a DOMElement with an illegal XML element name. See pages 188-9 of "Upgrading to PHP 5" by, um, I forget. :) -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 mail at gographics.biz Wed Feb 9 16:12:29 2005 From: mail at gographics.biz (Gographics) Date: Thu, 10 Feb 2005 08:12:29 +1100 Subject: [nycphp-talk] FTP_CONNECT In-Reply-To: <20050209170005.50513A87B1@virtu.nyphp.org> References: <20050209170005.50513A87B1@virtu.nyphp.org> Message-ID: <420A7CBD.1010203@gographics.biz> Just playing around with FTP_CONNECT and would like to know how to carry the connection resource id across multiple pages. $conn_id = ftp_connect(.....) I have tried $_POST and $_SESSIONS and setting them to $conn_id and also $$conn_id $conn_id = something like Resource ID #7 does anyone know what this is or how to use it without reconnecting on every new page? Ash -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 7/02/2005 From dcech at phpwerx.net Wed Feb 9 16:26:40 2005 From: dcech at phpwerx.net (Dan Cech) Date: Wed, 09 Feb 2005 16:26:40 -0500 Subject: [nycphp-talk] FTP_CONNECT In-Reply-To: <420A7CBD.1010203@gographics.biz> References: <20050209170005.50513A87B1@virtu.nyphp.org> <420A7CBD.1010203@gographics.biz> Message-ID: <420A8010.8090902@phpwerx.net> Unfortunately a resource id cannot be carried from page to page, you have to re-establish it each time. Dan Gographics wrote: > Just playing around with FTP_CONNECT and would like to know how to carry > the connection resource id across multiple pages. $conn_id = > ftp_connect(.....) > > I have tried $_POST and $_SESSIONS and setting them to $conn_id and also > $$conn_id > > $conn_id = something like Resource ID #7 does anyone know what this is > or how to use it without reconnecting on every new page? > > Ash > > From lists at zaunere.com Wed Feb 9 17:15:00 2005 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 9 Feb 2005 17:15:00 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: Message-ID: <20050209221504.C368BA87B0@virtu.nyphp.org> > > All PHP 5 code examples I've seen show try/catch pairs like this: > > > > try { > > $obj = new MyClass; > > $obj->DoSomething(); > > } catch( Exception $e ) { > > echo $e->getMessage(); > > } > > > > This is correct. > > > I am the only one in thinking that these examples are incorrect 99% > > of the time? Based on other languages, like Java, exceptions should > > very very rarely be thrown from a class' constructor. The simple > > reason, as in PHP 5, is that the object never gets created if an > > exception is thrown in the constructor. > > PHP is not Java. :) Riiiight... but it does have the same behavior :) > > Is there something particular to PHP 5 that I'm missing? While it > > could be considered pedantic, PHP 5 code examples should be as: > > > $obj = new MyClass; > > > > try { > > $obj->DoSomething(); > > } catch( Exception $e ) { > > echo $e->getMessage(); > > } > > > > This is incorrect. > > > In fact, in PHP 5 I cannot find anyway to determine the "return" > > value of the new operator. This leads me to believe that PHP 5's > > concept of proper OO is to always assume the object is created > > successfully, unless a catastrophic event happens, in which case an > > exception is thrown, and the object isn't created at all. This of > > course makes sense, but then I'm confused as to why the code samples > > all seem a bit incorrect. > > In PHP 5, the way to signal failure in a constructor is to throw an > exception. There is no other way to communicate errors. As "new" will > not return "false". > > Exceptions do not have to occur due to catastrophic failures, such as > lack of memory. This can also occur due to bad input parameters. For > example, passing the wrong number of parameters, or if you try to > create a DOMElement with an illegal XML element name. But what if a class should still be instantiated, even if some of the arguments are incorrect, or subsequent parts fail for some reason? True, this validation could be done outside of the constructor, even in a totally different class that the constructor instantiates itself, but this still would prevent the instantiation of the original class. class Top { protected $Child; public function __construct( $value ) { $this->Child = new Child($value); } } class Child { public function __construct( $value ) { throw new Exception('Bad Value'); } } try { $mytop = new Top($_POST); } catch( Exception $e ) { echo 'You had an exception'; } In the case above, it'd obviously be trivial to change, but with complex class relationships, and factory methods as my particular case involves, it gets cumbersome. Thus, it seems that instantiation of a class that might have some parts of it not successfully work out, which could be totally acceptable, would cause the Top class to not be created at all, and force the $mytop = new Top($_POST); to be done outside the try/catch, with subsequent checks done inside a try/catch. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org From adam at trachtenberg.com Wed Feb 9 17:39:35 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 9 Feb 2005 17:39:35 -0500 (EST) Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <20050209221504.C368BA87B0@virtu.nyphp.org> References: <20050209221504.C368BA87B0@virtu.nyphp.org> Message-ID: On Wed, 9 Feb 2005, Hans Zaunere wrote: > > PHP is not Java. :) > > Riiiight... but it does have the same behavior :) It has similar behavior, but is just different enough to slip you up. For instance, there's no concept of Checked vs. Unchecked exceptions in PHP. > But what if a class should still be instantiated, even if some of > the arguments are incorrect, or subsequent parts fail for some > reason? True, this validation could be done outside of the > constructor, even in a totally different class that the constructor > instantiates itself, but this still would prevent the instantiation > of the original class. This is a ZE2 limitation. The only way to signal failure from a constructor is via an exception. Even extensions that never throw exceptions throw them in the constructor. If you're concerned a non-essential portion can fail, you can either: a) Don't throw an exception in that instance, return the object, and provide developers with a way to check status. b) Don't place that functionality in the constructor, and provide a method to update the object with the additional data. -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 leam at reuel.net Wed Feb 9 19:01:52 2005 From: leam at reuel.net (leam at reuel.net) Date: Wed, 9 Feb 2005 19:01:52 -0500 Subject: [nycphp-talk] Liability protection for consultants? Message-ID: <20050210000152.GA2880@leitz> I'm looking at doing some side work setting up CMS and shopping carts for small businesses. The web-host I use has a few offerings that are php based and I'm looking at the requirements and set up to see which one I'd want to support. OScommerce requires register globals to be on, and Zen Cart requires some world-writeable directories in the DocumentRoot. THe other possibilites are AgoraCart, Interchange Cart, and CubeCart. I'm reading Chris' security workbook and trying to critically review anything that deals with money. My biggest fear is that one of my customers has a compromise and the public image of the business goes so bad that they lose their business. Yeah, I'm generally a "worst case scenario" sort of guy... How do you protect yourself against liability, and more importantly how do you give the customer the security they deserve? ciao! leam From brian at vermonster.com Wed Feb 9 19:23:58 2005 From: brian at vermonster.com (Brian Kaney) Date: Wed, 09 Feb 2005 19:23:58 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210000152.GA2880@leitz> References: <20050210000152.GA2880@leitz> Message-ID: <1107995037.14111.103.camel@brian.vermonster.com> On Wed, 2005-02-09 at 19:01, leam at reuel.net wrote: > I'm looking at doing some side work setting up CMS and shopping carts for small businesses. The web-host I use has a few offerings that are php based and I'm looking at the requirements and set up to see which one I'd want to support. > > OScommerce requires register globals to be on, and Zen Cart requires some world-writeable directories in the DocumentRoot. THe other possibilites are AgoraCart, Interchange Cart, and CubeCart. We started a project with OSCommerce and found it to be a hairball of code/presentation and security issues. It was really a pain to extend without bastardizing core code. We ended up scrapping it and using IC (interchange). The documentation is bad (they really need a wiki-doc-project), and we re-wrote most of the templates (they were filled with "legacy" HTML coding -- i.e tables within tables, inline styling, etc,). But after you get going on IC, it is a quite stable, secure and very extensible platform. My favorite part is IC uses a daemon process to handle all the heavy lifting, while completely detaching critical procedures from the client. The "catalog" (or store-related files) are completely separate from core and you can also override any core functions with your own without breaking core stuff. This all points to a solid framework. > > I'm reading Chris' security workbook and trying to critically review anything that deals with money. My biggest fear is that one of my customers has a compromise and the public image of the business goes so bad that they lose their business. > > Yeah, I'm generally a "worst case scenario" sort of guy... > > How do you protect yourself against liability, and more importantly how do you give the customer the security they deserve? > You can protect yourself and clients with a software license. You are protected by the IP portion and your clients by the warranty section. Here you can mitigate your clients risk by taking some or all of it on, even offer your clients full indemnification, all for a charge. Or, as the other extreme, us "AS IS" verbiage. You can also sell warranties for many OSS (but refer to the specific license for the project). The OSRM group also offers insurance for open source stuff. http://www.osriskmanagement.com/ Redhat and HP offer indemnification protection for their Linux-based products. - Brian From brian at vermonster.com Wed Feb 9 19:25:59 2005 From: brian at vermonster.com (Brian Kaney) Date: Wed, 09 Feb 2005 19:25:59 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <1107995037.14111.103.camel@brian.vermonster.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> Message-ID: <1107995159.14111.106.camel@brian.vermonster.com> BTW: this is dose not warrant legal console (or is it too late) ; > You can protect yourself and clients with a software license. You are > protected by the IP portion and your clients by the warranty section. > Here you can mitigate your clients risk by taking some or all of it on, > even offer your clients full indemnification, all for a charge. Or, as > the other extreme, us "AS IS" verbiage. You can also sell warranties > for many OSS (but refer to the specific license for the project). > > The OSRM group also offers insurance for open source stuff. > http://www.osriskmanagement.com/ > > Redhat and HP offer indemnification protection for their Linux-based > products. > > > - Brian From leam at reuel.net Wed Feb 9 19:32:15 2005 From: leam at reuel.net (leam at reuel.net) Date: Wed, 9 Feb 2005 19:32:15 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <1107995037.14111.103.camel@brian.vermonster.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> Message-ID: <20050210003214.GB2880@leitz> Dang, all good info! Two quick things. THe host is a shared host, so I'd have to work with interchange in that sense. The liability issue is more "I recommended this application and it just got cracked with all your business data" sort of thing. Not indemnity for the code itself but for the vulnerability of the apps I set up for them. ciao! leam --off to study interchange... On Wed, Feb 09, 2005 at 07:23:58PM -0500, Brian Kaney wrote: > On Wed, 2005-02-09 at 19:01, leam at reuel.net wrote: > > I'm looking at doing some side work setting up CMS and shopping carts for small businesses. The web-host I use has a few offerings that are php based and I'm looking at the requirements and set up to see which one I'd want to support. > > > > OScommerce requires register globals to be on, and Zen Cart requires some world-writeable directories in the DocumentRoot. THe other possibilites are AgoraCart, Interchange Cart, and CubeCart. > > We started a project with OSCommerce and found it to be a hairball of > code/presentation and security issues. It was really a pain to extend > without bastardizing core code. > > We ended up scrapping it and using IC (interchange). The documentation > is bad (they really need a wiki-doc-project), and we re-wrote most of > the templates (they were filled with "legacy" HTML coding -- i.e tables > within tables, inline styling, etc,). > > But after you get going on IC, it is a quite stable, secure and very > extensible platform. My favorite part is IC uses a daemon process to > handle all the heavy lifting, while completely detaching critical > procedures from the client. The "catalog" (or store-related files) are > completely separate from core and you can also override any core > functions with your own without breaking core stuff. This all points to > a solid framework. > > > > > I'm reading Chris' security workbook and trying to critically review anything that deals with money. My biggest fear is that one of my customers has a compromise and the public image of the business goes so bad that they lose their business. > > > > Yeah, I'm generally a "worst case scenario" sort of guy... > > > > How do you protect yourself against liability, and more importantly how do you give the customer the security they deserve? > > > > You can protect yourself and clients with a software license. You are > protected by the IP portion and your clients by the warranty section. > Here you can mitigate your clients risk by taking some or all of it on, > even offer your clients full indemnification, all for a charge. Or, as > the other extreme, us "AS IS" verbiage. You can also sell warranties > for many OSS (but refer to the specific license for the project). > > The OSRM group also offers insurance for open source stuff. > http://www.osriskmanagement.com/ > > Redhat and HP offer indemnification protection for their Linux-based > products. > > > - Brian > > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From leam at reuel.net Wed Feb 9 21:17:26 2005 From: leam at reuel.net (leam at reuel.net) Date: Wed, 9 Feb 2005 21:17:26 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <1107995037.14111.103.camel@brian.vermonster.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> Message-ID: <20050210021726.GD2880@leitz> This is getting worse as I go. Interchange doesn't work on CPanel, which the host uses. Agora cart looks real clunky and I need something that the customer can easily use to add to the cart. CubeCart is moving servers, is commercial, and I can't tell how it looks. *sigh* At least this *is* a market--most business owners I know wouldn't want to work through this hassle. ;) ciao! leam On Wed, Feb 09, 2005 at 07:23:58PM -0500, Brian Kaney wrote: > On Wed, 2005-02-09 at 19:01, leam at reuel.net wrote: > > I'm looking at doing some side work setting up CMS and shopping carts for small businesses. The web-host I use has a few offerings that are php based and I'm looking at the requirements and set up to see which one I'd want to support. > > > > OScommerce requires register globals to be on, and Zen Cart requires some world-writeable directories in the DocumentRoot. THe other possibilites are AgoraCart, Interchange Cart, and CubeCart. > > We started a project with OSCommerce and found it to be a hairball of > code/presentation and security issues. It was really a pain to extend > without bastardizing core code. > > We ended up scrapping it and using IC (interchange). The documentation > is bad (they really need a wiki-doc-project), and we re-wrote most of > the templates (they were filled with "legacy" HTML coding -- i.e tables > within tables, inline styling, etc,). > > But after you get going on IC, it is a quite stable, secure and very > extensible platform. My favorite part is IC uses a daemon process to > handle all the heavy lifting, while completely detaching critical > procedures from the client. The "catalog" (or store-related files) are > completely separate from core and you can also override any core > functions with your own without breaking core stuff. This all points to > a solid framework. > > > > > I'm reading Chris' security workbook and trying to critically review anything that deals with money. My biggest fear is that one of my customers has a compromise and the public image of the business goes so bad that they lose their business. > > > > Yeah, I'm generally a "worst case scenario" sort of guy... > > > > How do you protect yourself against liability, and more importantly how do you give the customer the security they deserve? > > > > You can protect yourself and clients with a software license. You are > protected by the IP portion and your clients by the warranty section. > Here you can mitigate your clients risk by taking some or all of it on, > even offer your clients full indemnification, all for a charge. Or, as > the other extreme, us "AS IS" verbiage. You can also sell warranties > for many OSS (but refer to the specific license for the project). > > The OSRM group also offers insurance for open source stuff. > http://www.osriskmanagement.com/ > > Redhat and HP offer indemnification protection for their Linux-based > products. > > > - Brian > > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From prusak at gmail.com Wed Feb 9 21:33:39 2005 From: prusak at gmail.com (Ophir Prusak) Date: Wed, 9 Feb 2005 21:33:39 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <20050209200136.889A1A85F0@virtu.nyphp.org> References: <20050209200136.889A1A85F0@virtu.nyphp.org> Message-ID: Hi Hans, I was dealing with this exact same dilemma on a project I'm currently coding. We ending up going with Adam's option B: move the code which can fail to outside the constructor. In the original design the you could create an object where the constructor could read some information from a database. In the final design, we moved the database code to a new load() function that executes the actual database call. This does add an additional step, but having the constructor throw an execution just messes things up. Ophir On Wed, 9 Feb 2005 15:01:31 -0500, Hans Zaunere wrote: > > Hi all, > > All PHP 5 code examples I've seen show try/catch pairs like this: > > try { > $obj = new MyClass; > $obj->DoSomething(); > } catch( Exception $e ) { > echo $e->getMessage(); > } > > I am the only one in thinking that these examples are incorrect 99% of the time? Based on other languages, like Java, exceptions should very very rarely be thrown from a class' constructor. The simple reason, as in PHP 5, is that the object never gets created if an exception is thrown in the constructor. > > Is there something particular to PHP 5 that I'm missing? While it could be considered pedantic, PHP 5 code examples should be as: > > $obj = new MyClass; > > try { > $obj->DoSomething(); > } catch( Exception $e ) { > echo $e->getMessage(); > } > > In fact, in PHP 5 I cannot find anyway to determine the "return" value of the new operator. This leads me to believe that PHP 5's concept of proper OO is to always assume the object is created successfully, unless a catastrophic event happens, in which case an exception is thrown, and the object isn't created at all. This of course makes sense, but then I'm confused as to why the code samples all seem a bit incorrect. > > Interested in hearing thoughts on this... > > --- > Hans Zaunere > President, Founder > New York PHP > http://www.nyphp.org > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From george at omniti.com Wed Feb 9 21:36:39 2005 From: george at omniti.com (George Schlossnagle) Date: Wed, 9 Feb 2005 21:36:39 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: References: <20050209200136.889A1A85F0@virtu.nyphp.org> Message-ID: <01c4d9becdcb47d8e0993ab41234dd1c@omniti.com> On Feb 9, 2005, at 9:33 PM, Ophir Prusak wrote: > Hi Hans, > > I was dealing with this exact same dilemma on a project I'm currently > coding. > We ending up going with Adam's option B: move the code which can fail > to outside the constructor. > > In the original design the you could create an object where the > constructor could read some information from a database. > > In the final design, we moved the database code to a new load() > function that executes the actual database call. This does add an > additional step, but having the constructor throw an execution just > messes things up. This is a best practice in many OO languages (for instance c++) George From matt at jobsforge.com Wed Feb 9 22:00:31 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 9 Feb 2005 22:00:31 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: References: <20050209221504.C368BA87B0@virtu.nyphp.org> Message-ID: <78127e48505a22d3d439e967a6684d43@jobsforge.com> On Feb 9, 2005, at 5:39 PM, Adam Maccabee Trachtenberg wrote: > If you're concerned a non-essential portion can fail, you can either: > > a) Don't throw an exception in that instance, return the object, and > provide developers with a way to check status. > > b) Don't place that functionality in the constructor, and provide a > method to update the object with the additional data. > > -adam Is it possible to gain some insulation in certain cases by using a specific exception subclass object type? From matt at jobsforge.com Wed Feb 9 22:30:26 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 9 Feb 2005 22:30:26 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <78127e48505a22d3d439e967a6684d43@jobsforge.com> References: <20050209221504.C368BA87B0@virtu.nyphp.org> <78127e48505a22d3d439e967a6684d43@jobsforge.com> Message-ID: <474f3beee47a4241612129e3471d4e0c@jobsforge.com> On Feb 9, 2005, at 10:00 PM, Matthew Terenzio wrote: > > On Feb 9, 2005, at 5:39 PM, Adam Maccabee Trachtenberg wrote: > >> If you're concerned a non-essential portion can fail, you can either: >> >> a) Don't throw an exception in that instance, return the object, and >> provide developers with a way to check status. >> >> b) Don't place that functionality in the constructor, and provide a >> method to update the object with the additional data. >> >> -adam > > Is it possible to gain some insulation in certain cases by using a > specific exception subclass object type? To clarify what I mean, I'm wondering if Hans can't add an additional catch like Example 20-3->example 1 below and somehow only abort the instantiation if a critical exception is thrown http://us3.php.net/manual/en/language.exceptions.php > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From adam at trachtenberg.com Thu Feb 10 00:20:32 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 10 Feb 2005 00:20:32 -0500 (EST) Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <474f3beee47a4241612129e3471d4e0c@jobsforge.com> References: <20050209221504.C368BA87B0@virtu.nyphp.org> <78127e48505a22d3d439e967a6684d43@jobsforge.com> <474f3beee47a4241612129e3471d4e0c@jobsforge.com> Message-ID: On Wed, 9 Feb 2005, Matthew Terenzio wrote: > > Is it possible to gain some insulation in certain cases by using a > > specific exception subclass object type? > > To clarify what I mean, I'm wondering if Hans can't add an additional > catch like Example 20-3->example 1 below > and somehow only abort the instantiation if a critical exception is > thrown It up to you to choose if you want to abort the instantiation. However, if you want to return an error in a constructor, you need to throw some form of exception. It can either be the base Exception class, or a subclass, but you can't do something like returning false. -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 shiflett at php.net Thu Feb 10 01:53:59 2005 From: shiflett at php.net (Chris Shiflett) Date: Wed, 9 Feb 2005 22:53:59 -0800 (PST) Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210000152.GA2880@leitz> Message-ID: <20050210065359.62650.qmail@web52803.mail.yahoo.com> --- leam at reuel.net wrote: > OScommerce requires register globals to be on, and Zen Cart requires > some world-writeable directories in the DocumentRoot. THe other > possibilites are AgoraCart, Interchange Cart, and CubeCart. I've never looked at any of these things, but I've heard OScommerce mentioned a few times recently. It's not obvious to me what this software does by visiting their site. Is it just a content management and shopping cart thing, or does it have more sophisticated support for payment processing and such? There seem to be all of these common problem spaces where someone needs to write a solution that doesn't suck. I'm wondering if this is yet another one. > I'm reading Chris' security workbook :-) You might be interested to know that this has been renamed to the PHP Security Guide and is now a project of the PHP Security Consortium: http://phpsec.org/projects/guide/ It should be enhanced and translated as time passes. > How do you protect yourself against liability, and more > importantly how do you give the customer the security they deserve? I've been asking these same questions recently. It sounds like having a separate business entity protects you personally, and having a signed contract can protect your business. I haven't spoken with a lawyer yet, so take this with a grain of IANAL salt. As for security, I truly think that giving a damn is the most important step, so you're already on the right track. :-) Learn as much as you can (I've tried to do my best to provide lots of free resources over the past few years, and many are available at http://phpsec.org/), and focus on filtering input and escaping output. If you're security needs are very demanding, you can have someone perform a security audit of the code. Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ From leam at reuel.net Thu Feb 10 06:22:32 2005 From: leam at reuel.net (leam at reuel.net) Date: Thu, 10 Feb 2005 06:22:32 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210065359.62650.qmail@web52803.mail.yahoo.com> References: <20050210000152.GA2880@leitz> <20050210065359.62650.qmail@web52803.mail.yahoo.com> Message-ID: <20050210112232.GA2883@leitz> On Wed, Feb 09, 2005 at 10:53:59PM -0800, Chris Shiflett wrote: > --- leam at reuel.net wrote: > > OScommerce requires register globals to be on, and Zen Cart requires > > some world-writeable directories in the DocumentRoot. THe other > > possibilites are AgoraCart, Interchange Cart, and CubeCart. > > I've never looked at any of these things, but I've heard OScommerce > mentioned a few times recently. It's not obvious to me what this software > does by visiting their site. Is it just a content management and shopping > cart thing, or does it have more sophisticated support for payment > processing and such? > > There seem to be all of these common problem spaces where someone needs to > write a solution that doesn't suck. I'm wondering if this is yet another > one. Looks to be. I'm an SA by trade and have worked in secure/paranoid backgrounds before. My gut feeling is that the authors of this sort of thing accept that credit card systems are going to be hacked and they just hope people are too embarassed about it to reveal it. > > > I'm reading Chris' security workbook > > :-) > > You might be interested to know that this has been renamed to the PHP > Security Guide and is now a project of the PHP Security Consortium: > > http://phpsec.org/projects/guide/ > > It should be enhanced and translated as time passes. > Yeah, something led me to the PHPSec site and that's actually where I found it. PHPSec could probably make a bundle of money by offereing code-review and "certification" of the code; "This product has met the standards set forth by the PHP Security Consortium". > > How do you protect yourself against liability, and more > > importantly how do you give the customer the security they deserve? > > I've been asking these same questions recently. It sounds like having a > separate business entity protects you personally, and having a signed > contract can protect your business. I haven't spoken with a lawyer yet, so > take this with a grain of IANAL salt. The Small Business Info center I'm learning from says commercial insurance carriers often have "Small business packages". It may well depend on the insurer's understanding of the computer industry, so something to research. At the moment I'm totally secure as I don't have a product to sell! ;) > > As for security, I truly think that giving a damn is the most important > step, so you're already on the right track. :-) Learn as much as you can > (I've tried to do my best to provide lots of free resources over the past > few years, and many are available at http://phpsec.org/), and focus on > filtering input and escaping output. Is there enough filtering that can happen to over-come the problems with register_globals? I'm only about a third of the way through the work-book. > > If you're security needs are very demanding, you can have someone perform > a security audit of the code. > > Hope that helps. > > Chris Yup, and thanks for posting the Security guide on-line. *I* certainly am putting it to use. ciao! leam From tgales at tgaconnect.com Thu Feb 10 07:24:05 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 10 Feb 2005 07:24:05 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: Message-ID: <041e01c50f6b$69e882d0$d0893818@oberon1> Ophir Prusak writes: > I was dealing with this exact same dilemma on a project I'm > currently coding. We ending up going with Adam's option B: > move the code which can fail to outside the constructor. > > In the original design the you could create an object where > the constructor could read some information from a database. > > In the final design, we moved the database code to a new > load() function that executes the actual database call. This > does add an additional step, but having the constructor throw > an execution just messes things up. "Factory methods are sometimes a more flexible way to instantiate a class than directly calling the constructor of the class, for the following reasons: Unlike constructors, factory methods are not required to create a new object each time they are invoked... from 'The Factory Design Pattern' by Amit Goel http://www.ondotnet.com/pub/a/dotnet/2003/08/11/factorypattern.html In the article Amit goes on to point out that objects returned by a factory "need not even exist at the time the factory method is written." (the article draws on examples from the .NET Framework Class Library to explain the potential advantage of using a factory pattern) T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From lists at zaunere.com Thu Feb 10 10:00:21 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 10 Feb 2005 10:00:21 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210000152.GA2880@leitz> Message-ID: <20050210150027.B1E17A862F@virtu.nyphp.org> > I'm looking at doing some side work setting up CMS and shopping carts for small > businesses. The web-host I use has a few offerings that are php based and I'm > looking at the requirements and set up to see which one I'd want to support. > > OScommerce requires register globals to be on, and Zen Cart requires some world- > writeable directories in the DocumentRoot. THe other possibilites are AgoraCart, > Interchange Cart, and CubeCart. > > I'm reading Chris' security workbook and trying to critically review anything that > deals with money. My biggest fear is that one of my customers has a compromise and > the public image of the business goes so bad that they lose their business. > > Yeah, I'm generally a "worst case scenario" sort of guy... That's good - this is a "worst case scenario" sort of business... >From the above and subsequent posts, it sounds like you are on a shared host. Frankly, if you're really concerned about security and storing sensitive data (like CC numbers) get your own box. All the code review and careful planning is pointless when some other idiot on your server is running phpNuke 1.0 from 1997. > How do you protect yourself against liability, and more importantly how do you give > the customer the security they deserve? Get a lawyer - get a dedicated box (or even a jail). Doing the latter will require less of the former :) --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From ajai at bitblit.net Thu Feb 10 11:11:36 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 10 Feb 2005 11:11:36 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210065359.62650.qmail@web52803.mail.yahoo.com> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com> Message-ID: <420B87B8.8070701@bitblit.net> Chris Shiflett wrote: >I've never looked at any of these things, but I've heard OScommerce >mentioned a few times recently. It's not obvious to me what this software >does by visiting their site. Is it just a content management and shopping >cart thing, or does it have more sophisticated support for payment >processing and such? > >There seem to be all of these common problem spaces where someone needs to >write a solution that doesn't suck. I'm wondering if this is yet another >one. > Yes it is! ;-) I built a prototype site with OSC and found it to be a real hairball. And the last time I used Interchange it required Postgres and used a lot of Perl. Right now, Mambo with the phpshop component is the only decent thing Ive found. (Xaraya is an excellent framework too but alas they have no ecommerce components yet...). -- Aj. Systems Administrator / Developer From 1j0lkq002 at sneakemail.com Thu Feb 10 11:21:46 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Thu, 10 Feb 2005 11:21:46 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210150027.B1E17A862F@virtu.nyphp.org> References: <20050210150027.B1E17A862F@virtu.nyphp.org> Message-ID: <9672-41614@sneakemail.com> Hans Zaunere lists-at-zaunere.com |nyphp dev/internal group use| wrote: >>the customer the security they deserve? >> >> > How do you protect yourself against liability, and more importantly > how do you give > > >Get a lawyer - get a dedicated box (or even a jail). Doing the latter will require less of the former :) > > > Completely true about dedicated server, but if you do your own box then you can't share liability with the host, right? You are responsible for making that box secure, in addition to your app. Isn't it more fun to spread the liability across a number of deep pockets, distributing the risk and making a case for common practice etc? Scenario: If you were an underwriter considering offering errors and ommissions insurance or a business owner package for this application developer, which would be more risky? 1. He's following industry norms and leased a server from the hosting provider ATT, which offers levels of ecommerce features and allows him to pick and choose pieces, or 2. He's using a dedicated server he bought from vendor X, running hardened *BSD or XXES, acting as sysadmin, and has even demonstrated he's an excellent high-security sysadmin? After you get past the punchline (he's an insurance guy, so he doesn't know anything about computers) you go with #1 because of the access to deep pockets (ATT). You are offering insurance against ERRORS and MISTAKES so it doesn't matter if he's an expert... everybody makes mistakes. -=john andrews From john at cyber-ny.com Thu Feb 10 13:02:38 2005 From: john at cyber-ny.com (John Nunez) Date: Thu, 10 Feb 2005 13:02:38 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <420B87B8.8070701@bitblit.net> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com> <420B87B8.8070701@bitblit.net> Message-ID: Ajai, I agree osCommerce is a pain to alter. I have made so many changes that I think it would have been easier to just re-write it. But then all the modules would not work. Interchange looks good but my perl skills stinks. How are the features of Mambo w/ phpshop when compared to osCommerce? osCommerce features needed: Top selling items, newsletters, categories and a few other. New features needed: Manufacturer Mini Stores (just pages listing manufacturer's products with a different template), backend security with Groups and tons of other stuff my boss will come up with midway through this project. Thanks, John Nunez On Feb 10, 2005, at 11:11 AM, Ajai Khattri wrote: > Chris Shiflett wrote: > >> I've never looked at any of these things, but I've heard OScommerce >> mentioned a few times recently. It's not obvious to me what this >> software >> does by visiting their site. Is it just a content management and >> shopping >> cart thing, or does it have more sophisticated support for payment >> processing and such? >> >> There seem to be all of these common problem spaces where someone >> needs to >> write a solution that doesn't suck. I'm wondering if this is yet >> another >> one. >> > > Yes it is! ;-) > > I built a prototype site with OSC and found it to be a real hairball. > > And the last time I used Interchange it required Postgres and used a > lot of Perl. > > Right now, Mambo with the phpshop component is the only decent thing > Ive found. > > (Xaraya is an excellent framework too but alas they have no ecommerce > components yet...). > > -- > Aj. > Systems Administrator / Developer > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From ajai at bitblit.net Thu Feb 10 13:24:19 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 10 Feb 2005 13:24:19 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: References: <20050210065359.62650.qmail@web52803.mail.yahoo.com> <420B87B8.8070701@bitblit.net> Message-ID: <420BA6D3.2040600@bitblit.net> John Nunez wrote: > I agree osCommerce is a pain to alter. I have made so many changes > that I think it would have been easier to just re-write it. But then > all the modules would not work. Interchange looks good but my perl > skills stinks. > > How are the features of Mambo w/ phpshop when compared to osCommerce? > > osCommerce features needed: > Top selling items, newsletters, categories and a few other. The main thing with the mambo-phpshop plugin is that it gives you a pretty impressive pre-built backend for managing products, categories, vendors, shippers, payment methods, inventory, orders, etc. Since it use PHP and MySQL, the setup is pretty simple (in most cases this is a 10 minute install). In addition to the phpshop plugins, there are added separate components that give you things like featured products or top-sellers, etc. As far as customization goes, there are two facets to this: you need to build a custom Mambo site template (or several if you like) for the overall site, then you will need to customize the various product detail, checkout, etc. pages that the shop component uses when loading shop pages. Im still working on a site that uses this stuff so Im no expert and Im still learning stuff myself (but having worked through OSC and IC, I am already finding it much easier to build this than either of those). I usually refer people to www.buyinnovation.com as a reasonable example of a mambo-phpshop site. Ill probably publicize the site Im working on when its finished. > New features needed: > Manufacturer Mini Stores (just pages listing manufacturer's products > with a different template), backend security with Groups and tons of > other stuff my boss will come up with midway through this project. Addressing a few of these points: I believe the mini stores can be handled by the vendor features in mambo-phpshop but Ive not had the need to use it yet. (In addition, the privileges system allow mini-store owners to manage their own products separately from other store owners). The backend has various privilege levels that you assign to users you create - I dont know if these are fine-grained enough for what you're asking. The features list is here: http://mambo-phpshop.net/index.php?option=com_content&task=view&id=69&Itemid=62 but the best thing to do is to install and spend an hour playing with it. -- Aj. Systems Administrator / Developer From Consult at CovenantEDesign.com Thu Feb 10 13:30:29 2005 From: Consult at CovenantEDesign.com (Edward) Date: Thu, 10 Feb 2005 13:30:29 -0500 Subject: [nycphp-talk] Liability protection for consultants? References: <20050210065359.62650.qmail@web52803.mail.yahoo.com><420B87B8.8070701@bitblit.net> Message-ID: <001f01c50f9e$99a47af0$45896e41@ced> OsCommece, although very buggy and budensome to it's databases is still the most flexibly and fully supported open source solution I could find. If one is even and average PHPer he can make OsCommerce beautiful, and functional. With thousands of developers paticipating and hundreds and hundreds of modules and contributions being developed weekly, I strongly suggest giving it a good honest try. www.oscommerce.com http://forums.oscommerce.com http://www.oscommerce.com/community/contributions -Edward P.S. Here is he beggings of one of mine... www.lofjbooks.com ----- Original Message ----- From: "John Nunez" To: "NYPHP Talk" Sent: Thursday, February 10, 2005 1:02 PM Subject: Re: [nycphp-talk] Liability protection for consultants? > Ajai, > > I agree osCommerce is a pain to alter. I have made so many changes > that I think it would have been easier to just re-write it. But then > all the modules would not work. Interchange looks good but my perl > skills stinks. > > How are the features of Mambo w/ phpshop when compared to osCommerce? > > osCommerce features needed: > Top selling items, newsletters, categories and a few other. > > New features needed: > Manufacturer Mini Stores (just pages listing manufacturer's products > with a different template), backend security with Groups and tons of > other stuff my boss will come up with midway through this project. > > Thanks, > John Nunez > > On Feb 10, 2005, at 11:11 AM, Ajai Khattri wrote: > > > Chris Shiflett wrote: > > > >> I've never looked at any of these things, but I've heard OScommerce > >> mentioned a few times recently. It's not obvious to me what this > >> software > >> does by visiting their site. Is it just a content management and > >> shopping > >> cart thing, or does it have more sophisticated support for payment > >> processing and such? > >> > >> There seem to be all of these common problem spaces where someone > >> needs to > >> write a solution that doesn't suck. I'm wondering if this is yet > >> another > >> one. > >> > > > > Yes it is! ;-) > > > > I built a prototype site with OSC and found it to be a real hairball. > > > > And the last time I used Interchange it required Postgres and used a > > lot of Perl. > > > > Right now, Mambo with the phpshop component is the only decent thing > > Ive found. > > > > (Xaraya is an excellent framework too but alas they have no ecommerce > > components yet...). > > > > -- > > Aj. > > Systems Administrator / Developer > > > > _______________________________________________ > > New York PHP Talk > > Supporting AMP Technology (Apache/MySQL/PHP) > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From john at cyber-ny.com Thu Feb 10 13:38:18 2005 From: john at cyber-ny.com (John Nunez) Date: Thu, 10 Feb 2005 13:38:18 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <420BA6D3.2040600@bitblit.net> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com> <420B87B8.8070701@bitblit.net> <420BA6D3.2040600@bitblit.net> Message-ID: Thanks Aj! The roles would be more on lines of Product Manager (Add and remove products), Shipper, Accounting Personel, Admin. Another feature... Logging! We need to know who logged in to the backend and changed stuff. I am going to install Mambo on my gentoo box and see what I can do over the weekend. Thanks, John Nunez Cyber-NY Interactive 212-475-2721 www.cyber-ny.com john at cyber-ny.com On Feb 10, 2005, at 1:24 PM, Ajai Khattri wrote: > John Nunez wrote: > >> I agree osCommerce is a pain to alter. I have made so many changes >> that I think it would have been easier to just re-write it. But then >> all the modules would not work. Interchange looks good but my perl >> skills stinks. >> >> How are the features of Mambo w/ phpshop when compared to osCommerce? >> >> osCommerce features needed: >> Top selling items, newsletters, categories and a few other. > > The main thing with the mambo-phpshop plugin is that it gives you a > pretty impressive pre-built backend for managing products, categories, > vendors, shippers, payment methods, inventory, orders, etc. Since it > use PHP and MySQL, the setup is pretty simple (in most cases this is a > 10 minute install). In addition to the phpshop plugins, there are > added separate components that give you things like featured products > or top-sellers, etc. > > As far as customization goes, there are two facets to this: you need > to build a custom Mambo site template (or several if you like) for the > overall site, then you will need to customize the various product > detail, checkout, etc. pages that the shop component uses when loading > shop pages. > > Im still working on a site that uses this stuff so Im no expert and Im > still learning stuff myself (but having worked through OSC and IC, I > am already finding it much easier to build this than either of those). > I usually refer people to www.buyinnovation.com as a reasonable > example of a mambo-phpshop site. Ill probably publicize the site Im > working on when its finished. > >> New features needed: >> Manufacturer Mini Stores (just pages listing manufacturer's products >> with a different template), backend security with Groups and tons of >> other stuff my boss will come up with midway through this project. > > > Addressing a few of these points: > > I believe the mini stores can be handled by the vendor features in > mambo-phpshop but Ive not had the need to use it yet. (In addition, > the privileges system allow mini-store owners to manage their own > products separately from other store owners). > > The backend has various privilege levels that you assign to users you > create - I dont know if these are fine-grained enough for what you're > asking. > > The features list is here: > http://mambo-phpshop.net/index.php? > option=com_content&task=view&id=69&Itemid=62 but the best thing to do > is to install and spend an hour playing with it. > > > -- > Aj. > Systems Administrator / Developer > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From brian at vermonster.com Thu Feb 10 13:44:39 2005 From: brian at vermonster.com (Brian Kaney) Date: Thu, 10 Feb 2005 13:44:39 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <001f01c50f9e$99a47af0$45896e41@ced> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com> <420B87B8.8070701@bitblit.net> <001f01c50f9e$99a47af0$45896e41@ced> Message-ID: <1108061079.14111.231.camel@brian.vermonster.com> On Thu, 2005-02-10 at 13:30, Edward wrote: > OsCommece, although very buggy and budensome to it's databases is still the > most flexibly and fully supported open source solution I could find. If one > is even and average PHPer he can make OsCommerce beautiful, and functional. > With thousands of developers paticipating and hundreds and hundreds of > modules and contributions being developed weekly, I strongly suggest giving > it a good honest try. Perhaps it has been upgraded since my last bout with OSC, but based on my experience, I tend to disagree. All the logic is mixed into the presentation. So, for example, if you want to change a UI element you risk breaking core code. This seems inflexible to me. If OSC used a template engine or template design pattern, it would be a big step in the right direction. I spent a few months last summer (2004) trying to use OSC, so this is my direct experience. But new releases may have cleaned up "under the hood" stuff... - Brian From john at cyber-ny.com Thu Feb 10 13:43:12 2005 From: john at cyber-ny.com (John Nunez) Date: Thu, 10 Feb 2005 13:43:12 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <001f01c50f9e$99a47af0$45896e41@ced> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com><420B87B8.8070701@bitblit.net> <001f01c50f9e$99a47af0$45896e41@ced> Message-ID: <6ca67127740ec841ed02a3d0a92d309a@cyber-ny.com> Hi Edward, I have been working with osCommerce for two years now and it has a huge array of modules but I when it comes down to configuration of the visuals it really lacks! I heard rumors of a re-write to use Smarty templates and make the entire system OOP but I have been pulling copies and nothing major has been done. When the re-write is complete every module will need to be re-written for it. So I think I will invest some time in Mambo since I also want to create an online magazine with article approval system. Thanks, John On Feb 10, 2005, at 1:30 PM, Edward wrote: > OsCommece, although very buggy and budensome to it's databases is > still the > most flexibly and fully supported open source solution I could find. > If one > is even and average PHPer he can make OsCommerce beautiful, and > functional. > With thousands of developers paticipating and hundreds and hundreds of > modules and contributions being developed weekly, I strongly suggest > giving > it a good honest try. > > www.oscommerce.com > http://forums.oscommerce.com > http://www.oscommerce.com/community/contributions > > -Edward > P.S. Here is he beggings of one of mine... www.lofjbooks.com > > > ----- Original Message ----- > From: "John Nunez" > To: "NYPHP Talk" > Sent: Thursday, February 10, 2005 1:02 PM > Subject: Re: [nycphp-talk] Liability protection for consultants? > > >> Ajai, >> >> I agree osCommerce is a pain to alter. I have made so many changes >> that I think it would have been easier to just re-write it. But then >> all the modules would not work. Interchange looks good but my perl >> skills stinks. >> >> How are the features of Mambo w/ phpshop when compared to osCommerce? >> >> osCommerce features needed: >> Top selling items, newsletters, categories and a few other. >> >> New features needed: >> Manufacturer Mini Stores (just pages listing manufacturer's products >> with a different template), backend security with Groups and tons of >> other stuff my boss will come up with midway through this project. >> >> Thanks, >> John Nunez >> >> On Feb 10, 2005, at 11:11 AM, Ajai Khattri wrote: >> >>> Chris Shiflett wrote: >>> >>>> I've never looked at any of these things, but I've heard OScommerce >>>> mentioned a few times recently. It's not obvious to me what this >>>> software >>>> does by visiting their site. Is it just a content management and >>>> shopping >>>> cart thing, or does it have more sophisticated support for payment >>>> processing and such? >>>> >>>> There seem to be all of these common problem spaces where someone >>>> needs to >>>> write a solution that doesn't suck. I'm wondering if this is yet >>>> another >>>> one. >>>> >>> >>> Yes it is! ;-) >>> >>> I built a prototype site with OSC and found it to be a real hairball. >>> >>> And the last time I used Interchange it required Postgres and used a >>> lot of Perl. >>> >>> Right now, Mambo with the phpshop component is the only decent thing >>> Ive found. >>> >>> (Xaraya is an excellent framework too but alas they have no ecommerce >>> components yet...). >>> >>> -- >>> Aj. >>> Systems Administrator / Developer >>> >>> _______________________________________________ >>> New York PHP Talk >>> Supporting AMP Technology (Apache/MySQL/PHP) >>> http://lists.nyphp.org/mailman/listinfo/talk >>> http://www.nyphp.org >>> >> >> _______________________________________________ >> New York PHP Talk >> Supporting AMP Technology (Apache/MySQL/PHP) >> http://lists.nyphp.org/mailman/listinfo/talk >> http://www.nyphp.org >> > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From Consult at CovenantEDesign.com Thu Feb 10 13:47:58 2005 From: Consult at CovenantEDesign.com (Edward) Date: Thu, 10 Feb 2005 13:47:58 -0500 Subject: [nycphp-talk] Liability protection for consultants? References: <20050210065359.62650.qmail@web52803.mail.yahoo.com><420B87B8.8070701@bitblit.net><001f01c50f9e$99a47af0$45896e41@ced> <1108061079.14111.231.camel@brian.vermonster.com> Message-ID: <000701c50fa1$0ac633c0$45896e41@ced> no, not elly brian. till no .tpl files here. Perhaps it's my amiliarity with OsC that brings y bias... I guess I'll acquie this 'mambo' and see what it's possibilities are. -Eward P.S. Still a big OsC fan. ;P ----- Original Message ----- From: "Brian Kaney" To: "NYPHP Talk" Sent: Thursday, February 10, 2005 1:44 PM Subject: Re: [nycphp-talk] Liability protection for consultants? > On Thu, 2005-02-10 at 13:30, Edward wrote: > > OsCommece, although very buggy and budensome to it's databases is still the > > most flexibly and fully supported open source solution I could find. If one > > is even and average PHPer he can make OsCommerce beautiful, and functional. > > With thousands of developers paticipating and hundreds and hundreds of > > modules and contributions being developed weekly, I strongly suggest giving > > it a good honest try. > > Perhaps it has been upgraded since my last bout with OSC, but based on > my experience, I tend to disagree. All the logic is mixed into the > presentation. So, for example, if you want to change a UI element you > risk breaking core code. This seems inflexible to me. > > If OSC used a template engine or template design pattern, it would be a > big step in the right direction. > > I spent a few months last summer (2004) trying to use OSC, so this is my > direct experience. But new releases may have cleaned up "under the > hood" stuff... > > - Brian > > > > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From lists at zaunere.com Thu Feb 10 14:03:34 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 10 Feb 2005 14:03:34 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <9672-41614@sneakemail.com> Message-ID: <20050210190346.D5522A862F@virtu.nyphp.org> > > How do you protect yourself against liability, and more importantly > > how do you give > > > > > >Get a lawyer - get a dedicated box (or even a jail). Doing the latter will require > less of the former :) > > > > Completely true about dedicated server, but if you do your own box then > you can't share liability with the host, right? You are responsible for > making that box secure, in addition to your app. > > Isn't it more fun to spread the liability across a number of deep > pockets, distributing the risk and making a case for common practice etc? It sure is, and this is even more doable with a dedicated host than with shared. Simple reason: hosting providers tend to give better SLAs when you pay them more money. Dedicated hosting with Verio, for instance, would give you more security and monitoring than you could do yourself, let alone some mom+pop shared hosting. Dedicated hosting isn't necessarily collocation; it's often their hardware, and their job to maintain the box. But this brings another good point. Even if you do need/want to go with shared hosting for sensitive information, pick a big name provider - with big pockets and their own team of lawyers. While this isn't always true, chances are the big names have more security, monitoring, and experience than the smaller companies. This is by no means against the small hosting firms, but sometimes size does matter. There are blue chips of hosting, and just like no one ever got fired for buying IBM, not many have gotten fired for buying Rackspace, Verio, etc. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From ajai at bitblit.net Thu Feb 10 14:35:45 2005 From: ajai at bitblit.net (Ajai Khattri) Date: Thu, 10 Feb 2005 14:35:45 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <6ca67127740ec841ed02a3d0a92d309a@cyber-ny.com> References: <20050210065359.62650.qmail@web52803.mail.yahoo.com><420B87B8.8070701@bitblit.net> <001f01c50f9e$99a47af0$45896e41@ced> <6ca67127740ec841ed02a3d0a92d309a@cyber-ny.com> Message-ID: <420BB791.9090201@bitblit.net> John Nunez wrote: > So I think I will invest some time in Mambo since I also want to > create an online magazine with article approval system. If you want to build a pure magazine site, then you may be interested in something Ive been playing with (in between Mambo that is!) which seems to be excellent for this kind of thing: Xaraya (xaraya.com). Unfortunately, Xaraya doesn't have ecommerce features yet so Im not using it for that. But I built a mini intranet with it and found it really easy to customize (in some ways, easier than Mambo). It separates presentation and logic and uses XML tags. But it is generic enough to build any sort of content site (blog, help pages, wiki, whatever). The admin tools include the ability to create your own document types without writing any code. Also, instead of having specialized modules for a feature, it has something called hooks that allow you to use one module's functions in another. For example, if you had a recipe site and wanted to allow visitors to comment on a recipe, you could hook the comments module to that publication type. (Im probably not doing a good job of explaining this concept but it basically means you dont need to write a new module that combines the functionality others). Ive been playing with too many content systems trying to find an ideal, but, you know what they say about the right tool for the right job... -- Aj. Systems Administrator / Developer From mitch.pirtle at gmail.com Thu Feb 10 15:38:28 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 10 Feb 2005 15:38:28 -0500 Subject: [nycphp-talk] Liability protection for consultants? In-Reply-To: <20050210190346.D5522A862F@virtu.nyphp.org> References: <9672-41614@sneakemail.com> <20050210190346.D5522A862F@virtu.nyphp.org> Message-ID: <330532b605021012382e26dc1a@mail.gmail.com> I'd like to add that regardless of where you host, or what software you use, or what services you provide or what you charge - if you develop software for money, then you absolutely need liability insurance. Trust me on this one... Someday you might find yourself 'collateral damage' as the result of some bigger firms being more dangerous and resistant to legal attack, so the little guy gets crushed between the clashing titans. If you write code for people and accept money for it, you MUST get liability insurance. -- Mitch, and I am NOT an insurance salesman ;-) From faber at linuxnj.com Thu Feb 10 18:13:03 2005 From: faber at linuxnj.com (Faber Fedor) Date: Thu, 10 Feb 2005 18:13:03 -0500 Subject: [nycphp-talk] Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050210021726.GD2880@leitz> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> Message-ID: <20050210231303.GA17714@uranus.faber.nom> On 09/02/05 21:17 -0500, leam at reuel.net wrote: > This is getting worse as I go. Interchange doesn't work on CPanel, which the host uses. Agora cart looks real clunky and I need something that the customer can easily use to add to the cart. CubeCart is moving servers, is commercial, and I can't tell how it looks. My feelings exactly. I'm finding Mambo and phpshopcart to be a royal PITA to get installed. Well, I can't even get phpshopcart installed since I'm getting fatal errors from the Mambo (PEAR?) libraries. Now, it turns out that most of these shopping carts are overkill for what I need. All I need to do, ecommerce-wise, is to track the items the end-user wants, gather up their pertinent info at checkout time, encrypt it all and email it to my client. No credit-cards or Paypal. No online registration. Anyone know of a CMS/shopping cart that *isn't* all tricked out? -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From matt at jobsforge.com Thu Feb 10 18:55:24 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Thu, 10 Feb 2005 18:55:24 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: References: <20050209221504.C368BA87B0@virtu.nyphp.org> <78127e48505a22d3d439e967a6684d43@jobsforge.com> <474f3beee47a4241612129e3471d4e0c@jobsforge.com> Message-ID: <1c5be5183a4f58190a74dc07200997ee@jobsforge.com> On Feb 10, 2005, at 12:20 AM, Adam Maccabee Trachtenberg wrote: > >>> Is it possible to gain some insulation in certain cases by using a >>> specific exception subclass object type? >> >> To clarify what I mean, I'm wondering if Hans can't add an additional >> catch like Example 20-3->example 1 below >> and somehow only abort the instantiation if a critical exception is >> thrown > > It up to you to choose if you want to abort the > instantiation. However, if you want to return an error in a > constructor, you need to throw some form of exception. It can either > be the base Exception class, or a subclass, but you can't do something > like returning false. Yeah, but some generic exception thrown from a class two or three levels away shouldn't be a concern of a developer who may not even be aware of the inner workings of that class. Back at the example below, I do believe something like the Java compiler would complain about new Child in the Top class because the child constructor can throw a bad value exception, therefore it must be caught. That would make the subsequent user of the Top class shielded , no? That is, the exception would be caught before it got into the arms of the try/catch below. But with no enforcement, I guess it's kinda hairy. Correct me if I'm wrong. I'm learning this, not arguing it. class Top { protected $Child; public function __construct( $value ) { $this->Child = new Child($value); } } class Child { public function __construct( $value ) { throw new Exception('Bad Value'); } } try { $mytop = new Top($_POST); } catch( Exception $e ) { echo 'You had an exception'; } From mitch.pirtle at gmail.com Thu Feb 10 20:29:23 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 10 Feb 2005 20:29:23 -0500 Subject: [nycphp-talk] Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050210231303.GA17714@uranus.faber.nom> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> Message-ID: <330532b6050210172998f29d7@mail.gmail.com> Hey Faber. On Thu, 10 Feb 2005 18:13:03 -0500, Faber Fedor wrote: > > My feelings exactly. I'm finding Mambo and phpshopcart to be a royal PITA to get > installed. Well, I can't even get phpshopcart installed since I'm > getting fatal errors from the Mambo (PEAR?) libraries. Nope, no PEAR libraries in Mambo, still waiting for a chance to put ADOdb in there. Can you send the errors that you are getting? With more detail I'm certain I can help. Mambo and phpShop is actually the easiest way for anyone to get started, so we probably just have a config or permissions problem. > Now, it turns out that most of these shopping carts are overkill for > what I need. All I need to do, ecommerce-wise, is to track the items > the end-user wants, gather up their pertinent info at checkout time, > encrypt it all and email it to my client. No credit-cards or Paypal. > No online registration. Sounds like you don't need a shopping cart as much as you need a filebase, or some sort of file distribution tool. Mambo has several, as do some of the other CMS' available. Maybe a shopping cart isn't the best approach? -- Mitch From faber at linuxnj.com Thu Feb 10 23:15:40 2005 From: faber at linuxnj.com (Faber Fedor) Date: Thu, 10 Feb 2005 23:15:40 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <330532b6050210172998f29d7@mail.gmail.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> Message-ID: <20050211041540.GA17929@uranus.faber.nom> On 10/02/05 20:29 -0500, Mitch Pirtle wrote: > Hey Faber. > > On Thu, 10 Feb 2005 18:13:03 -0500, Faber Fedor wrote: > > > > My feelings exactly. I'm finding Mambo and phpshopcart to be a royal PITA to get > > installed. Well, I can't even get phpshopcart installed since I'm > > getting fatal errors from the Mambo (PEAR?) libraries. > > Nope, no PEAR libraries in Mambo, still waiting for a chance to put > ADOdb in there. Can you send the errors that you are getting? With > more detail I'm certain I can help. Log in as Admin, select Componenets->Download mambo-phpShop (the first one (I have two)), and select "Downloand Component". It d/les from mamboforge.net and the errors are: <-------------------------< errors >-------------------> Warning: Failed opening '/var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl//pclerror.lib.' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php on line 78 Warning: Failed opening '/var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl//pcltrace.lib.' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php on line 82 Fatal error: Call to undefined function: trfctstart() in /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php on line 379 <-------------------------< errors >-------------------> If I chose "Dowload Module", I get the same errors. > Mambo and phpShop is actually the easiest way for anyone to get > started, :-? I had a devil of a time figuring out where to place the contents of the mambo-phpShop files to get Mambo to see them. > so we probably just have a config or permissions problem. That's what I thought. I've checked the permissions and they're 755. > > Now, it turns out that most of these shopping carts are overkill for > > what I need. All I need to do, ecommerce-wise, is to track the items > > the end-user wants, gather up their pertinent info at checkout time, > > encrypt it all and email it to my client. No credit-cards or Paypal. > > No online registration. > > Sounds like you don't need a shopping cart as much as you need a > filebase, or some sort of file distribution tool. Mambo has several, > as do some of the other CMS' available. Maybe a shopping cart isn't > the best approach? Possibly not, but I've not come across a better solution. Dp you have any links handy? -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From mitch.pirtle at gmail.com Fri Feb 11 00:00:40 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Fri, 11 Feb 2005 00:00:40 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050211041540.GA17929@uranus.faber.nom> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211041540.GA17929@uranus.faber.nom> Message-ID: <330532b605021021007ac3da2@mail.gmail.com> On Thu, 10 Feb 2005 23:15:40 -0500, Faber Fedor wrote: > On 10/02/05 20:29 -0500, Mitch Pirtle wrote: > > Hey Faber. > > > > On Thu, 10 Feb 2005 18:13:03 -0500, Faber Fedor wrote: > > > > > > My feelings exactly. I'm finding Mambo and phpshopcart to be a royal PITA to get > > > installed. Well, I can't even get phpshopcart installed since I'm > > > getting fatal errors from the Mambo (PEAR?) libraries. > > > > Nope, no PEAR libraries in Mambo, still waiting for a chance to put > > ADOdb in there. Can you send the errors that you are getting? With > > more detail I'm certain I can help. > > Log in as Admin, select Componenets->Download mambo-phpShop (the first > one (I have two)), and select "Downloand Component". It d/les from > mamboforge.net and the errors are: > > <-------------------------< errors >-------------------> > Warning: Failed opening > '/var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl//pclerror.lib.' > for inclusion (include_path='.:/usr/share/pear') in > /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php > on line 78 > > Warning: Failed opening > '/var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl//pcltrace.lib.' > for inclusion (include_path='.:/usr/share/pear') in > /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php > on line 82 > > Fatal error: Call to undefined function: trfctstart() in > /var/www/html/trimline.us/cms/Mambo/administrator/includes/pcl/pcltar.lib.php > on line 379 That doesn't mean Mambo uses PEAR though, that is just PHP showing you your include path saying that it cannot find the files it is looking for - and /usr/share/pear is in your include path (common for PHP). You must be using some 3rd party goodies for all of this, as Mambo does not download packages. I'd suggest downloading the phpShop component from here: http://mamboforge.net/frs/?group_id=38&release_id=2916 And skip the remote installer for now (sounds like it still needs some work). You can install the component using the standard installer in the admin -> Components -> Install... If you just install the component, you will have no problems. Just make sure you clear out any prevous broken installations of phpShop before you install the component this time. -- Mitch From faber at linuxnj.com Fri Feb 11 09:18:50 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 11 Feb 2005 09:18:50 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <330532b605021021007ac3da2@mail.gmail.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211041540.GA17929@uranus.faber.nom> <330532b605021021007ac3da2@mail.gmail.com> Message-ID: <20050211141850.GA21068@uranus.faber.nom> On 11/02/05 00:00 -0500, Mitch Pirtle wrote: > You must be using some 3rd party goodies for all of this, as Mambo > does not download packages. It was the phpshop_installer I was trying to use. > I'd suggest downloading the phpShop component from here: > > http://mamboforge.net/frs/?group_id=38&release_id=2916 >From the way I read it, this page contains a version of Mambo with phpshop already integrated. I'm going to try that. Thanks. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From leam at reuel.net Fri Feb 11 13:03:19 2005 From: leam at reuel.net (leam) Date: Fri, 11 Feb 2005 12:03:19 -0600 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] Message-ID: > On 11/02/05 00:00 -0500, Mitch Pirtle wrote: > > You must be using some 3rd party goodies for all of this, as Mambo > > does not download packages. > > It was the phpshop_installer I was trying to use. > > > I'd suggest downloading the phpShop component from here: > > > > http://mamboforge.net/frs/?group_id=38&release_id=2916 > > >From the way I read it, this page contains a version of Mambo with > phpshop already integrated. I'm going to try that. > > Thanks. > > > -- > > Regards, > > Faber Interestingly, a fellow LUG member down here works for an ISP and they'll give local LUG members a $50/month/1U colocation deal. Speaking of isolating the host makes this good timing. Now if I can just figure out a way to make it pay but not be quite so "shared", it'd be neat. Especially since I can take all the PHP security stuff and set up a decently secure server. :) ciao! leam From faber at linuxnj.com Fri Feb 11 14:46:58 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 11 Feb 2005 14:46:58 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <330532b6050210172998f29d7@mail.gmail.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> Message-ID: <20050211194658.GA22062@uranus.faber.nom> On 10/02/05 20:29 -0500, Mitch Pirtle wrote: > On Thu, 10 Feb 2005 18:13:03 -0500, Faber Fedor wrote: > > Now, it turns out that most of these shopping carts are overkill for > > what I need. All I need to do, ecommerce-wise, is to track the items > > the end-user wants, gather up their pertinent info at checkout time, > > encrypt it all and email it to my client. No credit-cards or Paypal. > > No online registration. > > Sounds like you don't need a shopping cart as much as you need a > filebase, or some sort of file distribution tool. Mambo has several, > as do some of the other CMS' available. Maybe a shopping cart isn't > the best approach? Mitch, Can you point me to these "filebases" that you speak of? The ones I see look to be templates. Out of the box Mambo/phpshop looks to be overkill as well, so something simpler would seem to be in order. Also, the CSS don't work very well under Linux/Firefox; MS/Firedox and MS/IE look okay. I assume I'll need to redo the CSSes? -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From jayeshsh at ceruleansky.com Fri Feb 11 17:08:57 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Fri, 11 Feb 2005 17:08:57 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries - Zen Cart Message-ID: <420D2CF9.9060102@ceruleansky.com> Hello all, I have been having quite an 'interesting' time with some Zen Cart issues. The customer had Zen Cart installed on his shared host, Dreamhost. The only payment module he had set up was PayPal. On step 3 of the checkout process, the cart would fail to post to PayPal, because it did not draw the required PayPal HTML form. Instead, it simply posted to his own site. (For a detailed description of the initial problem, please see my post here: http://www.zen-cart.com/modules/ipb/index.php?showtopic=16869&st=0&#entry96673 ) Anyway, "Kim" from this forum with some 10,000 posts to her name, suggested that the reason it was failing was because the "Zend Optimizer" was not installed along with Dreamhost's PHP 4.3.10 binary. This seemed wrong to me, because Zend Optmizer only deals with 'interpreting' compiled / encoded PHP code, and none of Zen Cart's code is compiled. I installed Zen Cart on my local Windows, PHP 5, Apache 2, MySQL machine, and it ran fine. So, we thought that perhaps doing a custom compile of PHP 5 on Dreamhost ( for more info. please see: http://www.moztips.com/php5_install/ ) as a CGI binary, and registering that binary through a .htaccess file for .php files would make the program work, because there seemed to be some conflict between the current PHP version and Zen Cart. The binary compiled file, the phpinfo() test script ( http://www.permanentimpressions1.com/phpinfo.php5 ) and other test scripts worked fine. But then, when encountering the main "index.php" page for Zen Cart (which serves as the main page controller / director to all its inner modules), produced an "internal server error". I custom compiled PHP 4.3.10 too, the phpinfo ( http://www.permanentimpressions1.com/phpinfo.php4 ) and test script worked fine too, but I got the same error with Zen Cart. Apache's error logs said the following: [Fri Feb 11 12:53:58 2005] [error] [client 209.194.148.130] Premature end of script headers: /home/*username*/*domain*/cgi-bin/php4.cgi I then decided to run the script in question through the command line to see what was happening: cd /home/*username*/php/bin ./php /home/*username*/domainname.com/index.php Then I got: Segmentation fault (The same thing happened with the PHP 4 compiled binary) But with Dreamhost's PHP binary, it worked (And all the HTML spewed forth) # It looks up php from the system path and runs it php /home/*username*/domainname.com.com/index.php Does anyone know: a) Why Zen Cart failed to go past Step 3 in the first place? b) Why the PHP interpreters are seg faulting on this index.php script? (It must be one heck of script!) Thanks a billion in advance for any help. - Jay From egewirtz at rcn.com Fri Feb 11 17:24:51 2005 From: egewirtz at rcn.com (Eric Gewirtz) Date: Fri, 11 Feb 2005 17:24:51 -0500 Subject: [nycphp-talk] PEAR Prepare and Oracle to_date Message-ID: <00b101c51088$8406c500$6501a8c0@Libby> Hi - I'm having issues with getting a compiled query working with PEAR using ->prepare when I have a DATE field in my Oracle 10g table. I have gotten the 'prepare' to work on a table with fields other then type DATE - so I know my 'connect', 'prepare' and 'execute' with the compiled query works. Any help would be much appreciated. I have tried numerous iterations of using 'to_date' and the date mask. Below is my code that works without a date field and it works fine This is the oracle table it inserts into CREATE TABLE CUSTMAST.TESTERIC ( FNAME VARCHAR2(20) NOT NULL, LNAME VARCHAR2(25) NOT NULL, AGE NUMBER(5,0) NOT NULL ) tablespace "WADATA04"; getMessage()); $sql = "INSERT INTO TESTERIC (FNAME,LNAME,AGE) VALUES (?,?,?)"; echo "The prepare sql is below \n"; echo "$sql \n"; $compiled = $db->prepare($sql); if (DB::isError($compiled)) { echo "PREPARE FAILED \n"; die($db->getMessage()); } echo "data string is \n"; var_dump($arrData); $result = $db->execute($compiled, $arrData); if (DB::isError($result)) { echo "EXECUTE FAILED \n"; die($db->getMessage()); } ?> This code does not work - it is using the Oracle to_date in the VALUES parms This is the oracle table it inserts in to CREATE TABLE CUSTMAST.TESTERIC ( FNAME VARCHAR2(20) NOT NULL, LNAME VARCHAR2(25) NOT NULL, AGE NUMBER(5,0) NOT NULL, BDATE DATE Not NULL ) tablespace "WADATA04"; getMessage()); $sql = "INSERT INTO TESTERIC (FNAME,LNAME,AGE,BDATE) VALUES (?,?,?,to_date(?,'".DATE_MASK_ORA."')"; echo "The prepare sql is below \n"; echo "$sql \n"; $compiled = $db->prepare($sql); if (DB::isError($compiled)) { echo "PREPARE FAILED \n"; die($db->getMessage()); } echo "data string is \n"; var_dump($arrData); $result = $db->execute($compiled, $arrData); if (DB::isError($result)) { echo "EXECUTE FAILED \n"; die($db->getMessage()); } ?> Here is the output of this program The prepare sql is below INSERT INTO TESTERIC (FNAME,LNAME,AGE,BDATE) VALUES (?,?,?,to_date(?,'yyyy-mm-dd hh24:mi:ss') data string is array(4) { [0]=> string(4) "Eric" [1]=> string(7) "Gewirtz" [2]=> int(46) [3]=> string(21) "'9999-12-31 23:59:59'" } EXECUTE FAILED Eric Gewirtz SolutionOne Phone - 845-729-7800 Fax - 845-279-5502 egewirtz at rcn.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Fri Feb 11 18:00:10 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 11 Feb 2005 18:00:10 -0500 Subject: [nycphp-talk] PEAR Prepare and Oracle to_date In-Reply-To: <00b101c51088$8406c500$6501a8c0@Libby> References: <00b101c51088$8406c500$6501a8c0@Libby> Message-ID: <20050211230010.GA10046@panix.com> Hi Eric: On Fri, Feb 11, 2005 at 05:24:51PM -0500, Eric Gewirtz wrote: ... snip ... Wow. That's a long example. In the future, may I suggest simplifying things? Makes it easier for us, let alone you, to figure out what's going on. You're using the wrong object to get the error message. Second, use the getDebugInfo() method instead because it shows the native error message from the DBMS. > $result = $db->execute($compiled, $arrData); > if (DB::isError($result)) { > echo "EXECUTE FAILED \n"; > die($db->getMessage()); So, make that last line: die($result->getDebugInfo()); Now you should be able to figure out what's going on for yourself from the error message. --Dan PS: Take a look at http://www.expita.com/nomime.html. -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From mitch.pirtle at gmail.com Fri Feb 11 19:09:55 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Fri, 11 Feb 2005 19:09:55 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050211194658.GA22062@uranus.faber.nom> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211194658.GA22062@uranus.faber.nom> Message-ID: <330532b6050211160946d84da3@mail.gmail.com> Hey Faber! On Fri, 11 Feb 2005 14:46:58 -0500, Faber Fedor wrote: > > Can you point me to these "filebases" that you speak of? The ones I see > look to be templates. There are several projects available: * DocMan document manager (use software as documents) http://www.mambodocman.com/ * Remository (file/software repository) http://mamboforge.net/projects/remository/ Those should get you started, or at least provide some inspiration ;-) > Out of the box Mambo/phpshop looks to be overkill as well, so something > simpler would seem to be in order. That is my thought as well, you will spend a tremendous amount of time trying to turn phpShop into something it was not intended for. > Also, the CSS don't work very well under Linux/Firefox; MS/Firedox and > MS/IE look okay. I assume I'll need to redo the CSSes? That is just the template, and I assume you mean SolarFlare, the default that ships with 4.5.1 series. It is a very beautiful template, but also a very, VERY temperamental one. Check out the following site for a demo of hundreds of templates: http://demo.mambohut.com Find anything you like? Probably will find the template for download at: http://www.mamboportal.com/ Didn't like a single one? Then take the tutorial and do it yourself, you will be amazed at how easily you can create a tempate for Mambo (there is even a DreamWeaver extension for the html-source-impaired): http://www.mambosolutions.com/dw_tutorial/ That might give you a better experience trying Mambo. BTW, we are getting ready to announce a new family of sites to bring all this information together, hoping to speed up both adoption and the learning curve (yes, I will personally make sure API documentation is very visible!). -- Mitch, frantically preparing for LinuxWorld in Boston next week (eek!) From kigathi at gmail.com Fri Feb 11 22:12:36 2005 From: kigathi at gmail.com (Eric K.) Date: Fri, 11 Feb 2005 22:12:36 -0500 Subject: [nycphp-talk] Compiling a PHP scripts into a standalone executable Message-ID: I'm working on a one-script project (pretty basic: takes some _GET params, compares them against a file on the system and echoes some text as the result, some Linux Apache PHP). Is it possible to compile it into a standalone cgi executable so that I can run it on another Linux system that may not have PHP installed? From egewirtz at rcn.com Fri Feb 11 22:34:30 2005 From: egewirtz at rcn.com (Eric Gewirtz) Date: Fri, 11 Feb 2005 22:34:30 -0500 Subject: [nycphp-talk] PEAR Prepare and Oracle to_date In-Reply-To: <20050211230010.GA10046@panix.com> Message-ID: <00c801c510b3$c602a660$6501a8c0@Libby> Thanks Daniel, I will attempt to be more concise in the future. Your suggestion was helpful, at least now I know what Oracle is complaining about. Unfortunately, the error message is not useful because my date is in range even though Oracle is saying it is out of range. Below is the output of my code. I did a var_dump of the data array that I am passing to ->execute, my date looks good and the format of the compiled sql insert does not have a syntax error. data string is array(4) { [0]=> string(4) "Eric" [1]=> string(7) "Gewirtz" [2]=> int(46) [3]=> string(21) "'2010-12-31 23:59:59'" } EXECUTE FAILED INSERT INTO TESTERIC (FNAME,LNAME,AGE,BDATE) VALUES (?,?,?,to_date(?,'yyyy-mm-dd hh24:mi:ss')) [nativecode=ORA-01841: (full) year must be between -4713 and +9999, and not be 0 ] Any help would be appreciated - thanks Eric Eric Gewirtz SolutionOne Phone - 845-729-7800 Fax - 845-279-5502 egewirtz at rcn.com >-----Original Message----- >From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On >Behalf Of Daniel Convissor >Sent: Friday, February 11, 2005 6:00 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PEAR Prepare and Oracle to_date > >Hi Eric: > >On Fri, Feb 11, 2005 at 05:24:51PM -0500, Eric Gewirtz wrote: >... snip ... > >Wow. That's a long example. In the future, may I suggest simplifying >things? Makes it easier for us, let alone you, to figure out what's going >on. > >You're using the wrong object to get the error message. Second, use the >getDebugInfo() method instead because it shows the native error message >from the DBMS. > >> $result = $db->execute($compiled, $arrData); >> if (DB::isError($result)) { >> echo "EXECUTE FAILED \n"; >> die($db->getMessage()); > >So, make that last line: > > die($result->getDebugInfo()); > >Now you should be able to figure out what's going on for yourself from the >error message. > >--Dan > >PS: Take a look at http://www.expita.com/nomime.html. > >-- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 >_______________________________________________ >New York PHP Talk >Supporting AMP Technology (Apache/MySQL/PHP) >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From egewirtz at rcn.com Fri Feb 11 23:05:15 2005 From: egewirtz at rcn.com (Eric Gewirtz) Date: Fri, 11 Feb 2005 23:05:15 -0500 Subject: [nycphp-talk] PEAR Prepare and Oracle to_date In-Reply-To: <20050211230010.GA10046@panix.com> Message-ID: <00cf01c510b8$11add900$6501a8c0@Libby> I found the solution. Daniel thanks again for pointing me to the getDebugInfo(). I did some hunting on the web for the ora-01841 error message I was getting and found the following information; Jon, it looks like you are wanting to use to_date with two parameters but you are only giving it one bind variable (which,taken together, will be something Oracle won't know to convert into a date). Oracle is trying to take your single bind variable interpret it as a date using the default date format for your Oracle session (which is probably YYYY-MM-DD already). Give two bind variables a try, and it should work. -- Michael A. Cleverly, March 21, 2001 This was exactly what I was doing - I was only giving to_date one parameter and hard coding the date mask - now my insert sql to be compiled by the prepare looks like this (THIS IS CORRECT): "INSERT INTO TESTERIC (FNAME,LNAME,AGE,BDATE) VALUES (?,?,?,to_date(?,?))"; vs THIS IS WRONG "INSERT INTO TESTERIC (FNAME,LNAME,AGE,BDATE) VALUES (?,?,?,to_date(?,'".DATE_MASK_ORA."'))"; Eric Eric Gewirtz SolutionOne Phone - 845-729-7800 Fax - 845-279-5502 egewirtz at rcn.com >-----Original Message----- >From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On >Behalf Of Daniel Convissor >Sent: Friday, February 11, 2005 6:00 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PEAR Prepare and Oracle to_date > >Hi Eric: > >On Fri, Feb 11, 2005 at 05:24:51PM -0500, Eric Gewirtz wrote: >... snip ... > >Wow. That's a long example. In the future, may I suggest simplifying >things? Makes it easier for us, let alone you, to figure out what's going >on. > >You're using the wrong object to get the error message. Second, use the >getDebugInfo() method instead because it shows the native error message >from the DBMS. > >> $result = $db->execute($compiled, $arrData); >> if (DB::isError($result)) { >> echo "EXECUTE FAILED \n"; >> die($db->getMessage()); > >So, make that last line: > > die($result->getDebugInfo()); > >Now you should be able to figure out what's going on for yourself from the >error message. > >--Dan > >PS: Take a look at http://www.expita.com/nomime.html. > >-- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 >_______________________________________________ >New York PHP Talk >Supporting AMP Technology (Apache/MySQL/PHP) >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From jayeshsh at ceruleansky.com Sat Feb 12 11:02:01 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Sat, 12 Feb 2005 11:02:01 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries - Zen Cart Message-ID: <420E2879.6060603@ceruleansky.com> Hello all, Regarding my previous post - here is a backtrace produced by the gdb debugger when PHP (5) crashes. This was produced by a debug build, with the same configuration. I also forgot to mention in my previous post that this error includes when index.php (of Zen Cart) includes the file 'includes/application_top.php'. Does it seem to be a problem with MySQL ? ------------------------------------------------------------------- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 1602)] 0x40501219 in malloc () from /lib/libc.so.6 (gdb) bt #0 0x40501219 in malloc () from /lib/libc.so.6 #1 0x40501074 in malloc () from /lib/libc.so.6 #2 0x404f4681 in fopen () from /lib/libc.so.6 #3 0x4056d3cf in __res_ninit () from /lib/libc.so.6 #4 0x4056d1a0 in __res_ninit () from /lib/libc.so.6 #5 0x40570429 in __nss_hostname_digits_dots () from /lib/libc.so.6 #6 0x40572268 in gethostbyname_r () from /lib/libc.so.6 #7 0x40099c6e in my_gethostbyname_r () from /usr//lib/libmysqlclient.14 #8 0x400abe06 in mysql_real_connect () from /usr//lib/libmysqlclient.14 #9 0x080f7071 in php_mysql_do_connect (ht=3, return_value=0x8530acc, this_ptr=0x0, return_value_used=1, persistent=1) at /home/singerm/src/php-5.0.3/ext/mysql/php_mysql.c:679 #10 0x080f785c in zif_mysql_pconnect (ht=3, return_value=0x8530acc, this_ptr=0x0, return_value_used=1) at /home/singerm/src/php-5.0.3/ext/mysql/php_mysql.c:843 #11 0x082b51d8 in zend_do_fcall_common_helper (execute_data=0xbfffb940, opline=0x8513adc, op_array=0x8512d4c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:2711 #12 0x082b5887 in zend_do_fcall_handler (execute_data=0xbfffb940, opline=0x8513adc, op_array=0x8512d4c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:2843 #13 0x082b1ce2 in execute (op_array=0x8512d4c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:1400 #14 0x082b5349 in zend_do_fcall_common_helper (execute_data=0xbfffba10, opline=0x40764e28, op_array=0x84de54c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:2740 #15 0x082b5796 in zend_do_fcall_by_name_handler (execute_data=0xbfffba10, opline=0x40764e28, op_array=0x84de54c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:2825 #16 0x082b1ce2 in execute (op_array=0x84de54c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:1400 #17 0x082b73b7 in zend_include_or_eval_handler (execute_data=0xbfffce50, opline=0x84e35c4, op_array=0x84d823c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:3565 #18 0x082b1ce2 in execute (op_array=0x84d823c) at /home/singerm/src/php-5.0.3/Zend/zend_execute.c:1400 #19 0x0828cb09 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/singerm/src/php-5.0.3/Zend/zend.c:1069 #20 0x0824a553 in php_execute_script (primary_file=0xbffff1a8) at /home/singerm/src/php-5.0.3/main/main.c:1628 #21 0x082be78c in main (argc=2, argv=0xbffff244) at /home/singerm/src/php-5.0.3/sapi/cgi/cgi_main.c:1568 ------------------------------------------------------ Thanks in advance. - Jay From lists at zaunere.com Sun Feb 13 01:34:25 2005 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 13 Feb 2005 01:34:25 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries -Zen Cart In-Reply-To: <420E2879.6060603@ceruleansky.com> Message-ID: <20050213063427.03DA6A8635@virtu.nyphp.org> > Regarding my previous post - here is a backtrace produced by the gdb > debugger when PHP (5) crashes. This was produced by a debug build, with > the same configuration. > I also forgot to mention in my previous post that this error includes > when index.php (of Zen Cart) includes the file > 'includes/application_top.php'. > > Does it seem to be a problem with MySQL ? Seems like it might be. From looking at the ./configure you used at http://www.moztips.com/php5_install/ you didn't specify any mysql options. Depending on the version of MySQL being used, try adding: --with-mysql=/usr or --with-mysqli=/usr/bin/mysql_config --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From jayeshsh at ceruleansky.com Sun Feb 13 15:06:18 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Sun, 13 Feb 2005 15:06:18 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries - Zen Cart In-Reply-To: <20050213170003.7AA73A86E1@virtu.nyphp.org> References: <20050213170003.7AA73A86E1@virtu.nyphp.org> Message-ID: <420FB33A.7040308@ceruleansky.com> Hi Hans, thanks for your reply. >>Does it seem to be a problem with MySQL ? >> >> > >Seems like it might be. From looking at the ./configure you used at http://www.moztips.com/php5_install/ you didn't specify any mysql options. Depending on the version of MySQL being used, try adding: > >--with-mysql=/usr > >or > >--with-mysqli=/usr/bin/mysql_config > > I did change the page moztips.com/php5_install from what I originally did, since it also serves as a guide for other people. Originally, I tried compiling PHP 5 by linking it against the system MySQL libraries - by using --with-mysql=/usr. But for some reason, that was not working. The configure script would produce an error when I tried that. I downloaded PHP 4.3.10, and could build it using its built-in MySQL client libraries. But PHP 5 does not come with MySQL client libraries. So I downloaded the MySQL source and compiled just the client libraries ( --without-server ) locally. Then I tried compiling PHP 5 against those libraries. This got past configure, make and make install. But when any PHP script encountered a mysql_fetch_row function (or something similar), the PHP binary segfaulted. I boiled it down to a testcase, and reproduced this. So my last hope (I think), is to build PHP 5 against a MySQL shared object library ( libmysqlclient.so ). But when I tried doing this on Dreamhost (Debian Stable, shared hosting), it would not output the shared object files, even after 'make install'. I tried doing the same thing on my SuSe box (dedicated server, root access) and it worked fine. So my question is: can I build a MySQL shared object library on one system, then copy that to Dreamhost, and then build PHP 5 against this shared object using something like: --with-mysql=shared,/home/myusername/shared_so ? Do I need to build the shared object on a Debian system if it is going to be copied to a Debian system ? Do shared object work just like dlls on Windows - i.e. they can be copied from system to system and just "swapped in"? Thanks in advance for any help. Best Regards, - Jay From tgales at tgaconnect.com Sun Feb 13 15:49:29 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 13 Feb 2005 15:49:29 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries -Zen Cart In-Reply-To: <420FB33A.7040308@ceruleansky.com> Message-ID: <001a01c5120d$83d5aa20$d0893818@oberon1> Jayesh Sheth writes: > Do I need to build the shared object on a Debian system if it > is going to be copied to a Debian system > ... > Do shared object work just like dlls on Windows - > i.e. they can be copied from system to system and just > "swapped in"? You would need to build the libraries on a machine with exactly the same dependencies. The various executables and intermediary libs often depend on version specific shared libraries and sometimes in very intricate ways -- so you are more than likely going to mess up somewhere if you try copying things around. A package manager can keep track of all those dependencies for you. Assuming you can use apt-get (or some other package manager). which will take care of the dependencies, you should use that to install MySQL and then rebuild against that installation. e.g. http://www.privaterra.org/blog-rg/fixing_the_php_mysql_apache_segfault.htm l T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From tgales at tgaconnect.com Sun Feb 13 15:58:33 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 13 Feb 2005 15:58:33 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries-Zen Cart In-Reply-To: <001a01c5120d$83d5aa20$d0893818@oberon1> Message-ID: <003f01c5120e$c7deb2b0$d0893818@oberon1> > e.g. > http://www.privaterra.org/blog-rg/fixing_the_php_mysql_apache_ > segfault.htm er.. make that /fixing_the_php_mysql_apache_segfault.html T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From heli_travel at yahoo.com Mon Feb 14 10:30:52 2005 From: heli_travel at yahoo.com (haha) Date: Mon, 14 Feb 2005 07:30:52 -0800 (PST) Subject: [nycphp-talk] internet broadcasting systems In-Reply-To: <41BC74CD.2020509@aaahawk.com> Message-ID: <20050214153052.67567.qmail@web12204.mail.yahoo.com> Does anyone know something about "internet broadcasting systems" is there a similar PHP program like 'http://www.live365.com'. Thanks Ty __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From jayeshsh at ceruleansky.com Mon Feb 14 10:38:42 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Mon, 14 Feb 2005 10:38:42 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries-Zen Cart Message-ID: <4210C602.6030905@ceruleansky.com> Hi Tim, thanks for the link. It will be useful to keep on file. However, the customer in question is using a shared account on Dreamhost, so he will not be able to un apt-get. But I think we have identified other issues in the code (of Zen Cart) that are causing the problems. So it is not a conflict with the PHP version that Dreamhost has, which we originally suspected. So, for now, we can use their system-wide PHP CGI binary instead. If one were to want to compile PHP 5 on Dreamhost, one could do so, except (I think) without MySQL support. There would be a way around it - place all PHP 5 scripts in a separate subdirectory ( www.mysite.com/php5docs/ ) and instruct Apache via a .htaccess file to parse .php files in that directory using the compiled PHP 5 binary. Then, modify the data object layer of the PHP 5 scripts to use a webservice (XML-RPC) to access the MySQL database via a script in www.mysite.com/mysql_xmlrpc.php. In other words, one could let the PHP 5 binary select, insert, update and delete data in a MySQL database by posting to a PHP 4 script one directory "above" it. If it is a well architected app, just the data object layer would have to be changed. But sadly, most open source apps do not have this strict three tier (data object, business object, presentation layer) separation. It would be an interesting exercise though, to modify one PHP 5 cart that I know of ( the one in the excellent new book from Apress on PHP 5 and E-Commerce - http://apress.com/book/bookDisplay.html?bID=356 ) so that it can run on a shared server (such as Dreamhost) with a PHP 5 binary and without built-in MySQL support. Oh - this cart in question is a PHP5-only cart, but it is exceptionally well architected (perhaps a bit over-architected, but nevertheless good). Many businesses however are already set up with Zen Cart, which seems to be an incredibly complex and temperamental piece of software. It does a lot, and from an end-user perspective (shopper and store owner) it does look appealing. But it has these gotchas: mess with some settings (stored in the DB), and then it bombs out before the payment step. And many of the (good-intentioned) people helping in the forums are non-programmers, so you cannot post a piece of code and expect them to have an opinion on it ... Anyway, I am rambling here ... thanks to you all for your help so far. Best regards, - Jay Sheth From lists at zaunere.com Mon Feb 14 11:20:30 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Feb 2005 11:20:30 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries -Zen Cart In-Reply-To: <420FB33A.7040308@ceruleansky.com> Message-ID: <20050214162036.16F3FA8636@virtu.nyphp.org> > I did change the page moztips.com/php5_install from what I originally > did, since it also serves as a guide for other people. Originally, I > tried compiling PHP 5 by linking it against the system MySQL libraries - > by using --with-mysql=/usr. But for some reason, that was not working. > The configure script would produce an error when I tried that. I What error? What kind of a box is this? 64 bit by chance? > downloaded PHP 4.3.10, and could build it using its built-in MySQL > client libraries. But PHP 5 does not come with MySQL client libraries. > > So I downloaded the MySQL source and compiled just the client libraries > ( --without-server ) locally. Then I tried compiling PHP 5 against those > libraries. This got past configure, make and make install. But when any > PHP script encountered a mysql_fetch_row function (or something > similar), the PHP binary segfaulted. I boiled it down to a testcase, and > reproduced this. If you have a test case, it might be a bug. However, it might also be that you didn't compile against the libs you thought you did. > So my last hope (I think), is to build PHP 5 against a MySQL shared > object library ( libmysqlclient.so ). But when I tried doing this on > Dreamhost (Debian Stable, shared hosting), it would not output the > shared object files, even after 'make install'. I tried doing the same > thing on my SuSe box (dedicated server, root access) and it worked fine. > > So my question is: can I build a MySQL shared object library on one > system, then copy that to Dreamhost, and then build PHP 5 against this > shared object using something like: > --with-mysql=shared,/home/myusername/shared_so > ? I would shy away from this. Moving binaries and libs around is often asking for trouble. Your hosting provider should have the proper MySQL libs installed for the database you're connecting to, and you should be able to compile PHP against them. Also check out the version of MySQL they have; they might have an old one, etc. H From faber at linuxnj.com Mon Feb 14 11:35:08 2005 From: faber at linuxnj.com (Faber Fedor) Date: Mon, 14 Feb 2005 11:35:08 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <330532b6050211160946d84da3@mail.gmail.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211194658.GA22062@uranus.faber.nom> <330532b6050211160946d84da3@mail.gmail.com> Message-ID: <20050214163508.GA10522@uranus.faber.nom> On 11/02/05 19:09 -0500, Mitch Pirtle wrote: > Hey Faber! Hey Mitch, > On Fri, 11 Feb 2005 14:46:58 -0500, Faber Fedor wrote: > > Can you point me to these "filebases" that you speak of? The ones I see > > look to be templates. > > There are several projects available: > > * DocMan document manager (use software as documents) > http://www.mambodocman.com/ > * Remository (file/software repository) > http://mamboforge.net/projects/remository/ > > Those should get you started, or at least provide some inspiration ;-) Okay, I'm missing something here. How do either of these help me keep track of items and money, allow the end-user to fill out a form, and email it all to myself? Don't get me wrong, I like the DocMan one and I think I've got another client who can use it, but I don't see how these are going to letme build my mini-shopping-cart. > > Also, the CSS don't work very well under Linux/Firefox; MS/Firedox and > > MS/IE look okay. I assume I'll need to redo the CSSes? > > That is just the template, and I assume you mean SolarFlare, The problem was with all of the templates shipped with 4.5.1. > Check out the following site for a demo of hundreds of templates: > > http://demo.mambohut.com I rather like the new box_business_new. I'm thinking of redoing my site with it and Mambo. > Didn't like a single one? Then take the tutorial and do it yourself, > you will be amazed at how easily you can create a tempate for Mambo Huh? Then I must have been looking at the wrong docs (http://docs.mamboserver.com/HomePage) because a quick glance didn't make it look "easy". And the other thing I'm looking for is a tutorial on how to build a site with Mambo; the interactions between the different menu items. The stuff at http://docs.mamboserver.com/HomePage is as helpful as KDE's help, i.e. not very. > That might give you a better experience trying Mambo. BTW, we are > getting ready to announce a new family of sites to bring all this > information together, hoping to speed up both adoption and the > learning curve Good. Can I have it yesterday? :-) -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From heli_travel at yahoo.com Mon Feb 14 11:54:13 2005 From: heli_travel at yahoo.com (Say What I think) Date: Mon, 14 Feb 2005 08:54:13 -0800 (PST) Subject: [nycphp-talk] internet broadcasting systems In-Reply-To: <20050214153052.67567.qmail@web12204.mail.yahoo.com> Message-ID: <20050214165413.60330.qmail@web12210.mail.yahoo.com> Really nobody knows this part? or Do you know some online teaching softwares programmed in PHP? I try to build an online audio teaching site. Thanks! Ty --- haha wrote: > Does anyone know something about "internet broadcasting > systems" > is there a similar PHP program like 'http://www.live365.com'. > Thanks > Ty > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Helps protect you from nasty viruses. > http://promotions.yahoo.com/new_mail > _______________________________________________ > New York PHP Talk > Supporting AMP Technology (Apache/MySQL/PHP) > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com From jayeshsh at ceruleansky.com Mon Feb 14 12:17:15 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Mon, 14 Feb 2005 12:17:15 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiled binaries-Zen Cart Message-ID: <4210DD1B.7080002@ceruleansky.com> Hi Hans, thanks for your follow-up. >/ did, since it also serves as a guide for other people. Originally, I />/ tried compiling PHP 5 by linking it against the system MySQL libraries - />/ by using --with-mysql=/usr. But for some reason, that was not working. />/ The configure script would produce an error when I tried that. I / >What error? >What kind of a box is this? 64 bit by chance? Re: 32 bit or 64 bit - it think it's 32 bit, but I will confirm with the host. The ./configure script fails with this error: configure: error: mysql configure failed. Please check config.log for more information. The complete ./configure directive was: ------ ./configure --prefix=/home/singerm/php5_debug --enable-force-cgi-redirect --enable-debug --with-config-file-path=/home/singerm/etc/php5_debug/ --with-xml --with-libxml-dir=/home/singerm/php/lib --enable-soap --with-xsl=/home/singerm/php/lib --with-mysql=/usr --with-openssl=/home/singerm/php/lib --with-curl=/home/singerm/php/lib --with-mhash=/home/singerm/php/lib --with-mcrypt=/home/singerm/php/lib --with-zlib-dir=/home/singerm/php/lib --with-jpeg-dir=/usr/ --with-png-dir=/usr/ --with-gd --enable-gd-native-ttf --enable-ftp --enable-sockets --enable-wddx --with-iconv --enable-soap --with-config-file-path=/home/singerm/etc/ > ----- I have posted the entire config.log here: http://www.moztips.com/mysql_php5_debug/config.log Maybe that log will have clues in it regarding this problem. Best regards, - Jay From mitch.pirtle at gmail.com Mon Feb 14 12:32:15 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Mon, 14 Feb 2005 12:32:15 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050214163508.GA10522@uranus.faber.nom> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211194658.GA22062@uranus.faber.nom> <330532b6050211160946d84da3@mail.gmail.com> <20050214163508.GA10522@uranus.faber.nom> Message-ID: <330532b60502140932134818fd@mail.gmail.com> If you can make it through the week, I am presenting Mambo at NYPHP. Make sure to be there, and machine-gun me with template questions and such. That will be the point of the presentation, showing and exploring Mambo as both a tool and as an application platform. :-) I'm in Boston this week for LinuxWorld, and encourage anyone to stop by booth #22. I'll be pretty much offline as a result - hance the offer to help in person next week ;-) -- Mitch From lists at zaunere.com Mon Feb 14 12:50:36 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Feb 2005 12:50:36 -0500 Subject: [nycphp-talk] Static Method Referencing Message-ID: <20050214175039.EA78CA863E@virtu.nyphp.org> Given this test case: StaticMethod; MyClass::$tmp('Works'); } public function HelloNoWorks() { MyClass::$this->StaticMethod('NoWorks'); } } $myobj = new MyClass; $myobj->HelloWorks(); $myobj->HelloNoWorks(); ?> Results in this: Say Hello, Works! PHP Fatal error: Call to undefined method MyClass::StaticMethod() in /home/praxis/test.psh on line 22 Line 22 is: MyClass::$this->StaticMethod('NoWorks'); If I change line 22 to: MyClass::{$this->StaticMethod}('NoWorks'); Then I get a parse error: PHP Parse error: parse error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /home/praxis/test.psh on line 22 I this expected behavior or a bug? Do I have to set the method's name to a $tmp variable before using it as a reference to a static method? Is there some other way to do it that I'm forgetting? --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From lists at zaunere.com Mon Feb 14 13:00:47 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Feb 2005 13:00:47 -0500 Subject: [nycphp-talk] PHP 5 Throwing Exceptions in Constructors In-Reply-To: <01c4d9becdcb47d8e0993ab41234dd1c@omniti.com> Message-ID: <20050214180053.C651DA87B1@virtu.nyphp.org> > > I was dealing with this exact same dilemma on a project I'm currently > > coding. > > We ending up going with Adam's option B: move the code which can fail > > to outside the constructor. > > > > In the original design the you could create an object where the > > constructor could read some information from a database. > > > > In the final design, we moved the database code to a new load() > > function that executes the actual database call. This does add an > > additional step, but having the constructor throw an execution just > > messes things up. > > This is a best practice in many OO languages (for instance c++) Yeah, I in fact have an Init() method just for these reasons. The issue really wasn't even about a constructor. It boiled down to the fact that throwing an exception is just too "strong" for what I wanted to do, ie, let the object be created regardless. Even after moving the throw out of __construct(), if __construct() called some other object or method that threw an exception, it was killed. Sure, I could have added a bunch of try/catch pairs, but I started to feel I was removing encapsulation. I ended up having these potential problem areas simply set properties, which can then be accessed later. I guess the takeaway here is that if you have simple base classes that can succeed to different degrees or not, it's better to not have them throw exceptions unless you want to ensure a major change in program flow (thus, an exception :) --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From lists at zaunere.com Mon Feb 14 13:10:50 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 14 Feb 2005 13:10:50 -0500 Subject: [nycphp-talk] PHP segmentation fault with custom-compiledbinaries-Zen Cart In-Reply-To: <4210DD1B.7080002@ceruleansky.com> Message-ID: <20050214181052.BCF02A8636@virtu.nyphp.org> > The complete ./configure directive was: > ------ > ./configure --prefix=/home/singerm/php5_debug > --enable-force-cgi-redirect --enable-debug > --with-config-file-path=/home/singerm/etc/php5_debug/ --with-xml > --with-libxml-dir=/home/singerm/php/lib --enable-soap > --with-xsl=/home/singerm/php/lib --with-mysql=/usr > --with-openssl=/home/singerm/php/lib --with-curl=/home/singerm/php/lib > --with-mhash=/home/singerm/php/lib --with-mcrypt=/home/singerm/php/lib > --with-zlib-dir=/home/singerm/php/lib --with-jpeg-dir=/usr/ > --with-png-dir=/usr/ --with-gd --enable-gd-native-ttf --enable-ftp > --enable-sockets --enable-wddx --with-iconv --enable-soap > --with-config-file-path=/home/singerm/etc/ > > ----- > I have posted the entire config.log here: > http://www.moztips.com/mysql_php5_debug/config.log > > Maybe that log will have clues in it regarding this problem. Sure does, check the bottom of the log. It's not finding the SSL libs, and seems that MySQL is compiled against SSL. Talk to them about building against their MySQL client libs and have them check that they are working ok. H From faber at linuxnj.com Mon Feb 14 14:34:49 2005 From: faber at linuxnj.com (Faber Fedor) Date: Mon, 14 Feb 2005 14:34:49 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <330532b60502140932134818fd@mail.gmail.com> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211194658.GA22062@uranus.faber.nom> <330532b6050211160946d84da3@mail.gmail.com> <20050214163508.GA10522@uranus.faber.nom> <330532b60502140932134818fd@mail.gmail.com> Message-ID: <20050214193449.GA11142@uranus.faber.nom> On 14/02/05 12:32 -0500, Mitch Pirtle wrote: > If you can make it through the week, I am presenting Mambo at NYPHP. > Make sure to be there, and machine-gun me with template questions and > such. Wait until next week? That'll just mean a LOT more questions for ya'. :-) > That will be the point of the presentation, showing and exploring > Mambo as both a tool and as an application platform. :-) Cool. I've just RSVPed. > I'm in Boston this week for LinuxWorld, and encourage anyone to stop > by booth #22. I'll be pretty much offline as a result - hance the > offer to help in person next week ;-) Have fun and let us know how it goes. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From adam at trachtenberg.com Mon Feb 14 19:05:18 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Mon, 14 Feb 2005 19:05:18 -0500 (EST) Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <20050214175039.EA78CA863E@virtu.nyphp.org> References: <20050214175039.EA78CA863E@virtu.nyphp.org> Message-ID: On Mon, 14 Feb 2005, Hans Zaunere wrote: > I this expected behavior or a bug? Do I have to set the method's > name to a $tmp variable before using it as a reference to a static > method? Is there some other way to do it that I'm forgetting? self::staticMethod('foo'); Pages 28-9, 35 in "Upgrading to PHP 5." :) -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 matt at jiffycomp.com Tue Feb 15 08:20:39 2005 From: matt at jiffycomp.com (Matt Morgan) Date: Tue, 15 Feb 2005 08:20:39 -0500 Subject: [nycphp-talk] internet broadcasting systems In-Reply-To: <20050214165413.60330.qmail@web12210.mail.yahoo.com> References: <20050214165413.60330.qmail@web12210.mail.yahoo.com> Message-ID: <4211F727.4030105@jiffycomp.com> Say What I think wrote: >Really nobody knows this part? or Do you know some online >teaching softwares programmed in PHP? I try to build an online >audio teaching site. > >Thanks! > >Ty > > > I doubt it's programmed in PHP, but Icecast (http://www.icecast.org/) is the popular OSS streaming server. I kind of doubt you'd want to program audio streaming in PHP--but you could set up a PHP-based site to organize your teaching materials, and then deliver them with Icecast. From chsnyder at gmail.com Tue Feb 15 10:10:45 2005 From: chsnyder at gmail.com (csnyder) Date: Tue, 15 Feb 2005 10:10:45 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: References: <20050214175039.EA78CA863E@virtu.nyphp.org> Message-ID: On Mon, 14 Feb 2005 19:05:18 -0500 (EST), Adam Maccabee Trachtenberg wrote: > self::staticMethod('foo'); > > Pages 28-9, 35 in "Upgrading to PHP 5." :) Maybe you should publish a FAQ, Adam. From danielc at analysisandsolutions.com Tue Feb 15 10:41:11 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 15 Feb 2005 10:41:11 -0500 Subject: [nycphp-talk] highlights from SecurityFocus Newsletter #287 Message-ID: <20050215154111.GA9452@panix.com> SecurityFocus Newsletter #287 phpPGAds HTTP Response Splitting Vulnerability http://www.securityfocus.com/bid/12398 JShop E-Commerce Suite Product.PHP Cross-Site Scripting Vuln... http://www.securityfocus.com/bid/12403 Xoops Incontent Module Directory Traversal Vulnerability http://www.securityfocus.com/bid/12406 SquirrelMail URL Remote Code Execution Vulnerability http://www.securityfocus.com/bid/12413 PHP-Fusion Forum_Search.PHP Information Disclosure Vulnerabi... http://www.securityfocus.com/bid/12425 Mambo Open Source Global Variables Unauthorized Access Vulne... http://www.securityfocus.com/bid/12436 SunShop Shopping Cart Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12438 Claroline Add_Course.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12449 -- 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 lists at zaunere.com Tue Feb 15 11:12:35 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 15 Feb 2005 11:12:35 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: Message-ID: <20050215161319.5C06EA8636@virtu.nyphp.org> > > I this expected behavior or a bug? Do I have to set the method's > > name to a $tmp variable before using it as a reference to a static > > method? Is there some other way to do it that I'm forgetting? > > self::staticMethod('foo'); > > Pages 28-9, 35 in "Upgrading to PHP 5." :) I don't have the book, but from the code snippet above, that's not it anyway. StaticMethod is a property, containing the name of a static method to call. Maybe my choice of naming the property was confusing, so here is another: class MyClass { private $StaticMethodName = 'SayHello'; static public function SayHello( $name ) { echo "\n\nSay Hello, $name!\n\n"; } public function HelloWorks() { // this dereferences the static method call, calling the SayHello() method $tmp = $this->StaticMethodName; MyClass::$tmp('Works'); } public function HelloNoWorks() { // this does not MyClass::$this->StaticMethodName('NoWorks'); // also does not work (parse error) // MyClass::{$this->StaticMethodName}('NoWorks'); } } $myobj = new MyClass; $myobj->HelloWorks(); $myobj->HelloNoWorks(); Perhaps this is just a limitation of the parser, but I don't see any reason it shouldn't work, so perhaps a bug. Basically I'm seeing that's there's no way to dereference a property into a static method call, whereas a regular variable can be dereferenced in this respect. For additional clarification of the underlying goal, a non-OOP example: function my_func() { echo 'This is my_func'; } $thefunc = 'my_func'; $thefunc(); Calls a function by the name of my_func() --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From codebowl at gmail.com Tue Feb 15 11:24:03 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue, 15 Feb 2005 11:24:03 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <20050215161319.5C06EA8636@virtu.nyphp.org> References: <20050215161319.5C06EA8636@virtu.nyphp.org> Message-ID: <8d9a428005021508246326a8d6@mail.gmail.com> rather than MyClass::$this->StaticMethodName('NoWorks'); try this MyClass::$StaticMethodName('NoWorks'); -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From adam at trachtenberg.com Tue Feb 15 17:39:24 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 15 Feb 2005 17:39:24 -0500 (EST) Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <20050215161319.5C06EA8636@virtu.nyphp.org> References: <20050215161319.5C06EA8636@virtu.nyphp.org> Message-ID: On Tue, 15 Feb 2005, Hans Zaunere wrote: > Perhaps this is just a limitation of the parser, but I don't see any > reason it shouldn't work, so perhaps a bug. > > Basically I'm seeing that's there's no way to dereference a property > into a static method call, whereas a regular variable can be > dereferenced in this respect. Oh. Yea. You can't do that. It doesn't work. :) I can't remember if I filed this as a bug, but it's come up before on internals. I also can't remember if/when this will come to PHP 5. -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 kushner at gmail.com Wed Feb 16 01:29:47 2005 From: kushner at gmail.com (Daniel Kushner) Date: Tue, 15 Feb 2005 22:29:47 -0800 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <20050215161319.5C06EA8636@virtu.nyphp.org> References: <20050215161319.5C06EA8636@virtu.nyphp.org> Message-ID: <7ac626ed050215222928824dfa@mail.gmail.com> Hi Hans, I can't seem to find a way to do this by dereferencing, but yet another way of doing it: call_user_func(array('MyClass', $this->StaticMethod), 'NoWorks'); -Daniel On Tue, 15 Feb 2005 11:12:35 -0500, Hans Zaunere wrote: > > > > I this expected behavior or a bug? Do I have to set the method's > > > name to a $tmp variable before using it as a reference to a static > > > method? Is there some other way to do it that I'm forgetting? > > > > self::staticMethod('foo'); > > > > Pages 28-9, 35 in "Upgrading to PHP 5." :) > > I don't have the book, but from the code snippet above, that's not it anyway. StaticMethod is a property, containing the name of a static method to call. > > Maybe my choice of naming the property was confusing, so here is another: > > class MyClass > { > private $StaticMethodName = 'SayHello'; > > static public function SayHello( $name ) { > > echo "\n\nSay Hello, $name!\n\n"; > } > > public function HelloWorks() { > > // this dereferences the static method call, calling the SayHello() method > $tmp = $this->StaticMethodName; > MyClass::$tmp('Works'); > } > > public function HelloNoWorks() { > > // this does not > MyClass::$this->StaticMethodName('NoWorks'); > > // also does not work (parse error) > // MyClass::{$this->StaticMethodName}('NoWorks'); > } > } > > $myobj = new MyClass; > $myobj->HelloWorks(); > $myobj->HelloNoWorks(); > > Perhaps this is just a limitation of the parser, but I don't see any reason it shouldn't work, so perhaps a bug. > > Basically I'm seeing that's there's no way to dereference a property into a static method call, whereas a regular variable can be dereferenced in this respect. > > For additional clarification of the underlying goal, a non-OOP example: > > function my_func() { > echo 'This is my_func'; > } > > $thefunc = 'my_func'; > $thefunc(); > > Calls a function by the name of my_func() > > > --- > Hans Zaunere > President, Founder > > New York PHP > http://www.nyphp.org > > AMP Technology > Supporting Apache, MySQL and PHP > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From adam at trachtenberg.com Wed Feb 16 09:32:36 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 16 Feb 2005 09:32:36 -0500 (EST) Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <7ac626ed050215222928824dfa@mail.gmail.com> References: <20050215161319.5C06EA8636@virtu.nyphp.org> <7ac626ed050215222928824dfa@mail.gmail.com> Message-ID: I believe you can also use the reflection classes, if you're into an all OO solution. -adam On Tue, 15 Feb 2005, Daniel Kushner wrote: > Hi Hans, > > I can't seem to find a way to do this by dereferencing, but yet > another way of doing it: > > call_user_func(array('MyClass', $this->StaticMethod), 'NoWorks'); > > -Daniel > > > > On Tue, 15 Feb 2005 11:12:35 -0500, Hans Zaunere wrote: > > > > > > I this expected behavior or a bug? Do I have to set the method's > > > > name to a $tmp variable before using it as a reference to a static > > > > method? Is there some other way to do it that I'm forgetting? > > > > > > self::staticMethod('foo'); > > > > > > Pages 28-9, 35 in "Upgrading to PHP 5." :) > > > > I don't have the book, but from the code snippet above, that's not it anyway. StaticMethod is a property, containing the name of a static method to call. > > > > Maybe my choice of naming the property was confusing, so here is another: > > > > class MyClass > > { > > private $StaticMethodName = 'SayHello'; > > > > static public function SayHello( $name ) { > > > > echo "\n\nSay Hello, $name!\n\n"; > > } > > > > public function HelloWorks() { > > > > // this dereferences the static method call, calling the SayHello() method > > $tmp = $this->StaticMethodName; > > MyClass::$tmp('Works'); > > } > > > > public function HelloNoWorks() { > > > > // this does not > > MyClass::$this->StaticMethodName('NoWorks'); > > > > // also does not work (parse error) > > // MyClass::{$this->StaticMethodName}('NoWorks'); > > } > > } > > > > $myobj = new MyClass; > > $myobj->HelloWorks(); > > $myobj->HelloNoWorks(); > > > > Perhaps this is just a limitation of the parser, but I don't see any reason it shouldn't work, so perhaps a bug. > > > > Basically I'm seeing that's there's no way to dereference a property into a static method call, whereas a regular variable can be dereferenced in this respect. > > > > For additional clarification of the underlying goal, a non-OOP example: > > > > function my_func() { > > echo 'This is my_func'; > > } > > > > $thefunc = 'my_func'; > > $thefunc(); > > > > Calls a function by the name of my_func() > > > > > > --- > > Hans Zaunere > > President, Founder > > > > New York PHP > > http://www.nyphp.org > > > > AMP Technology > > Supporting Apache, MySQL and PHP > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- 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 jeff.knight at gmail.com Wed Feb 16 10:42:14 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Wed, 16 Feb 2005 10:42:14 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: References: <20050215161319.5C06EA8636@virtu.nyphp.org> <7ac626ed050215222928824dfa@mail.gmail.com> Message-ID: <2ca9ba910502160742665c6c2f@mail.gmail.com> You are the one that must be high to not see it... trying to eat your cake and have it too. You're trying to be slick, sneak around the gate and get away with something. The ultimate fact of the matter is that you cannot access the contents of the $StaticMethod property ("SayHello"), without instantiating the object. It does not matter that you are then trying to do a perfectly legal operation with that information, but that you do not have access to that information in the first place. On Wed, 16 Feb 2005 09:32:36 -0500 (EST), Adam Maccabee Trachtenberg wrote: > I believe you can also use the reflection classes, if you're into an > all OO solution. > > -adam > > On Tue, 15 Feb 2005, Daniel Kushner wrote: > > > Hi Hans, > > > > I can't seem to find a way to do this by dereferencing, but yet > > another way of doing it: > > > > call_user_func(array('MyClass', $this->StaticMethod), 'NoWorks'); > > > > -Daniel > > > > > > > > On Tue, 15 Feb 2005 11:12:35 -0500, Hans Zaunere wrote: > > > > > > > > I this expected behavior or a bug? Do I have to set the method's > > > > > name to a $tmp variable before using it as a reference to a static > > > > > method? Is there some other way to do it that I'm forgetting? > > > > > > > > self::staticMethod('foo'); > > > > > > > > Pages 28-9, 35 in "Upgrading to PHP 5." :) > > > > > > I don't have the book, but from the code snippet above, that's not it anyway. StaticMethod is a property, containing the name of a static method to call. > > > > > > Maybe my choice of naming the property was confusing, so here is another: > > > > > > class MyClass > > > { > > > private $StaticMethodName = 'SayHello'; > > > > > > static public function SayHello( $name ) { > > > > > > echo "\n\nSay Hello, $name!\n\n"; > > > } > > > > > > public function HelloWorks() { > > > > > > // this dereferences the static method call, calling the SayHello() method > > > $tmp = $this->StaticMethodName; > > > MyClass::$tmp('Works'); > > > } > > > > > > public function HelloNoWorks() { > > > > > > // this does not > > > MyClass::$this->StaticMethodName('NoWorks'); > > > > > > // also does not work (parse error) > > > // MyClass::{$this->StaticMethodName}('NoWorks'); > > > } > > > } > > > > > > $myobj = new MyClass; > > > $myobj->HelloWorks(); > > > $myobj->HelloNoWorks(); > > > > > > Perhaps this is just a limitation of the parser, but I don't see any reason it shouldn't work, so perhaps a bug. > > > > > > Basically I'm seeing that's there's no way to dereference a property into a static method call, whereas a regular variable can be dereferenced in this respect. > > > > > > For additional clarification of the underlying goal, a non-OOP example: > > > > > > function my_func() { > > > echo 'This is my_func'; > > > } > > > > > > $thefunc = 'my_func'; > > > $thefunc(); > > > > > > Calls a function by the name of my_func() > > > > > > > > > --- > > > Hans Zaunere > > > President, Founder > > > > > > New York PHP > > > http://www.nyphp.org > > > > > > AMP Technology > > > Supporting Apache, MySQL and PHP > > > > > > _______________________________________________ > > > New York PHP Talk Mailing List > > > AMP Technology > > > Supporting Apache, MySQL and PHP > > > http://lists.nyphp.org/mailman/listinfo/talk > > > http://www.nyphp.org > > > > > _______________________________________________ > > New York PHP Talk Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org > > > > -- > 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! > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From jeff.knight at gmail.com Wed Feb 16 12:02:42 2005 From: jeff.knight at gmail.com (Jeff Knight) Date: Wed, 16 Feb 2005 12:02:42 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <2ca9ba910502160742665c6c2f@mail.gmail.com> References: <20050215161319.5C06EA8636@virtu.nyphp.org> <7ac626ed050215222928824dfa@mail.gmail.com> <2ca9ba910502160742665c6c2f@mail.gmail.com> Message-ID: <2ca9ba9105021609027973918d@mail.gmail.com> Doh! That certainly is not an appropriate tone for a public list. Hans & I were having a parallel conversation, and I inadvertently sent it to the wrong address. That's what I get for hitting the reply button before being sufficiently caffeinated. This list is great because it is almost always free of that kind of response, so common on almost every other list I've seen, and I apologize for even the slightest implication that that sort of thing is OK around here. From leam at reuel.net Wed Feb 16 16:26:59 2005 From: leam at reuel.net (leam at reuel.net) Date: Wed, 16 Feb 2005 16:26:59 -0500 Subject: [nycphp-talk] Mambo in the news! Message-ID: <20050216212659.GG2987@leitz> Mambo wins best of show anf Best Open Source Solution! http://mamboserver.com/The_News/Frontpage/And_the_winners_are.../ From mitch.pirtle at gmail.com Thu Feb 17 01:09:29 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 17 Feb 2005 01:09:29 -0500 Subject: [nycphp-talk] Re: Getting back to shopping carts [ WAS Re: Liability protection for consultants?] In-Reply-To: <20050214193449.GA11142@uranus.faber.nom> References: <20050210000152.GA2880@leitz> <1107995037.14111.103.camel@brian.vermonster.com> <20050210021726.GD2880@leitz> <20050210231303.GA17714@uranus.faber.nom> <330532b6050210172998f29d7@mail.gmail.com> <20050211194658.GA22062@uranus.faber.nom> <330532b6050211160946d84da3@mail.gmail.com> <20050214163508.GA10522@uranus.faber.nom> <330532b60502140932134818fd@mail.gmail.com> <20050214193449.GA11142@uranus.faber.nom> Message-ID: <330532b60502162209289988dd@mail.gmail.com> On Mon, 14 Feb 2005 14:34:49 -0500, Faber Fedor wrote: > On 14/02/05 12:32 -0500, Mitch Pirtle wrote: > > If you can make it through the week, I am presenting Mambo at NYPHP. > > Make sure to be there, and machine-gun me with template questions and > > such. > > Wait until next week? That'll just mean a LOT more questions for ya'. > :-) We just released Mambo 4.5.2, with some great bugfixes and performance tweaks. This is perfect timing for the presentation Tuesday. > > That will be the point of the presentation, showing and exploring > > Mambo as both a tool and as an application platform. :-) > > Cool. I've just RSVPed. Oh, just released help.mamboserver.com, the new online companion of mamboserver for documentation. > > I'm in Boston this week for LinuxWorld, and encourage anyone to stop > > by booth #22. I'll be pretty much offline as a result - hance the > > offer to help in person next week ;-) > > Have fun and let us know how it goes. Heh. Been having a lot of fun, and definitely have a lot of news. Too much for this post, but I want to quickly say that any of you that use Mambo need to stand up and take a bow. There is absolutely no way we could have walked away with the Best Overall award without such an awesome, dynamic and demanding community. GROUP HUG! hehe -- Mitch From mitch.pirtle at gmail.com Thu Feb 17 01:22:23 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 17 Feb 2005 01:22:23 -0500 Subject: [nycphp-talk] Mambo in the news! In-Reply-To: <20050216212659.GG2987@leitz> References: <20050216212659.GG2987@leitz> Message-ID: <330532b605021622221766d134@mail.gmail.com> On Wed, 16 Feb 2005 16:26:59 -0500, leam at reuel.net wrote: > > Mambo wins best of show anf Best Open Source Solution! Just a quick note on this, and then off to bed for me! You know what this means for PHP and LAMP? I had an exec from Intel walk over and ask what all the fuss was about. I was interviewed, and it wasn't by my Mom. I had a guy walk over and say "What is a Mambo? One of the guys from Novell told me I needed to come over here and talk to you." This is cool for Mambo of course, but more importantly this validates PHP and the LAMP platform as a force to be reckoned with. It sends a message that companies are deploying LAMP applications for serious purposes, not just brochureware sites. It means that there are developers (and whole companies) that are making a living customizing applications based on the LAMP platform. We just sent a very loud and clear message to the business world: * you can make money with this stuff * you can run your business on this stuff * you can trust and depend on this stuff Congratulations to everyone, as this is a huge coup for the LAMP community as a whole. -- Mitch From smanes at magpie.com Thu Feb 17 12:09:45 2005 From: smanes at magpie.com (Steve Manes) Date: Thu, 17 Feb 2005 12:09:45 -0500 Subject: [nycphp-talk] Problem with Quickform and email rules Message-ID: <4214CFD9.7020308@magpie.com> I've got an application that's got an email element I want to validate. This is being done through the Array/Smarty interface, if this matters. The element is created: $form->addElement('text', 'email', 'Email', array('size' => 30, 'maxlength' => 100)); Then I registered and added a rule: $form->registerRule('emailcheck', 'function', 'emailCheck'); $form->addRule('email', 'Enter a valid email address', 'emailcheck', 'function'); emailCheck() is a custom function in the same file. Problem is, this rule never gets called. I even dumped a phpinfo() in the function so I wouldn't miss its invocation. So I tried using QuickForm's built-in email rule: $form->addRule('email', 'Enter a valid email address', 'email', null, 'server'); This too doesn't work no matter what garbage I put in the email field. However, the 'required' rule works on it: $form->addRule('email', 'Please enter an Email address.', 'required'); If the email field is set, .errors get set with the error message. What am I missing here?? From smanes at magpie.com Thu Feb 17 13:13:58 2005 From: smanes at magpie.com (Steve Manes) Date: Thu, 17 Feb 2005 13:13:58 -0500 Subject: [nycphp-talk] Re: Problem with Quickform and email rules In-Reply-To: <4214CFD9.7020308@magpie.com> References: <4214CFD9.7020308@magpie.com> Message-ID: <4214DEE6.8020704@magpie.com> Steve Manes wrote: > I've got an application that's got an email element I want to validate. > This is being done through the Array/Smarty interface, if this matters. Never mind... late night cockpit error (missing element on the template) From dmintz at davidmintz.org Thu Feb 17 14:16:40 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 17 Feb 2005 14:16:40 -0500 (EST) Subject: [nycphp-talk] Re: Problem with Quickform and email rules In-Reply-To: <4214DEE6.8020704@magpie.com> References: <4214CFD9.7020308@magpie.com> <4214DEE6.8020704@magpie.com> Message-ID: On Thu, 17 Feb 2005, Steve Manes wrote: > Steve Manes wrote: > > I've got an application that's got an email element I want to validate. > > This is being done through the Array/Smarty interface, if this matters. > > Never mind... late night cockpit error (missing element on the template) Welcome to the club. (-: I was already speculating that that might be your problem after reading the first couple of sentences. print_r($renderer->toArray()) is nice for seeing what's really there. --- David Mintz http://davidmintz.org/ From jkelly at sussex.edu Thu Feb 17 17:25:11 2005 From: jkelly at sussex.edu (jessica kelly) Date: Thu, 17 Feb 2005 17:25:11 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem / Mod_Rewrite? Message-ID: Hi All, I'm upgrading all of my server software and need to test out before the upgrade. I'm using the ApacheFriends xampp for windoz package. I whish to fully test out my current online site on the test server so I know all php, perl, mysql scripts and related webpages will work properly. Problem: I have some includes and hard coded links in the site. This causes the browser to resolve to the online server rather than the test server when using the dropdown (javascript) menues etc.. I have been looking, trying to configure mod_rewrite all day to do this: When you see mysite.com/bla/bla/bla.htm in the page (server is parsing all pages) change the mysite.com part to 127.0.0.1 so the browser will navigate properly down the directory tree. This is what I have in the htaccess file in the webroot folder: RewriteEngine on RewriteCond %{HTTP_HOST} !^mysite\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) 127\.0\.0\.1/$1 [L,R] Can someone point me in the right direction or offer an outright rule/fix that will do this. I've been all over the mod-rewrite.com site and google and do not see any examples of what I'm trying to do. Thank You, Jessica From chsnyder at gmail.com Thu Feb 17 17:53:46 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 17 Feb 2005 17:53:46 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem / Mod_Rewrite? In-Reply-To: References: Message-ID: On Thu, 17 Feb 2005 17:25:11 -0500, jessica kelly wrote: > I have been looking, trying to configure mod_rewrite all day to do this: > > When you see mysite.com/bla/bla/bla.htm in the > page (server is parsing all pages) change the mysite.com part to 127.0.0.1 so the browser will navigate properly down the directory tree. I think you're trying to get mod_rewrite to do something it doesn't. Mod_rewrite only rewrites requests, not responses. You want to run all of your responses through some kind of filter (a PHP script perhaps) that will preg_replace() all of the mysite.com's to 127.0.0.1's. Do you have Dreamweaver? You could do a global search and replace on the site to change them all, test it, then do another to change them all back... Keep a backup of the originals!!! From dcech at phpwerx.net Thu Feb 17 18:00:33 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 17 Feb 2005 18:00:33 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem / Mod_Rewrite? In-Reply-To: References: Message-ID: <42152211.3030800@phpwerx.net> You could temporarily add an entry to your hosts file that tells your machine that mysite.com is 127.0.0.1 On Windows XP the hosts file is: C:\WINDOWS\system32\drivers\etc\hosts You will need to open it with your favorite text editor and add a line like: 127.0.0.1 mysite.com Until you remove that line the system will think that mysite.com is your local machine. Dan jessica kelly wrote: > Hi All, > > I'm upgrading all of my server software and need to test out before the upgrade. I'm using the ApacheFriends xampp for windoz package. > > I whish to fully test out my current online site on the test server so I know all php, perl, mysql scripts and related webpages will work properly. > > Problem: I have some includes and hard coded links in the site. This causes the browser to resolve to the online server rather than the test server when using the dropdown (javascript) menues etc.. > > I have been looking, trying to configure mod_rewrite all day to do this: > > When you see mysite.com/bla/bla/bla.htm in the > page (server is parsing all pages) change the mysite.com part to 127.0.0.1 so the browser will navigate properly down the directory tree. > > This is what I have in the htaccess file in the webroot folder: > RewriteEngine on > > RewriteCond %{HTTP_HOST} !^mysite\.com [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteRule ^/(.*) 127\.0\.0\.1/$1 [L,R] > > Can someone point me in the right direction or offer an outright rule/fix that will do this. I've been all over the mod-rewrite.com site and google and do not see any examples of what I'm trying to do. > > Thank You, > > Jessica > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From chsnyder at gmail.com Thu Feb 17 18:08:57 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 17 Feb 2005 18:08:57 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem / Mod_Rewrite? In-Reply-To: <42152211.3030800@phpwerx.net> References: <42152211.3030800@phpwerx.net> Message-ID: On Thu, 17 Feb 2005 18:00:33 -0500, Dan Cech wrote: > You could temporarily add an entry to your hosts file that tells your > machine that mysite.com is 127.0.0.1 Oooh, that's a much better solution than a filter. (slaps forehead.) Thanks, Dan. From lists at zaunere.com Thu Feb 17 19:01:37 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 17 Feb 2005 19:01:37 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <2ca9ba910502160742665c6c2f@mail.gmail.com> Message-ID: <20050218000229.C8BE6A85E9@virtu.nyphp.org> > You are the one that must be high to not see it... trying to eat your > cake and have it too. You're trying to be slick, sneak around the gate > and get away with something. The ultimate fact of the matter is that This is a great post :) As Jeff mentioned after this, these types of posts are not acceptable, and in fact a perfect example of what not to do - but apparently Jeff thinks it ok to talk like that privately :) > you cannot access the contents of the $StaticMethod property > ("SayHello"), without instantiating the object. It does not matter > that you are then trying to do a perfectly legal operation with that > information, but that you do not have access to that information in > the first place. Funnyish aside, the problem I was having was to use an object property to call a static class method. There was no use of an object ($this) in the static part of the class. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From matt at jobsforge.com Thu Feb 17 20:10:09 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Thu, 17 Feb 2005 20:10:09 -0500 Subject: [nycphp-talk] MySQL full text search Message-ID: <18099fd0c6d49f06e88ae40e136020c5@jobsforge.com> I applied a full text index to a table. Had one entry in the DB and the match function didn't work. I figured the database need more entries to actually create the index. I created five more entries and the searches worked, but when I have a search term which is present in more than four rows, I seem to be getting an empty set. I'm combing Google and mysql.com but don't see anything yet. From faber at linuxnj.com Thu Feb 17 20:19:33 2005 From: faber at linuxnj.com (Faber Fedor) Date: Thu, 17 Feb 2005 20:19:33 -0500 Subject: [nycphp-talk] Re: MySQL full text search In-Reply-To: <18099fd0c6d49f06e88ae40e136020c5@jobsforge.com> References: <18099fd0c6d49f06e88ae40e136020c5@jobsforge.com> Message-ID: <20050218011933.GB6254@uranus.faber.nom> On 17/02/05 20:10 -0500, Matthew Terenzio wrote: > I applied a full text index to a table. > > Had one entry in the DB and the match function didn't work. I figured > the database need more entries to actually create the index. > I created five more entries and the searches worked, but when I have a > search term which is present in more than four rows, I seem to be > getting an empty set. > > I'm combing Google and mysql.com but don't see anything yet. As I recall, MySQL will disregard words that appear in more than x% of the rows as "noise". In my example, I put together a database of IT resumes. Since practically everyone had "Microsoft" and/or "Windows" in their resume, a search on either would turn up nothing. I eventually went with a straight text search (WHERE field like '%foobar%') IIRC. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From lists at zaunere.com Thu Feb 17 20:25:05 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 17 Feb 2005 20:25:05 -0500 Subject: [nycphp-talk] MySQL full text search In-Reply-To: <18099fd0c6d49f06e88ae40e136020c5@jobsforge.com> Message-ID: <20050218012548.47835A85E9@virtu.nyphp.org> > I applied a full text index to a table. > > Had one entry in the DB and the match function didn't work. I figured > the database need more entries to actually create the index. > I created five more entries and the searches worked, but when I have a > search term which is present in more than four rows, I seem to be > getting an empty set. There are a series of search word length, frequency, etc. constraints that can be applied. Take a look at http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html H From codebowl at gmail.com Thu Feb 17 20:36:09 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Thu, 17 Feb 2005 20:36:09 -0500 Subject: [nycphp-talk] Static Method Referencing In-Reply-To: <20050218000229.C8BE6A85E9@virtu.nyphp.org> References: <2ca9ba910502160742665c6c2f@mail.gmail.com> <20050218000229.C8BE6A85E9@virtu.nyphp.org> Message-ID: <8d9a42800502171736228eb76b@mail.gmail.com> Hans, for my information, was what i said the issue? MyClass::$StaticMethod('NoWorks'); -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From matt at jobsforge.com Thu Feb 17 20:36:16 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Thu, 17 Feb 2005 20:36:16 -0500 Subject: [nycphp-talk] MySQL full text search In-Reply-To: <20050218012548.47835A85E9@virtu.nyphp.org> References: <20050218012548.47835A85E9@virtu.nyphp.org> Message-ID: On Feb 17, 2005, at 8:25 PM, Hans Zaunere wrote: > There are a series of search word length, frequency, etc. constraints > that can be applied. Take a look at > http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html From matt at jobsforge.com Thu Feb 17 20:46:56 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Thu, 17 Feb 2005 20:46:56 -0500 Subject: [nycphp-talk] MySQL full text search In-Reply-To: References: <20050218012548.47835A85E9@virtu.nyphp.org> Message-ID: <5dcaafae9c02f6bb7d5c2f23c433a89b@jobsforge.com> On Feb 17, 2005, at 8:36 PM, Matthew Terenzio wrote: > > On Feb 17, 2005, at 8:25 PM, Hans Zaunere wrote: > >> There are a series of search word length, frequency, etc. constraints >> that can be applied. Take a look at >> http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html I see said the blind man. From nyphp at enobrev.com Fri Feb 18 12:47:14 2005 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 18 Feb 2005 12:47:14 -0500 Subject: [nycphp-talk] RSA Security Message-ID: <20050218174712.9C559A8633@virtu.nyphp.org> I have a new potential client in the financial industry who's interested in using RSA security for their site. One of these bad boys: http://www.rsasecurity.com/node.asp?id=1157 Unfortunately, all the info I can find thus far is more meant for IT managers than for the guys in the trenches. Do any of you have experience working with this type of security and could you point me in the right direction? Thanks! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at enobrev.com Fri Feb 18 12:52:03 2005 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 18 Feb 2005 12:52:03 -0500 Subject: [nycphp-talk] RSA Security In-Reply-To: <20050218174712.9C559A8633@virtu.nyphp.org> Message-ID: <20050218175157.8234AA8633@virtu.nyphp.org> Ok, I just found a huge cache of into on their site that I'd missed before (damned 18 hour days): http://www.rsasecurity.com/content_library.asp Nonetheless, if any of you have any experience that you think would be helpful, I'd truly appreciate it. Mark _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Armendariz Sent: Friday, February 18, 2005 12:47 PM To: 'NYPHP Talk' Subject: [nycphp-talk] RSA Security I have a new potential client in the financial industry who's interested in using RSA security for their site. One of these bad boys: http://www.rsasecurity.com/node.asp?id=1157 Unfortunately, all the info I can find thus far is more meant for IT managers than for the guys in the trenches. Do any of you have experience working with this type of security and could you point me in the right direction? Thanks! Mark -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fields at hedge.net Fri Feb 18 12:59:35 2005 From: fields at hedge.net (Adam Fields) Date: Fri, 18 Feb 2005 12:59:35 -0500 Subject: [nycphp-talk] RSA Security In-Reply-To: <20050218174712.9C559A8633@virtu.nyphp.org> References: <20050218174712.9C559A8633@virtu.nyphp.org> Message-ID: <20050218175935.GS25095@lola.aquick.org> On Fri, Feb 18, 2005 at 12:47:14PM -0500, Mark Armendariz wrote: > I have a new potential client in the financial industry who's interested in > using RSA security for their site. One of these bad boys: > > http://www.rsasecurity.com/node.asp?id=1157 > > Unfortunately, all the info I can find thus far is more meant for IT > managers than for the guys in the trenches. Do any of you have experience > working with this type of security and could you point me in the right > direction? This is usually a webserver plugin (like mod_auth) that replaces your standard authentication mechanisms. What kind of information are you looking for? -- - Adam ----- ** My new project --> http://www.visiognomy.com/daily ** Flagship blog --> http://www.aquick.org/blog Hire me: [ http://www.adamfields.com/Adam_Fields_Resume.htm ] Links: [ http://del.icio.us/fields ] Photos: [ http://www.aquick.org/photoblog ] From nyphp at enobrev.com Fri Feb 18 13:01:30 2005 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 18 Feb 2005 13:01:30 -0500 Subject: [nycphp-talk] RSA Security In-Reply-To: <20050218175935.GS25095@lola.aquick.org> Message-ID: <20050218180128.EB0B1A8633@virtu.nyphp.org> > This is usually a webserver plugin (like mod_auth) that replaces your > standard authentication mechanisms. > > What kind of information are you looking for? > > -- > - Adam Implementation, particularly with apache and php. From fields at hedge.net Fri Feb 18 13:29:08 2005 From: fields at hedge.net (Adam Fields) Date: Fri, 18 Feb 2005 13:29:08 -0500 Subject: [nycphp-talk] RSA Security In-Reply-To: <20050218180128.EB0B1A8633@virtu.nyphp.org> References: <20050218175935.GS25095@lola.aquick.org> <20050218180128.EB0B1A8633@virtu.nyphp.org> Message-ID: <20050218182908.GT25095@lola.aquick.org> On Fri, Feb 18, 2005 at 01:01:30PM -0500, Mark Armendariz wrote: > > This is usually a webserver plugin (like mod_auth) that replaces your > > standard authentication mechanisms. > > > > What kind of information are you looking for? > > > > -- > > - Adam > > Implementation, particularly with apache and php. I haven't worked with this in a while, but it usually involves installing the apache module which communicates to a running daemon, but then it feeds through the standard http authentication mechanism. You'll have multiple options for setting up users and access levels. Clients have to present the token (from the hardware key) in addition to their local password. From within PHP, this should look exactly like any other kind of standard SSL authentication - you don't have to do anything except collect the username of the logged in user. You should download the trial and check it out. All of these components should be included: http://www.rsasecurity.com/node.asp?id=1081 -- - Adam ----- ** My new project --> http://www.visiognomy.com/daily ** Flagship blog --> http://www.aquick.org/blog Hire me: [ http://www.adamfields.com/Adam_Fields_Resume.htm ] Links: [ http://del.icio.us/fields ] Photos: [ http://www.aquick.org/photoblog ] From hans at cyberxdesigns.com Sat Feb 19 13:37:38 2005 From: hans at cyberxdesigns.com (hans at cyberxdesigns.com) Date: Sat, 19 Feb 2005 13:37:38 -0500 (EST) Subject: [nycphp-talk] Flow Charting, UML and Modeling. Message-ID: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> As some of you may know, I am a recent switcher. I moved from a doz notebook to a powerbook. I would like recommendations for Flow Charting, UML and Modeling software for OS X. Sorta off topic but good stuff anyway, good work Mitch and the Mambo team! We use your software extensively and have had great luck with it. We have delivered several very succesful projects based on Mambo and will continue to use it. Our clients love you guys. Thanks, Hans Kaspersetz http://www.cyberxdesigns.com From nasir81 at gmail.com Sat Feb 19 13:43:16 2005 From: nasir81 at gmail.com (Nasir Zubair) Date: Sat, 19 Feb 2005 13:43:16 -0500 Subject: [nycphp-talk] Flow Charting, UML and Modeling. In-Reply-To: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> References: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> Message-ID: <40fcda730502191043370df57e@mail.gmail.com> Poseidon for UML is a decent UML editor. I used it for a while for some Java work. They have a free Community Edition which you can get from http://www.gentleware.com/products/download.php4 Since it is java based, it should run fine on you powerbook. On Sat, 19 Feb 2005 13:37:38 -0500 (EST), hans at cyberxdesigns.com wrote: > As some of you may know, I am a recent switcher. I moved from a doz > notebook to a powerbook. I would like recommendations for Flow Charting, > UML and Modeling software for OS X. > > Sorta off topic but good stuff anyway, good work Mitch and the Mambo team! > We use your software extensively and have had great luck with it. We > have delivered several very succesful projects based on Mambo and will > continue to use it. Our clients love you guys. > > Thanks, > Hans Kaspersetz > http://www.cyberxdesigns.com > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Nasir Zubair http://www.nasir.us/ From danielc at analysisandsolutions.com Sat Feb 19 17:34:33 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 19 Feb 2005 17:34:33 -0500 Subject: [nycphp-talk] php stuff in SecurityFocus Newsletter #288 Message-ID: <20050219223433.GA9972@panix.com> Shalom: Yet another fun filled summary from the SecurityFocus Newsletter (#288)... LiteForum Enter.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/12452 Chipmunk Forum Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/12456 CMScore Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/12457 SquirrelMail S/MIME Plug-in Remote Command Execution Vulnera... http://www.securityfocus.com/bid/12467 BXCP Index.PHP Input Validation PHP Script Execution Vulnera... http://www.securityfocus.com/bid/12469 PHP-Fusion Viewthread.PHP Information Disclosure Vulnerbilit... http://www.securityfocus.com/bid/12482 MyPHP Forum Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/12501 MercuryBoard INDEX.PHP SQL Injection Vulnerability http://www.securityfocus.com/bid/12503 PostWrap Module Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12505 -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From chsnyder at gmail.com Sat Feb 19 19:02:41 2005 From: chsnyder at gmail.com (csnyder) Date: Sat, 19 Feb 2005 19:02:41 -0500 Subject: [nycphp-talk] Flow Charting, UML and Modeling. In-Reply-To: <40fcda730502191043370df57e@mail.gmail.com> References: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> <40fcda730502191043370df57e@mail.gmail.com> Message-ID: I'm a recent convert myself -- to OmniGraffle, that is. http://www.omnigroup.com/applications/omnigraffle/ I have seldom had more fun while getting actual work done. I could kiss this program. 100% OSX, and not too expensive either. From tgales at tgaconnect.com Sun Feb 20 08:32:59 2005 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 20 Feb 2005 08:32:59 -0500 Subject: [nycphp-talk] Flow Charting, UML and Modeling. In-Reply-To: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> Message-ID: <002f01c51750$b1aee9a0$d0893818@oberon1> Hans Kaspersetz writes: > I would like recommendations for Flow Charting, > UML and Modeling software for OS X. I would suggest looking at 'Visual Paradigm for UML Community Edition' http://www.visual-paradigm.com/productinfovpumlce.php T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From dan at cain.sh Sun Feb 20 13:30:29 2005 From: dan at cain.sh (Daniel J Cain Jr.) Date: Sun, 20 Feb 2005 12:30:29 -0600 Subject: [nycphp-talk] Flow Charting, UML and Modeling. In-Reply-To: References: <37346.127.0.0.1.1108838258.squirrel@www.cyberxdesigns.com> <40fcda730502191043370df57e@mail.gmail.com> Message-ID: <4218D745.80101@cain.sh> Check your PowerBook for Omni products. Mine came with OmniGraffle and OmniOutliner already installed I just found out. Older versions, but a good way to check it out and use the upgrade price to get to the latest. csnyder wrote: > I'm a recent convert myself -- to OmniGraffle, that is. > http://www.omnigroup.com/applications/omnigraffle/ > > I have seldom had more fun while getting actual work done. I could > kiss this program. > 100% OSX, and not too expensive either. > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From ez at ericzander.com Mon Feb 21 12:11:13 2005 From: ez at ericzander.com (EZ) Date: Mon, 21 Feb 2005 12:11:13 -0500 Subject: [nycphp-talk] Re: Flow Charting, UML and Modeling. (Daniel J Cain Jr.) In-Reply-To: <20050221170004.F381BA8775@virtu.nyphp.org> References: <20050221170004.F381BA8775@virtu.nyphp.org> Message-ID: <421A1631.6030303@ericzander.com> I know it isn't OSX specific but after recently looking for a flow charting tool and looking over all of the free & open source options, I discovered the answer to all my needs was already installed on my computer - OpenOffice.org. EZ From patrick.fee at baesystems.com Mon Feb 21 14:59:44 2005 From: patrick.fee at baesystems.com (Fee, Patrick J (US SSA)) Date: Mon, 21 Feb 2005 14:59:44 -0500 Subject: [nycphp-talk] How to enable popups on a site by site basis.... Message-ID: <728813C3358BF04CB3A3DA2341D44A71015E61DF@e2k11.na.baesystems.com> Hey Gang, A quick question. I am supporting an organization that is currently using a web-based tool that includes pop-ups. Obviously, this is causing issues with users who are using pop-up blockers. And I'm one of the guys who has to talk users thru enabling pop-ups for this site (even though we didn't develop the tool). Has anyone seen a white paper or a how-to presentation for enabling pop-ups on a browser by browser basis? Preferably on how to enable pop-ups on a site-by-site basis. I want to point folks towards something that will help them during this transition. Thanks, PJF Patrick J. Fee 901 D. St, SW. Suite 850 Washington, DC. 20024 202-646-5858 (desk) 240-401-6820 (cell) Patrick.Fee at BAESystems.com From jkelly at sussex.edu Mon Feb 21 16:53:27 2005 From: jkelly at sussex.edu (jessica kelly) Date: Mon, 21 Feb 2005 16:53:27 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem/ Mod_Rewrite? Message-ID: HI Dan, What a simple solution to my problem. Wish I had asked sooner. Thanks Again! Jessica <<< dcech at phpwerx.net 2/17 6:00p >>> You could temporarily add an entry to your hosts file that tells your machine that mysite.com is 127.0.0.1 On Windows XP the hosts file is: C:\WINDOWS\system32\drivers\etc\hosts You will need to open it with your favorite text editor and add a line like: 127.0.0.1 mysite.com Until you remove that line the system will think that mysite.com is your local machine. Dan jessica kelly wrote: > Hi All, > > I'm upgrading all of my server software and need to test out before the upgrade. I'm using the ApacheFriends xampp for windoz package. > > I whish to fully test out my current online site on the test server so I know all php, perl, mysql scripts and related webpages will work properly. > > Problem: I have some includes and hard coded links in the site. This causes the browser to resolve to the online server rather than the test server when using the dropdown (javascript) menues etc.. > > I have been looking, trying to configure mod_rewrite all day to do this: > > When you see mysite.com/bla/bla/bla.htm in the > page (server is parsing all pages) change the mysite.com part to 127.0.0.1 so the browser will navigate properly down the directory tree. > > This is what I have in the htaccess file in the webroot folder: > RewriteEngine on > > RewriteCond %{HTTP_HOST} !^mysite\.com [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteRule ^/(.*) 127\.0\.0\.1/$1 [L,R] > > Can someone point me in the right direction or offer an outright rule/fix that will do this. I've been all over the mod-rewrite.com site and google and do not see any examples of what I'm trying to do. > > Thank You, > > Jessica > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From dcech at phpwerx.net Mon Feb 21 17:03:13 2005 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 21 Feb 2005 17:03:13 -0500 Subject: [nycphp-talk] [OT] Apache Testing Server Config Problem/ Mod_Rewrite? In-Reply-To: References: Message-ID: <421A5AA1.8050309@phpwerx.net> No problem Jessica, I'm glad it worked out for you. Dan jessica kelly wrote: > HI Dan, > > What a simple solution to my problem. Wish I had asked sooner. > > Thanks Again! > Jessica > > <<< dcech at phpwerx.net 2/17 6:00p >>> > You could temporarily add an entry to your hosts file that tells your > machine that mysite.com is 127.0.0.1 > > On Windows XP the hosts file is: > > C:\WINDOWS\system32\drivers\etc\hosts > > You will need to open it with your favorite text editor and add a line like: > > 127.0.0.1 mysite.com > > Until you remove that line the system will think that mysite.com is your > local machine. > > Dan From danielc at analysisandsolutions.com Tue Feb 22 01:42:07 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 22 Feb 2005 01:42:07 -0500 Subject: [nycphp-talk] PLEASE test PEAR XML_RPC 1.2.0 Message-ID: <20050222064207.GC11529@panix.com> Hi Folks: I think/hope/pray I've come up with the final release candidate for the XML_RPC package. This is a widely used and vitally important utility, so I don't want anyone getting burned by upgrading to the stable version when it comes out. If you use the PEAR XML_RPC package, PLEASE, get the latest version and test it out. via PEAR installer: pear upgrade XML_RPC-beta via a tar file: http://pear.php.net/get/XML_RPC-1.2.0RC7.tgz For more info, see http://pear.php.net/package/XML_RPC. Thanks very much, --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 danielc at analysisandsolutions.com Tue Feb 22 11:06:09 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 22 Feb 2005 11:06:09 -0500 Subject: [nycphp-talk] testing the new PEAR DB 1.7.0 Message-ID: <20050222160609.GA24481@panix.com> Hola: I've implemented several improvements and bug fixes to the PEAR DB package and put out a release candidate. Some may be interested to know the InterBase/Firefox and mSQL drivers now work completely. If you use the PEAR DB package, PLEASE, get the latest version and test it out. via PEAR installer: pear upgrade DB-beta via a tar file: http://pear.php.net/get/DB-1.7.0RC1.tgz For more info, see http://pear.php.net/package/DB. Thanks very much, --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 jayeshsh at ceruleansky.com Tue Feb 22 12:25:53 2005 From: jayeshsh at ceruleansky.com (Jayesh Sheth) Date: Tue, 22 Feb 2005 12:25:53 -0500 Subject: [nycphp-talk] PHP meets .NET Message-ID: <421B6B21.20302@ceruleansky.com> Guten Tag, (Dan used hola, so I thought I would try something different too.) I just saw this, and I thought it was pretty cool: http://www.php-compiler.net/ Here is some info. from their site. Very cool, in my opinion. Looks like it is only available for non-commercial use though ( http://www.php-compiler.net/License.htm). Hope to see the regulars (and some new faces too) at the meeting tonight. - Jay ----- Phlanger: the PHP Language Compiler for .NET Framework Extends the .NET language family with PHP version 5 * PHP code compiled into MSIL (Microsoft Intermediate Language) byte-code and metadata * compiled functions, classes and interfaces can be used from other .NET languages (like C#) * type inheritance preserved ? each PHP class or interface declaration corresponds to one CLI type * PHP code can call methods declared in the Phalanger's Class Library (methods annotated by certain metadata are visible to PHP code) * classes defined in Phalanger's Class Library which inherits from common supertype (PhpObject) can be instantiated and inherited from PHP code * the Class Library can be extended by user code written in any .NET language provided some requirements are fulfilled Enables creation of ASP.NET applications made of existing PHP scripts * development of ASP.NET web applications made up from existing PHP scripts * scripts are compiled automatically and gradually as requests incoming * scripts are watched for modifications and recompilation is performed if necessary * enables web application to be configured using hierarchy of Web.config files * web server is not needed to be restarted when configuration changes Compiles PHP scripts to achieve a significant speed-up of application execution * compiled scripts run faster than interpreted ones and even those sped-up by PHP encoders (see benchmarks ) * console applications written in PHP are compiled into single-module executable .NET assemblies * libraries of PHP classes, interfaces, constants and functions are compiled into single-module .NET assemblies Provides .NET application developers with all the PHP libraries * more than 450 PHP functions implemented in the Phalanger Class Library * all PHP extensions are available to any other .NET language via managed wrappers * managed wrappers encapsulates native extension dlls with a managed layer hiding implementation details of extension dlls * native extensions can be hosted in separate process to isolate native code from web server's address space * communication with isolated extensions via .NET Remoting with shared memory channel Integrates the PHP language into Microsoft Visual Studio .NET * a new type of project for PHP console applications and libraries * syntax highlighting * syntax checking * integrated project building * simple tracing using compiler-generated debug symbols (experimental in this version) From alexchan.1976 at gmail.com Tue Feb 22 12:41:05 2005 From: alexchan.1976 at gmail.com (Alex C) Date: Tue, 22 Feb 2005 12:41:05 -0500 Subject: [nycphp-talk] PHP meets .NET In-Reply-To: <421B6B21.20302@ceruleansky.com> References: <421B6B21.20302@ceruleansky.com> Message-ID: <8f494f7605022209414f442d1@mail.gmail.com> Hi. As cool as this one is.. it only runs on MS clr. however there is a more open version that runs on mono. it is written in C#. it can be found at http://sourceforge.net/projects/ironphp/. however it is too much in alpha.. php-compiler.net seems much more complete. alex On Tue, 22 Feb 2005 12:25:53 -0500, Jayesh Sheth wrote: > Guten Tag, > > (Dan used hola, so I thought I would try something different too.) > > I just saw this, and I thought it was pretty cool: > http://www.php-compiler.net/ > > Here is some info. from their site. Very cool, in my opinion. Looks like > it is only available for non-commercial use though ( > http://www.php-compiler.net/License.htm). > > Hope to see the regulars (and some new faces too) at the meeting tonight. > > - Jay > ----- > Phlanger: the PHP Language Compiler for .NET Framework > > Extends the .NET language family with PHP version 5 > > * PHP code compiled into MSIL (Microsoft Intermediate Language) > byte-code and metadata > * compiled functions, classes and interfaces can be used from other > .NET languages (like C#) > * type inheritance preserved ? each PHP class or interface > declaration corresponds to one CLI type > * PHP code can call methods declared in the Phalanger's Class > Library (methods annotated by certain metadata are visible to PHP > code) > * classes defined in Phalanger's Class Library which inherits from > common supertype (PhpObject) can be instantiated and inherited > from PHP code > * the Class Library can be extended by user code written in any .NET > language provided some requirements are fulfilled > > Enables creation of ASP.NET applications made of existing PHP > scripts > > * development of ASP.NET web applications made up from existing PHP > scripts > * scripts are compiled automatically and gradually as requests incoming > * scripts are watched for modifications and recompilation is > performed if necessary > * enables web application to be configured using hierarchy of > Web.config files > * web server is not needed to be restarted when configuration changes > > Compiles PHP scripts to achieve a significant speed-up of > application execution > > * compiled scripts run faster than interpreted ones and even those > sped-up by PHP encoders (see benchmarks > ) > * console applications written in PHP are compiled into > single-module executable .NET assemblies > * libraries of PHP classes, interfaces, constants and functions are > compiled into single-module .NET assemblies > > Provides .NET application developers with all the PHP libraries > > * more than 450 PHP functions implemented in the Phalanger Class Library > * all PHP extensions are available to any other .NET language via > managed wrappers > * managed wrappers encapsulates native extension dlls with a managed > layer hiding implementation details of extension dlls > * native extensions can be hosted in separate process to isolate > native code from web server's address space > * communication with isolated extensions via .NET Remoting with > shared memory channel > > Integrates the PHP language into Microsoft Visual Studio .NET > > * a new type of project for PHP console applications and libraries > * syntax highlighting > * syntax checking > * integrated project building > * simple tracing using compiler-generated debug symbols > (experimental in this version) > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From lists at zaunere.com Tue Feb 22 12:57:04 2005 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 22 Feb 2005 12:57:04 -0500 Subject: [nycphp-talk] PHP meets .NET In-Reply-To: <8f494f7605022209414f442d1@mail.gmail.com> Message-ID: <20050222175707.6A759A85F3@virtu.nyphp.org> > As cool as this one is.. it only runs on MS clr. however there is a > more open version that runs on mono. it is written in C#. it can be > found at http://sourceforge.net/projects/ironphp/. however it is too > much in alpha.. php-compiler.net seems much more complete. > > alex > > > On Tue, 22 Feb 2005 12:25:53 -0500, Jayesh Sheth > wrote: > > Guten Tag, > > > > (Dan used hola, so I thought I would try something different too.) > > > > I just saw this, and I thought it was pretty cool: > > http://www.php-compiler.net/ > > > > Here is some info. from their site. Very cool, in my opinion. Looks like > > it is only available for non-commercial use though ( > > http://www.php-compiler.net/License.htm). Interesting stuff guys - seems like it'd be a good topic for a presentation. Has anyone played with these at a somewhat in-depth level? Even a comparison between the various options? --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From j at nybg.org Tue Feb 22 23:10:22 2005 From: j at nybg.org (Freeman, Joshua) Date: Tue, 22 Feb 2005 23:10:22 -0500 Subject: [nycphp-talk] newbie question/confusion Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F8897F@xmail.nybg.org> This may be more of a MySQL question than a PHP question but here goes: First, I will confess to the fact that I'm using PHAkt/AdoDB with Dreamweaver to help myself learn PHP... So, that is why the syntax is what it is. It's a place to start... :-) I have a small database with two tables in it. It's a database of Botanical Gardens in the US. Table 1 contains the botanical gardens and has 8 fields: (I'm abbreviating for brevity and clarity): id, name, address, town, state_id, zip, phone, url Table 2 contains the states referred to in the 'state_id' field and itself has 3 fields id, abbreviation, name So, 'id' in the 'state' table is linked to the 'gardens' table via that table's 'state_id' field. Now, in pulling data out of the database to display on a web page I have all of my connection stuff working and the query of 'select * from gardens' along with this php code: works fine, pulling records out of the 'gardens' table and displaying it on a web page, but, of course, I'm seeing the 'state_id' instead of either the 'state_abbreviation' or the 'state_name'. I am at a complete and total loss as to how to edit my code at this point so that, before displaying anything, i can grab either 'state_abbr' or 'state_name' from the states table, properly associated with the 'state_id' and display the actual state abbreviation or state name in my web page. I'm so close, yet so far. I know if I can be shown once how this works, I'll be able to apply the solution again in the future. Thanks in advance for any help with this. Sincerely, Joshua -------------- next part -------------- An HTML attachment was scrubbed... URL: From j at nybg.org Tue Feb 22 23:18:08 2005 From: j at nybg.org (Freeman, Joshua) Date: Tue, 22 Feb 2005 23:18:08 -0500 Subject: [nycphp-talk] btw Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F88982@xmail.nybg.org> I went out to #nyphp but there was no one there! #php was hopping but I was too shy to post my query there. :-) J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -------------- next part -------------- An HTML attachment was scrubbed... URL: From faber at linuxnj.com Tue Feb 22 23:27:32 2005 From: faber at linuxnj.com (Faber Fedor) Date: Tue, 22 Feb 2005 23:27:32 -0500 Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F8897F@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F8897F@xmail.nybg.org> Message-ID: <20050223042732.GA8080@uranus.faber.nom> On 22/02/05 23:10 -0500, Freeman, Joshua wrote: > I am at a complete and total loss as to how to edit my code at this > point so that, before displaying anything, i can grab either > 'state_abbr' or 'state_name' from the states table, properly > associated with the 'state_id' and display the actual state > abbreviation or state name in my web page. Are you asking "how do I do a JOIN on the tables"? SELECT botgard_name, botgard_address, yadayadayada, state_abbr FROM gardens LEFT JOIN states ON gardens.state_id = states.state_id (I think that's the syntx) or, to be safer, you might want to do SELECT botgard_name, botgard_address, yadayadayada, state_abbr FROM gardens, states WHERE gardens.state_id = states.state_id (I know that syntax will work). There are subtle differences between the two, but either should work in your circumstance. You want to RTFM at http://dev.mysql.com/doc/mysql/en/join.html which isn't too helpful, IMO, or try http://www.devshed.com/c/a/MySQL/MySQL-Table-Joins/ -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From j at nybg.org Tue Feb 22 23:48:35 2005 From: j at nybg.org (Freeman, Joshua) Date: Tue, 22 Feb 2005 23:48:35 -0500 Subject: [nycphp-talk] Re: newbie question/confusion Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> T H A N K Y O U ! ! I used the second syntax first... I'll test the first syntax tomorrow! Now I just have to figure out how to write my insert statement for when people want to add gardens! ;-) J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -----Original Message----- From: talk-bounces at lists.nyphp.org on behalf of Faber Fedor Sent: Tue 2/22/2005 11:27 PM To: NYPHP Talk Subject: [nycphp-talk] Re: newbie question/confusion On 22/02/05 23:10 -0500, Freeman, Joshua wrote: > I am at a complete and total loss as to how to edit my code at this > point so that, before displaying anything, i can grab either > 'state_abbr' or 'state_name' from the states table, properly > associated with the 'state_id' and display the actual state > abbreviation or state name in my web page. Are you asking "how do I do a JOIN on the tables"? SELECT botgard_name, botgard_address, yadayadayada, state_abbr FROM gardens LEFT JOIN states ON gardens.state_id = states.state_id (I think that's the syntx) or, to be safer, you might want to do SELECT botgard_name, botgard_address, yadayadayada, state_abbr FROM gardens, states WHERE gardens.state_id = states.state_id (I know that syntax will work). There are subtle differences between the two, but either should work in your circumstance. You want to RTFM at http://dev.mysql.com/doc/mysql/en/join.html which isn't too helpful, IMO, or try http://www.devshed.com/c/a/MySQL/MySQL-Table-Joins/ -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3499 bytes Desc: not available URL: From faber at linuxnj.com Wed Feb 23 00:09:50 2005 From: faber at linuxnj.com (Faber Fedor) Date: Wed, 23 Feb 2005 00:09:50 -0500 Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> Message-ID: <20050223050950.GB8251@uranus.faber.nom> On 22/02/05 23:48 -0500, Freeman, Joshua wrote: > T H A N K Y O U ! ! > > I used the second syntax first... I'll test the first syntax tomorrow! > > Now I just have to figure out how to write my insert statement for when people want to add gardens! INSERT INTO gardens (field1, field2, field3) VALUES (value1, value2, value3) http://dev.mysql.com/doc/mysql/en/insert.html or do what I do: google for "mysql insert syntax". First link. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From danielc at analysisandsolutions.com Wed Feb 23 00:38:50 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 23 Feb 2005 00:38:50 -0500 Subject: [nycphp-talk] newbie question/confusion In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F8897F@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F8897F@xmail.nybg.org> Message-ID: <20050223053850.GB18874@panix.com> Joshua: On Tue, Feb 22, 2005 at 11:10:22PM -0500, Freeman, Joshua wrote: > > So, 'id' in the 'state' table is linked to the 'gardens' table via > that table's 'state_id' field. Good job on "normalizing" your database. Suggestion: use the same column names in each table for the key: state_id. It makes things easier to join and is clearer. > it on a web page, but, of course, I'm seeing the 'state_id' instead of > either the 'state_abbreviation' or the 'state_name'. Faber was on target. My MySQL tutorial, while mainly geared toward how to install MySQL on Windows, also includes SQL syntax tips: http://www.analysisandsolutions.com/code/mybasic.htm A later post mentioned your inquiry regarding inserting new gardens. When accepting user input, make sure you carefully validate the information so it won't permit "SQL injection" attacks or other corruptions/errors. --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 sajith.ml at gmail.com Wed Feb 23 05:22:00 2005 From: sajith.ml at gmail.com (Sajith A) Date: Wed, 23 Feb 2005 15:52:00 +0530 Subject: [nycphp-talk] PHP 5 framework Message-ID: Recently we came across a situation to develop a crm application in php5. Thinking maintainability in mind, we thought about using a framework. It would be helpful to receive inputs from anyone who has successfully used any. Would like to know your opinion about prado[http://www.xisc.com/ inspired by apache tapestry] , iconnect or Seagull [http://seagull.phpkitchen.com/?ref=phpkitchen] or any other... Thanks and regards sajith http://apilgrim.info sajith.ml[at]gmail.com From list at harveyk.com Wed Feb 23 08:08:31 2005 From: list at harveyk.com (harvey) Date: Wed, 23 Feb 2005 08:08:31 -0500 Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: <20050223050950.GB8251@uranus.faber.nom> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> <20050223050950.GB8251@uranus.faber.nom> Message-ID: <6.1.0.6.2.20050223080646.075269c8@mail.harveyk.com> This is a great site for beginning to learn lots of languages: http://www.w3schools.com/ and specificlaly for SQL: http://www.w3schools.com/sql/default.asp At 12:09 AM 2/23/2005, Faber Fedor wrote: >On 22/02/05 23:48 -0500, Freeman, Joshua wrote: > > T H A N K Y O U ! ! > > > > I used the second syntax first... I'll test the first syntax tomorrow! > > > > Now I just have to figure out how to write my insert statement for when > people want to add gardens! > > >INSERT INTO gardens >(field1, field2, field3) >VALUES (value1, value2, value3) > > >http://dev.mysql.com/doc/mysql/en/insert.html or do what I do: google >for "mysql insert syntax". First link. > > >-- > >Regards, > >Faber > >Linux New Jersey: Open Source Solutions for New Jersey >http://www.linuxnj.com > > > >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From matt at jobsforge.com Wed Feb 23 08:11:52 2005 From: matt at jobsforge.com (Matthew Terenzio) Date: Wed, 23 Feb 2005 08:11:52 -0500 Subject: [nycphp-talk] PHP meets .NET In-Reply-To: <20050222175707.6A759A85F3@virtu.nyphp.org> References: <20050222175707.6A759A85F3@virtu.nyphp.org> Message-ID: <8002f7ef3205089cf8dab5d089bd8bee@jobsforge.com> On Feb 22, 2005, at 12:57 PM, Hans Zaunere wrote: > Interesting stuff guys - seems like it'd be a good topic for a > presentation. Has anyone played with these at a somewhat in-depth > level? Even a comparison between the various options? Yeah, and you might be able to include bridging PHP to Java objects in this way http://www.jcp.org/en/jsr/detail?id=223 And I'm wondering if a PHP script has ever been compiled by a Java compiler. From dmintz at davidmintz.org Wed Feb 23 09:20:12 2005 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 23 Feb 2005 09:20:12 -0500 (EST) Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: <6.1.0.6.2.20050223080646.075269c8@mail.harveyk.com> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> <20050223050950.GB8251@uranus.faber.nom> <6.1.0.6.2.20050223080646.075269c8@mail.harveyk.com> Message-ID: Just to add a little more onto the pile of more-answer-than-you-asked-for: it's probably wise to create some indexes on your tables to speed up SELECT operations. The columns frequently appearing in your WHERE clauses are good candidates. There's http://www.databasejournal.com/features/mysql/article.php/1382791 but I'm sure there's plenty of other fine reading material out there. --- David Mintz http://davidmintz.org/ From j at nybg.org Wed Feb 23 09:25:21 2005 From: j at nybg.org (Freeman, Joshua) Date: Wed, 23 Feb 2005 09:25:21 -0500 Subject: [nycphp-talk] Re: newbie question/confusion Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F88986@xmail.nybg.org> Thanks everyone! I really appreciate the help! Things are taking shape nicely... J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -----Original Message----- From: talk-bounces at lists.nyphp.org on behalf of David Mintz Sent: Wed 2/23/2005 9:20 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Re: newbie question/confusion Just to add a little more onto the pile of more-answer-than-you-asked-for: it's probably wise to create some indexes on your tables to speed up SELECT operations. The columns frequently appearing in your WHERE clauses are good candidates. There's http://www.databasejournal.com/features/mysql/article.php/1382791 but I'm sure there's plenty of other fine reading material out there. --- David Mintz http://davidmintz.org/ _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3015 bytes Desc: not available URL: From gatzby3jr at gmail.com Wed Feb 23 09:25:06 2005 From: gatzby3jr at gmail.com (Brian O'Connor) Date: Wed, 23 Feb 2005 09:25:06 -0500 Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: References: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> <20050223050950.GB8251@uranus.faber.nom> <6.1.0.6.2.20050223080646.075269c8@mail.harveyk.com> Message-ID: <29da5d150502230625757612e6@mail.gmail.com> About that ... when you create a unique field on a table, does that automatically make that an index as well? On Wed, 23 Feb 2005 09:20:12 -0500 (EST), David Mintz wrote: > > Just to add a little more onto the pile of more-answer-than-you-asked-for: > it's probably wise to create some indexes on your tables to speed up > SELECT operations. The columns frequently appearing in your WHERE clauses > are good candidates. > > There's http://www.databasejournal.com/features/mysql/article.php/1382791 > but I'm sure there's plenty of other fine reading material out there. > > --- > David Mintz > http://davidmintz.org/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > -- Brian O'Connor From j at nybg.org Wed Feb 23 10:04:48 2005 From: j at nybg.org (Freeman, Joshua) Date: Wed, 23 Feb 2005 10:04:48 -0500 Subject: [nycphp-talk] next challenge Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> So, I can now create a page that reaches into the database, grabs all the records and then displays the first 10 records (or however many I want to set it to) and displays buttons for the next 10, etc... I also have a form so that people can add new records to the database. going back to the issue of displaying records in the database, I want set up the ability to bring up a record-edit form by clicking on the name of the Botanical garden... any pointers? J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cbielanski at inta.org Wed Feb 23 10:24:13 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Wed, 23 Feb 2005 10:24:13 -0500 Subject: [nycphp-talk] next challenge Message-ID: <43387D79FA1DB74AA876E4C3F4867D320C81E5@intamail1.ny.inta.org> You could add an "operation" argument to your list/view page: Then next to each record, your EDIT button passes the record's ID and the EDIT operation to your action page. When I see EDIT as the op, I redirect to the Edit page or whatever means I've built to edit a record, (which happens in a current case to be the same page as my list page). Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski at inta.org , www.inta.org INTA -- 125 Years of Excellence -----Original Message----- From: Freeman, Joshua [mailto:j at nybg.org] Sent: Wednesday, February 23, 2005 10:05 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] next challenge So, I can now create a page that reaches into the database, grabs all the records and then displays the first 10 records (or however many I want to set it to) and displays buttons for the next 10, etc... I also have a form so that people can add new records to the database. going back to the issue of displaying records in the database, I want set up the ability to bring up a record-edit form by clicking on the name of the Botanical garden... any pointers? J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Wed Feb 23 10:25:23 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 23 Feb 2005 10:25:23 -0500 Subject: [nycphp-talk] next challenge In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> Message-ID: <20050223152523.GA22547@panix.com> Hi Joshua: The list of gardens has the name of the garden as a hyperlink. The link goes to the add/edit page and has the garden id as part of the query string: echo '' . $row['garden'] . "\n"; Adding and editing items should be done via the same page/form. Makes long term maintenance easier. --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 Cbielanski at inta.org Wed Feb 23 10:26:54 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Wed, 23 Feb 2005 10:26:54 -0500 Subject: [nycphp-talk] next challenge Message-ID: <43387D79FA1DB74AA876E4C3F4867D320C81E6@intamail1.ny.inta.org> Sorry, I forgot to protoype the EDIT button: Edit :) Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski at inta.org , www.inta.org INTA -- 125 Years of Excellence -----Original Message----- From: Chris Bielanski [mailto:Cbielanski at inta.org] Sent: Wednesday, February 23, 2005 10:24 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] next challenge You could add an "operation" argument to your list/view page: Then next to each record, your EDIT button passes the record's ID and the EDIT operation to your action page. When I see EDIT as the op, I redirect to the Edit page or whatever means I've built to edit a record, (which happens in a current case to be the same page as my list page). Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski at inta.org , www.inta.org INTA -- 125 Years of Excellence -----Original Message----- From: Freeman, Joshua [mailto:j at nybg.org] Sent: Wednesday, February 23, 2005 10:05 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] next challenge So, I can now create a page that reaches into the database, grabs all the records and then displays the first 10 records (or however many I want to set it to) and displays buttons for the next 10, etc... I also have a form so that people can add new records to the database. going back to the issue of displaying records in the database, I want set up the ability to bring up a record-edit form by clicking on the name of the Botanical garden... any pointers? J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Wed Feb 23 10:27:23 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 23 Feb 2005 10:27:23 -0500 Subject: [nycphp-talk] Re: newbie question/confusion In-Reply-To: <29da5d150502230625757612e6@mail.gmail.com> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88983@xmail.nybg.org> <20050223050950.GB8251@uranus.faber.nom> <6.1.0.6.2.20050223080646.075269c8@mail.harveyk.com> <29da5d150502230625757612e6@mail.gmail.com> Message-ID: <20050223152723.GB22547@panix.com> Brian: > About that ... when you create a unique field on a table, does that > automatically make that an index as well? Yes. UNIQUE is an index/key. --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 jsiegel1 at optonline.net Wed Feb 23 10:38:40 2005 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 23 Feb 2005 10:38:40 -0500 Subject: [nycphp-talk] next challenge In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> Message-ID: <421CA380.9040800@optonline.net> Joshua, You can do something like the following: "{$rows['NameofGarden']}"; Of course...those are bogus names for the database columns...you'd use the real ones. I assume, also, that you're using something like mysql_fetch_assoc. Jeff Freeman, Joshua wrote: > > going back to the issue of displaying records in the database, I want > set up the ability to bring up a record-edit form by clicking on the > name of the Botanical garden... any pointers? > From rolan at omnistep.com Wed Feb 23 10:50:55 2005 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 23 Feb 2005 10:50:55 -0500 Subject: [nycphp-talk] next challenge In-Reply-To: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> References: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> Message-ID: <421CA65F.8010805@omnistep.com> Silly but true story/word of caution: If you add a "delete record" button, be sure your admin page is protected with a password and also add a robots.txt. A few years back, I had a unprotected admin page (security through obscurity, heh!). Googlebot found the page (linked from an automated daily web stats page) and proceeded to spider all the [delete] links ultimately wiping out all the records. Luckily I was able to restore from a nightly backup. It was quite embarrasing to be owned by a search engine. ~Rolan Freeman, Joshua wrote: > So, > > I can now create a page that reaches into the database, grabs all the > records and then displays the first 10 records (or however many I want > to set it to) and displays buttons for the next 10, etc... > > I also have a form so that people can add new records to the database. > > going back to the issue of displaying records in the database, I want > set up the ability to bring up a record-edit form by clicking on the > name of the Botanical garden... any pointers? > > J. > > Joshua S. Freeman > Director, Information Technology, NYBG > v: 718 817 8937 m: 347 392 2560 > jfreeman at nybg dot org > > > From j at nybg.org Wed Feb 23 10:50:17 2005 From: j at nybg.org (Freeman, Joshua) Date: Wed, 23 Feb 2005 10:50:17 -0500 Subject: [nycphp-talk] next challenge Message-ID: <319FD9EAB7A43E43895ACA5AA1F81E05F8898A@xmail.nybg.org> Thanks! fwiw, this little database is going to be behind our corporate firewall and only accessible to a few people... Basically, our retail department (the people who manage the shop) keep a Microsoft Word doc. list of all of the other Botanical Gardens in the US that have shops.. the idea being that we might be able to get those other shops to purchase items from us that we have manufactured for OUR shop. When I saw this MS word doc. I figured it'd be a good, small project for me to start building LAMP apps. :-) J. Joshua S. Freeman Director, Information Technology, NYBG v: 718 817 8937 m: 347 392 2560 jfreeman at nybg dot org -----Original Message----- From: talk-bounces at lists.nyphp.org on behalf of Rolan Yang Sent: Wed 2/23/2005 10:50 AM To: NYPHP Talk Subject: Re: [nycphp-talk] next challenge Silly but true story/word of caution: If you add a "delete record" button, be sure your admin page is protected with a password and also add a robots.txt. A few years back, I had a unprotected admin page (security through obscurity, heh!). Googlebot found the page (linked from an automated daily web stats page) and proceeded to spider all the [delete] links ultimately wiping out all the records. Luckily I was able to restore from a nightly backup. It was quite embarrasing to be owned by a search engine. ~Rolan Freeman, Joshua wrote: > So, > > I can now create a page that reaches into the database, grabs all the > records and then displays the first 10 records (or however many I want > to set it to) and displays buttons for the next 10, etc... > > I also have a form so that people can add new records to the database. > > going back to the issue of displaying records in the database, I want > set up the ability to bring up a record-edit form by clicking on the > name of the Botanical garden... any pointers? > > J. > > Joshua S. Freeman > Director, Information Technology, NYBG > v: 718 817 8937 m: 347 392 2560 > jfreeman at nybg dot org > > > _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3596 bytes Desc: not available URL: From krook at us.ibm.com Wed Feb 23 11:13:45 2005 From: krook at us.ibm.com (Daniel Krook) Date: Wed, 23 Feb 2005 11:13:45 -0500 Subject: [nycphp-talk] next challenge In-Reply-To: <421CA65F.8010805@omnistep.com> Message-ID: > Silly but true story/word of caution: > > If you add a "delete record" button, be sure your admin page is > protected with a password and also add a robots.txt. A few years back, I > had a unprotected admin page (security through obscurity, heh!). > Googlebot found the page (linked from an automated daily web stats page) > and proceeded to spider all the [delete] links ultimately wiping out all > the records. Luckily I was able to restore from a nightly backup. It was > quite embarrasing to be owned by a search engine. Ha. I had the same thing happen to me... luckily it was just a prototype application though. I had cleverly attached JavaScript confirm()'s to the delete links which was pretty good at making it a two step process of deletion for users, but Google just plowed on through. :) Daniel Krook, Advisory IT Specialist - Application Development WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From 1j0lkq002 at sneakemail.com Wed Feb 23 16:21:19 2005 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 23 Feb 2005 16:21:19 -0500 Subject: [nycphp-talk] next challenge In-Reply-To: References: Message-ID: <12033-50168@sneakemail.com> Daniel Krook krook-at-us.ibm.com |nyphp dev/internal group use| wrote: >>Silly but true story/word of caution: >> >>If you add a "delete record" button, be sure your admin page is >>protected with a password and also add a robots.txt. A few years back, I >> >> > > > >>had a unprotected admin page (security through obscurity, heh!). >>Googlebot found the page (linked from an automated daily web stats page) >> >> > > > >>and proceeded to spider all the [delete] links ultimately wiping out all >> >> > > > >>the records. Luckily I was able to restore from a nightly backup. It was >> >> > > > >>quite embarrasing to be owned by a search engine. >> >> > > >Ha. I had the same thing happen to me... luckily it was just a prototype >application though. > >I had cleverly attached JavaScript confirm()'s to the delete links which >was pretty good at making it a two step process of deletion for users, but >Google just plowed on through. :) > > > > > > > >Daniel Krook, Advisory IT Specialist - Application Development >WW Web Production Services North 2, ibm.com >1133 Westchester Avenue, White Plains, NY 10604 > > great stories. Good examples for warning people about search enigine visits.... -=john From Consult at CovenantEDesign.com Thu Feb 24 03:04:24 2005 From: Consult at CovenantEDesign.com (Edward) Date: Thu, 24 Feb 2005 03:04:24 -0500 Subject: [nycphp-talk] next challenge References: <319FD9EAB7A43E43895ACA5AA1F81E05F88988@xmail.nybg.org> <421CA380.9040800@optonline.net> Message-ID: <002101c51a47$77550d30$45896e41@ced> What is the RSS feed for this list? EDWARD PREVOST ----- Original Message ----- From: "Jeff Siegel" To: "NYPHP Talk" Sent: Wednesday, February 23, 2005 10:38 AM Subject: Re: [nycphp-talk] next challenge > Joshua, > > You can do something like the following: > > "{$rows['NameofGarden']}"; > > Of course...those are bogus names for the database columns...you'd use > the real ones. I assume, also, that you're using something like > mysql_fetch_assoc. > > Jeff > > Freeman, Joshua wrote: > > > > > going back to the issue of displaying records in the database, I want > > set up the ability to bring up a record-edit form by clicking on the > > name of the Botanical garden... any pointers? > > > > > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From rrust at r2communications.com Thu Feb 24 08:11:15 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 24 Feb 2005 08:11:15 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment Message-ID: <421DD273.1010003@r2communications.com> I have a nice little codebase that I have written in PHP 4 OOP. I am very leary that my host will someday switch to PHP 5, and although backwards compatability may be turned on (if it can be), I am still leary that my objects will fail upon instantiation. I have three classes that I use on every page for the following functionality: - connecting to the database (class_db.php) - controlling the display of the page (class_display.php) - validating user input (class_validator.php) In all of my other classes, I use a constructor to instantiate the above classes so that I can use their methods and properties. class Employer { //constructor function Employer(){ $this->db =& new DB; $this->display =& new Display; $this->validator =& new Validator; $this->db=$this->db->conn; } //properties //methods } I am really still new to the whole OOP thing, but I am learning. I definitely see the benefits of it, but I want to make sure that what I am describing above will not break in PHP 5. I have a second machine at home that I am going to install Apache and PHP 5 on this weekend, but I thought I would ask for some feedback first. TIA. -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From chsnyder at gmail.com Thu Feb 24 08:59:02 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 24 Feb 2005 08:59:02 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <421DD273.1010003@r2communications.com> References: <421DD273.1010003@r2communications.com> Message-ID: On Thu, 24 Feb 2005 08:11:15 -0500, Randal Rust wrote: > I have a nice little codebase that I have written in PHP 4 OOP. I am > very leary that my host will someday switch to PHP 5, and although > backwards compatability may be turned on (if it can be), I am still > leary that my objects will fail upon instantiation. In general PHP4 OOP is forwards compatible with PHP5. 5 will still call your Emloyer() method as the constructor, for instance, even though it prefers __construct(). > function Employer(){ > $this->db =& new DB; > $this->display =& new Display; > $this->validator =& new Validator; > $this->db=$this->db->conn; > } Out of curiousity, why are you assigning by reference ( =& ) when creating the new objects? Is it because DB, Display, and Validator implement a singleton pattern? From rrust at r2communications.com Thu Feb 24 09:14:50 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 24 Feb 2005 09:14:50 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: References: <421DD273.1010003@r2communications.com> Message-ID: <421DE15A.8080308@r2communications.com> csnyder wrote: > Out of curiousity, why are you assigning by reference ( =& ) when > creating the new objects? i was under the impression that =& created a new instance of the object, and that was the proper way to do it. > Is it because DB, Display, and Validator implement a singleton pattern? unfortunately, i have no idea what 'singleton patter' means:) i am merely a designer learning to move from procedural scripting to OOP. so all i know is that in order to access the properties and methods in the other classes, i had to use a constructor. -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From list at harveyk.com Thu Feb 24 09:16:22 2005 From: list at harveyk.com (harvey) Date: Thu, 24 Feb 2005 09:16:22 -0500 Subject: [nycphp-talk] Grabbing info Twice from the Same Table Message-ID: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> Hello, I'm drawing a blank on this... I've got a table of "show" information and a table of month names. When listing the shows, dates, prices, etc, I do something like the following: SELECT shows.name, shows.id, month.month_name AS openmonth FROM shows, months WHERE shows.openmonth_fid = months.month_id I get the opening month name fine. Now I also want to get the closing month name. But I know a query like the following won't work. SELECT shows.name, shows.id, month.month_name AS openmonth, month.month_name AS closemonth FROM shows, months WHERE shows.openmonth_fid = months.month_id AND shows.closemonth_fid = months.month_id How would I go about doing something like the above? I know I can create two separate months tables (one for opens, one for closes) but there's gotta be a better way, right? Thanks! Harvey From rrust at r2communications.com Thu Feb 24 09:24:27 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 24 Feb 2005 09:24:27 -0500 Subject: [nycphp-talk] Grabbing info Twice from the Same Table In-Reply-To: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> References: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> Message-ID: <421DE39B.4060707@r2communications.com> harvey wrote: > SELECT shows.name, shows.id, month.month_name AS openmonth > FROM shows, months > WHERE shows.openmonth_fid = months.month_id for clarity's sake, it sounds like your tables are like so... SHOWS ------------ showName showID openMonth_fid closeMonth_fid MONTHS ------------- monthID monthName > How would I go about doing something like the above? see if the following works. if it doesn't try 'left join' in place of inner join. QUERY -------------- select s.showName, s.showID, m.monthName as openMonth, m.monthName as closeMonth from shows s innner join months m on s.openMonth_fid=m.monthID and s.closedMonth_fid=m.monthID -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From dcech at phpwerx.net Thu Feb 24 09:30:51 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 24 Feb 2005 09:30:51 -0500 Subject: [nycphp-talk] Grabbing info Twice from the Same Table In-Reply-To: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> References: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> Message-ID: <421DE51B.20400@phpwerx.net> harvey wrote: > Hello, > > I'm drawing a blank on this... > > I've got a table of "show" information and a table of month names. > When listing the shows, dates, prices, etc, I do something like the > following: > > SELECT shows.name, shows.id, month.month_name AS openmonth > FROM shows, months > WHERE shows.openmonth_fid = months.month_id > > I get the opening month name fine. > Now I also want to get the closing month name. > But I know a query like the following won't work. > > SELECT shows.name, shows.id, month.month_name AS openmonth, > month.month_name AS closemonth > FROM shows, months > WHERE shows.openmonth_fid = months.month_id > AND shows.closemonth_fid = months.month_id > > How would I go about doing something like the above? You need the following syntax: SELECT s.name,s.id,m1.month_name AS open,m2.month_name AS close FROM shows AS s JOIN months AS m1 ON m1.month_id = s.openmonth_id JOIN months AS m2 ON m2.month_id = s.closemonth_id Dan > I know I can create two separate months tables (one for opens, one for > closes) but there's gotta be a better way, right? > > Thanks! > > Harvey From chsnyder at gmail.com Thu Feb 24 09:58:02 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 24 Feb 2005 09:58:02 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <421DE15A.8080308@r2communications.com> References: <421DD273.1010003@r2communications.com> <421DE15A.8080308@r2communications.com> Message-ID: On Thu, 24 Feb 2005 09:14:50 -0500, Randal Rust wrote: > csnyder wrote: > > > Out of curiousity, why are you assigning by reference ( =& ) when > > creating the new objects? > > i was under the impression that =& created a new instance of the object, > and that was the proper way to do it. > > > Is it because DB, Display, and Validator implement a singleton pattern? > > unfortunately, i have no idea what 'singleton patter' means:) > A singleton is a class which returns an instance of some object. If the instance doesn't exist yet, the singleton creates it. Otherwise, a reference to the existing instance is returned. It's good for things like database connections that you only need one of. But that's beside the point... you don't need the =&, you can just say: $instance = new className; > > i am merely a designer learning to move from procedural scripting to > OOP. so all i know is that in order to access the properties and methods > in the other classes, i had to use a constructor. > If you have a lot of classes that instantiate the same objects over and over on construction, you might consider something like: class Employer { function Employer() { global $DB; $this->db =& $DB; } } $DB = new DB; $employer = new Employer; The global command brings the previously created $DB object into the local scope of the constructor. And you *would* use =& here so that you create a reference (memory pointer) to the $DB object instead of a copy of it. From rrust at r2communications.com Thu Feb 24 10:38:12 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 24 Feb 2005 10:38:12 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: References: <421DD273.1010003@r2communications.com> <421DE15A.8080308@r2communications.com> Message-ID: <421DF4E4.3040702@r2communications.com> csnyder wrote: > A singleton is a class which returns an instance of some object. ok. thanks for the explanation. fwiw, i am starting to read up on OOP, starting with adam's php 5 book. > If you have a lot of classes that instantiate the same objects over > and over on construction, you might consider something like: > > class Employer { > function Employer() { > global $DB; > $this->db =& $DB; > } > } > > $DB = new DB; > $employer = new Employer; you are exactly right. but i found that my approach.... > function Employer(){ > $this->db =& new DB; > $this->display =& new Display; > $this->validator =& new Validator; > $this->db=$this->db->conn; > } ...allowed me to only have these lines in my php page... $employer = new Employer $db=$employer->db; as far as i knew, this just allowed me to put less code in my pages. -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From list at harveyk.com Thu Feb 24 10:54:18 2005 From: list at harveyk.com (harvey) Date: Thu, 24 Feb 2005 10:54:18 -0500 Subject: [nycphp-talk] Grabbing info Twice from the Same Table In-Reply-To: <421DE51B.20400@phpwerx.net> References: <6.1.0.6.2.20050224091615.04a17778@127.0.0.1> <421DE51B.20400@phpwerx.net> Message-ID: <6.1.0.6.2.20050224105341.04a297c8@mail.harveyk.com> Thanks! That makes total sense. I didn't know you could put the AS on the JOIN... At 09:30 AM 2/24/2005, Dan Cech wrote: >harvey wrote: >>Hello, >>I'm drawing a blank on this... >>I've got a table of "show" information and a table of month names. >>When listing the shows, dates, prices, etc, I do something like the >>following: >>SELECT shows.name, shows.id, month.month_name AS openmonth >>FROM shows, months >>WHERE shows.openmonth_fid = months.month_id >>I get the opening month name fine. >>Now I also want to get the closing month name. >>But I know a query like the following won't work. >>SELECT shows.name, shows.id, month.month_name AS openmonth, >>month.month_name AS closemonth >>FROM shows, months >>WHERE shows.openmonth_fid = months.month_id >>AND shows.closemonth_fid = months.month_id >>How would I go about doing something like the above? > >You need the following syntax: > >SELECT s.name,s.id,m1.month_name AS open,m2.month_name AS close >FROM shows AS s >JOIN months AS m1 ON m1.month_id = s.openmonth_id >JOIN months AS m2 ON m2.month_id = s.closemonth_id > >Dan > >>I know I can create two separate months tables (one for opens, one for >>closes) but there's gotta be a better way, right? >>Thanks! >>Harvey >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From wfan at VillageVoice.com Thu Feb 24 11:27:50 2005 From: wfan at VillageVoice.com (Fan, Wellington) Date: Thu, 24 Feb 2005 11:27:50 -0500 Subject: [nycphp-talk] [OT] Paging Daniel Convissor Message-ID: <1448FB4565D489478642386D50D3FB770551F4F7@vvntmail.vvny.villagevoice.com> Sorry about using the list as a paging service, but I need Daniel to contact me off-list as soon as he can. Thanks! -- Wellington wfan at villagevoice.com From danielc at analysisandsolutions.com Thu Feb 24 11:38:28 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 24 Feb 2005 11:38:28 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: References: <421DD273.1010003@r2communications.com> Message-ID: <20050224163828.GB15795@panix.com> On Thu, Feb 24, 2005 at 08:59:02AM -0500, csnyder wrote: > > Out of curiousity, why are you assigning by reference ( =& ) when > creating the new objects? Doing so in PHP 4 saves on memory. For example, in PEAR DB, the connect method creates and then returns an object. As I understand it, in PHP 4, if references are not used, the object returned will be a whole new copy of the object created inside the method. But if you assign by reference, you get the object created inside the method. --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 danielc at analysisandsolutions.com Thu Feb 24 11:39:44 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 24 Feb 2005 11:39:44 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <421DD273.1010003@r2communications.com> References: <421DD273.1010003@r2communications.com> Message-ID: <20050224163944.GC15795@panix.com> Hi: On Thu, Feb 24, 2005 at 08:11:15AM -0500, Randal Rust wrote: > > am describing above will not break in PHP 5. Doesn't look like it will. Why not install PHP 5 on your computer and find out for sure? --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 dmintz at davidmintz.org Thu Feb 24 11:41:01 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 24 Feb 2005 11:41:01 -0500 (EST) Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel Message-ID: Hey Mitch, Very nice job on the presentation Tuesday night. (I was the jerk who tried to do the sound effect in honor of your trademark rimshot at the start of your talk.) --- David Mintz http://davidmintz.org/ From rrust at r2communications.com Thu Feb 24 11:54:02 2005 From: rrust at r2communications.com (Randal Rust) Date: Thu, 24 Feb 2005 11:54:02 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <20050224163944.GC15795@panix.com> References: <421DD273.1010003@r2communications.com> <20050224163944.GC15795@panix.com> Message-ID: <421E06AA.1050804@r2communications.com> Daniel Convissor wrote: > Doesn't look like it will. Why not install PHP 5 on your computer and > find out for sure? the reason i asked is because there is someone in my office running php 5, and we have noticed some strange 'notices.' but i have not had the time to look into it. i do intend to install it this weekend. i just wanted to throw it out there and make sure that what i already have wasn't a poor implementation. it sounds like i am ok, at least so far. -- Randal Rust R.Squared Communications http://www.r2communications.com Digital Design for Bricks-and-Mortar Businesses From chsnyder at gmail.com Thu Feb 24 12:16:24 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 24 Feb 2005 12:16:24 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <421DF4E4.3040702@r2communications.com> References: <421DD273.1010003@r2communications.com> <421DE15A.8080308@r2communications.com> <421DF4E4.3040702@r2communications.com> Message-ID: On Thu, 24 Feb 2005 10:38:12 -0500, Randal Rust wrote: > > $employer = new Employer > $db=$employer->db; > > as far as i knew, this just allowed me to put less code in my pages. > True, but you'll have four objects in memory per Employer object you create. It's not really that big a deal, and maybe you need a separate Display object for each Employer... From danielc at analysisandsolutions.com Thu Feb 24 12:28:53 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 24 Feb 2005 12:28:53 -0500 Subject: [nycphp-talk] Setting up PHP 4 OOP to work in PHP 5 environment In-Reply-To: <421E06AA.1050804@r2communications.com> References: <421DD273.1010003@r2communications.com> <20050224163944.GC15795@panix.com> <421E06AA.1050804@r2communications.com> Message-ID: <20050224172853.GA24429@panix.com> Hi Randal: On Thu, Feb 24, 2005 at 11:54:02AM -0500, Randal Rust wrote: > > the reason i asked is because there is someone in my office running php > 5, and we have noticed some strange 'notices.' I'll bet they're E_STRICT notices about the need to use "public", "protected" or "private" instead of "var" to declare properties. You can turn them off via error_reporting. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From mitch.pirtle at gmail.com Thu Feb 24 13:37:05 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Feb 2005 13:37:05 -0500 Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: References: Message-ID: <330532b6050224103752b03c48@mail.gmail.com> On Thu, 24 Feb 2005 11:41:01 -0500 (EST), David Mintz wrote: > > Hey Mitch, > > Very nice job on the presentation Tuesday night. Thank you so much. I was quite impressed with the turnout, as well. The one thing I didn't get to illustrate was how you (as a developer) could base your applications on Mambo for rapid site/application development. Maybe some other time ;-) > (I was the jerk who tried to do the sound effect in honor of your > trademark rimshot at the start of your talk.) Yeah, that was nice - and I see you also managed to stay awake :-) -- Mitch From nestorflorez at earthlink.net Thu Feb 24 13:47:26 2005 From: nestorflorez at earthlink.net (Nestor Florez) Date: Thu, 24 Feb 2005 10:47:26 -0800 (GMT-08:00) Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel Message-ID: <8239188.1109270846788.JavaMail.root@statler.psp.pas.earthlink.net> Is the presentation online anywhere? Thanks, Nestor :-) -----Original Message----- From: Mitch Pirtle Sent: Feb 24, 2005 10:37 AM To: NYPHP Talk Subject: Re: [nycphp-talk] kudos to Mitchy P for the Mambo spiel On Thu, 24 Feb 2005 11:41:01 -0500 (EST), David Mintz wrote: > > Hey Mitch, > > Very nice job on the presentation Tuesday night. Thank you so much. I was quite impressed with the turnout, as well. The one thing I didn't get to illustrate was how you (as a developer) could base your applications on Mambo for rapid site/application development. Maybe some other time ;-) > (I was the jerk who tried to do the sound effect in honor of your > trademark rimshot at the start of your talk.) Yeah, that was nice - and I see you also managed to stay awake :-) -- Mitch _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From mitch.pirtle at gmail.com Thu Feb 24 13:52:48 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Feb 2005 13:52:48 -0500 Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: <8239188.1109270846788.JavaMail.root@statler.psp.pas.earthlink.net> References: <8239188.1109270846788.JavaMail.root@statler.psp.pas.earthlink.net> Message-ID: <330532b605022410523447b334@mail.gmail.com> Will be completed within the next day or so - promise! -- Mitch On Thu, 24 Feb 2005 10:47:26 -0800 (GMT-08:00), Nestor Florez wrote: > Is the presentation online anywhere? From dmintz at davidmintz.org Thu Feb 24 14:37:01 2005 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 24 Feb 2005 14:37:01 -0500 (EST) Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: <330532b6050224103752b03c48@mail.gmail.com> References: <330532b6050224103752b03c48@mail.gmail.com> Message-ID: On Thu, 24 Feb 2005, Mitch Pirtle wrote: > Thank you so much. I was quite impressed with the turnout, as well. > The one thing I didn't get to illustrate was how you (as a developer) > could base your applications on Mambo for rapid site/application > development. Maybe some other time ;-) Actually I was thinking about that and started feeling the old heart rate increase. Imagine you're a small-time part-timer like me whose specialty is really programming rather than page design, but friends of friends etc keeping wanting you to make a "web site," and you're like, oh man, I'm really not a graphic artist or drop-dead sexy page designer... no wait. If I can get Mambo-proficient, maybe contract out some graphic work to get the pretty images.... Maybe you can do (almost) everything "yourself" without being a complete rocket scientist/android who never sleeps. Looks like we do need a presentation: Mambo Part Two. --- David Mintz http://davidmintz.org/ From henry at beewh.com Thu Feb 24 14:54:34 2005 From: henry at beewh.com (Henry Ponce) Date: Thu, 24 Feb 2005 16:54:34 -0300 Subject: [nycphp-talk] html php form problem Message-ID: <200502241654.34978.henry@beewh.com> Hello everyone: I've been searching for the solution to my problem. I do not want a form to be resubmitted when i refresh a page. i use this in the portion of the html page: But i can't get this to work. Can anyone tell me if i need to use something in php as well in order for a refresh to be done without re-submitting a form. Thank you. Henry From mitch.pirtle at gmail.com Thu Feb 24 14:57:33 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Feb 2005 14:57:33 -0500 Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: References: <330532b6050224103752b03c48@mail.gmail.com> Message-ID: <330532b605022411571a2198c9@mail.gmail.com> On Thu, 24 Feb 2005 14:37:01 -0500 (EST), David Mintz wrote: > On Thu, 24 Feb 2005, Mitch Pirtle wrote: > > Actually I was thinking about that and started feeling the old heart rate > increase. Imagine you're a small-time part-timer like me whose specialty > is really programming rather than page design, but friends of friends etc > keeping wanting you to make a "web site," and you're like, oh man, I'm > really not a graphic artist or drop-dead sexy page designer... no wait. If > I can get Mambo-proficient, maybe contract out some graphic work to get > the pretty images.... Maybe you can do (almost) everything "yourself" > without being a complete rocket scientist/android who never sleeps. mambosolutions.com has a template of the month club, and there are hundreds of little Mambo template shops popping up out there, for a very similar reason: It is just as easy for the graphics people to work with Mambo as it is the programmers. Custom templates will run you $100-300, so it is typically a negligible cost :-D > Looks like we do need a presentation: Mambo Part Two. Well to help satiate the need, NYPHP is proud to present: (time for the drumroll David) The Mambo Mailing List! You can find it here: http://lists.nyphp.org/mailman/listinfo/mambo So please join in and bring on the Mambo goodness! -- Mitch From danielc at analysisandsolutions.com Thu Feb 24 15:00:15 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 24 Feb 2005 15:00:15 -0500 Subject: [nycphp-talk] html php form problem In-Reply-To: <200502241654.34978.henry@beewh.com> References: <200502241654.34978.henry@beewh.com> Message-ID: <20050224200015.GA6227@panix.com> On Thu, Feb 24, 2005 at 04:54:34PM -0300, Henry Ponce wrote: > > I've been searching for the solution to my problem. I do not want a > form to be > resubmitted when i refresh a page. That is not possible as far as I know. To work around it, process the form in one script and then forward to another page once processing is done: form.php
process.php Thanks for your submission --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 Thu Feb 24 15:12:34 2005 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 24 Feb 2005 15:12:34 -0500 Subject: [nycphp-talk] html php form problem In-Reply-To: <20050224200015.GA6227@panix.com> References: <200502241654.34978.henry@beewh.com> <20050224200015.GA6227@panix.com> Message-ID: <421E3532.3070202@phpwerx.net> One other solution is to embed a one-time token in each form you want to protect. Below is a simplified example: if (!isset($_SESSION['tokens'])) { $_SESSION['tokens'] = array(); } if (isset($_POST['action'])) { if (array_key_exists($_POST['token'],$_SESSION['tokens'])) { // do something here // unset token so it can't be used again unset($_SESSION['tokens'][$_POST['token']]); } else { // form was submitted twice } } $token = md5(uniqid()); $_SESSION['tokens'][$token] = time(); As you may have noticed the code above also stored the issue time for each token, so you can also prevent users submitting 'stale' forms. There are also definite merits to using a system which redirects users to result pages after they submit a form, especially in terms of making the 'back' button work in an intuitive way. Dan Daniel Convissor wrote: > On Thu, Feb 24, 2005 at 04:54:34PM -0300, Henry Ponce wrote: > >>I've been searching for the solution to my problem. I do not want a >>form to be >>resubmitted when i refresh a page. > > > That is not possible as far as I know. To work around it, process the > form in one script and then forward to another page once processing is > done: > > form.php > > > process.php > // validate and save info > if (!$errors) { > header('Location: http://host/thanks.php'); > } > > thanks.php >

Thanks for your submission

> > --Dan > From list at harveyk.com Thu Feb 24 15:14:55 2005 From: list at harveyk.com (harvey) Date: Thu, 24 Feb 2005 15:14:55 -0500 Subject: [nycphp-talk] html php form problem In-Reply-To: <200502241654.34978.henry@beewh.com> References: <200502241654.34978.henry@beewh.com> Message-ID: <6.1.0.6.2.20050224150159.04ac2c30@mail.harveyk.com> I think you have it backwards. "The directive CACHE-CONTROL:NO-CACHE indicates cached information should not be used and instead requests should be forwarded to the origin server." But even if you fix that, I don't think it will solve your problem. I think you can create a "process.php" page that takes the "form.php" data, processes it, and then returns to the form page. The form page should now be considered a "new" page and refreshing should not resubmit the old data. Or you could have a hidden timestamp be submitted and compare posts, not processing if the questionable post is less than X seconds after the last post. At 02:54 PM 2/24/2005, you wrote: >Hello everyone: > >I've been searching for the solution to my problem. I do not want a form >to be >resubmitted when i refresh a page. >i use this in the portion of the html page: > > > > > >But i can't get this to work. Can anyone tell me if i need to use >something in >php as well in order for a refresh to be done without re-submitting a form. > >Thank you. >Henry >_______________________________________________ >New York PHP Talk Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/talk >http://www.nyphp.org From rolan at omnistep.com Thu Feb 24 15:17:20 2005 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 24 Feb 2005 15:17:20 -0500 Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: <330532b6050224103752b03c48@mail.gmail.com> References: <330532b6050224103752b03c48@mail.gmail.com> Message-ID: <421E3650.80205@omnistep.com> That is one of the reasons I came to the meeting! Is it going to be included in the powerpoint? ~Rolan Mitch Pirtle wrote: >The one thing I didn't get to illustrate was how you (as a developer) >could base your applications on Mambo for rapid site/application >development. Maybe some other time ;-) > > > > From mitch.pirtle at gmail.com Thu Feb 24 16:20:42 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Feb 2005 16:20:42 -0500 Subject: [nycphp-talk] kudos to Mitchy P for the Mambo spiel In-Reply-To: <421E3650.80205@omnistep.com> References: <330532b6050224103752b03c48@mail.gmail.com> <421E3650.80205@omnistep.com> Message-ID: <330532b605022413206d598e9d@mail.gmail.com> On Thu, 24 Feb 2005 15:17:20 -0500, Rolan Yang wrote: > That is one of the reasons I came to the meeting! > Is it going to be included in the powerpoint? > ~Rolan > > Mitch Pirtle wrote: > > >The one thing I didn't get to illustrate was how you (as a developer) > >could base your applications on Mambo for rapid site/application > >development. Maybe some other time ;-) Well I am thinking about a miniMambo presentation that focuses solely on developers and 3rd party types, who wish to use Mambo as the base platform for all of their development. Might be interested to see how much demand such a presentation would have (hint, hint). -- Mitch, copying the new MAMBO MAILING LIST :-) From wfan at VillageVoice.com Thu Feb 24 15:26:04 2005 From: wfan at VillageVoice.com (Fan, Wellington) Date: Thu, 24 Feb 2005 15:26:04 -0500 Subject: [nycphp-talk] [OT] ? Job Posting Message-ID: <1448FB4565D489478642386D50D3FB770551F504@vvntmail.vvny.villagevoice.com> Hey all, I haven't seen any job postings here in a while; would it be a faux-pas for me to post one? I have already posted to php-jobs, but it seems that this list is more heavily trafficked... -- Wellington Fan Senior Web Developer The Village Voice (212) 475-3300 x14000 From lists at zaunere.com Thu Feb 24 17:44:18 2005 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 24 Feb 2005 17:44:18 -0500 Subject: [nycphp-talk] [OT] ? Job Posting In-Reply-To: <1448FB4565D489478642386D50D3FB770551F504@vvntmail.vvny.villagevoice.com> Message-ID: <20050224224419.E1962A8795@virtu.nyphp.org> > I haven't seen any job postings here in a while; would it be a faux-pas for > me to post one? I have already posted to php-jobs, but it seems that this > list is more heavily trafficked... There are over 350 subscribed to the jobs list, but it's not very chatty (which is good). We'd prefer to keep the jobs list for jobs, and this list for general discussion. For those who are interested in jobs posting, please see: http://lists.nyphp.org/mailman/listinfo/jobs H From faber at linuxnj.com Thu Feb 24 18:10:00 2005 From: faber at linuxnj.com (Faber Fedor) Date: Thu, 24 Feb 2005 18:10:00 -0500 Subject: [nycphp-talk] Re: kudos to Mitchy P for the Mambo spiel In-Reply-To: <330532b605022413206d598e9d@mail.gmail.com> References: <330532b6050224103752b03c48@mail.gmail.com> <421E3650.80205@omnistep.com> <330532b605022413206d598e9d@mail.gmail.com> Message-ID: <20050224231000.GA22174@uranus.faber.nom> On 24/02/05 16:20 -0500, Mitch Pirtle wrote: > Well I am thinking about a miniMambo presentation that focuses solely > on developers and 3rd party types, who wish to use Mambo as the base > platform for all of their development. > > Might be interested to see how much demand such a presentation would > have (hint, hint). Even though I've given up on Mambo until some better docs come along (I simply can't figure out the paradigm for this thing), I'd be very interested in seeing this presentation as well. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From chsnyder at gmail.com Thu Feb 24 19:16:11 2005 From: chsnyder at gmail.com (csnyder) Date: Thu, 24 Feb 2005 19:16:11 -0500 Subject: [nycphp-talk] Re: kudos to Mitchy P for the Mambo spiel In-Reply-To: <20050224231000.GA22174@uranus.faber.nom> References: <330532b6050224103752b03c48@mail.gmail.com> <421E3650.80205@omnistep.com> <330532b605022413206d598e9d@mail.gmail.com> <20050224231000.GA22174@uranus.faber.nom> Message-ID: On Thu, 24 Feb 2005 18:10:00 -0500, Faber Fedor wrote: > Even though I've given up on Mambo until some better docs come along (I > simply can't figure out the paradigm for this thing), I'd be very > interested in seeing this presentation as well. This is probably one of the biggest hurdles to CMS adoption by experienced developers -- when faced with a system as complex as Mambo or Drupal or whatever, it seems like it will take months just to figure out, big picture, how everything works together. It seems easier to just start from scratch. While any core developer could easily communicate the paradigm to another programmer face to face, doing so in a written document is a daunting task. Does anyone know of a project (doesn't have to be PHP) that has done this well? -- Chris Snyder http://chxo.com/ From mitch.pirtle at gmail.com Thu Feb 24 20:12:37 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 24 Feb 2005 20:12:37 -0500 Subject: [nycphp-talk] Re: kudos to Mitchy P for the Mambo spiel In-Reply-To: <20050224231000.GA22174@uranus.faber.nom> References: <330532b6050224103752b03c48@mail.gmail.com> <421E3650.80205@omnistep.com> <330532b605022413206d598e9d@mail.gmail.com> <20050224231000.GA22174@uranus.faber.nom> Message-ID: <330532b6050224171225d0524e@mail.gmail.com> On Thu, 24 Feb 2005 18:10:00 -0500, Faber Fedor wrote: > On 24/02/05 16:20 -0500, Mitch Pirtle wrote: > > Even though I've given up on Mambo until some better docs come along (I > simply can't figure out the paradigm for this thing), I'd be very > interested in seeing this presentation as well. That is exactly why this Mambo mailing list was created. Signup and let 'er rip man! What is missing? What is not clear? -- Mitch From frank_wong2 at informationideas.com Thu Feb 24 22:15:26 2005 From: frank_wong2 at informationideas.com (Frank Wong) Date: Thu, 24 Feb 2005 22:15:26 -0500 Subject: [nycphp-talk] PHP4 OOP Serialization Message-ID: Can someone shed some light on the following issue? 1: I have an object, A, that I create on a page. 2: Object A's constructor create an object, B and is stored in a variable in object A. 3: I register object A as a session variable. 4: On my next page, I grab object A from the session and everything is fine. 5: I try to get object B from object A and it is not an object. All objects definitions occur before session_start(). Is that the way object serialization supposed to work in PHP4? If so, what is the best alternative to having an object within an object? TIA ________________________ Frank Wong From frank_wong2 at informationideas.com Thu Feb 24 23:05:24 2005 From: frank_wong2 at informationideas.com (Frank Wong) Date: Thu, 24 Feb 2005 23:05:24 -0500 Subject: [nycphp-talk] PHP4 OOP Serialization In-Reply-To: Message-ID: After further testing, objects inside an object are serialized without a problem. I made the mistake of reading someone's comment on php.net about object serialization stating the problem I posted before and then looked for evidence to prove his statement. Stupid me. ________________________ Frank Wong -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Frank Wong Sent: Thursday, February 24, 2005 10:15 PM To: NYPHP Talk Subject: [nycphp-talk] PHP4 OOP Serialization Can someone shed some light on the following issue? 1: I have an object, A, that I create on a page. 2: Object A's constructor create an object, B and is stored in a variable in object A. 3: I register object A as a session variable. 4: On my next page, I grab object A from the session and everything is fine. 5: I try to get object B from object A and it is not an object. All objects definitions occur before session_start(). Is that the way object serialization supposed to work in PHP4? If so, what is the best alternative to having an object within an object? TIA ________________________ Frank Wong _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From krook at us.ibm.com Fri Feb 25 10:01:30 2005 From: krook at us.ibm.com (Daniel Krook) Date: Fri, 25 Feb 2005 10:01:30 -0500 Subject: [nycphp-talk] IBM & PHP Message-ID: An interesting read :) "IBM backs open-source Web software" http://www.nytimes.com/cnet/CNET_2100-7344_3-5589559.html? Some snippets: "IBM is putting its corporate heft behind a popular open-source Web development technology called PHP, in a move meant to reach out to a broader set of developers... "The two companies [IBM and Zend] intend to devote programmers to make PHP work better with corporate databases and Web services protocols. IBM also plans to establish an area dedicated to PHP on its developer Web site, which will include technical resources such as white papers... "Big Blue's public commitment to PHP is significant because the company has the technical and marketing resources to accelerate usage of the open-source product. IBM's investments in Linux and Java, for example, were crucial to mainstream corporation adoption of those technologies... Daniel Krook, Advisory IT Specialist - Application Development WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From chsnyder at gmail.com Fri Feb 25 12:57:26 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 25 Feb 2005 12:57:26 -0500 Subject: [nycphp-talk] IBM & PHP In-Reply-To: References: Message-ID: On Fri, 25 Feb 2005 10:01:30 -0500, Daniel Krook wrote: > An interesting read :) > > "IBM backs open-source Web software" > http://www.nytimes.com/cnet/CNET_2100-7344_3-5589559.html? Time for a promotion, Dan? Great news in any case. -- Chris Snyder http://chxo.com/ From Consult at CovenantEDesign.com Fri Feb 25 13:03:16 2005 From: Consult at CovenantEDesign.com (Edward) Date: Fri, 25 Feb 2005 13:03:16 -0500 Subject: [nycphp-talk] IBM & PHP References: Message-ID: <004801c51b64$4b702f10$45896e41@ced> lol EDWARD PREVOST ----- Original Message ----- From: "csnyder" To: "NYPHP Talk" Sent: Friday, February 25, 2005 12:57 PM Subject: Re: [nycphp-talk] IBM & PHP > On Fri, 25 Feb 2005 10:01:30 -0500, Daniel Krook wrote: > > An interesting read :) > > > > "IBM backs open-source Web software" > > http://www.nytimes.com/cnet/CNET_2100-7344_3-5589559.html? > > Time for a promotion, Dan? > Great news in any case. > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > From krook at us.ibm.com Fri Feb 25 13:10:09 2005 From: krook at us.ibm.com (Daniel Krook) Date: Fri, 25 Feb 2005 13:10:09 -0500 Subject: [nycphp-talk] IBM & PHP In-Reply-To: Message-ID: > Time for a promotion, Dan? > Great news in any case. Heh, I wish. It looks like the official word just popped up on ibm.com/press http://www-1.ibm.com/press/PressServletForm.wss?MenuChoice=pressreleases&TemplateName=ShowPressReleaseTemplate&SelectString=t1.docunid=7540&TableName=DataheadApplicationClass&SESSIONKEY=any&WindowTitle=Press+Release&STATUS=publish Daniel Krook, Advisory IT Specialist - Application Development WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From codebowl at gmail.com Fri Feb 25 13:17:00 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Fri, 25 Feb 2005 13:17:00 -0500 Subject: [nycphp-talk] IBM & PHP In-Reply-To: References: Message-ID: <8d9a42800502251017496dc3da@mail.gmail.com> hmm will this only run on IBM based servers or is it something i could install on a linux / windows macine? -- Joseph Crawford Jr. Codebowl Solutions codebowl at gmail.com From pcolleu at free.fr Fri Feb 25 13:28:00 2005 From: pcolleu at free.fr (pcolleu at free.fr) Date: Fri, 25 Feb 2005 19:28:00 +0100 Subject: [nycphp-talk] allowed memory size error In-Reply-To: References: Message-ID: <1109356080.421f6e30ae8fe@imp4-q.free.fr> Could somebody help me on that one ? I'm trying to retrieve a 300 char long text from a database and place it into a textarea... Here is the message I get from my browser : ----------- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 61 bytes) in /home/r/e/user988508/html/primaire/pagesFr/personnel/infosFlashModify.php on line 59 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 138 bytes) in Unknown on line 0 ----------- If I display the same text (coming from the same database) as text on the page, then there is no problem ! What should I do to fix the problem ? Thanks in advance Philippe COLLEU Instituteur charg? de l'informatique au Lyc?e Fran?ais de New York, NY, USA : Quelques images de New York : Quelques images d'Equateur : Quelques images d'Ouganda : Maths au CM : Grammaire au CM From danielc at analysisandsolutions.com Fri Feb 25 13:56:30 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 25 Feb 2005 13:56:30 -0500 Subject: [nycphp-talk] allowed memory size error In-Reply-To: <1109356080.421f6e30ae8fe@imp4-q.free.fr> References: <1109356080.421f6e30ae8fe@imp4-q.free.fr> Message-ID: <20050225185629.GA3663@panix.com> On Fri, Feb 25, 2005 at 07:28:00PM +0100, pcolleu at free.fr wrote: > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to Change your memory_limit ini setting. http://us3.php.net/ini.core --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 lists at zaunere.com Fri Feb 25 13:57:02 2005 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 25 Feb 2005 13:57:02 -0500 Subject: [nycphp-talk] MySQL Talk in Boston Message-ID: <20050225185703.A51E7A8795@virtu.nyphp.org> For those who might be in the Boston area, I'll be giving an in-depth technical overview of MySQL at the Boston ACM chapter on March 19th. http://www.gbcacm.org/website/ --- Hans Zaunere, Sales Engineer MySQL, Inc. www.mysql.com Office: +1 212.213.1131 President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From lists at zaunere.com Fri Feb 25 13:58:33 2005 From: lists at zaunere.com (Hans Zaunere) Date: Fri, 25 Feb 2005 13:58:33 -0500 Subject: [nycphp-talk] MySQL Talk in Boston/MIT Message-ID: <20050225185836.91201A8796@virtu.nyphp.org> For those who might be in the Boston area, I'll be giving an in-depth technical overview of MySQL at the Boston ACM chapter on March 19th. http://www.gbcacm.org/website/ --- Hans Zaunere, Sales Engineer MySQL, Inc. www.mysql.com Office: +1 212.213.1131 President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From chsnyder at gmail.com Fri Feb 25 14:56:31 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 25 Feb 2005 14:56:31 -0500 Subject: [nycphp-talk] allowed memory size error In-Reply-To: <20050225185629.GA3663@panix.com> References: <1109356080.421f6e30ae8fe@imp4-q.free.fr> <20050225185629.GA3663@panix.com> Message-ID: On Fri, 25 Feb 2005 13:56:30 -0500, Daniel Convissor wrote: > On Fri, Feb 25, 2005 at 07:28:00PM +0100, pcolleu at free.fr wrote: > > > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to > > Change your memory_limit ini setting. > http://us3.php.net/ini.core > Umm, are you sure that your script isn't going into some kind of endless loop? You say the text is about 300 chars, but is there other stuff in the script that might push the size over 8MB? From stephen at musgrave.org Fri Feb 25 15:00:23 2005 From: stephen at musgrave.org (Stephen Musgrave) Date: Fri, 25 Feb 2005 15:00:23 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box Message-ID: <861d088d979ce0d9aef1372411cb2369@musgrave.org> Hello - Has anybody had any experience using PHP/MySQL on a Windows machine running SBS? So far I have only worked with PHP/MySQL running Apache on a *nix machine. I am curious to get any advice to know if this is a good or bad idea. And yes, this machine will be in a production environment. I've often heard the questions to the statement, "I want to run PHP/MySQL on a Windows box," -- "Why?" Which leads me to believe that there are significant concerns and/or it's just not the most optimal situation. (please excuse me if this topic has been covered in that past, but i didn't see anything in my archive folder.) Thanks, Stephen From danielc at analysisandsolutions.com Fri Feb 25 15:07:40 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 25 Feb 2005 15:07:40 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: <861d088d979ce0d9aef1372411cb2369@musgrave.org> References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> Message-ID: <20050225200740.GB14452@panix.com> Hi Stephen: On Fri, Feb 25, 2005 at 03:00:21PM -0500, Stephen Musgrave wrote: > > Has anybody had any experience using PHP/MySQL on a Windows machine > running SBS? ... > I've often heard the questions to the statement, "I want to run > PHP/MySQL on a Windows box," -- "Why?" Which leads me to believe > that there are significant concerns and/or it's just not the most > optimal situation. I do it every day, though it's my development box. The "why"'s probably have to do with it not being optimal as opposed to it being a really bad idea. I've also written a (very popular) tutorial about getting MySQL going on Windows machines: http://www.analysisandsolutions.com/code/mybasic.htm --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 john at cyber-ny.com Fri Feb 25 15:14:51 2005 From: john at cyber-ny.com (John Nunez) Date: Fri, 25 Feb 2005 15:14:51 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: <861d088d979ce0d9aef1372411cb2369@musgrave.org> References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> Message-ID: I believe there is a speed issue with PHP running on IIS as a CGI. The www.php.net site has some information. There are also different Windows Installer packages that will install pre-built binaries of AMP. - John On Feb 25, 2005, at 3:00 PM, Stephen Musgrave wrote: > > Has anybody had any experience using PHP/MySQL on a Windows machine > running SBS? From chsnyder at gmail.com Fri Feb 25 15:29:28 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 25 Feb 2005 15:29:28 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: <861d088d979ce0d9aef1372411cb2369@musgrave.org> References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> Message-ID: Stephen Musgrave wrote: > Has anybody had any experience using PHP/MySQL on a Windows machine > running SBS? > > So far I have only worked with PHP/MySQL running Apache on a *nix > machine. I am curious to get any advice to know if this is a good or > bad idea. And yes, this machine will be in a production environment. > I've often heard the questions to the statement, "I want to run > PHP/MySQL on a Windows box," -- "Why?" Which leads me to believe > that there are significant concerns and/or it's just not the most > optimal situation. What is SBS? Not for production use (see Dan's article for that) but an easy way to get AMP on Windows for development or testing is to use the XAMPP distribution: http://www.apachefriends.org/en/xampp.html Does anyone have a checklist of things to look at when securing / locking down a Windows server for use as a production website? From keremtuzemen at gmail.com Fri Feb 25 15:07:28 2005 From: keremtuzemen at gmail.com (Kerem Tuzemen) Date: Fri, 25 Feb 2005 15:07:28 -0500 Subject: [nycphp-talk] allowed memory size error References: <1109356080.421f6e30ae8fe@imp4-q.free.fr> Message-ID: <007501c51b7a$13faa2c0$d0175c42@OKTPAVILION> Philippe, This usually happens when you are not careful with what you pull from the database. Especially if you are putting the results into a hash or an array with a foreach or similar loop. I would suggest to take a closer look on that part of the code. Kerem Tuzemen ----- Original Message ----- From: To: "NYPHP Talk" Sent: Friday, February 25, 2005 1:28 PM Subject: [nycphp-talk] allowed memory size error > Could somebody help me on that one ? > > I'm trying to retrieve a 300 char long text from a database and place it into a > textarea... > Here is the message I get from my browser : > > ----------- > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate > 61 bytes) in > /home/r/e/user988508/html/primaire/pagesFr/personnel/infosFlashModify.php on > line 59 > > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate > 138 bytes) in Unknown on line 0 > ----------- > > If I display the same text (coming from the same database) as text on the page, > then there is no problem ! > What should I do to fix the problem ? > > Thanks in advance > > > Philippe COLLEU > Instituteur charg? de l'informatique au Lyc?e Fran?ais de New York, NY, USA > : Quelques images de New York > : Quelques images d'Equateur > : Quelques images d'Ouganda > : Maths au CM > : Grammaire au CM > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org From john at cyber-ny.com Fri Feb 25 16:13:33 2005 From: john at cyber-ny.com (John Nunez) Date: Fri, 25 Feb 2005 16:13:33 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> Message-ID: <9d02a44451747d6eb17153915e99c5b8@cyber-ny.com> It's Microsoft's Small Business Server. I believe it has all of the applications of a Enterprise Server but limited to 10 accounts. - John On Feb 25, 2005, at 3:29 PM, csnyder wrote: > What is SBS? From chsnyder at gmail.com Fri Feb 25 16:20:24 2005 From: chsnyder at gmail.com (csnyder) Date: Fri, 25 Feb 2005 16:20:24 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: <9d02a44451747d6eb17153915e99c5b8@cyber-ny.com> References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> <9d02a44451747d6eb17153915e99c5b8@cyber-ny.com> Message-ID: On Fri, 25 Feb 2005 16:13:33 -0500, John Nunez wrote: > It's Microsoft's Small Business Server. I believe it has all of the > applications of a Enterprise Server but limited to 10 accounts. > > - John > > On Feb 25, 2005, at 3:29 PM, csnyder wrote: > > > What is SBS? > So then you'd have to use IIS, right? I'm guessing it's already latched onto port 80... From faber at linuxnj.com Fri Feb 25 16:49:47 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 25 Feb 2005 16:49:47 -0500 Subject: [nycphp-talk] XML(?) problem Message-ID: <20050225214947.GA27758@uranus.faber.nom> I'm attemtping to write a webapp using the XMLHTTPRequest functionality as described over at http://www.xml.com/pub/a/2005/02/09/xml-http-request.html . I'm assuming someone in here has already done this. If not, anyone know the URL for the NY XML group (I saw mention of their existence, but no URL). My problem is here: function processReqChange() { // only if req shows "complete" if (req.readyState == 4) { // only if "OK" if (req.status == 200) { // ...processing statements go here... alert("getting the response"); response = req.responseXML.documentElement; alert("So far, so good!"); method = response.getElementsByTagName('method')[0].firstChild.data; alert("method = " + method); I successfully get to "getting the response" alert but it fails at the next line. The Javascript console complains that req.responseXML has no properties and javascript aborts the function (silently!). req.statusText says everything's OK and I can even see the text of the XML in req.responseText. So I'm guessing the error is that I don't have a wellformed XML document. Here is what I have: refreshQ My Results! which, to me, is well-formed. I googled for everything I can think of and came up with nada. Any suggestions? -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From john at cyber-ny.com Fri Feb 25 18:14:00 2005 From: john at cyber-ny.com (John Nunez) Date: Fri, 25 Feb 2005 18:14:00 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: References: <861d088d979ce0d9aef1372411cb2369@musgrave.org> <9d02a44451747d6eb17153915e99c5b8@cyber-ny.com> Message-ID: <1235ad311f3293782f9786a75ea6c99b@cyber-ny.com> Latched?!?! Death Grip on port 80. There are some hacks out there to allow Apache to handle port 80 but I haven't done any of this for a while. On Feb 25, 2005, at 4:20 PM, csnyder wrote: > > So then you'd have to use IIS, right? I'm guessing it's already > latched onto port 80... From corey at domanistudios.com Fri Feb 25 18:45:26 2005 From: corey at domanistudios.com (corey szopinski) Date: Fri, 25 Feb 2005 18:45:26 -0500 Subject: [nycphp-talk] XML(?) problem In-Reply-To: <20050225214947.GA27758@uranus.faber.nom> Message-ID: I?ve just gone through something similar. I read somewhere that the xml request object likes to see that the content is served up as XML, so either the file extension ends in .xml or you have the header set as header("Content-type: text/xml"); I?m not sure if this makes any difference or not, but I have gotten it work. I?d also try alert(response); and make sure you get [object], if not, then you know that something?s not coming through correctly. You can also pass your xmldoc into this quick and dirty recursive function to see what you?re working with: /** * DESCRIBE AN XML FILE BY RECURSIVE LISTING * * calls traverse() recursively to list out nodes and child nodes as list items * * ** DON'T USE ON FIREFOX: the document.write overwrites the document object (for reasons unknown) * * @param xml */ function describeXML(xmlDoc){ var root=xmlDoc.documentElement; traverse(root); //for(var i in xmlDoc){ document.write(i+"
"); } /* this is interesting, but not too useful */ } /** * TRAVERSES AN XML NODE * * recursive function * @param xml.node */ function traverse(tree) { if(tree.hasChildNodes()) { document.write('
  • '); document.write(tree.tagName+' ('+tree.childNodes.length+') : '); for(var i=0; i < tree.childNodes.length; i++){ traverse(tree.childNodes[i]); } document.write('
'); }else{ document.write(''+tree.nodeValue+''); } } On 2/25/05 4:49 PM, "Faber Fedor" wrote: > I'm attemtping to write a webapp using the XMLHTTPRequest functionality > as described over at > http://www.xml.com/pub/a/2005/02/09/xml-http-request.html . I'm > assuming someone in here has already done this. If not, anyone know the > URL for the NY XML group (I saw mention of their existence, but no URL). > > My problem is here: > > function processReqChange() > { > // only if req shows "complete" > if (req.readyState == 4) { > // only if "OK" > if (req.status == 200) { > // ...processing statements go here... > alert("getting the response"); > response = req.responseXML.documentElement; > > alert("So far, so good!"); > method = response.getElementsByTagName('method')[0].firstChild.data; > alert("method = " + method); > > > I successfully get to "getting the response" alert but it fails at the > next line. The Javascript console complains that req.responseXML has no > properties and javascript aborts the function (silently!). > req.statusText says everything's OK and I can even see the text of the > XML in req.responseText. > > So I'm guessing the error is that I don't have a wellformed XML > document. Here is what I have: > > > > refreshQ > My Results! > > > which, to me, is well-formed. > > I googled for everything I can think of and came up with nada. Any > suggestions? Corey Szopinski Director of Technology DOMANI STUDIOS corey at domanistudios.com 55 Washington St. Suite 822 Brooklyn, NY 11201 718-797-4470 x116 From frank_wong2 at informationideas.com Fri Feb 25 19:06:56 2005 From: frank_wong2 at informationideas.com (Frank Wong) Date: Fri, 25 Feb 2005 19:06:56 -0500 Subject: [nycphp-talk] PHP/MySQL on Windows SBS Box In-Reply-To: <1235ad311f3293782f9786a75ea6c99b@cyber-ny.com> Message-ID: Actually, if IIS on SBS behaves like IIS on XP Pro, it is easy to direct port 80 to Apache instead of IIS. The following steps will stop IIS from grabbing port 80. 1) Goto IIS admin 2) Right click on 'Default Web Site' 3) Select 'Properties' 4) Under 'Web Site' tab, change 'TCP Port' to anything other than 80. 5) Hit Apply or the other method is to goto Services and stop the 'IIS Admin' service then set it to manual start. Either of those ways will get IIS of your back. _______________ Frank Wong -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of John Nunez Sent: Friday, February 25, 2005 6:14 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP/MySQL on Windows SBS Box Latched?!?! Death Grip on port 80. There are some hacks out there to allow Apache to handle port 80 but I haven't done any of this for a while. On Feb 25, 2005, at 4:20 PM, csnyder wrote: > > So then you'd have to use IIS, right? I'm guessing it's already > latched onto port 80... _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From faber at linuxnj.com Fri Feb 25 19:10:31 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 25 Feb 2005 19:10:31 -0500 Subject: [nycphp-talk] Re: XML(?) problem In-Reply-To: References: <20050225214947.GA27758@uranus.faber.nom> Message-ID: <20050226001031.GA28310@uranus.faber.nom> On 25/02/05 18:45 -0500, corey szopinski wrote: > I?ve just gone through something similar. Since you've obviously survived it, that gives me hope. :-) > I read somewhere that the xml request object likes to see that the content > is served up as XML, so either the file extension ends in .xml or you have > the header set as header("Content-type: text/xml"); I'll have to set the header then, because ulitmately it's going to be a PHP file. > I?m not sure if this makes any difference or not, but I have gotten it work. > I?d also try alert(response); and make sure you get [object], if not, then > you know that something?s not coming through correctly. You're right. I get NULL when I do alert(req.responseXML). Now how the $#%^ do I debug this? > You can also pass your xmldoc into this quick and dirty recursive function > to see what you?re working with: I'll give it a shot even if I am on Firefox. ;-) -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From faber at linuxnj.com Fri Feb 25 19:21:46 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 25 Feb 2005 19:21:46 -0500 Subject: [nycphp-talk] Re: XML(?) problem In-Reply-To: References: <20050225214947.GA27758@uranus.faber.nom> Message-ID: <20050226002146.GA28361@uranus.faber.nom> On 25/02/05 18:45 -0500, corey szopinski wrote: > I read somewhere that the xml request object likes to see that the content > is served up as XML, so either the file extension ends in .xml or you have > the header set as header("Content-type: text/xml"); That did it! Now I have to figure out how to extract the child nodes... -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From flakie at gmail.com Fri Feb 25 20:36:16 2005 From: flakie at gmail.com (Eric Rank) Date: Fri, 25 Feb 2005 19:36:16 -0600 Subject: [nycphp-talk] Re: XML(?) problem In-Reply-To: <20050226002146.GA28361@uranus.faber.nom> References: <20050225214947.GA27758@uranus.faber.nom> <20050226002146.GA28361@uranus.faber.nom> Message-ID: I couldn't resist responding to this. XMLHTTPrequest is too cool to ignore.... I'd suggest using the DOM methods available to you for both extraction and insertion. I find them much more friendly and clean to use than a bunch of document.write statements. I've had pretty good luck with them for the major mainstream browsers / platforms. Some of the relevant players will be: //for the response you get after making your XMLHTTPRequest. req.responseXML.getElementsByTagName("item"); //create a new element document.createElement('tagname') //retreieve a node reference document.getElementById('id'); //insert a child node appendChild([node reference]) I created a simple directory listing app that you can check out. Be careful where you put it though, it shows all the contents of whatever directory the webserver can read! As a result, it's password protected with 'password' as the password. Just put it on your server and browse to 'directory.php' http://lo-fi.net/blog/archive/getfile.zip It's poorly documented, and it comes with no warranty. It also has a problem reading dirs and files that have apostrophe's :-) More about DOM scripting: you can see what methods and properties are available to you with the DOM inspector that comes with Firefox (tools>DOM Inspector). After you open it up, look in the right column at the top. you'll seee a grid-like icon with an arrow; click that and choose 'Javascript Object'. Then you can check out all of the available properties and methods available on the node you have selected in the left column of the window. It's an extremely handy tool when debugging. It also tells you what the current DOM structure is, regardless of your source code. So as you're building up your page dynamically with your xmlhttprequests, the DOM inspector gives you an accurate snapshot of the tree. Eric Rank On Fri, 25 Feb 2005 19:21:46 -0500, Faber Fedor wrote: > On 25/02/05 18:45 -0500, corey szopinski wrote: > > I read somewhere that the xml request object likes to see that the content > > is served up as XML, so either the file extension ends in .xml or you have > > the header set as header("Content-type: text/xml"); > > That did it! > > Now I have to figure out how to extract the child nodes... > From faber at linuxnj.com Fri Feb 25 20:59:05 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 25 Feb 2005 20:59:05 -0500 Subject: [nycphp-talk] Re: XML(?) problem In-Reply-To: References: <20050225214947.GA27758@uranus.faber.nom> <20050226002146.GA28361@uranus.faber.nom> Message-ID: <20050226015905.GA28657@uranus.faber.nom> On 25/02/05 19:36 -0600, Eric Rank wrote: > I couldn't resist responding to this. XMLHTTPrequest is too cool to ignore.... That may be, but between the problems I had with Mambo and now with this, I'm beginning to think I've lost my touch with programming > I'd suggest using the DOM methods available to you for both extraction > and insertion. I find them much more friendly and clean to use than a > bunch of document.write statements. I've had pretty good luck with > them for the major mainstream browsers / platforms. Well, I'm not. > Some of the relevant players will be: > > //for the response you get after making your XMLHTTPRequest. > req.responseXML.getElementsByTagName("item"); items = req.responseXML.getElementsByTagName("item"); retunes an object HTMLCollection for item, but I'll be damned if I can find anything in them! > I created a simple directory listing app that you can check out. I certainly will! Perhaps I can glean some info from it! > More about DOM scripting: you can see what methods and properties are > available to you with the DOM inspector that comes with Firefox > (tools>DOM Inspector). After you open it up, look in the right column > at the top. you'll seee a grid-like icon with an arrow; click that and > choose 'Javascript Object'. Then you can check out all of the > available properties and methods available on the node you have > selected in the left column of the window. It's an extremely handy > tool when debugging. It also tells you what the current DOM structure > is, regardless of your source code. So as you're building up your page > dynamically with your xmlhttprequests, the DOM inspector gives you an > accurate snapshot of the tree. Okay, I missed that. Maybe that can tell me what's going on. That venkman debugger was worse than useless. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From pcolleu at free.fr Sat Feb 26 14:46:36 2005 From: pcolleu at free.fr (Philippe COLLEU) Date: Sat, 26 Feb 2005 14:46:36 -0500 Subject: [nycphp-talk] allowed memory size error In-Reply-To: References: <1109356080.421f6e30ae8fe@imp4-q.free.fr> <20050225185629.GA3663@panix.com> Message-ID: Oooops, I double checked my code and found that endless loop ! :=) Thanks to all. Philippe Le 25 f?vr. 05, ? 14:56, csnyder a ?crit : > On Fri, 25 Feb 2005 13:56:30 -0500, Daniel Convissor > wrote: >> On Fri, Feb 25, 2005 at 07:28:00PM +0100, pcolleu at free.fr wrote: >> >>> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to >> >> Change your memory_limit ini setting. >> http://us3.php.net/ini.core >> > > > Umm, are you sure that your script isn't going into some kind of > endless loop? > > You say the text is about 300 chars, but is there other stuff in the > script that might push the size over 8MB? > _______________________________________________ > New York PHP Talk Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/talk > http://www.nyphp.org > > Philippe COLLEU Instituteur charg? de l'informatique au Lyc?e Fran?ais de New York, NY, USA : Quelques images de New York : Quelques images d'Equateur : Quelques images d'Ouganda : Maths au CM : Grammaire au CM From krook at us.ibm.com Sun Feb 27 17:50:34 2005 From: krook at us.ibm.com (Daniel Krook) Date: Sun, 27 Feb 2005 17:50:34 -0500 Subject: [nycphp-talk] 32bit vs AMD 64 versions of Apache and shared objects Message-ID: Hey folks, I'm trying to configure a Xeon processor-based (EM64T/AMD 64) SuSE 9.2 Professional machine to run Apache 1.3.33, PHP 5.0.3 and WebSphere Application Server 5.1.1.3. I was able to get all these guys cooperating on a 32 bit Pentium III machine on the same version of SuSE Pro. But I seem to be running into some 32 bit vs 64 bit issues on this new machine. The way things worked out on the older machine was that I had a binary installation of Apache (IBM HTTP Server, based on 1.3.28) which used a shared object to communicate with WAS, and which used libphp5.so that I compiled against it via apxs for PHP. All was well. On this machine, however, I can't get the precompiled 32-bit Apache (IHS) talking to PHP via libphp5.so, as the PHP build against it creates a 64-bit object: # /opt/IBMHttpServer/bin/apachectl configtest Syntax error on line 231 of /opt/IBMHttpServer/conf/httpd.conf: Cannot load /opt/IBMHttpServer/libexec/libphp5.so into server: /opt/IBMHttpServer/libexec/libphp5.so: cannot open shared object file: No such file or directory # file /opt/IBMHttpServer/libexec/libphp5.so /opt/IBMHttpServer/libexec/libphp5.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped On the other hand, if I try to compile my own version of Apache, it will work with the 64-bit version of libphp5.so, but will not use the 32-bit WebSphere plugin: # /opt/local/apache/bin/apachectl configtest Syntax error on line 243 of /opt/local/apache/conf/httpd.conf: Cannot load /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so into server: /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: cannot open shared object file: No such file or directory # file /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped So, I guess my question is how can I get my 64-bit version of Apache to use the 32-bit WAS plugin, or alternately how can I get the 32-bit version of IHS to use the 64-bit PHP object? Is it possible to do that? If not, how would I compile a 32-bit version of libphp5.so on AMD 64 so that the 32-bit version of IHS can use it? Thanks in advance for any pointers. Daniel Krook, Advisory IT Specialist - Application Development WW Web Production Services North 2, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Personal: http://info.krook.org/ Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=9A9796897 From faber at linuxnj.com Sun Feb 27 19:23:47 2005 From: faber at linuxnj.com (Faber Fedor) Date: Sun, 27 Feb 2005 19:23:47 -0500 Subject: [nycphp-talk] Safely running root commands Message-ID: <20050228002347.GA13631@uranus.faber.nom> Well, my playing around with/obsessing over the whole XMLHttpRequest object paradigm is paying off. I've done nothing but write code since Thursday (well, I've slept some, too) and I have only one major step to work through... My GUI talks to a PHP backend. At the moment, I have some stuff hard-coded in the PHP functions. What I need to do is to run some root commands (specifically postcat and mailq), get the output into PHP, XML-ize them and send them to the GUI. My question is: how can I safely run the root commands? Only root can run those commands. The PHP script will run as the apache user who doesn't have access to the root commands. I want my GUI to be accessible over the web, so some extra security is needed on the backend (as well as a password on the front-end, but that's a different matter). I've thought of three ways to do it: 1) have the sysadmin create a sudo user that can run the given commands with no password, 2) create a sudo user and store his name and password outside of the document root, or 3) write some C wrappers and set them suid. I'm not crazy about any of these solutions. Anybody else have a better idea? -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From mitch.pirtle at gmail.com Sun Feb 27 20:22:16 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Sun, 27 Feb 2005 20:22:16 -0500 Subject: [nycphp-talk] Safely running root commands In-Reply-To: <20050228002347.GA13631@uranus.faber.nom> References: <20050228002347.GA13631@uranus.faber.nom> Message-ID: <330532b6050227172238997b53@mail.gmail.com> On Sun, 27 Feb 2005 19:23:47 -0500, Faber Fedor wrote: > > I've thought of three ways to do it: 1) have the sysadmin create a sudo > user that can run the given commands with no password, 2) create a > sudo user and store his name and password outside of the document root, > or 3) write some C wrappers and set them suid. I'm not crazy about any > of these solutions. When faced with these options, I would choose #1. > Anybody else have a better idea? Well back in the old days I would copy the binaries required (when possible) to a separate path for the httpd/apache user, but I was always very careful to restrict what the apache user could do. Your OS on the server may also provide some extra protection (chroot jails etc.). I'm definitely interested to see what everyone else would do in this situation. -- Mitch From lists at zaunere.com Sun Feb 27 22:43:55 2005 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 27 Feb 2005 22:43:55 -0500 Subject: [nycphp-talk] Safely running root commands In-Reply-To: <330532b6050227172238997b53@mail.gmail.com> Message-ID: <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> > > I've thought of three ways to do it: 1) have the sysadmin create a sudo > > user that can run the given commands with no password, 2) create a > > sudo user and store his name and password outside of the document root, > > or 3) write some C wrappers and set them suid. I'm not crazy about any > > of these solutions. > > When faced with these options, I would choose #1. The simplest and most straight forward would probably be number 1 or 2 - but then don't forget that sudo is basically like giving them root for that command. If that command can modify, the sudo can too. 3) is probably the safest if written well, but then there lies the trick :) For complex root operations, like filesystem stuff, I hand commands off to a very simple and carefully written daemon that runs as root. The daemon only accepts very specific commands and responds accodringly. This is actually similar to option 3, except that the apache process is "further" away from the infamous UID 0 in many ways. > > Anybody else have a better idea? > > Well back in the old days I would copy the binaries required (when > possible) to a separate path for the httpd/apache user, but I was > always very careful to restrict what the apache user could do. > > Your OS on the server may also provide some extra protection (chroot > jails etc.). I'm definitely interested to see what everyone else would > do in this situation. Since the scope of root operations needed in this case seem limited, I'd avoid root all together. How about a cronjob that dumps the info you need to a database, or even a file? Or a queue system, where jobs are queued by apache, and a cronjob wakes up every so often to fill the queue with a response? There might be some delay, but depending on the load you expect, it might be insignificant. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From chsnyder at gmail.com Sun Feb 27 22:59:57 2005 From: chsnyder at gmail.com (csnyder) Date: Sun, 27 Feb 2005 21:59:57 -0600 Subject: [nycphp-talk] Safely running root commands In-Reply-To: <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> References: <330532b6050227172238997b53@mail.gmail.com> <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> Message-ID: I don't like any of those options. Are you sure it isn't possible to set this up in such a way that either: 1) cron can run the necessary commands as root, and you scripts just pick up the data from a neutral location or 2) you write a daemon using PHP that runs as root, and listens to a some port or file for a "go" command, runs the commands, and then returns the results Either of those seems preferable to giving the webserver any kind of escalated privileges. From faber at linuxnj.com Sun Feb 27 23:14:09 2005 From: faber at linuxnj.com (Faber Fedor) Date: Sun, 27 Feb 2005 23:14:09 -0500 Subject: [nycphp-talk] Re: Safely running root commands In-Reply-To: <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> References: <330532b6050227172238997b53@mail.gmail.com> <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> Message-ID: <20050228041409.GA14798@uranus.faber.nom> On 27/02/05 22:43 -0500, Hans Zaunere wrote: > > > I've thought of three ways to do it: 1) have the sysadmin create a sudo > > > user that can run the given commands with no password, 2) create a > > > sudo user and store his name and password outside of the document root, > > > or 3) write some C wrappers and set them suid. I'm not crazy about any > > > of these solutions. > > > > When faced with these options, I would choose #1. > > The simplest and most straight forward would probably be number 1 or 2 > - but then don't forget that sudo is basically like giving them root > for that command. If that command can modify, the sudo can too. That's the point of sudo, isn't it? :-) > 3) is probably the safest if written well, but then there lies the > trick :) For complex root operations, like filesystem stuff, Nothing that complex. What I'm doing is manipulating the mail queue: viewing, deleting and holding email. Not all that dangerous, but email is sancrosanct and only root is able to do those things. > Since the scope of root operations needed in this case seem limited, > I'd avoid root all together. How about a cronjob that dumps the info > you need to a database, or even a file? Or a queue system... No, the point is to have real-time manipulation of the mail queue in a GUI. cron won't cut it, IMNSHO. -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From faber at linuxnj.com Sun Feb 27 23:21:13 2005 From: faber at linuxnj.com (Faber Fedor) Date: Sun, 27 Feb 2005 23:21:13 -0500 Subject: [nycphp-talk] Re: Safely running root commands In-Reply-To: References: <330532b6050227172238997b53@mail.gmail.com> <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> Message-ID: <20050228042113.GB14798@uranus.faber.nom> On 27/02/05 21:59 -0600, csnyder wrote: > I don't like any of those options. Neither do I, which is why I asked. :-) > Are you sure it isn't possible to set this up in such a way that either: > > 1) cron can run the necessary commands as root, and you scripts just > pick up the data from a neutral location No can do. See my email to Hans. > or > > 2) you write a daemon using PHP that runs as root, and listens to a > some port or file for a "go" command, runs the commands, and then > returns the results Hmmmm, a daemon. There's an idea I like. But why would I write a daemon in PHP? Sure, I *could* do a daemon in PHP, but I _could_ do it in bash as well. Perl or even Python would seem a better language, IMO. > Either of those seems preferable to giving the webserver any kind of > escalated privileges. I agree. Now, to figure out how to do it... -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From brian at vermonster.com Sun Feb 27 23:21:47 2005 From: brian at vermonster.com (brian at vermonster.com) Date: Sun, 27 Feb 2005 23:21:47 -0500 Subject: [nycphp-talk] Safely running root commands In-Reply-To: References: <330532b6050227172238997b53@mail.gmail.com> <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> Message-ID: <1109564507.42229c5b3810a@webmail.vermonster.com> Quoting csnyder : > > 2) you write a daemon using PHP that runs as root, and listens to a > some port or file for a "go" command, runs the commands, and then > returns the results > This worked really well for me. I recently used this approach (although the daemon-portion was written in Perl) and found you can add a nice security boundary between the PHP script and the system. From faber at linuxnj.com Sun Feb 27 23:50:19 2005 From: faber at linuxnj.com (Faber Fedor) Date: Sun, 27 Feb 2005 23:50:19 -0500 Subject: [nycphp-talk] Re: Safely running root commands In-Reply-To: <1109564507.42229c5b3810a@webmail.vermonster.com> References: <330532b6050227172238997b53@mail.gmail.com> <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> <1109564507.42229c5b3810a@webmail.vermonster.com> Message-ID: <20050228045019.GA14902@uranus.faber.nom> On 27/02/05 23:21 -0500, brian at vermonster.com wrote: > Quoting csnyder : > > > > 2) you write a daemon using PHP that runs as root, and listens to a > > some port or file for a "go" command, runs the commands, and then > > returns the results > > > > This worked really well for me. I recently used this approach (although the > daemon-portion was written in Perl) and found you can add a nice security > boundary between the PHP script and the system. Care to share? (Hints, code, links, advice, etc. ...) -- Regards, Faber Linux New Jersey: Open Source Solutions for New Jersey http://www.linuxnj.com From lists at zaunere.com Mon Feb 28 09:07:59 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 28 Feb 2005 09:07:59 -0500 Subject: [nycphp-talk] Re: Safely running root commands In-Reply-To: <20050228041409.GA14798@uranus.faber.nom> Message-ID: <0MKz5u-1D5lZ20E0M-0001M2@mrelay.perfora.net> > > 3) is probably the safest if written well, but then there lies the > > trick :) For complex root operations, like filesystem stuff, > > Nothing that complex. What I'm doing is manipulating the mail queue: > viewing, deleting and holding email. Not all that dangerous, but email Not dangerous? Check how many sendmail and other mail queue related bugs there have been in the last years - it's up there :) As I mentioned originally, I'd go with a daemon then, and yeah, in PHP - there's no reason not to. Something like this to get you started: function daemonize() { $pid = pcntl_fork(); if( $pid < 0 ) return NULL; if( $pid ) exit(1); posix_setsid(); $pid = pcntl_fork(); if( $pid < 0 ) return NULL; if( $pid ) exit(1); return posix_getpid(); } --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From lists at zaunere.com Mon Feb 28 09:24:07 2005 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 28 Feb 2005 09:24:07 -0500 Subject: [nycphp-talk] 32bit vs AMD 64 versions of Apache and shared objects In-Reply-To: Message-ID: <0MKz5u-1D5loe0a0s-0001Nq@mrelay.perfora.net> Hey Dan, > I'm trying to configure a Xeon processor-based (EM64T/AMD 64) SuSE 9.2 > Professional machine to run Apache 1.3.33, PHP 5.0.3 and WebSphere > Application Server 5.1.1.3. I was able to get all these guys cooperating > on a 32 bit Pentium III machine on the same version of SuSE Pro. But I > seem to be running into some 32 bit vs 64 bit issues on this new machine. So if I read into this, IBM will be bundling PHP with WebSphere next? :) > The way things worked out on the older machine was that I had a binary > installation of Apache (IBM HTTP Server, based on 1.3.28) which used a > shared object to communicate with WAS, and which used libphp5.so that I > compiled against it via apxs for PHP. All was well. > > On this machine, however, I can't get the precompiled 32-bit Apache (IHS) > talking to PHP via libphp5.so, as the PHP build against it creates a > 64-bit object: > > # /opt/IBMHttpServer/bin/apachectl configtest > Syntax error on line 231 of /opt/IBMHttpServer/conf/httpd.conf: > Cannot load /opt/IBMHttpServer/libexec/libphp5.so into server: > /opt/IBMHttpServer/libexec/libphp5.so: cannot open shared object file: No > such file or directory > > # file /opt/IBMHttpServer/libexec/libphp5.so > /opt/IBMHttpServer/libexec/libphp5.so: ELF 64-bit LSB shared object, AMD > x86-64, version 1 (SYSV), not stripped > > > On the other hand, if I try to compile my own version of Apache, it will > work with the 64-bit version of libphp5.so, but will not use the 32-bit > WebSphere plugin: > > # /opt/local/apache/bin/apachectl configtest > Syntax error on line 243 of /opt/local/apache/conf/httpd.conf: > Cannot load /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so into > server: /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: cannot > open shared object file: No such file or directory > > # file /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so > /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: ELF 32-bit LSB > shared object, Intel 80386, version 1 (SYSV), not stripped > > > So, I guess my question is how can I get my 64-bit version of Apache to > use the 32-bit WAS plugin, or alternately how can I get the 32-bit version > of IHS to use the 64-bit PHP object? Is it possible to do that? If not, As far as I know (and from what I learned at our AMD meeting) it's not possible. > how would I compile a 32-bit version of libphp5.so on AMD 64 so that the > 32-bit version of IHS can use it? You basically need to compile against the 32bit libs, which it probably is doing already, since you're not using PHP 5.1. But then, to get it to link for 32bit, I'm not sure - possibly try --target=x86-unknown-linux-gnu in your ./configure. Would be interested to hear what happens :) --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP From danielc at analysisandsolutions.com Mon Feb 28 20:05:05 2005 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 28 Feb 2005 20:05:05 -0500 Subject: [nycphp-talk] stuff from secuityfocus 289 Message-ID: <20050301010504.GA26054@panix.com> Highlights from SecurityFocus Newsletter #289 --------------------------------------------- PHP STUFF... VBulletin Forumdisplay.PHP Remote Command Execution Vulnerab... http://www.securityfocus.com/bid/12542 OpenConf Paper Submission HTML Injection Vulnerability http://www.securityfocus.com/bid/12554 Siteman User.PHP Unspecified Security Restriction Bypass Vul... http://www.securityfocus.com/bid/12558 PHP-Nuke Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/12561 Microsoft Internet Explorer Malformed File URI Denial of Ser... http://www.securityfocus.com/bid/12565 OSCommerce Contact_us.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12568 PaNews Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12576 PaFaq SQL Injection Vulnerability http://www.securityfocus.com/bid/12582 MercuryBoard Forum Remote Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/12578 Skull-Splitter Guestbook Unspecified HTML Injection Vulnerab... http://www.securityfocus.com/bid/12580 WebCalendar SQL Injection Vulnerability http://www.securityfocus.com/bid/12581 [Loads of CitrusDB Vulnerabilities] http://www.securityfocus.com/bid/12557 http://www.securityfocus.com/bid/12560 http://www.securityfocus.com/bid/12564 OTHER STUFF.... Firefox Remote SMB Document Local File Disclosure Vulnerabil... http://www.securityfocus.com/bid/12533 Microsoft Internet Explorer Mouse Event URI Status Bar Obfus... http://www.securityfocus.com/bid/12541 Microsoft Internet Explorer Favorites List Script Code Execu... http://www.securityfocus.com/bid/12544 Opera Web Browser Multiple Remote Vulnerabilities http://www.securityfocus.com/bid/12550 Squid Proxy DNS Name Resolver Remote Denial Of Service Vulne... http://www.securityfocus.com/bid/12551 -- 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 Consult at CovenantEDesign.com Mon Feb 28 20:42:30 2005 From: Consult at CovenantEDesign.com (Edward) Date: Mon, 28 Feb 2005 20:42:30 -0500 Subject: [nycphp-talk] XML & XSLT problem References: <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> Message-ID: <000b01c51dff$ef13b7c0$45896e41@ced> I've been trying to transorm some XML on the fly and for whatever reason I keep getting XML errors... I don't find anything wrong with the xml files though. I've tried both local and remote files too...still no luck nat.xml Warning: Sablotron error on line none: cannot open file '/hsphere/local/home/skoilnog/edwardprevost.info/PHPStuff/html_style.xsl' in http://www.edwardprevost.info/PHPStuff/XMLMaker.inc on line 8 Unknown error building web page from XML & XSLT sources. The reason is that cannot open file '/hsphere/local/home/skoilnog/edwardprevost.info/PHPStuff/html_style.xsl' and the error code is 4 The variable magically echos out, but the xslt_process() never runs the container. Weird. Anyway here are the files I've been using. Any help would be much appreciated as xsl and xslt is relatively new to me. www.EdwardPrevost.info/testing.php www.EdwardPRevost.info/PHPStuff/ Thanks in advance guys! Edward JS Prevost II Me at EdwardPrevost.info www.EdwardPrevost.info ----- Original Message ----- From: "Hans Zaunere" To: "'NYPHP Talk'" Sent: Sunday, February 27, 2005 10:43 PM Subject: RE: [nycphp-talk] Safely running root commands > > I've thought of three ways to do it: 1) have the sysadmin create a sudo > > user that can run the given commands with no password, 2) create a > > sudo user and store his name and password outside of the document root, > > or 3) write some C wrappers and set them suid. I'm not crazy about any > > of these solutions. > > When faced with these options, I would choose #1. The simplest and most straight forward would probably be number 1 or 2 - but then don't forget that sudo is basically like giving them root for that command. If that command can modify, the sudo can too. 3) is probably the safest if written well, but then there lies the trick :) For complex root operations, like filesystem stuff, I hand commands off to a very simple and carefully written daemon that runs as root. The daemon only accepts very specific commands and responds accodringly. This is actually similar to option 3, except that the apache process is "further" away from the infamous UID 0 in many ways. > > Anybody else have a better idea? > > Well back in the old days I would copy the binaries required (when > possible) to a separate path for the httpd/apache user, but I was > always very careful to restrict what the apache user could do. > > Your OS on the server may also provide some extra protection (chroot > jails etc.). I'm definitely interested to see what everyone else would > do in this situation. Since the scope of root operations needed in this case seem limited, I'd avoid root all together. How about a cronjob that dumps the info you need to a database, or even a file? Or a queue system, where jobs are queued by apache, and a cronjob wakes up every so often to fill the queue with a response? There might be some delay, but depending on the load you expect, it might be insignificant. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org AMP Technology Supporting Apache, MySQL and PHP _______________________________________________ New York PHP Talk Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org From adam at trachtenberg.com Mon Feb 28 20:54:29 2005 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Mon, 28 Feb 2005 20:54:29 -0500 (EST) Subject: [nycphp-talk] XML & XSLT problem In-Reply-To: <000b01c51dff$ef13b7c0$45896e41@ced> References: <0MKyxe-1D5bp636wl-00016Z@mrelay.perfora.net> <000b01c51dff$ef13b7c0$45896e41@ced> Message-ID: On Mon, 28 Feb 2005, Edward wrote: > '/hsphere/local/home/skoilnog/edwardprevost.info/PHPStuff/html_style.xsl' in > http://www.edwardprevost.info/PHPStuff/XMLMaker.inc on line 8 html_style.xsl is not HTMLStyle.xsl. -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!