From tech_learner at yahoo.com Mon Sep 1 05:28:36 2003 From: tech_learner at yahoo.com (Tracy) Date: Mon, 1 Sep 2003 02:28:36 -0700 (PDT) Subject: [nycphp-talk] Fwd: [PHP Classes] Released new book review: Core PHP Programming, Third Edition Message-ID: <20030901092837.95417.qmail@web14305.mail.yahoo.com> Note: forwarded message attached. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coming together is a beginning... keeping together is progress... working together is success !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded message was scrubbed... From: PHP Classes Subject: [PHP Classes] Released new book review: Core PHP Programming, Third Edition Date: 31 Aug 2003 05:15:06 -0000 Size: 6790 URL: From soazine at erols.com Mon Sep 1 05:44:18 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 1 Sep 2003 05:44:18 -0400 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually Message-ID: <043701c3706d$9d2af450$67a76244@philofsoa> ----- Original Message ----- From: "Phil Powell" Sent: Sunday, August 31, 2003 8:38 PM Subject: I have a Windows/OE question actually > I am not only receiving an average of 20 - 30 infected emails per day, but > now I am "sending" about 5 - 10 infected emails to users via localhost > (127.0.0.1) and I don't know how I'm doing it! I am running a virus scan > every day that detects no viruses (not even heuristic searches find > anything), yet I'm still "sending" infected SoBig emails! > > I have Win2000 Professional and Outlook Express 6. > > HELP! > > Phil > From pl at eskimo.com Mon Sep 1 17:03:53 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 1 Sep 2003 17:03:53 -0400 Subject: [nycphp-talk] html question Message-ID: <009b01c370cc$8e6922c0$442c0242@peter1> I am trying to get the "maxsize" attribute to work in the input tag, but am having problems. IE 6 appears to ignore it. For example in, the text box allows input of 16 or more characters. Has anyone else noticed this behavior? Is there a way to work around it? Peter Lehrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From chendry at nyc.rr.com Mon Sep 1 17:15:17 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Mon, 1 Sep 2003 17:15:17 -0400 Subject: [nycphp-talk] html question In-Reply-To: <009b01c370cc$8e6922c0$442c0242@peter1> Message-ID: Try 'maxlength' instead. And try front-end at lists.nyphp.org - I hear those guys are really cool. :) - C -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Peter Lehrer Sent: Monday, September 01, 2003 5:04 PM To: NYPHP Talk Subject: [nycphp-talk] html question I am trying to get the "maxsize" attribute to work in the input tag, but am having problems. IE 6 appears to ignore it. For example in, the text box allows input of 16 or more characters. Has anyone else noticed this behavior? Is there a way to work around it? Peter Lehrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Mon Sep 1 17:24:44 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 1 Sep 2003 17:24:44 -0400 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually In-Reply-To: <043701c3706d$9d2af450$67a76244@philofsoa> Message-ID: <001601c370cf$76b6f9b0$c48e3818@OBERON1> Phil, You could look into Basic MailSafe. It is included in ZoneAlarm (free edition). Tim G. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Monday, September 01, 2003 5:44 AM To: NYPHP Talk Subject: [nycphp-talk] Fw: I have a Windows/OE question actually ----- Original Message ----- From: "Phil Powell" Sent: Sunday, August 31, 2003 8:38 PM Subject: I have a Windows/OE question actually > I am not only receiving an average of 20 - 30 infected emails per day, but > now I am "sending" about 5 - 10 infected emails to users via localhost > (127.0.0.1) and I don't know how I'm doing it! I am running a virus scan > every day that detects no viruses (not even heuristic searches find > anything), yet I'm still "sending" infected SoBig emails! > > I have Win2000 Professional and Outlook Express 6. > > HELP! > > Phil > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Mon Sep 1 17:37:50 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 01 Sep 2003 17:37:50 -0400 Subject: [nycphp-talk] html question In-Reply-To: References: Message-ID: <3F53BC2E.3090200@chxo.com> As detailed in http://www.w3.org/TR/html4/interact/forms.html#h-17.4 Christopher Hendry wrote: > Try 'maxlength' instead. > > -----Original Message----- > *From:* talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]*On Behalf Of *Peter Lehrer > *Sent:* Monday, September 01, 2003 5:04 PM > *To:* NYPHP Talk > *Subject:* [nycphp-talk] html question > > I am trying to get the "maxsize" attribute to work in the input > tag, but am having problems. IE 6 appears to ignore it. > > From soazine at erols.com Mon Sep 1 17:39:06 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 1 Sep 2003 17:39:06 -0400 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually References: <001601c370cf$76b6f9b0$c48e3818@OBERON1> Message-ID: <067c01c370d1$7886ecd0$67a76244@philofsoa> Yep, just installed ZoneAlarm with Basic MailSafe. The infected emails still keep coming though.. :( Phil ----- Original Message ----- From: "Tim Gales" To: "'NYPHP Talk'" Sent: Monday, September 01, 2003 5:24 PM Subject: RE: [nycphp-talk] Fw: I have a Windows/OE question actually Phil, You could look into Basic MailSafe. It is included in ZoneAlarm (free edition). Tim G. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Monday, September 01, 2003 5:44 AM To: NYPHP Talk Subject: [nycphp-talk] Fw: I have a Windows/OE question actually ----- Original Message ----- From: "Phil Powell" Sent: Sunday, August 31, 2003 8:38 PM Subject: I have a Windows/OE question actually > I am not only receiving an average of 20 - 30 infected emails per day, but > now I am "sending" about 5 - 10 infected emails to users via localhost > (127.0.0.1) and I don't know how I'm doing it! I am running a virus scan > every day that detects no viruses (not even heuristic searches find > anything), yet I'm still "sending" infected SoBig emails! > > I have Win2000 Professional and Outlook Express 6. > > HELP! > > Phil > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Mon Sep 1 17:41:56 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 1 Sep 2003 17:41:56 -0400 Subject: [nycphp-talk] html question References: Message-ID: <00cf01c370d1$df8f6ba0$442c0242@peter1> 'maxlength' works. Thanks! PL ----- Original Message ----- From: Christopher Hendry To: NYPHP Talk Sent: Monday, September 01, 2003 5:15 PM Subject: RE: [nycphp-talk] html question Try 'maxlength' instead. And try front-end at lists.nyphp.org - I hear those guys are really cool. :) - C -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Peter Lehrer Sent: Monday, September 01, 2003 5:04 PM To: NYPHP Talk Subject: [nycphp-talk] html question I am trying to get the "maxsize" attribute to work in the input tag, but am having problems. IE 6 appears to ignore it. For example in, the text box allows input of 16 or more characters. Has anyone else noticed this behavior? Is there a way to work around it? Peter Lehrer ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Mon Sep 1 19:50:32 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 1 Sep 2003 19:50:32 -0400 Subject: [nycphp-talk] Java/Swing <-> PHP/GTK Message-ID: <001c01c370e3$d4ceb6f0$6400a8c0@thinkpad> are there any good links on porting apps from java/swing to php/gtk on the web? is http://gtk.php.net/manual/en/ the most comprehensive? do developers here write gui apps w/ php + gtk? are there any pitfalls? how is the portability issues? thanks. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From southwell at dneba.com Mon Sep 1 21:43:52 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 01 Sep 2003 21:43:52 -0400 Subject: [nycphp-talk] html question In-Reply-To: <009b01c370cc$8e6922c0$442c0242@peter1> Message-ID: <5.1.0.14.2.20030901214103.00b43768@mail.optonline.net> At 05:03 PM 9/1/2003, you wrote: >I am trying to get the "maxsize" attribute to work in the input tag, but >am having problems. IE 6 appears to ignore it. > >For example in, > > > >the text box allows input of 16 or more characters. Has anyone else >noticed this behavior? Is there a way to work around it? you are confusing the two attributes "size" (which determines the size of the input box in pixels) and "maxlength" (which determines the number of characters allowed to be typed into the box). > > >Peter Lehrer > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From csnyder at chxo.com Tue Sep 2 00:46:51 2003 From: csnyder at chxo.com (Chris Snyder) Date: Tue, 02 Sep 2003 00:46:51 -0400 Subject: [nycphp-talk] so-called triple md5 Message-ID: <3F5420BB.6020802@chxo.com> I picked up the simple encryption scheme below a couple years ago from a comment in the PHP manual. I'm a little curious about its origins -- I've seen it referred to as "triple md5", but Google doesn't have much to say about that, and I suspect it was a euphemism. The original comment has since been deleted. Does anyone recognize this, or care to comment on its ability to withstand anything more than casual snooping? It has the advantage of being available in setups without mcrypt support, but a false sense of security is worse than none at all. And by the way, what method do -you- recommend for encrypting data that needs to be decrypted later? > function keyED($txt,$encrypt_key) { > $encrypt_key = md5($encrypt_key); > $ctr=0; > $tmp = ""; > for ($i=0;$i if ($ctr==strlen($encrypt_key)) $ctr=0; > $tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1); > $ctr++; > } > return $tmp; > } > > function hex2bin($data) { > $len = strlen($data); > for($i=0;$i<$len;$i+=2) { > $newdata .= pack("C",hexdec(substr($data,$i,2))); > } > return $newdata; > } > > function encrypt($txt, $key="") { > srand((double)microtime()*1000000); > $encrypt_key = md5(rand(0,32000)); > $ctr=0; > $tmp = ""; > for ($i=0;$i if ($ctr==strlen($encrypt_key)) $ctr=0; > $tmp.= substr($encrypt_key,$ctr,1) . (substr($txt,$i,1) ^ > substr($encrypt_key,$ctr,1)); > $ctr++; > } > return bin2hex(keyED($tmp,$key)); > } > function decrypt($text, $key="") { > $bin= hex2bin($text); > $txt = keyED($bin,$key); > $tmp = ""; > for ($i=0;$i $md5 = substr($txt,$i,1); > $i++; > $tmp.= (substr($txt,$i,1) ^ $md5); > } > return $tmp; > } From dkrook at hotmail.com Tue Sep 2 01:27:55 2003 From: dkrook at hotmail.com (D C Krook) Date: Tue, 02 Sep 2003 01:27:55 -0400 Subject: [nycphp-talk] html question Message-ID: >And try front-end at lists.nyphp.org - I hear those guys are really cool. I heard the same thing : ) http://lists.nyphp.org/mailman/listinfo/front-end http://nyfe.org/ _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From pl at eskimo.com Tue Sep 2 08:26:55 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 2 Sep 2003 08:26:55 -0400 Subject: [nycphp-talk] html question References: Message-ID: <001a01c3714d$810959c0$572c0242@peter1> thanks. i signed up. peter ----- Original Message ----- From: "D C Krook" To: Sent: Tuesday, September 02, 2003 1:27 AM Subject: RE: [nycphp-talk] html question > >And try front-end at lists.nyphp.org - I hear those guys are really cool. > > I heard the same thing : ) > > http://lists.nyphp.org/mailman/listinfo/front-end > http://nyfe.org/ > > _________________________________________________________________ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From sklar at sklar.com Tue Sep 2 09:32:29 2003 From: sklar at sklar.com (David Sklar) Date: Tue, 2 Sep 2003 09:32:29 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: <3F5420BB.6020802@chxo.com> Message-ID: Don't use this algorithm. It "encrypts" things by just XORing plaintext with the MD5 hash of a key. This has many problems, including the fact that since the output of md5() is a string that contains only the characters [a-e0-9], there's only 16 possible values that each piece of ciphertext needs to be xor'ed with to produce plaintext. If you need to encrypt data that needs to be decrypted later, use an algorithm designed by a known, qualified cryptosystem designer and (more importantly) that has stood up to lots of testing and attempts to break it. For example, Blowfish (http://www.counterpane.com/blowfish.html), which is available in the mcrypt extension. There are also versions available in other languages (http://www.counterpane.com/blowfish-download.html) and you could probably write a (slow) native PHP implementation. David On Tuesday, September 02, 2003 12:47 AM, wrote: > I picked up the simple encryption scheme below a couple years ago > from a comment in the PHP manual. I'm a little curious about its > origins -- I've seen it referred to as "triple md5", but Google > doesn't have much to say about that, and I suspect it was a > euphemism. The original comment has since been deleted. > > Does anyone recognize this, or care to comment on its ability to > withstand anything more than casual snooping? It has the advantage of > being available in setups without mcrypt support, but a false sense of > security is worse than none at all. > > And by the way, what method do -you- recommend for encrypting data > that needs to be decrypted later? > >> function keyED($txt,$encrypt_key) { >> $encrypt_key = md5($encrypt_key); >> $ctr=0; >> $tmp = ""; >> for ($i=0;$i> if ($ctr==strlen($encrypt_key)) $ctr=0; >> $tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1); >> $ctr++; } >> return $tmp; >> } >> >> function hex2bin($data) { >> $len = strlen($data); >> for($i=0;$i<$len;$i+=2) { >> $newdata .= pack("C",hexdec(substr($data,$i,2))); } >> return $newdata; >> } >> >> function encrypt($txt, $key="") { >> srand((double)microtime()*1000000); >> $encrypt_key = md5(rand(0,32000)); >> $ctr=0; >> $tmp = ""; >> for ($i=0;$i> if ($ctr==strlen($encrypt_key)) $ctr=0; >> $tmp.= substr($encrypt_key,$ctr,1) . (substr($txt,$i,1) ^ >> substr($encrypt_key,$ctr,1)); $ctr++; >> } >> return bin2hex(keyED($tmp,$key)); >> } > >> function decrypt($text, $key="") { >> $bin= hex2bin($text); >> $txt = keyED($bin,$key); >> $tmp = ""; >> for ($i=0;$i> $md5 = substr($txt,$i,1); >> $i++; >> $tmp.= (substr($txt,$i,1) ^ $md5); >> } >> return $tmp; >> } > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Tue Sep 2 09:36:15 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 2 Sep 2003 09:36:15 -0400 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually References: <001601c370cf$76b6f9b0$c48e3818@OBERON1> Message-ID: <00f701c37157$30e1be60$572c0242@peter1> Di you try getting a sobig removal problem. http://securityresponse.symantec.com/avcenter/tools.list.html peter ----- Original Message ----- From: "Tim Gales" To: "'NYPHP Talk'" Sent: Monday, September 01, 2003 5:24 PM Subject: RE: [nycphp-talk] Fw: I have a Windows/OE question actually > Phil, > > You could look into Basic MailSafe. > It is included in ZoneAlarm (free edition). > > Tim G. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On > Behalf Of Phil Powell > Sent: Monday, September 01, 2003 5:44 AM > To: NYPHP Talk > Subject: [nycphp-talk] Fw: I have a Windows/OE question actually > > > ----- Original Message ----- > From: "Phil Powell" > Sent: Sunday, August 31, 2003 8:38 PM > Subject: I have a Windows/OE question actually > > > > I am not only receiving an average of 20 - 30 infected emails per day, but > > now I am "sending" about 5 - 10 infected emails to users via localhost > > (127.0.0.1) and I don't know how I'm doing it! I am running a virus scan > > every day that detects no viruses (not even heuristic searches find > > anything), yet I'm still "sending" infected SoBig emails! > > > > I have Win2000 Professional and Outlook Express 6. > > > > HELP! > > > > Phil > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From Ed at ComSimplicity.com Tue Sep 2 10:03:41 2003 From: Ed at ComSimplicity.com (Ed McCarroll) Date: Tue, 2 Sep 2003 07:03:41 -0700 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually In-Reply-To: <043701c3706d$9d2af450$67a76244@philofsoa> Message-ID: > > I am not only receiving an average of 20 - 30 infected emails > > per day, but now I am "sending" about 5 - 10 infected emails > > to users via localhost (127.0.0.1) and I don't know how I'm > > doing it! Are you sure you're actually sending them? Could someone else be spoofing your address? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ed McCarroll MailTo:Ed at ComSimplicity.com ComSimplicity (310) 838-4330 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From pl at eskimo.com Tue Sep 2 10:21:33 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 2 Sep 2003 10:21:33 -0400 Subject: [nycphp-talk] Fw: I have a Windows/OE question actually References: Message-ID: <013501c3715d$85852aa0$572c0242@peter1> ----- Original Message ----- From: "Ed McCarroll" To: "NYPHP Talk" Sent: Tuesday, September 02, 2003 10:03 AM Subject: RE: [nycphp-talk] Fw: I have a Windows/OE question actually > > > I am not only receiving an average of 20 - 30 infected emails > > > per day, but now I am "sending" about 5 - 10 infected emails > > > to users via localhost (127.0.0.1) and I don't know how I'm > > > doing it! > > Are you sure you're actually sending them? Could someone else be > spoofing your address? > This virus sounds like the SOBIG virus. I believe that when it infects your computer, it starts sending out bogus emails with "pif" attachments to people in your address book. Peter Lehrer > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Ed McCarroll MailTo:Ed at ComSimplicity.com > ComSimplicity (310) 838-4330 > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From shawn at shawnlawyer.com Tue Sep 2 11:28:24 2003 From: shawn at shawnlawyer.com (shawn at shawnlawyer.com) Date: Tue, 2 Sep 2003 08:28:24 -0700 (PDT) Subject: [nycphp-talk] so-called triple md5 In-Reply-To: References: <3F5420BB.6020802@chxo.com> Message-ID: <3697.165.247.32.174.1062516504.squirrel@mail.shawnlawyer.com> well on a simplier note, i perfer the sha1() encyption type. it's like the md5 but produces a longer string of [A-z0-9] characters making it harder to *guess*. really if you that concerned about security then you need to discuss this with your sysadmin. they may need to set up software that stops people from using programs that hit your server repeatedly with *guessing* requests. From agfische at email.smith.edu Tue Sep 2 12:17:40 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue, 2 Sep 2003 12:17:40 -0400 Subject: [nycphp-talk] ASP resources? Message-ID: Unfortunately one of my client's sites is hosted on an IIS server without php installed. I haven't worked with ASP before and don't want to buy a book as this is a pretty cheap project. I would appreciate pointers to good resources on the web, i.e. discussion groups, web tutorials, scripts, etc. So far the ones that I have gone to have been pretty poorly written. I am just doing a simple form processing that takes the output and sends to an email address and redirects the user to a response page. TIA, Aaron From brian at preston-campbell.com Tue Sep 2 12:21:49 2003 From: brian at preston-campbell.com (Preston-Campbell) Date: Tue, 2 Sep 2003 12:21:49 -0400 Subject: [nycphp-talk] ASP resources? In-Reply-To: References: Message-ID: <200309021221.49790.brian@preston-campbell.com> Check http://www.hotscripts.com for a prewritten solution. Save yourself the time and energy of reinventing the wheel (albeit a sqaure one as we are talking about ASP and IIS). Brian On Tuesday 02 September 2003 12:17 pm, Aaron Fischer wrote: > Unfortunately one of my client's sites is hosted on an IIS server > without php installed. I haven't worked with ASP before and don't want > to buy a book as this is a pretty cheap project. I would appreciate > pointers to good resources on the web, i.e. discussion groups, web > tutorials, scripts, etc. So far the ones that I have gone to have been > pretty poorly written. > > I am just doing a simple form processing that takes the output and > sends to an email address and redirects the user to a response page. > > TIA, > > Aaron > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dkrook at hotmail.com Tue Sep 2 12:23:49 2003 From: dkrook at hotmail.com (D C Krook) Date: Tue, 02 Sep 2003 12:23:49 -0400 Subject: [nycphp-talk] ASP resources? Message-ID: >I am just doing a simple form processing that takes the output and sends to >an email address and redirects the user to a response page. Aaron, I've got some simple scripts for this sort of thing online: http://dev.krook.org/src.php?i=7&t=asp Make sure that you have CDONTS enabled on the server to send mail. If you want to do redirects, VBScript provides this functionality in Response.Redirect("http://example.com/") _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From dan at mx2pro.com Tue Sep 2 12:23:57 2003 From: dan at mx2pro.com (Dan Horning) Date: Tue, 2 Sep 2003 12:23:57 -0400 Subject: [nycphp-talk] ASP resources? In-Reply-To: Message-ID: <000701c3716e$9dd418d0$a00f9942@dwchome> I would suggest finding out if the server has ASP.net and if so .. Use it... Otherwise... Google it - Dan Horning ------------------------------------------------------------------------ ------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? ------------------------------------------------------------------------ ------------ MX2 Productions, Media from concept to execution. PO Box 160, Clifton Park, NY 12065-0160 > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Aaron Fischer > Sent: Tuesday, September 02, 2003 12:18 PM > To: NYPHP Talk > Subject: [nycphp-talk] ASP resources? > > > Unfortunately one of my client's sites is hosted on an IIS server > without php installed. I haven't worked with ASP before and > don't want > to buy a book as this is a pretty cheap project. I would appreciate > pointers to good resources on the web, i.e. discussion groups, web > tutorials, scripts, etc. So far the ones that I have gone to > have been > pretty poorly written. > > I am just doing a simple form processing that takes the output and > sends to an email address and redirects the user to a response page. > > TIA, > > Aaron > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From agfische at email.smith.edu Tue Sep 2 12:33:13 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue, 2 Sep 2003 12:33:13 -0400 Subject: [nycphp-talk] ASP resources? In-Reply-To: Message-ID: <25ED70AC-DD63-11D7-BD59-0003930D07F2@email.smith.edu> Thanks all, those are great leads. Unfortunately the ISP is pretty dated with Win NT and IIS 4.0. I tried one solution using CDONTS and came up with errors that I believe are indicating that it is not enabled. Ugh, I will never take a project like this again. -Aaron On Tuesday, Sep 2, 2003, at 12:23 US/Eastern, D C Krook wrote: > Aaron, > > I've got some simple scripts for this sort of thing online: > > http://dev.krook.org/src.php?i=7&t=asp > > Make sure that you have CDONTS enabled on the server to send mail. If > you want to do redirects, VBScript provides this functionality in > Response.Redirect("http://example.com/") From csnyder at chxo.com Tue Sep 2 13:22:22 2003 From: csnyder at chxo.com (Chris Snyder) Date: Tue, 02 Sep 2003 13:22:22 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: References: Message-ID: <3F54D1CE.3040806@chxo.com> Thanks David-- I guess if something is worth hiding, it's worth hiding well. I'm a little surprised that no one has written the native PHP implementation of Blowfish, slow though it may be. I noticed that there are PEAR classes that implement RC4 and TEA. I'm having trouble finding any sort of online resource that compares encryption algorithms. Short of reading "Applied Cryptography," are there any good overviews out there that might help someone say, "Oh, TEA is good enough for what I'm doing," or "Gee, I guess I need to recompile with mcrypt support so I can use Blowfish?" chris. David Sklar wrote: >Don't use this algorithm. It "encrypts" things by just XORing plaintext with >the MD5 hash of a key. This has many problems, including the fact that since >the output of md5() is a string that contains only the characters [a-e0-9], >there's only 16 possible values that each piece of ciphertext needs to be >xor'ed with to produce plaintext. > >If you need to encrypt data that needs to be decrypted later, use an >algorithm designed by a known, qualified cryptosystem designer and (more >importantly) that has stood up to lots of testing and attempts to break it. >For example, Blowfish (http://www.counterpane.com/blowfish.html), which is >available in the mcrypt extension. There are also versions available in >other languages (http://www.counterpane.com/blowfish-download.html) and you >could probably write a (slow) native PHP implementation. > >David > > > From sklar at sklar.com Tue Sep 2 13:27:27 2003 From: sklar at sklar.com (David Sklar) Date: Tue, 2 Sep 2003 13:27:27 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: <3F54D1CE.3040806@chxo.com> Message-ID: If you're at the point where the difference between TEA and Blowfish is important to your application, then you should read Applied Cryptography. What are you encrypting? For the differences between algorithms to really matter, you should be analyzing how much ciphertext you're generating, who's likely to snoop it, what kind of resources they have, etc. For most web-based services, the likelihood of a bruteforce attack (or slightly-less-than-brute-force based on a weakness of a cryptosystem) is so, so, so much less than the likelihood of an attack because someone was careless and left a key in an accesssible place or chose an easily guessable key. A 56 bit key and a 1024 bit key are equally weak when they're written on a post-it stuck to a monitor. David On Tuesday, September 02, 2003 1:22 PM, wrote: > Thanks David-- > > I guess if something is worth hiding, it's worth hiding well. > > I'm a little surprised that no one has written the native PHP > implementation of Blowfish, slow though it may be. I noticed that > there are PEAR classes that implement RC4 and TEA. > > I'm having trouble finding any sort of online resource that compares > encryption algorithms. Short of reading "Applied Cryptography," are > there any good overviews out there that might help someone say, "Oh, > TEA is good enough for what I'm doing," or "Gee, I guess I need to > recompile with mcrypt support so I can use Blowfish?" > > chris. From csnyder at chxo.com Tue Sep 2 14:28:09 2003 From: csnyder at chxo.com (Chris Snyder) Date: Tue, 02 Sep 2003 14:28:09 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: References: Message-ID: <3F54E139.4010104@chxo.com> I'm encrypting smallish strings, probably not subject to attack but protected just in case. 1) I want passwords to be encrypted for storage, but decryptable so that they can be looked-up by an admin (over SSL) or (gasp!) sent to a user via email if the user has agreed in advance that this is a completely insecure thing to do. 2) I want to create an encrypted session cookie that includes the session id and a shared secret that changes with every request. 3) I'd also like to encrypt identity data like addresses and telephone numbers. This may at some point be used to protect access to quasi-financial data (credits in a game economy), but never credit card or social security numbers. I know that all of this is dependent on the encryption key remaining secret, but in a shared-database environment this seems like the right thing to do. chris. David Sklar wrote: >If you're at the point where the difference between TEA and Blowfish is >important to your application, then you should read Applied Cryptography. > >What are you encrypting? For the differences between algorithms to really >matter, you should be analyzing how much ciphertext you're generating, who's >likely to snoop it, what kind of resources they have, etc. > >For most web-based services, the likelihood of a bruteforce attack (or >slightly-less-than-brute-force based on a weakness of a cryptosystem) is so, >so, so much less than the likelihood of an attack because someone was >careless and left a key in an accesssible place or chose an easily guessable >key. A 56 bit key and a 1024 bit key are equally weak when they're written >on a post-it stuck to a monitor. > >David > > > From sklar at sklar.com Tue Sep 2 15:45:02 2003 From: sklar at sklar.com (David Sklar) Date: Tue, 2 Sep 2003 15:45:02 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: <3F54E139.4010104@chxo.com> Message-ID: If you are not providing any automated processes that do decryption, then you don't need to store the key anywhere (but in the head of the admin). This is good (and TEA or Blowfish or whatever will probably just fine for your encryption). What do you mean by "shared-database"? Are there users out of your control who have read access to the tables in which this data is stored? Or are you dependent upon a third party's correct administration of database access privileges to ensure that other people can't look at the relevant database tables. If you are storing the key anywhere, then the encrypted data is only as secure as wherever the key is (as you noted below). So if you are storing the key in a file whose proper security depends on a third-party administrator, you may not be better off than just storing the data under a permissions regime that also depends on such an administrator. At some point, the data is valuable enough to put it on a dedicated server, so that unauthorized access requires either a nasty hole in your application that exposes it or physical access to the machine. Then you have to start thinking about unauthorized physical access. There are lots of ways to make yourself comfortable in this regard, but part of me keeps thinking that being on the overnight janitorial shift at a large company or hosting provider would be a very lucrative job -- a USB DVD writer and a few minutes access to a machine would provide access to lots and lots of data that would be very valuable. David On Tuesday, September 02, 2003 2:28 PM, wrote: > I'm encrypting smallish strings, probably not subject to attack but > protected just in case. > > 1) I want passwords to be encrypted for storage, but decryptable so > that they can be looked-up by an admin (over SSL) or (gasp!) sent to > a user via email if the user has agreed in advance that this is a > completely insecure thing to do. > > 2) I want to create an encrypted session cookie that includes the > session id and a shared secret that changes with every request. > > 3) I'd also like to encrypt identity data like addresses and > telephone numbers. > > This may at some point be used to protect access to quasi-financial > data (credits in a game economy), but never credit card or social > security numbers. I know that all of this is dependent on the > encryption key remaining secret, but in a shared-database environment > this seems like the right thing to do. > > chris. > > > David Sklar wrote: > >> If you're at the point where the difference between TEA and Blowfish >> is important to your application, then you should read Applied >> Cryptography. >> >> What are you encrypting? For the differences between algorithms to >> really matter, you should be analyzing how much ciphertext you're >> generating, who's likely to snoop it, what kind of resources they >> have, etc. >> >> For most web-based services, the likelihood of a bruteforce attack >> (or slightly-less-than-brute-force based on a weakness of a >> cryptosystem) is so, so, so much less than the likelihood of an >> attack because someone was careless and left a key in an accesssible >> place or chose an easily guessable key. A 56 bit key and a 1024 bit >> key are equally weak when they're written on a post-it stuck to a >> monitor. >> >> David >> >> >> > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Tue Sep 2 16:11:43 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 02 Sep 2003 16:11:43 -0400 Subject: [nycphp-talk] so-called triple md5 Message-ID: No matter what security you put in place, there is always the risk of Sydney Bristow punching and kicking her way past security in her high-heels, only to retrieve the data with a device that needs only to be placed near the HD to read it and upload it to the SD-6 mainframe via an undetectable satellite uplink where it will be child's play for Marshal to decrypt. :) > If you are not providing any automated processes that do decryption, then > you don't need to store the key anywhere (but in the head of the admin). > This is good (and TEA or Blowfish or whatever will probably just fine for > your encryption). > > What do you mean by "shared-database"? Are there users out of your control > who have read access to the tables in which this data is stored? Or are you > dependent upon a third party's correct administration of database access > privileges to ensure that other people can't look at the relevant database > tables. If you are storing the key anywhere, then the encrypted data is only > as secure as wherever the key is (as you noted below). So if you are storing > the key in a file whose proper security depends on a third-party > administrator, you may not be better off than just storing the data under a > permissions regime that also depends on such an administrator. > > At some point, the data is valuable enough to put it on a dedicated server, > so that unauthorized access requires either a nasty hole in your application > that exposes it or physical access to the machine. > > Then you have to start thinking about unauthorized physical access. There > are lots of ways to make yourself comfortable in this regard, but part of me > keeps thinking that being on the overnight janitorial shift at a large > company or hosting provider would be a very lucrative job -- a USB DVD > writer and a few minutes access to a machine would provide access to lots > and lots of data that would be very valuable. > > David > > > On Tuesday, September 02, 2003 2:28 PM, wrote: > > > I'm encrypting smallish strings, probably not subject to attack but > > protected just in case. > > > > 1) I want passwords to be encrypted for storage, but decryptable so > > that they can be looked-up by an admin (over SSL) or (gasp!) sent to > > a user via email if the user has agreed in advance that this is a > > completely insecure thing to do. > > > > 2) I want to create an encrypted session cookie that includes the > > session id and a shared secret that changes with every request. > > > > 3) I'd also like to encrypt identity data like addresses and > > telephone numbers. > > > > This may at some point be used to protect access to quasi-financial > > data (credits in a game economy), but never credit card or social > > security numbers. I know that all of this is dependent on the > > encryption key remaining secret, but in a shared-database environment > > this seems like the right thing to do. > > > > chris. > > > > > > David Sklar wrote: > > > >> If you're at the point where the difference between TEA and Blowfish > >> is important to your application, then you should read Applied > >> Cryptography. > >> > >> What are you encrypting? For the differences between algorithms to > >> really matter, you should be analyzing how much ciphertext you're > >> generating, who's likely to snoop it, what kind of resources they > >> have, etc. > >> > >> For most web-based services, the likelihood of a bruteforce attack > >> (or slightly-less-than-brute-force based on a weakness of a > >> cryptosystem) is so, so, so much less than the likelihood of an > >> attack because someone was careless and left a key in an accesssible > >> place or chose an easily guessable key. A 56 bit key and a 1024 bit > >> key are equally weak when they're written on a post-it stuck to a > >> monitor. > >> > >> David > >> > >> > >> > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From sklar at sklar.com Tue Sep 2 16:14:54 2003 From: sklar at sklar.com (David Sklar) Date: Tue, 2 Sep 2003 16:14:54 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: Message-ID: Heh heh heh. That's why I keep my copy of the Mission Impossible NOC list written in invisible lemon juice ink on ricepaper. David > No matter what security you put in place, there is always the risk of > Sydney Bristow punching and kicking her way past security in her > high-heels, only to retrieve the data with a device that needs only to > be placed near the HD to read it and upload it to the SD-6 mainframe > via an undetectable satellite uplink where it will be child's play > for Marshal to decrypt. > > :) > From stephen at musgrave.org Tue Sep 2 16:36:10 2003 From: stephen at musgrave.org (Stephen Musgrave) Date: Tue, 02 Sep 2003 16:36:10 -0400 Subject: [nycphp-talk] MIME multipart email frustrations In-Reply-To: <3F4FCA7C.5060002@nyphp.org> Message-ID: Thank you all who replied to my query. I found the solution in "Mime Mail" in PEAR. It works great! However, before finally getting AOL to behave, I found out that it is extra sensitive to the Bcc: field. Thanks again! Stephen Musgrave // stephen at musgrave.org // http://musgrave.org // 718-486-6514 On 8/29/03 5:49 PM, "Hans Zaunere" wrote: > >> Here's a link to the resulting email file: >> >> http://musgrave.org/mutlipart-source.txt > > A couple of points... for one, according to the RFCs, all line-endings should > be \r\n > > And, the general form is a bit off; while the top level header's Content-type > is correct, the empty Status: header field might throw some clients off. And, > if I remember correctly, ending boundaries need an trailing '--'. But, as Dan > said, PEAR and phpclasses.org have tons of fairly complete classes for this > type of thing. > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Tue Sep 2 16:38:55 2003 From: csnyder at chxo.com (Chris Snyder) Date: Tue, 2 Sep 2003 16:38:55 -0400 Subject: [nycphp-talk] so-called triple md5 In-Reply-To: References: Message-ID: <20030902203855.GA70841@berylium.psydeshow.org> Little does she know that the -real- data is on the system that is hidden inside the Six Million Dollar Man lunchbox in the bottom of my ex-girlfriend's closet. I just run the server farm here at work as a honeypot. On Tue, Sep 02, 2003 at 04:11:43PM -0400, Brian Pang wrote: > No matter what security you put in place, there is always the risk of > Sydney Bristow punching and kicking her way past security in her > high-heels, only to retrieve the data with a device that needs only to > be placed near the HD to read it and upload it to the SD-6 mainframe via > an undetectable satellite uplink where it will be child's play for > Marshal to decrypt. > From danielc at analysisandsolutions.com Tue Sep 2 23:46:22 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 2 Sep 2003 23:46:22 -0400 Subject: [nycphp-talk] php in SecurityFocus Newsletter #212 Message-ID: <20030903034621.GA12489@panix.com> ----------------- EXCELLENT ARTICLE ----------------- Securing MySQL: step-by-step http://www.securityfocus.com/infocus/1726 ---------------- BUGS IN PHP APPS ---------------- newsPHP Remote File Include Vulnerability http://www.securityfocus.com/bid/8488 newsPHP Authentication Bypass Vulnerability http://www.securityfocus.com/bid/8489 PHPGACL Debugging Information Disclosure Vulnerability http://www.securityfocus.com/bid/8494 Py-Membres Secure.PHP Unauthorized Access Vulnerability http://www.securityfocus.com/bid/8499 Py-Membres Pass_done.PHP Remote SQL Injection Vulnerability http://www.securityfocus.com/bid/8500 Attila PHP SQL Injection Unauthorized Privileged Access Vuln... http://www.securityfocus.com/bid/8502 eNdonesia Mod Parameter Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8506 eNdonesia Mod Parameter Path Disclosure Vulnerability http://www.securityfocus.com/bid/8507 -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From soazine at erols.com Wed Sep 3 03:16:11 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 3 Sep 2003 03:16:11 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? Message-ID: <0dfe01c371eb$416a61d0$67a76244@philofsoa> I've seen the notation '&' floating around prefixing function names from time to time but I can't find any online resource that explains what it does. Can someone explain it to me? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Wed Sep 3 03:46:22 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 3 Sep 2003 03:46:22 -0400 Subject: [nycphp-talk] Help with evaluating a string into an actual PHP line Message-ID: <0e4901c371ef$78e96530$67a76244@philofsoa> The following lines are in a TCL script I wrote: #$xmlTclAssocArray = ('email.xml' => 'emailalert', 'feedback.xml' => 'feedback', 'pollresults.xml' => 'poll', 'profileMember.xml' => 'profile', 'triviaresults.xml' => 'trivia'); # THE PRECEDING LINE IS A COMMENTED-OUT PHP LINE TO BE USED BY alert_view_redirect.php Only the first line needs to be read by a PHP script, doing an fgets to obtain it, chopping off the "#" from it by doing a substr($arraySyntax, 1, strlen($arraySyntax) - 1) on it. But the trick is that I have to evaluate that line into an actual PHP command as this line is dynamically generated by TCL and not PHP. How then do I convert this string into an actual existing PHP line that will create an array called $xmlTclAssocArray? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Wed Sep 3 04:01:32 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 3 Sep 2003 04:01:32 -0400 Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! Message-ID: <0e6b01c371f1$96df27d0$67a76244@philofsoa> I need to store data into XML that, often enough, is not in English. How have you guys dealt with characters not found in the English language like ? or ? or ?? I have to store them as "å" in my XML file, however, whenever I am doing evaluation somehow the "å" gets converted literally to "?" and when that displays in HTML it chokes, puts garbage BACK into the XML file and it deteriorates further. How can I ensure that when going back and forth between HTML, PHP and XML that "å" REMAINS "å" AS IS??? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Wed Sep 3 01:42:45 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 3 Sep 2003 01:42:45 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? References: <0dfe01c371eb$416a61d0$67a76244@philofsoa> Message-ID: <005401c371de$337e27d0$6400a8c0@thinkpad> this explains it pretty well ... http://www.faqts.com/knowledge_base/view.phtml/aid/134/fid/40 - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 03, 2003 3:16 AM Subject: [nycphp-talk] What does function &get_ref() {} do? I've seen the notation '&' floating around prefixing function names from time to time but I can't find any online resource that explains what it does. Can someone explain it to me? Thanx Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Wed Sep 3 01:47:59 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 3 Sep 2003 01:47:59 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? References: <0dfe01c371eb$416a61d0$67a76244@philofsoa> Message-ID: <007001c371de$eeff8f30$6400a8c0@thinkpad> also ... http://www.php.net/manual/en/language.references.whatdo.php http://www.php.net/manual/en/language.references.return.php - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 03, 2003 3:16 AM Subject: [nycphp-talk] What does function &get_ref() {} do? I've seen the notation '&' floating around prefixing function names from time to time but I can't find any online resource that explains what it does. Can someone explain it to me? Thanx Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From southwell at dneba.com Wed Sep 3 09:03:50 2003 From: southwell at dneba.com (Michael Southwell) Date: Wed, 03 Sep 2003 09:03:50 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? In-Reply-To: <005401c371de$337e27d0$6400a8c0@thinkpad> References: <0dfe01c371eb$416a61d0$67a76244@philofsoa> Message-ID: <5.1.0.14.2.20030903090047.00b47630@mail.optonline.net> Here is the relevant portion of Jon's reference (illustrating &$var): ------------------------- function swap(&$var_1, &$var_2) { $temp = $var_1; $var_1 = $var_2; $var_2 = $temp; } $var_1 = 'I am var 1'; [etc] ----------------------------- doesn't this need global $var_1,$var_2; in the swap function? At 01:42 AM 9/3/2003, you wrote: >this explains it pretty well ... > >http://www.faqts.com/knowledge_base/view.phtml/aid/134/fid/40 > >- jon >----- Original Message ----- >From: Phil Powell >To: NYPHP Talk >Sent: Wednesday, September 03, 2003 3:16 AM >Subject: [nycphp-talk] What does function &get_ref() {} do? > >I've seen the notation '&' floating around prefixing function names from >time to time but I can't find any online resource that explains what it >does. Can someone explain it to me? > >Thanx >Phil > > >---------- >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From heli_travel at yahoo.com Wed Sep 3 09:21:20 2003 From: heli_travel at yahoo.com (LIAO YANG) Date: Wed, 3 Sep 2003 06:21:20 -0700 (PDT) Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! In-Reply-To: <0e6b01c371f1$96df27d0$67a76244@philofsoa> Message-ID: <20030903132120.51901.qmail@web12202.mail.yahoo.com> It is just a display problem. Characters are still the same, you may need a configure your browser or your system to display multiple languages! --- Phil Powell wrote: > I need to store data into XML that, often enough, is not in > English. How have you guys dealt with characters not found in > the English language like ? or ? or ?? I have to store them > as "?0?2" in my XML file, however, whenever I am doing > evaluation somehow the "?0?2" gets converted literally to > "?" and when that displays in HTML it chokes, puts garbage > BACK into the XML file and it deteriorates further. > > How can I ensure that when going back and forth between HTML, > PHP and XML that "?0?2" REMAINS "?0?2" AS IS??? > > Thanx > Phil> _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From crisscott at netzero.com Wed Sep 3 09:31:44 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Wed, 3 Sep 2003 13:31:44 GMT Subject: [nycphp-talk] What does function &get_ref() {} do? Message-ID: <20030903.063230.116.169941@webmail03.lax.untd.com> > doesn't this need global $var_1,$var_2; in the swap function? No. Normally variables passed to functions are just copies used in the function scope. When something is passed by reference (&$var), you are telling the function where to find the original variable. When a function uses a variable reference it can make changes to that variable outside of its own scope. From hans at nyphp.org Wed Sep 3 10:35:47 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 03 Sep 2003 10:35:47 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? In-Reply-To: <20030903.063230.116.169941@webmail03.lax.untd.com> References: <20030903.063230.116.169941@webmail03.lax.untd.com> Message-ID: <3F55FC43.6000803@nyphp.org> This is always a confusing topic, and I'd just like to point a couple things out; hopefully without confusing it more. >>doesn't this need global $var_1,$var_2; in the swap function? > > No. Normally variables passed to functions are just copies used in the function scope. Actually, variables are always passed by reference, although they are "weak". This means that as long as a argument isn't written to or changed in any way, inside the function, the variable's contents aren't copied. Only when the argument is written to, are the contents copied, ie copy-on-write. This doesn't apply, however to objects, IIRC. H From shiflett at php.net Wed Sep 3 10:44:51 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 3 Sep 2003 07:44:51 -0700 (PDT) Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! In-Reply-To: <0e6b01c371f1$96df27d0$67a76244@philofsoa> Message-ID: <20030903144451.18516.qmail@web14309.mail.yahoo.com> --- Phil Powell wrote: > How can I ensure that when going back and forth between HTML, PHP > and XML that "?" REMAINS "?" AS IS??? I don't really understand, but maybe you can use & for the ampersands? Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From dkrook at hotmail.com Wed Sep 3 11:20:23 2003 From: dkrook at hotmail.com (D C Krook) Date: Wed, 03 Sep 2003 11:20:23 -0400 Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! Message-ID: I had a similar problem parsing ampersands in XML and converting the page to XHTML via PHP. To end up with compliant XHTML entities, I had to double encode ampersands in the XML like so: Content Management, Versioning &#38; Delivery: If the sample above gets processed in your mail client, that's "ampersand - pound - 3 - 8 - pound - 3 - 8" > > How can I ensure that when going back and forth between HTML, PHP > > and XML that "?" REMAINS "?" AS IS??? > >I don't really understand, but maybe you can use & for the ampersands? > >Chris _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From sklar at sklar.com Wed Sep 3 11:25:51 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 3 Sep 2003 11:25:51 -0400 Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! In-Reply-To: Message-ID: You can also surround the encoded element content with markers, like this: David On Wednesday, September 03, 2003 11:20 AM, wrote: > I had a similar problem parsing ampersands in XML and converting the > page to XHTML via PHP. To end up with compliant XHTML entities, I > had to double encode ampersands in the XML like so: > > Content Management, Versioning &#38; > Delivery: > > If the sample above gets processed in your mail client, that's > "ampersand - pound - 3 - 8 - pound - 3 - 8" > > > > >>> How can I ensure that when going back and forth between HTML, PHP >>> and XML that "?" REMAINS "?" AS IS??? >> >> I don't really understand, but maybe you can use & for the >> ampersands? >> >> Chris > > _________________________________________________________________ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 3 12:04:25 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 3 Sep 2003 12:04:25 -0400 Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! References: <20030903144451.18516.qmail@web14309.mail.yahoo.com> Message-ID: <0f6001c37235$0c2dff00$67a76244@philofsoa> Actually I do my best coding at 4am! I figured it all out with htmlspecialchars() function. It stores it as "?" or "?" or whatever but can also allow for HTML to safely display it. Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Wednesday, September 03, 2003 10:44 AM Subject: Re: [nycphp-talk] Sorry guys, VERY bad coding night tonight! > --- Phil Powell wrote: > > How can I ensure that when going back and forth between HTML, PHP > > and XML that "?" REMAINS "?" AS IS??? > > I don't really understand, but maybe you can use & for the ampersands? > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 3 12:05:47 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 3 Sep 2003 12:05:47 -0400 Subject: [nycphp-talk] Sorry guys, VERY bad coding night tonight! References: Message-ID: <0f6a01c37235$3cb23150$67a76244@philofsoa> That's a great option for PHP to parse for XML, but unfortunately PHP is not the only language accessing the XML file - there is also a backend TCL script that also reads it; TCL not having any native XML processing syntax it would choke on Phil ----- Original Message ----- From: "David Sklar" To: "NYPHP Talk" Sent: Wednesday, September 03, 2003 11:25 AM Subject: RE: [nycphp-talk] Sorry guys, VERY bad coding night tonight! > You can also surround the encoded element content with > markers, like this: > > Delivery:]]> > > David > > On Wednesday, September 03, 2003 11:20 AM, wrote: > > > I had a similar problem parsing ampersands in XML and converting the > > page to XHTML via PHP. To end up with compliant XHTML entities, I > > had to double encode ampersands in the XML like so: > > > > Content Management, Versioning &#38; > > Delivery: > > > > If the sample above gets processed in your mail client, that's > > "ampersand - pound - 3 - 8 - pound - 3 - 8" > > > > > > > > > >>> How can I ensure that when going back and forth between HTML, PHP > >>> and XML that "?" REMAINS "?" AS IS??? > >> > >> I don't really understand, but maybe you can use & for the > >> ampersands? > >> > >> Chris > > > > _________________________________________________________________ > > MSN 8 with e-mail virus protection service: 2 months FREE* > > http://join.msn.com/?page=features/virus > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From southwell at dneba.com Wed Sep 3 14:33:46 2003 From: southwell at dneba.com (Michael Southwell) Date: Wed, 03 Sep 2003 14:33:46 -0400 Subject: [nycphp-talk] FUNDAMENTALS column announcement Message-ID: <5.1.0.14.2.20030903143133.00b2a660@mail.optonline.net> After a series of discussions among Hans, Jeff Siegel, and Mike Southwell, we are beginning a Fundamentals thread on the Talk list. The purpose of the thread is to provide a way for the highly experienced among you to help out those who are less experienced by offering your insights into best practices. The format will be as follows: a) We will pose a problem or issue (sometimes with a possible solution or two). b) The subject line of the posting will be "Fundamentals: ". c) After some discussion on the list, the whole thread will be collected and turned into a brief article that will then be posted on the website. Your participation will help to make this a success. Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From psaw at pswebcode.com Wed Sep 3 16:21:31 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Wed, 3 Sep 2003 16:21:31 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: <001e01c37258$f7c72d60$68e4a144@bronco> My question: Anyone got a working runaround suggestion to force file downloads on IE? My issue(s): I am using PHP to write HTTP headers to force pdf file download to user roughly as follows: blah, authenticate user, blah, select $file, blah... then push with... header ("Content-Type: application/octet-stream"); header("Content-Transfer-Encoding: Binary"); header("Content-Length: $iFileSize"); header ("Content-Disposition: attachment; filename=$iFileName"); readfile("$file"); Netscape conforms and opens the Save As... dialog as expected. IE6 messes up the content-disposition header and opens the download inline in the browser without prompting user to Save As... Seems regardless, of content-type header specified: application/octet-stream application/force-download application/pdf IE will mess it up. This is a known issue. Best run around I've seen so far is to .Zip the files, in which case IE offers the Save As... on the download. Don't want to zip em. Thoughts? Warmest regards, Peter Sawczynec, Technology Director PSWebcode -- Web Development and Site Architecture psaw at pswebcode.com www.pswebcode.com 718.543.3240 From suzerain at suzerain.com Wed Sep 3 16:31:44 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 3 Sep 2003 16:31:44 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: <001e01c37258$f7c72d60$68e4a144@bronco> References: <001e01c37258$f7c72d60$68e4a144@bronco> Message-ID: I may be wrong, but I think the only reason you're seeing the save as... dialog in Netscape is because the Adobe Acrobat web browser plugin doesn't run in Netscape anymore. AFAIK (and according to the system requirements), Acrobat seems to be implemented in ActiveX now, which will only work (on Windows) in IE. http://www.adobe.com/products/acrobat/acrrsystemreqs.html#60win So what I'm saying is that your script isn't what's controlling this; if the plugin was functioning in Netscape, NS would display it inline, too. To illustrate this, forget about PDF for a second, and pretend it's a JPEG. Try forcing a download of a JPEG. I don't believe you can do it, because the client-side browser controls how it will handle JPEGs (i.e., whether it will display inline or send to another viewer). Of course, as I said, I may be wrong. :) Marc Antony Vose http://www.suzerain.com/ The cost of liberty is less than the price of repression. -- W.E.B. Du Bois >My question: >Anyone got a working runaround suggestion to force file downloads on IE? > >My issue(s): >I am using PHP to write HTTP headers to force pdf file download to user >roughly as follows: > >blah, authenticate user, blah, select $file, blah... then push with... > >header ("Content-Type: application/octet-stream"); >header("Content-Transfer-Encoding: Binary"); >header("Content-Length: $iFileSize"); >header ("Content-Disposition: attachment; filename=$iFileName"); >readfile("$file"); > >Netscape conforms and opens the Save As... dialog as expected. IE6 messes up >the content-disposition header and opens the download inline in the browser >without prompting user to Save As... > >Seems regardless, of content-type header specified: >application/octet-stream >application/force-download >application/pdf > >IE will mess it up. This is a known issue. Best run around I've seen so far >is to .Zip the files, in which case IE offers the Save As... on the >download. Don't want to zip em. > >Thoughts? > >Warmest regards, > >Peter Sawczynec, Technology Director >PSWebcode -- Web Development and >Site Architecture >psaw at pswebcode.com >www.pswebcode.com >718.543.3240 > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Wed Sep 3 16:36:03 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 03 Sep 2003 16:36:03 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: I think this has been addressed in the archives already.. but maybe not specific to PDF this works for me. Still prompts to save, but fills in the filename. Does it work for you? header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$filename\""); $fd=fopen("$filePath","r"); fpassthru($fd); > My question: > Anyone got a working runaround suggestion to force file downloads on IE? > > My issue(s): > I am using PHP to write HTTP headers to force pdf file download to user > roughly as follows: > > blah, authenticate user, blah, select $file, blah... then push with... > > header ("Content-Type: application/octet-stream"); > header("Content-Transfer-Encoding: Binary"); > header("Content-Length: $iFileSize"); > header ("Content-Disposition: attachment; filename=$iFileName"); > readfile("$file"); > > Netscape conforms and opens the Save As... dialog as expected. IE6 messes up > the content-disposition header and opens the download inline in the browser > without prompting user to Save As... > > Seems regardless, of content-type header specified: > application/octet-stream > application/force-download > application/pdf > > IE will mess it up. This is a known issue. Best run around I've seen so far > is to .Zip the files, in which case IE offers the Save As... on the > download. Don't want to zip em. > > Thoughts? > > Warmest regards, > > Peter Sawczynec, Technology Director > PSWebcode -- Web Development and > Site Architecture > psaw at pswebcode.com > www.pswebcode.com > 718.543.3240 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From bpang at bpang.com Wed Sep 3 16:44:52 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 03 Sep 2003 16:44:52 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: that code snippet I posted should work similarily for jpgs or anything else... > I may be wrong, but I think the only reason you're seeing the save > as... dialog in Netscape is because the Adobe Acrobat web browser > plugin doesn't run in Netscape anymore. AFAIK (and according to the > system requirements), Acrobat seems to be implemented in ActiveX now, > which will only work (on Windows) in IE. > > http://www.adobe.com/products/acrobat/acrrsystemreqs.html#60win > > So what I'm saying is that your script isn't what's controlling this; > if the plugin was functioning in Netscape, NS would display it > inline, too. > > To illustrate this, forget about PDF for a second, and pretend it's a > JPEG. Try forcing a download of a JPEG. I don't believe you can do > it, because the client-side browser controls how it will handle JPEGs > (i.e., whether it will display inline or send to another viewer). > > Of course, as I said, I may be wrong. :) > > Marc Antony Vose > http://www.suzerain.com/ > > The cost of liberty is less than the price of repression. > -- W.E.B. Du Bois > > > > > >My question: > >Anyone got a working runaround suggestion to force file downloads on IE? > > > >My issue(s): > >I am using PHP to write HTTP headers to force pdf file download to user > >roughly as follows: > > > >blah, authenticate user, blah, select $file, blah... then push with... > > > >header ("Content-Type: application/octet-stream"); > >header("Content-Transfer-Encoding: Binary"); > >header("Content-Length: $iFileSize"); > >header ("Content-Disposition: attachment; filename=$iFileName"); > >readfile("$file"); > > > >Netscape conforms and opens the Save As... dialog as expected. IE6 messes up > >the content-disposition header and opens the download inline in the browser > >without prompting user to Save As... > > > >Seems regardless, of content-type header specified: > >application/octet-stream > >application/force-download > >application/pdf > > > >IE will mess it up. This is a known issue. Best run around I've seen so far > >is to .Zip the files, in which case IE offers the Save As... on the > >download. Don't want to zip em. > > > >Thoughts? > > > >Warmest regards, > > > >Peter Sawczynec, Technology Director > >PSWebcode -- Web Development and > >Site Architecture > >psaw at pswebcode.com > >www.pswebcode.com > >718.543.3240 > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From shiflett at php.net Wed Sep 3 16:49:12 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 3 Sep 2003 13:49:12 -0700 (PDT) Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: <001e01c37258$f7c72d60$68e4a144@bronco> Message-ID: <20030903204912.85186.qmail@web14303.mail.yahoo.com> --- "pswebcode, nyc" wrote: > header ("Content-Type: application/octet-stream"); > header("Content-Transfer-Encoding: Binary"); Get rid of Content-Transfer-Encoding. There is no such header. It shouldn't affect the outcome, but it's best to simplify the problem with as few errors as possible. :-) > header("Content-Length: $iFileSize"); > header ("Content-Disposition: attachment; filename=$iFileName"); The filename should be quoted. See if that makes a difference, and let us know. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From suzerain at suzerain.com Wed Sep 3 17:01:30 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 3 Sep 2003 17:01:30 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: References: Message-ID: >I think this has been addressed in the archives already.. >but maybe not specific to PDF > >this works for me. Still prompts to save, but fills in the filename. >Does it work for you? > > >header("Cache-Control: no-cache, must-revalidate"); >header("Pragma: no-cache"); >header("Content-type: application/octet-stream"); >header("Content-Disposition: attachment; filename=\"$filename\""); >$fd=fopen("$filePath","r"); >fpassthru($fd); > It's worth pointing out, I suppose, that to some systems (i.e., classic Mac OS), once you tell the browser that a JPEG (or PDF in your case) is "application/octet-stream", it is no longer a JPEG (or PDF). If this is a controlled Windows environment which relies on simple file extensions to identify files, you're probably fine, but if you don't know the types of clients that might connect, you run a risk of creating problems where people might double-click on the resulting downloaded file and nothing happenes, because the OS no longer recognizes it as a JPEG. Cheers, -- Marc Antony Vose http://www.suzerain.com/ Imagination is more important than knowledge. -- Albert Einstein From bpang at bpang.com Wed Sep 3 17:11:13 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 03 Sep 2003 17:11:13 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: oh yeah.. stupid Mac resource forks... good point I don't have enough experience with them, but I would guess that there is a way to append/pre-pend a resource fork to the file. does anyone know about this? or you could read the file's info or do the filename extension mapping yourself in the script and set the content-type accordingly. > >I think this has been addressed in the archives already.. > >but maybe not specific to PDF > > > >this works for me. Still prompts to save, but fills in the filename. > >Does it work for you? > > > > > >header("Cache-Control: no-cache, must-revalidate"); > >header("Pragma: no-cache"); > >header("Content-type: application/octet-stream"); > >header("Content-Disposition: attachment; filename=\"$filename\""); > >$fd=fopen("$filePath","r"); > >fpassthru($fd); > > > > > It's worth pointing out, I suppose, that to some systems (i.e., > classic Mac OS), once you tell the browser that a JPEG (or PDF in > your case) is "application/octet-stream", it is no longer a JPEG (or > PDF). > > If this is a controlled Windows environment which relies on simple > file extensions to identify files, you're probably fine, but if you > don't know the types of clients that might connect, you run a risk of > creating problems where people might double-click on the resulting > downloaded file and nothing happenes, because the OS no longer > recognizes it as a JPEG. > > Cheers, > -- > Marc Antony Vose > http://www.suzerain.com/ > > Imagination is more important than knowledge. > -- Albert Einstein > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From bpang at bpang.com Wed Sep 3 17:16:10 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 03 Sep 2003 17:16:10 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: hmm... IE 6.0.2 on *blush* Win98 uses the specified filename. will investigate further > Brian: On a quick test, this set of headers is forcing a Save As... dialog > on my IE6 on WINXP. Good so far. But the filename is the name of the php > page that sent down the headers and then the save fails.\ > > The following MS page contains a discussion of the issue I am having with > your headers an d additional links to more known issues surrounding force > download and IE: > http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com: > 80/support/kb/articles/Q279/6/67.ASP&NoWebContent=1 > > Thanks. > > PSaw > > -----Original Message----- > From: Brian Pang [mailto:bpang at bpang.com] > Sent: Wednesday, September 03, 2003 4:36 PM > To: psaw at pswebcode.com; NYPHP Talk > Subject: Re: [nycphp-talk] Force File Download HTTP Headers and IE Issue > > > I think this has been addressed in the archives already.. > but maybe not specific to PDF > > this works for me. Still prompts to save, but fills in the filename. Does it > work for you? > > > header("Cache-Control: no-cache, must-revalidate"); > header("Pragma: no-cache"); > header("Content-type: application/octet-stream"); > header("Content-Disposition: attachment; filename=\"$filename\""); > $fd=fopen("$filePath","r"); fpassthru($fd); > > > > My question: > > Anyone got a working runaround suggestion to force file downloads on > > IE? > > > > My issue(s): > > I am using PHP to write HTTP headers to force pdf file download to > > user roughly as follows: > > > > blah, authenticate user, blah, select $file, blah... then push with... > > > > header ("Content-Type: application/octet-stream"); > > header("Content-Transfer-Encoding: Binary"); > > header("Content-Length: $iFileSize"); > > header ("Content-Disposition: attachment; filename=$iFileName"); > > readfile("$file"); > > > > Netscape conforms and opens the Save As... dialog as expected. IE6 > messes up > > the content-disposition header and opens the download inline in the > browser > > without prompting user to Save As... > > > > Seems regardless, of content-type header specified: > > application/octet-stream application/force-download > > application/pdf > > > > IE will mess it up. This is a known issue. Best run around I've seen > so far > > is to .Zip the files, in which case IE offers the Save As... on the > > download. Don't want to zip em. > > > > Thoughts? > > > > Warmest regards, > > > > Peter Sawczynec, Technology Director > > PSWebcode -- Web Development and > > Site Architecture > > psaw at pswebcode.com > > www.pswebcode.com > > 718.543.3240 > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > From jeffknight at mac.com Wed Sep 3 17:36:07 2003 From: jeffknight at mac.com (Jeff Knight) Date: Wed, 3 Sep 2003 17:36:07 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue Message-ID: From the reader comments at php.net/manual http://www.php.net/manual/en/function.header.php (I'm not being a RTFM smartass, I just happened to be there very recently) simon dot lee at terago dot ca 28-May-2002 05:50 Additional notes to my workaround on Q266305: I have tested my findings with PDF, XLS, DOC and ZIP. However JPG and GIF didn't make IE pop up the download box.? By changing content type from "octet-stream" to "force-download" (or some undefined type), it will work. Of course, we need to take care of other browsers too. Here is the improved code, hope it helps: header("Content-type: application/force-download"); if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")) ? header("Content-Disposition: filename=$myfile" . "%20"); // For IE else ? header("Content-Disposition: attachment; filename=$myfile"); ? ? // For Other browsers Note: If you are using session together with this download, you will need to add the following line BEFORE the code above to make IE work: session_cache_limiter(""); ====== It (or some other voodoo) got my thing working.... good luck. Of course, while you're there you'll also find an endless discussion of ."%20", other IE 6, 5, 4, 3, 2, 1 and Opera on my Highly Customized Toilet discussions.... On Wednesday, September 3, 2003, at 04:21 PM, pswebcode, nyc wrote: > My question: > Anyone got a working runaround suggestion to force file downloads on > IE? > > My issue(s): > I am using PHP to write HTTP headers to force pdf file download to user > roughly as follows: > > blah, authenticate user, blah, select $file, blah... then push with... > > header ("Content-Type: application/octet-stream"); > header("Content-Transfer-Encoding: Binary"); > header("Content-Length: $iFileSize"); > header ("Content-Disposition: attachment; filename=$iFileName"); > readfile("$file"); > > Netscape conforms and opens the Save As... dialog as expected. IE6 > messes up > the content-disposition header and opens the download inline in the > browser > without prompting user to Save As... > > Seems regardless, of content-type header specified: > application/octet-stream > application/force-download > application/pdf > > IE will mess it up. This is a known issue. Best run around I've seen > so far > is to .Zip the files, in which case IE offers the Save As... on the > download. Don't want to zip em. > > Thoughts? > > Warmest regards, > > Peter Sawczynec, Technology Director > PSWebcode -- Web Development and > Site Architecture > psaw at pswebcode.com > www.pswebcode.com > 718.543.3240 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From shiflett at php.net Wed Sep 3 17:38:45 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 3 Sep 2003 14:38:45 -0700 (PDT) Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: Message-ID: <20030903213845.92412.qmail@web14303.mail.yahoo.com> --- Marc Antony Vose wrote: > It's worth pointing out, I suppose, that to some systems (i.e., > classic Mac OS), once you tell the browser that a JPEG (or PDF in > your case) is "application/octet-stream", it is no longer a JPEG > (or PDF). Can you explain that? I don't understand how it could matter after the resource has been downloaded and saved to the filesystem. Typically, the content type described in the HTTP response is used by the HTTP client only. I'm certainly not arguing, but I'd like that explained further if you are certain it is true. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From max at idsociety.com Wed Sep 3 18:15:05 2003 From: max at idsociety.com (max goldberg) Date: Wed, 03 Sep 2003 18:15:05 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: <001e01c37258$f7c72d60$68e4a144@bronco> References: <001e01c37258$f7c72d60$68e4a144@bronco> Message-ID: <3F5667E9.4050507@idsociety.com> I had this problem quite a few months ago. I don't remember what exactly causes the problem, but I remember the solution was that I was forced to write the file to disk, and then open it back up and shoot it out. A similar problem occurs with mod_rewrite and IE6 from a bug thats been in IE6 for > 2 years. They are pretty lazy when it comes to fixing stuff like this. Anyway, try writing the file to disk first and see if that helps. -Max pswebcode, nyc wrote: > My question: > Anyone got a working runaround suggestion to force file downloads on IE? > > My issue(s): > I am using PHP to write HTTP headers to force pdf file download to user > roughly as follows: > > blah, authenticate user, blah, select $file, blah... then push with... > > header ("Content-Type: application/octet-stream"); > header("Content-Transfer-Encoding: Binary"); > header("Content-Length: $iFileSize"); > header ("Content-Disposition: attachment; filename=$iFileName"); > readfile("$file"); > > Netscape conforms and opens the Save As... dialog as expected. IE6 messes up > the content-disposition header and opens the download inline in the browser > without prompting user to Save As... > > Seems regardless, of content-type header specified: > application/octet-stream > application/force-download > application/pdf > > IE will mess it up. This is a known issue. Best run around I've seen so far > is to .Zip the files, in which case IE offers the Save As... on the > download. Don't want to zip em. > > Thoughts? > > Warmest regards, > > Peter Sawczynec, Technology Director > PSWebcode -- Web Development and > Site Architecture > psaw at pswebcode.com > www.pswebcode.com > 718.543.3240 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From suzerain at suzerain.com Wed Sep 3 19:48:19 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 3 Sep 2003 19:48:19 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: <20030903213845.92412.qmail@web14303.mail.yahoo.com> References: <20030903213845.92412.qmail@web14303.mail.yahoo.com> Message-ID: >--- Marc Antony Vose wrote: >> It's worth pointing out, I suppose, that to some systems (i.e., >> classic Mac OS), once you tell the browser that a JPEG (or PDF in >> your case) is "application/octet-stream", it is no longer a JPEG >> (or PDF). > >Can you explain that? I don't understand how it could matter after >the resource >has been downloaded and saved to the filesystem. Typically, the content type >described in the HTTP response is used by the HTTP client only. > >I'm certainly not arguing, but I'd like that explained further if you are >certain it is true. > Well, the whole file metadata thing is a huge can of worms. So, before I say anything to explain, I'll say: (1) This probably is only a problem in this instance with Classic Mac OS (meaning, prior to X). Therefore, your amount of caring might be minimal. I say, test it on every single browser you care about supporting, and if it works, then you've made your choice. Anyway, the explanation is lengthy, and it's a hot debate in the Mac community right now, because Apple is (in a lot of people's minds) moving backwards by adopting the Windows/Unix file extension setup, instead of creating a more sophisticated file metadata architecture in the OS. The way files are organized in Mac OS is that they have a data fork and a resource fork. Unix and Windows systems don't have this, so generally when files from a Mac are put on a Web site, the resource fork is stripped. (Mac OS X, by the way, can utilize the resource fork if present, and then has a backup mapping from the extension. This is a bit of an oversimplification, but it is pretty much accurate.) Anyway, as Brian said earlier, "stupid Mac resource forks". And, in this case, it sucks for the programmer, because it makes life more difficult if you choose to care about it. Then again, it could be argued that calling a PDF an "octet-stream" just to get around file download limitations of the browser maybe isn't the best solution from the standpoint of interoperability and just "the way things ought to be done", so that everything is certain to work on future (as yet undesigned) systems, and so forth. IMHO opinion, MIME types are there for a reason, and for the good of standards and interoperability, people should be sending out the proper MIME types with the file, instead of trying to fool the browser into doing something else. So, if I was doing this project, my choice would probably be to ZIP the file, especially since ZIP files seem to be so pervasive these days that they are auto-extracted anyway. But, to each his/her own, and I am not meaning to be critical, or anything. So, anyway, what most Mac browsers seemed to be doing (under OS 9 and earlier) is this: If they received an octet stream (or a generic data stream), if they could determine the file type, they appeared to add a resource fork onto the file (sometimes) which allowed the OS to map the file properly. However, many times, the file would just be downloaded and end up with the blank page icon which, when clicked, wouldn't open. (I've specifically seen this problem with PDF files, by the way.) Now, to get religious for a bit: The main advantage of the resource fork becomes clear when you use a Mac on a daily basis. The thing is, in Windows, if you double-click a JPG...any JPG...it opens with the program that's the default for opening JPEGs. Obviously, this is silly, because you might want to have one JPEG associated with Photoshop and another associated with Preview, or whatever. That's what the resource fork allows the OS to do: separate the type of file from the creator of the file. It also frees the user from stupidly having to have a file extension on every file. So, you can just call your file "Letter to Bob Jones", rather than "Letter to Bob Jones.doc". Just easier from a user's standpoint. There was a lengthy article on ArsTechnica about this a while ago. I have my own opinions on file metadata which I won't go into now. ;) Cheers, Marc From hans at nyphp.org Wed Sep 3 21:21:25 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 03 Sep 2003 21:21:25 -0400 Subject: [nycphp-talk] FUNDAMENTALS column announcement In-Reply-To: <5.1.0.14.2.20030903143133.00b2a660@mail.optonline.net> References: <5.1.0.14.2.20030903143133.00b2a660@mail.optonline.net> Message-ID: <3F569395.5010304@nyphp.org> Michael Southwell wrote: > After a series of discussions among Hans, Jeff Siegel, and Mike Southwell, > we are beginning a Fundamentals thread on the Talk list. The purpose of > the thread is to provide a way for the highly experienced among you to help > out those who are less experienced by offering your insights into best > practices. The format will be as follows: > a) We will pose a problem or issue (sometimes with a possible > solution or two). > b) The subject line of the posting will be "Fundamentals: of problem>". > c) After some discussion on the list, the whole thread will be > collected and > turned into a brief article that will then be posted on the website. > > Your participation will help to make this a success. This will be a great addition to the mailing list, and PHP resources in general. I hope everyone will be eager to weigh in and voice their techniques for the various topics. There truly are no wrong answers, and with everyone's techniques and opinions will come a valuable lesson. As the topics are posted on this list, I'll be maintaining a current news event on the nyphp.org front-page so that people can stay abreast of the current discussion topics. A big thank you to you both for working on this over the last month, H From csnyder at chxo.com Wed Sep 3 21:34:49 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 03 Sep 2003 21:34:49 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: References: <20030903213845.92412.qmail@web14303.mail.yahoo.com> Message-ID: <3F5696B9.6090702@chxo.com> Excellent explanation, Marc! It's true that the mime-type should always be an accurate description of the file, but application/octet-stream is accurate, if overly general. Perhaps what was missing from Macintosh's Classic metadata handling was a way for the user to easily change the filetype, by adding a .pdf to the filename, for example? (it's been a long time...) The reson for the behavior, while not explained, is set forth in RFC 2616, the HTTP 1.1 specification: "If this header [Content-disposition: attachment] is used in a response with the application/octet-stream content-type, the implied suggestion is that the user agent should not display the response, but directly enter a `save response as...' dialog." Otherwise, the browser is only supposed to use the Content-disposition header for discovering the file name in case the user wants to save the file after viewing it. If you're really curious, that's on about page 170 of ftp://ftp.isi.edu/in-notes/rfc2616.txt (thank you, Mozilla, for type-ahead find!) chris. From pl at eskimo.com Wed Sep 3 22:52:47 2003 From: pl at eskimo.com (Peter Lehrer) Date: Wed, 3 Sep 2003 22:52:47 -0400 Subject: [nycphp-talk] What does function &get_ref() {} do? References: <0dfe01c371eb$416a61d0$67a76244@philofsoa> <5.1.0.14.2.20030903090047.00b47630@mail.optonline.net> Message-ID: <00b501c3728f$a06577c0$902c0242@peter1> What you are doing is passing a reference to $var_1 and $var_2. In this way, you can change the values of these variables outside the scope of the function. Peter L. ----- Original Message ----- From: "Michael Southwell" To: "NYPHP Talk" Sent: Wednesday, September 03, 2003 9:03 AM Subject: Re: [nycphp-talk] What does function &get_ref() {} do? > Here is the relevant portion of Jon's reference (illustrating &$var): > ------------------------- > function swap(&$var_1, &$var_2) > { > $temp = $var_1; > $var_1 = $var_2; > $var_2 = $temp; > } > > $var_1 = 'I am var 1'; > [etc] > ----------------------------- > > doesn't this need global $var_1,$var_2; in the swap function? > > > At 01:42 AM 9/3/2003, you wrote: > >this explains it pretty well ... > > > >http://www.f aqts.com/knowledge_base/view.phtml/aid/134/fid/40 > > > >- jon > >----- Original Message ----- > >From: Phil Powell > >To: NYPHP Talk > >Sent: Wednesday, September 03, 2003 3:16 AM > >Subject: [nycphp-talk] What does function &get_ref() {} do? > > > >I've seen the notation '&' floating around prefixing function names from > >time to time but I can't find any online resource that explains what it > >does. Can someone explain it to me? > > > >Thanx > >Phil > > > > > >---------- > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > Michael G. Southwell ================================= > DNEBA Enterprises > 81 South Road > Bloomingdale, NJ 07403-1419 > 973/492-7873 (voice and fax) > southwell at dneba.com > http://www.dneba.com > ====================================================== > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Thu Sep 4 06:59:14 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 04 Sep 2003 06:59:14 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: <002201c372d3$9534b070$6401a8c0@EZDSDELL> FUNDAMENTALS #1: Site Structure: Where to Locate Includes? Index.php is always located in a website's document root, /var/www/html/ on a Linux box. Where should includes be located? Here are some possibilities: * in the same directory, /var/www/html/ * in a subdirectory of document root, /var/www/html/includes/ * in a parallel directory to document root, /var/www/includes What are the advantages and disadvantages of each possibility? IN THE SAME DIRECTORY * simple * but confusing and cluttered if there are more than just a few IN A SUBDIRECTORY * provides a logical place for them * but exposes them to browsers IN A PARALLEL DIRECTORY * provides a logical place for them * doesn't expose them to browsers * but perhaps write privileges are not available (or needed?) What does exposure matter? If the include file contains html, it will be visible in the calling file's source code. If it contains php code (like a database connection), it will never be visible anyway. Are there important principles here, or is location just a matter of preference? ======================================================================= Don't know what this posting is all about? See: http://lists.nyphp.org/pipermail/talk/2003-September/005049.html ======================================================================= Jeff From seth at ghiek.com Thu Sep 4 07:33:00 2003 From: seth at ghiek.com (Seth [Ghiek]) Date: Thu, 4 Sep 2003 07:33:00 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <002201c372d3$9534b070$6401a8c0@EZDSDELL> Message-ID: The parallel directory to document root, /var/www/includes, is my vote. No matter what happens, the .inc files are not available to anyone other than those who have ftp access. Once you have decided that your .inc files are outside the public area, it is an easy matter to consistently format your require statements that are within your .php code. Locating .inc files in a parallell directory to the document root reduces one less factor (ie, noone but u can get to them) that causes headaches later. Why think about the possibility of a prob when u can discount it completely? spirits, seth j hersh -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff Sent: Thursday, September 04, 2003 6:59 AM To: 'NYPHP Talk' Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure FUNDAMENTALS #1: Site Structure: Where to Locate Includes? Index.php is always located in a website's document root, /var/www/html/ on a Linux box. Where should includes be located? Here are some possibilities: * in the same directory, /var/www/html/ * in a subdirectory of document root, /var/www/html/includes/ * in a parallel directory to document root, /var/www/includes What are the advantages and disadvantages of each possibility? IN THE SAME DIRECTORY * simple * but confusing and cluttered if there are more than just a few IN A SUBDIRECTORY * provides a logical place for them * but exposes them to browsers IN A PARALLEL DIRECTORY * provides a logical place for them * doesn't expose them to browsers * but perhaps write privileges are not available (or needed?) What does exposure matter? If the include file contains html, it will be visible in the calling file's source code. If it contains php code (like a database connection), it will never be visible anyway. Are there important principles here, or is location just a matter of preference? ======================================================================= Don't know what this posting is all about? See: http://lists.nyphp.org/pipermail/talk/2003-September/005049.html ======================================================================= Jeff _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jim at bizcomputinginc.com Thu Sep 4 08:27:59 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Thu, 4 Sep 2003 08:27:59 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure References: <002201c372d3$9534b070$6401a8c0@EZDSDELL> Message-ID: <00e201c372df$fa9e2ed0$6501a8c0@Notebook> My choice has always been in a subdirectory of root. To satisfy security requirements I use the .php extension so even though the files are exposed to the browser, they are still run on the server when directly queried. The subdir provides a clean organization and an easy deployment with tools like DreamWeaver. Jim From hans at nyphp.org Thu Sep 4 10:01:51 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 04 Sep 2003 10:01:51 -0400 Subject: [nycphp-talk] quick regex question Message-ID: <3F5745CF.1090405@nyphp.org> Given: $swipe = 'A405E,;095612813=1227?2003/08/20 10:51:15 4A4'; preg_match('/\;(.+)\=/s',$swipe,$match); This fills $match as: array(2) { [0]=> string(11) ";095612813=" [1]=> string(9) "095612813" } Can I modify my subpattern somehow, so that only the second element of the array is returned? I don't need the whole string, just the matched pattern itself (ie, I don't need the ';' and '=' chars in the result). Hopefully I can get my work done and give my take on the fundamentals! Thanks, H From sklar at sklar.com Thu Sep 4 10:03:19 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 4 Sep 2003 10:03:19 -0400 Subject: [nycphp-talk] quick regex question In-Reply-To: <3F5745CF.1090405@nyphp.org> Message-ID: preg_match() always returns the text that matched the entire pattern as the first element of the $match array. So the only way to have a match array that contains just the numbers that match your current parenthesized subpattern is to have an entire pattern that matches just those numbers from the string. Which I don't think you can do. Why do you want to do this? David > Given: > > $swipe = 'A405E,;095612813=1227?2003/08/20 10:51:15 4A4'; > > preg_match('/\;(.+)\=/s',$swipe,$match); > > This fills $match as: > > array(2) { > [0]=> > string(11) ";095612813=" > [1]=> > string(9) "095612813" > } > > > Can I modify my subpattern somehow, so that only the second > element of the array is returned? I don't need the whole string, > just the matched pattern itself (ie, I don't need the ';' and '=' > chars in the result). > > Hopefully I can get my work done and give my take on the > fundamentals! Thanks, > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From sklar at sklar.com Thu Sep 4 10:10:02 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 4 Sep 2003 10:10:02 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <002201c372d3$9534b070$6401a8c0@EZDSDELL> Message-ID: > FUNDAMENTALS #1: Site Structure: Where to Locate Includes? I set things up like this: Document root: /www/www.sitename.com/docroot Includes: /www/www.sitename.com/support Individual pathnames and directory names, of course, don't really matter, but it's important to locate includes outside of the document root. You can configure your web server to not server include files based on extension or parse include files as PHP based on extension, but then you're in trouble if you ever have an include file with a different extension (on purpose, by accident, because you edited one in-place with emacs and ended up with foo.inc~, etc.) Putting includes outside of the document root also lets you put other things in that include directory: PHP scripts that run not as a response to requests (cron jobs, other maintenance scripts, etc), other programs, data files that aren't PHP, etc. Dividing things like this makes it easier to group files into CVS modules that are used for different purposes. For example, let's say things are organized like this: Document root: /www/www.sitename.com/docroot Includes for database access: /www/www.sitename.com/support/db Includes for site layout and formatting: /www/www.sitename.com/support/layout Scripts run by cron: /www/www.sitename.com/support/cron Textfiles containing data feeds: /www/www.sitename.com/support/feeds Each of these directories can be a separate CVS module. If you have a machine that just needs to run cron scripts (which themselves need database access), you can just check out (or export) the support/db and support/cron modules on that machine instead of all the code. Other combinations can be similarly modular. If everything is piled under the document root, you don't have that kind of flexibility. David From hans at nyphp.org Thu Sep 4 10:20:16 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 04 Sep 2003 10:20:16 -0400 Subject: [nycphp-talk] quick regex question In-Reply-To: References: Message-ID: <3F574A20.9010703@nyphp.org> David Sklar wrote: > preg_match() always returns the text that matched the entire pattern as the > first element of the $match array. So the only way to have a match array > that contains just the numbers that match your current parenthesized > subpattern is to have an entire pattern that matches just those numbers from > the string. Which I don't think you can do. > > Why do you want to do this? That's a good question :) I guess I just want to be sure that the second element of the array will always be what I need. I came across this in the PHP manual ( An assertion subpattern is matched in the normal way, except that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?! for negative assertions. For example, \w+(?=;) matches a word followed by a semicolon, but does not include the semicolon in the match, and > > David > > >>Given: >> >>$swipe = 'A405E,;095612813=1227?2003/08/20 10:51:15 4A4'; >> >>preg_match('/\;(.+)\=/s',$swipe,$match); >> >>This fills $match as: >> >>array(2) { >> [0]=> >> string(11) ";095612813=" >> [1]=> >> string(9) "095612813" >>} >> >> >>Can I modify my subpattern somehow, so that only the second >>element of the array is returned? I don't need the whole string, >>just the matched pattern itself (ie, I don't need the ';' and '=' >>chars in the result). >> >>Hopefully I can get my work done and give my take on the >>fundamentals! Thanks, >> >>H >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Thu Sep 4 10:23:04 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 04 Sep 2003 10:23:04 -0400 Subject: [nycphp-talk] quick regex question In-Reply-To: References: Message-ID: <3F574AC8.2030605@nyphp.org> Shoot, sorry folks; Mozilla got a little too eager to send the message.... Anyway... David Sklar wrote: > preg_match() always returns the text that matched the entire pattern as the > first element of the $match array. So the only way to have a match array > that contains just the numbers that match your current parenthesized > subpattern is to have an entire pattern that matches just those numbers from > the string. Which I don't think you can do. > > Why do you want to do this? That's a good question :) I guess I just want to be sure that the second element of the array will always be what I need. I came across this in the PHP manual (http://us3.php.net/manual/en/pcre.pattern.syntax.php): "An assertion subpattern is matched in the normal way, except that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?! for negative assertions. For example, \w+(?=;) matches a word followed by a semicolon, but does not include the semicolon in the match, and...." Which basically does what I need, although maybe for the wrong reasons. As long as I can be sure the second array is the matched pattern, I have no problem with it. Although, I for large strings I could see this behavior as annoying; ie, having the first element a 10k string that's always ignored. H From sklar at sklar.com Thu Sep 4 10:17:31 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 4 Sep 2003 10:17:31 -0400 Subject: [nycphp-talk] quick regex question In-Reply-To: <3F574A20.9010703@nyphp.org> Message-ID: > That's a good question :) I guess I just want to be sure that > the second element of the array will always be what I need. I > came across this in the PHP manual ( > > An assertion subpattern is matched in the normal way, except > that it does not cause the current matching position to be > changed. Lookahead assertions start with (?= for positive > assertions and (?! for negative assertions. For example, > > \w+(?=;) > > matches a word followed by a semicolon, but does not include > the semicolon in the match, and But even if you use an assertion, the assertion is still part of the entire pattern that matches, so the stuff that matches the assertion will be part of $match[0]. David From dkrook at hotmail.com Thu Sep 4 10:46:05 2003 From: dkrook at hotmail.com (D C Krook) Date: Thu, 04 Sep 2003 10:46:05 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: My vote is for a directory under the web root, since it gives better flexibility to deploy code from machine to machine with a minimum of hassle, kind of like packaging a Java web application in a nice tidy WAR file that doesn't care about an absolutely mapped OS path. Granted you keep your classes and beans in a protected "/WEB-INF" directory under this web root, but your standard includes stay in the publicly accessible web root. I'm also a fan of naming the includes directory "/inc". That way you have a set of directories whose contents are somewhat self evident based on their file extensions or calling tag name, e.g., standard.css goes in "/css", functions.js goes in "/js", images of all sorts go in "/img". Another upshot to this naming convention is that you never worry about whether you called it "/include" or "/includes" or "/image" or "/images". _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From David.SextonJr at ubs.com Thu Sep 4 10:47:04 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 4 Sep 2003 10:47:04 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: <18D7B8CAA5284F478470828806DB124603789F3B@psle01.xchg.pwj.com> I try to keep all the includes in a central location that is not under the web root. The reason is that it's easy to use components across multiple sites and everything is easy to locate. I typically use a file naming convention for the include files within that central directory to identify which ones are site specific or general purpose or whatever the case may be. I don't really feel that exposure is much of an issue because I haven't heard of any vulnerabilities where a user can stop the server from parsing the PHP code. I have, however, seen exploits on unpatched NT servers that allow you to read any file on the target's filesystem using simple DOS commands. SO, I guess if you're up to date on all your patches, security concerns shouldn't influence anyone's decision to place includes in location A rather the B. -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, September 04, 2003 6:59 AM To: 'NYPHP Talk' Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure FUNDAMENTALS #1: Site Structure: Where to Locate Includes? Index.php is always located in a website's document root, /var/www/html/ on a Linux box. Where should includes be located? Here are some possibilities: * in the same directory, /var/www/html/ * in a subdirectory of document root, /var/www/html/includes/ * in a parallel directory to document root, /var/www/includes What are the advantages and disadvantages of each possibility? IN THE SAME DIRECTORY * simple * but confusing and cluttered if there are more than just a few IN A SUBDIRECTORY * provides a logical place for them * but exposes them to browsers IN A PARALLEL DIRECTORY * provides a logical place for them * doesn't expose them to browsers * but perhaps write privileges are not available (or needed?) What does exposure matter? If the include file contains html, it will be visible in the calling file's source code. If it contains php code (like a database connection), it will never be visible anyway. Are there important principles here, or is location just a matter of preference? ======================================================================= Don't know what this posting is all about? See: http://lists.nyphp.org/pipermail/talk/2003-September/005049.html ======================================================================= Jeff _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From sklar at sklar.com Thu Sep 4 10:54:44 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 4 Sep 2003 10:54:44 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <18D7B8CAA5284F478470828806DB124603789F3B@psle01.xchg.pwj.com> Message-ID: > SO, I guess if you're up to > date on all your patches, security concerns shouldn't influence > anyone's decision to place includes in location A rather the B. Being "up to date on all your patches" is a theoretical goal state never achieved in practice for any signficant length of time. Even if you think you've installed all of the currently available and relevant patches for all of the software running on your web server, your database server, your VPN server, your firewall, your dialup server, your employee desktops, your coffee maker, and your pet hamster, new vulnerabilities will be discovered and new patches released. Security concerns should definitely influence how you organize your site. Running Apache and/or MySQL in a chroot jail, for example, is still a good idea even for the patch-vigilant. David From shiflett at php.net Thu Sep 4 11:09:29 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 4 Sep 2003 08:09:29 -0700 (PDT) Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: Message-ID: <20030904150929.68148.qmail@web14308.mail.yahoo.com> --- D C Krook wrote: > My vote is for a directory under the web root, since it gives > better flexibility to deploy code from machine to machine with > a minimum of hassle I'd be curious to see a poll on this topic now. It seems that the majority of people who have responded to this question consider a security risk an acceptable price to pay for a small convenience. I guess the answers could break down into three categories: 1. I place my includes under document root for convenience, and I'm not aware of any problems that could cause. 2. I understand the risk in doing so, but I still place my includes under document root. 3. I place my includes outside of document root. It is a simple task, and it is at least more secure than doing otherwise. I am seeing a lot of people who fit into category 2. Does the convenience really seem worth the risk? I'm honestly curious - not trying to be a smart ass. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From David.SextonJr at ubs.com Thu Sep 4 11:10:02 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 4 Sep 2003 11:10:02 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: <18D7B8CAA5284F478470828806DB124603789F3C@psle01.xchg.pwj.com> True. I guess it's actually a moot point since we're talking about security in general. Whether you place your files in one directory or another... if someone gains significant access to the box, you're exposed. Then again, someone gaining FTP access using brute force could download the PHP source code if it's in a readable directory, and considering many hosts grant FTP access to your webroot, it would be safer to place the files somewhere else. -----Original Message----- From: David Sklar [mailto:sklar at sklar.com] Sent: Thursday, September 04, 2003 10:55 AM To: NYPHP Talk Subject: RE: [nycphp-talk] FUNDAMENTALS #1: Site Structure > SO, I guess if you're up to > date on all your patches, security concerns shouldn't influence > anyone's decision to place includes in location A rather the B. Being "up to date on all your patches" is a theoretical goal state never achieved in practice for any signficant length of time. Even if you think you've installed all of the currently available and relevant patches for all of the software running on your web server, your database server, your VPN server, your firewall, your dialup server, your employee desktops, your coffee maker, and your pet hamster, new vulnerabilities will be discovered and new patches released. Security concerns should definitely influence how you organize your site. Running Apache and/or MySQL in a chroot jail, for example, is still a good idea even for the patch-vigilant. David _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From fields at surgam.net Thu Sep 4 11:23:09 2003 From: fields at surgam.net (Adam Fields) Date: Thu, 4 Sep 2003 11:23:09 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <20030904150929.68148.qmail@web14308.mail.yahoo.com> References: <20030904150929.68148.qmail@web14308.mail.yahoo.com> Message-ID: <20030904152309.GA8196@eye.surgam.net> On Thu, Sep 04, 2003 at 08:09:29AM -0700, Chris Shiflett wrote: > I guess the answers could break down into three categories: > > 1. I place my includes under document root for convenience, and I'm not aware > of any problems that could cause. > 2. I understand the risk in doing so, but I still place my includes under > document root. > 3. I place my includes outside of document root. It is a simple task, and it is > at least more secure than doing otherwise. I typically name my includes with .inc extensions and set Apache to not serve those files directly. This is both relatively convenient and relatively secure. -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From jonbaer at jonbaer.net Thu Sep 4 11:20:33 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 4 Sep 2003 11:20:33 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure References: <20030904150929.68148.qmail@web14308.mail.yahoo.com> Message-ID: <009801c372f8$159359a0$6400a8c0@thinkpad> i find it kinda odd that the only advise suggested on the topic in Security Focus's "Securing PHP" is to simply make the includes + classes w/ the same mime-type as a php app: http://www.securityfocus.com/infocus/1706 -snip- AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php .inc AddType application/x-httpd-php .class It is worth to note that besides "*.php", two extensions have been added as PHP scripts: "*.inc" and "*.class". Programmers often include additional files, with an extension like "*.inc", "*.class" or similar. Because by default those extensions are treated as regular files, the requests to download them will reveal the source code comprised in them. This can lead to revealing passwords or other sensitive information. -snip- - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From fields at surgam.net Thu Sep 4 11:51:25 2003 From: fields at surgam.net (Adam Fields) Date: Thu, 4 Sep 2003 11:51:25 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <18D7B8CAA5284F478470828806DB124603789F3C@psle01.xchg.pwj.com> References: <18D7B8CAA5284F478470828806DB124603789F3C@psle01.xchg.pwj.com> Message-ID: <20030904155125.GC8196@eye.surgam.net> On Thu, Sep 04, 2003 at 11:10:02AM -0400, Sexton, David wrote: > True. I guess it's actually a moot point since we're talking about security > in general. Whether you place your files in one directory or another... if > someone gains significant access to the box, you're exposed. Then again, > someone gaining FTP access using brute force could download the PHP source > code if it's in a readable directory, and considering many hosts grant FTP > access to your webroot, it would be safer to place the files somewhere else. If you use FTP, you're asking to be hacked anyway. Use SFTP, SCP, or WebDAV over SSL (this last is my preference for ease of use). Demand this of your service providers. -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From hans at nyphp.org Thu Sep 4 12:45:59 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 04 Sep 2003 12:45:59 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <002201c372d3$9534b070$6401a8c0@EZDSDELL> References: <002201c372d3$9534b070$6401a8c0@EZDSDELL> Message-ID: <3F576C47.50601@nyphp.org> Jeff wrote: > FUNDAMENTALS #1: Site Structure: Where to Locate Includes? > > Index.php is always located in a website's document root, /var/www/html/ > on a Linux box. > Where should includes be located? Personally, I find it depends on my environment: -- dedicated server, application not intended for distribution (ie, an intranet, private e-commerce site): /usr/local/lib/php -- any application intended for distribution, or working in a shared public server: inline with the document root, or a subdirectory thereof, depending on the number of files. I always name my includes with the extension of .inc > Here are some possibilities: > * in the same directory, /var/www/html/ > * in a subdirectory of document root, /var/www/html/includes/ > * in a parallel directory to document root, /var/www/includes > > What are the advantages and disadvantages of each possibility? > IN THE SAME DIRECTORY > * simple > * but confusing and cluttered if there are more than just a few > IN A SUBDIRECTORY > * provides a logical place for them > * but exposes them to browsers > IN A PARALLEL DIRECTORY > * provides a logical place for them > * doesn't expose them to browsers > * but perhaps write privileges are not available (or needed?) Protecting from browser exposure has a couple of options as well. -- if the app is open source anyway, what do I care? To protect sensitive information, I create a drop-in application.php file. It's a single file, aware of all the needed params, containing configuration options, DB connections, etc, and either in a protected directory or parsed by php anyway. It contains *no* logic except to determine where includes are, possibly bring a DB connection online, or to create other menial aspects of the app's environment. -- if the app's source shouldn't be open to the public, it'll be on a dedicated server anyway :) Then, you can do it right; setup a nice hierarchy outside of the web root (/usr/local/lib/php) and use an auto included application file (ie, auto.logic.inc). I also sometimes set environment variables in the apache .conf file, with additional helper paths and so forth. This is particularly helpful if you have many sister projects on a single vhost (ie, /reports has it's own include dir, automatically determined by an environment variable set in a directive in httpd.conf). > What does exposure matter? > If the include file contains html, it will be visible in the calling > file's source code. > If it contains php code (like a database connection), it will never be > visible anyway. One fallacy I've seen in using the extension .php for included files, as to limit their visibility, is that while the browser may not see any output, that file is still being executed. So, if you have more than just functions or classes, bits and pieces of the app are running, which may be *much* worse than someone getting the DB password or looking at your code in some form. > Are there important principles here, or is location just a matter of > preference? I think it's most important to just be cognitive of where your files are, and of what types they are (executeable, or includeable). I like .inc for included files, and .php for *real* php files (ie, those that are executed). H From radiox at go.ro Thu Sep 4 12:57:53 2003 From: radiox at go.ro (X) Date: Thu, 4 Sep 2003 17:57:53 +0100 Subject: [nycphp-talk] quick regex question References: Message-ID: <001201c37305$b121a9f0$62dc869f@x> Please remove my e-mail address from all the mailing lists. Thank you! From jim at bizcomputinginc.com Thu Sep 4 13:52:07 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Thu, 4 Sep 2003 13:52:07 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure References: <20030904150929.68148.qmail@web14308.mail.yahoo.com> <20030904152309.GA8196@eye.surgam.net> Message-ID: <004001c3730d$4249d590$6501a8c0@Notebook> I would agree to setting Apache to not serve .inc files except that I want to maintain a consistent standard from one application to another. I don't have access to config Apache on many applications because the app runs on a shared box. Then there's when running under IIS. If I standardize on the .inc extension protected via the web server then I need to have knowledge of how to do it in all the various environments I may work in. Standardizing on putting incudes in a subdir of the app root & using the .php extension to protect those include files from direct download allows me to work in most any php environment, no need to have access to Apache, no need to have access to ftp outside the webroot, no need for knowledge of the web server either. This also allows me to work the same in PHP as I do in ASP. Same standard, different language. So I would also say that I fall into the 2nd category of I know the risks but consider the convenience a worthwhile compromise. Knock on wood, but in 8 years of web app development ( mostly in ASP and JSP ) I have yet to have an application hacked. That may be mostly luck, but I'ld like to think its partly due to the standards I've adopted. Jim ----- Original Message ----- From: "Adam Fields" To: ; "NYPHP Talk" Sent: Thursday, September 04, 2003 11:23 AM Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure > On Thu, Sep 04, 2003 at 08:09:29AM -0700, Chris Shiflett wrote: > > I guess the answers could break down into three categories: > > > > 1. I place my includes under document root for convenience, and I'm not aware > > of any problems that could cause. > > 2. I understand the risk in doing so, but I still place my includes under > > document root. > > 3. I place my includes outside of document root. It is a simple task, and it is > > at least more secure than doing otherwise. > > I typically name my includes with .inc extensions and set Apache to > not serve those files directly. This is both relatively convenient and > relatively secure. > > -- > - Adam > > ----- > Adam Fields, Managing Partner, fields at surgam.net > Surgam, Inc. is a technology consulting firm with strong background in > delivering scalable and robust enterprise web and IT applications. > http://www.adamfields.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From rsd at electronink.com Thu Sep 4 14:01:21 2003 From: rsd at electronink.com (Russ Demarest) Date: Thu, 4 Sep 2003 14:01:21 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <004001c3730d$4249d590$6501a8c0@Notebook> Message-ID: .htaccess can be set to not serve .inc files. Doesn't require getting into apache config. Russ On Thursday, September 4, 2003, at 01:52 PM, Jim Hendricks wrote: > I would agree to setting Apache to not serve .inc files except that I > want > to maintain a consistent standard from one application to another. I > don't > have access to config Apache on many applications because the app runs > on a > shared box. Then there's when running under IIS. If I > standardize > on the .inc extension protected via the web server then I need to have > knowledge of how to do it in all the various environments I may work > in. > Standardizing on putting incudes in a subdir of the app root & using > the > .php extension to protect those include files from direct download > allows me > to work in most any php environment, no need to have access to Apache, > no > need to have access to ftp outside the webroot, no need for knowledge > of the > web server either. > > This also allows me to work the same in PHP as I do in ASP. Same > standard, > different language. > > So I would also say that I fall into the 2nd category of I know the > risks > but consider the convenience a worthwhile compromise. > > Knock on wood, but in 8 years of web app development ( mostly in ASP > and > JSP ) I have yet to have an application hacked. That may be mostly > luck, > but I'ld like to think its partly due to the standards I've adopted. > > Jim > > ----- Original Message ----- > From: "Adam Fields" > To: ; "NYPHP Talk" > Sent: Thursday, September 04, 2003 11:23 AM > Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure > > >> On Thu, Sep 04, 2003 at 08:09:29AM -0700, Chris Shiflett wrote: >>> I guess the answers could break down into three categories: >>> >>> 1. I place my includes under document root for convenience, and I'm >>> not > aware >>> of any problems that could cause. >>> 2. I understand the risk in doing so, but I still place my includes > under >>> document root. >>> 3. I place my includes outside of document root. It is a simple task, > and it is >>> at least more secure than doing otherwise. >> >> I typically name my includes with .inc extensions and set Apache to >> not serve those files directly. This is both relatively convenient and >> relatively secure. >> >> -- >> - Adam >> >> ----- >> Adam Fields, Managing Partner, fields at surgam.net >> Surgam, Inc. is a technology consulting firm with strong background in >> delivering scalable and robust enterprise web and IT applications. >> http://www.adamfields.com >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> >> > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Thu Sep 4 14:22:42 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 14:22:42 -0400 Subject: [nycphp-talk] How do I create a future date for a cookie? Message-ID: <14d001c37311$8a807ae0$67a76244@philofsoa> I'm using setcookie() that I want to set "permanently" (set it to like 100 years from now), but looking up both date() and mktime() honestly made no sense to me as to how to do it. So, um, how do I do it? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Thu Sep 4 14:28:05 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Thu, 4 Sep 2003 14:28:05 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure References: Message-ID: <006301c37312$493261b0$6501a8c0@Notebook> Yes, but still relies on apache specifics which means when running in IIS I would have to handle securing .inc differently. includes with .php in it's own directory needs no special handling by different web servers and if the subdir is named inc or include the purpose of the .php file is still known. Jim ----- Original Message ----- From: "Russ Demarest" To: "NYPHP Talk" Sent: Thursday, September 04, 2003 2:01 PM Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure > .htaccess can be set to not serve .inc files. Doesn't require getting > into apache config. > > Russ > > On Thursday, September 4, 2003, at 01:52 PM, Jim Hendricks wrote: > > > I would agree to setting Apache to not serve .inc files except that I > > want > > to maintain a consistent standard from one application to another. I > > don't > > have access to config Apache on many applications because the app runs > > on a > > shared box. Then there's when running under IIS. If I > > standardize > > on the .inc extension protected via the web server then I need to have > > knowledge of how to do it in all the various environments I may work > > in. > > Standardizing on putting incudes in a subdir of the app root & using > > the > > .php extension to protect those include files from direct download > > allows me > > to work in most any php environment, no need to have access to Apache, > > no > > need to have access to ftp outside the webroot, no need for knowledge > > of the > > web server either. > > > > This also allows me to work the same in PHP as I do in ASP. Same > > standard, > > different language. > > > > So I would also say that I fall into the 2nd category of I know the > > risks > > but consider the convenience a worthwhile compromise. > > > > Knock on wood, but in 8 years of web app development ( mostly in ASP > > and > > JSP ) I have yet to have an application hacked. That may be mostly > > luck, > > but I'ld like to think its partly due to the standards I've adopted. > > > > Jim > > > > ----- Original Message ----- > > From: "Adam Fields" > > To: ; "NYPHP Talk" > > Sent: Thursday, September 04, 2003 11:23 AM > > Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure > > > > > >> On Thu, Sep 04, 2003 at 08:09:29AM -0700, Chris Shiflett wrote: > >>> I guess the answers could break down into three categories: > >>> > >>> 1. I place my includes under document root for convenience, and I'm > >>> not > > aware > >>> of any problems that could cause. > >>> 2. I understand the risk in doing so, but I still place my includes > > under > >>> document root. > >>> 3. I place my includes outside of document root. It is a simple task, > > and it is > >>> at least more secure than doing otherwise. > >> > >> I typically name my includes with .inc extensions and set Apache to > >> not serve those files directly. This is both relatively convenient and > >> relatively secure. > >> > >> -- > >> - Adam > >> > >> ----- > >> Adam Fields, Managing Partner, fields at surgam.net > >> Surgam, Inc. is a technology consulting firm with strong background in > >> delivering scalable and robust enterprise web and IT applications. > >> http://www.adamfields.com > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From David.SextonJr at ubs.com Thu Sep 4 14:32:27 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 4 Sep 2003 14:32:27 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: <18D7B8CAA5284F478470828806DB124603789F3E@psle01.xchg.pwj.com> So this looks like a wash... If you stop .inc files from being served raw and exposing source code, you consequently cause them to execute as a "real" .php file would. Placing .inc files in a locked down, parallel location (without parsing them) sounds like the best solution to me (if you have that option), but what are the downsides to executing included files? I guess it depends on the code, but is there any significant performance degradation in most instances? I'd make sure any third-party hosts are parsing .inc's before placing them under webroot. That also makes the app less portable since you can't be sure if you're moving to a server set up to parse inc's - I mean it's portable, but you may be opening your app up to direct downloads on a shared provider. Another point in favor of .php extensions is that many editors have a PHP template to make your code easier to read. I use Homesite and it does a great job of highlighting the code if it's .php, but .inc is just plain old, boring, hard to read text. Granted, you could config the editor to treat .inc as .php, but why bother doing that if there is no other apparent benefit to using .inc over .php? -----Original Message----- From: Russ Demarest [mailto:rsd at electronink.com] Sent: Thursday, September 04, 2003 2:01 PM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure .htaccess can be set to not serve .inc files. Doesn't require getting into apache config. Russ On Thursday, September 4, 2003, at 01:52 PM, Jim Hendricks wrote: > I would agree to setting Apache to not serve .inc files except that I > want > to maintain a consistent standard from one application to another. I > don't > have access to config Apache on many applications because the app runs > on a > shared box. Then there's when running under IIS. If I > standardize > on the .inc extension protected via the web server then I need to have > knowledge of how to do it in all the various environments I may work > in. > Standardizing on putting incudes in a subdir of the app root & using > the > .php extension to protect those include files from direct download > allows me > to work in most any php environment, no need to have access to Apache, > no > need to have access to ftp outside the webroot, no need for knowledge > of the > web server either. > > This also allows me to work the same in PHP as I do in ASP. Same > standard, > different language. > > So I would also say that I fall into the 2nd category of I know the > risks > but consider the convenience a worthwhile compromise. > > Knock on wood, but in 8 years of web app development ( mostly in ASP > and > JSP ) I have yet to have an application hacked. That may be mostly > luck, > but I'ld like to think its partly due to the standards I've adopted. > > Jim > > ----- Original Message ----- > From: "Adam Fields" > To: ; "NYPHP Talk" > Sent: Thursday, September 04, 2003 11:23 AM > Subject: Re: [nycphp-talk] FUNDAMENTALS #1: Site Structure > > >> On Thu, Sep 04, 2003 at 08:09:29AM -0700, Chris Shiflett wrote: >>> I guess the answers could break down into three categories: >>> >>> 1. I place my includes under document root for convenience, and I'm >>> not > aware >>> of any problems that could cause. >>> 2. I understand the risk in doing so, but I still place my includes > under >>> document root. >>> 3. I place my includes outside of document root. It is a simple task, > and it is >>> at least more secure than doing otherwise. >> >> I typically name my includes with .inc extensions and set Apache to >> not serve those files directly. This is both relatively convenient and >> relatively secure. >> >> -- >> - Adam >> >> ----- >> Adam Fields, Managing Partner, fields at surgam.net >> Surgam, Inc. is a technology consulting firm with strong background in >> delivering scalable and robust enterprise web and IT applications. >> http://www.adamfields.com >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> >> > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From soazine at erols.com Thu Sep 4 15:02:43 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 15:02:43 -0400 Subject: [nycphp-talk] How do I create a future date for a cookie? References: <14d001c37311$8a807ae0$67a76244@philofsoa> Message-ID: <151701c37317$1f0529e0$67a76244@philofsoa> well this is what I came up with, it's a kluge but it's the best I can think of: setcookie('myCookie', $val, time() + (86400 * 36500)); // SET TO 100 YEARS FROM NOW Phil ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Thursday, September 04, 2003 2:22 PM Subject: [nycphp-talk] How do I create a future date for a cookie? I'm using setcookie() that I want to set "permanently" (set it to like 100 years from now), but looking up both date() and mktime() honestly made no sense to me as to how to do it. So, um, how do I do it? Thanx Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From sklar at sklar.com Thu Sep 4 15:29:37 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 4 Sep 2003 15:29:37 -0400 Subject: [nycphp-talk] How do I create a future date for a cookie? In-Reply-To: <151701c37317$1f0529e0$67a76244@philofsoa> Message-ID: Note that many browsers won't deal well with an cookie whose expiration date is after January 19, 2038 at 3:14:07 A.M. UTC (that's an epoch timestamp of 2147483647) since they store cookie expiration time in a 32 bit signed integer. (The maximum positive value of a 32 bit signed int is 2147483647). So, you may be better off with: setcookie('myCookie',$val,2147483647); David On Thursday, September 04, 2003 3:03 PM, mailto:talk-bounces at lists.nyphp.org wrote: > well this is what I came up with, it's a kluge but it's the best I > can think of: > > setcookie('myCookie', $val, time() + (86400 * 36500)); // SET TO 100 > YEARS FROM NOW > > Phil > > ----- Original Message ----- > From: Phil Powell > To: NYPHP Talk > Sent: Thursday, September 04, 2003 2:22 PM > Subject: [nycphp-talk] How do I create a future date for a cookie? > > > I'm using setcookie() that I want to set "permanently" (set it to > like 100 years from now), but looking up both date() and mktime() > honestly made no sense to me as to how to do it. > > So, um, how do I do it? > > Thanx > Phil > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Sep 4 15:33:51 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 4 Sep 2003 12:33:51 -0700 (PDT) Subject: [nycphp-talk] How do I create a future date for a cookie? In-Reply-To: Message-ID: <20030904193351.9602.qmail@web14308.mail.yahoo.com> --- David Sklar wrote: > Note that many browsers won't deal well with an cookie whose > expiration date is after January 19, 2038 at 3:14:07 A.M. UTC > (that's an epoch timestamp of 2147483647) since they store cookie > expiration time in a 32 bit signed integer. (The maximum positive > value of a 32 bit signed int is 2147483647). > > So, you may be better off with: > > setcookie('myCookie',$val,2147483647); That's a good point. Also of note is that the cookie specification does not allow a cookie's expiration date to be more than two years in the future, so a cookie should never be allowed to persist for more than two years. I'm honestly not sure how strictly this is implemented across the various browsers; maybe someone with some free time can use David's code and test. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From psaw at pswebcode.com Thu Sep 4 17:03:36 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Thu, 4 Sep 2003 17:03:36 -0400 Subject: [nycphp-talk] Force File Download HTTP Headers and IE Issue In-Reply-To: Message-ID: <001f01c37328$02b888c0$68e4a144@bronco> An update on this topic: I finally just set the content-type header to: application/zip It works. It messes up the file name in the Save As... dialog, but it works. Thank you all. PSaw -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Marc Antony Vose Sent: Wednesday, September 03, 2003 7:48 PM To: shiflett at php.net; NYPHP Talk Subject: Re: [nycphp-talk] Force File Download HTTP Headers and IE Issue >--- Marc Antony Vose wrote: >> It's worth pointing out, I suppose, that to some systems (i.e., >> classic Mac OS), once you tell the browser that a JPEG (or PDF in >> your case) is "application/octet-stream", it is no longer a JPEG (or >> PDF). > >Can you explain that? I don't understand how it could matter after >the resource >has been downloaded and saved to the filesystem. Typically, the content type >described in the HTTP response is used by the HTTP client only. > >I'm certainly not arguing, but I'd like that explained further if you >are certain it is true. > Well, the whole file metadata thing is a huge can of worms. So, before I say anything to explain, I'll say: (1) This probably is only a problem in this instance with Classic Mac OS (meaning, prior to X). Therefore, your amount of caring might be minimal. I say, test it on every single browser you care about supporting, and if it works, then you've made your choice. Anyway, the explanation is lengthy, and it's a hot debate in the Mac community right now, because Apple is (in a lot of people's minds) moving backwards by adopting the Windows/Unix file extension setup, instead of creating a more sophisticated file metadata architecture in the OS. The way files are organized in Mac OS is that they have a data fork and a resource fork. Unix and Windows systems don't have this, so generally when files from a Mac are put on a Web site, the resource fork is stripped. (Mac OS X, by the way, can utilize the resource fork if present, and then has a backup mapping from the extension. This is a bit of an oversimplification, but it is pretty much accurate.) Anyway, as Brian said earlier, "stupid Mac resource forks". And, in this case, it sucks for the programmer, because it makes life more difficult if you choose to care about it. Then again, it could be argued that calling a PDF an "octet-stream" just to get around file download limitations of the browser maybe isn't the best solution from the standpoint of interoperability and just "the way things ought to be done", so that everything is certain to work on future (as yet undesigned) systems, and so forth. IMHO opinion, MIME types are there for a reason, and for the good of standards and interoperability, people should be sending out the proper MIME types with the file, instead of trying to fool the browser into doing something else. So, if I was doing this project, my choice would probably be to ZIP the file, especially since ZIP files seem to be so pervasive these days that they are auto-extracted anyway. But, to each his/her own, and I am not meaning to be critical, or anything. So, anyway, what most Mac browsers seemed to be doing (under OS 9 and earlier) is this: If they received an octet stream (or a generic data stream), if they could determine the file type, they appeared to add a resource fork onto the file (sometimes) which allowed the OS to map the file properly. However, many times, the file would just be downloaded and end up with the blank page icon which, when clicked, wouldn't open. (I've specifically seen this problem with PDF files, by the way.) Now, to get religious for a bit: The main advantage of the resource fork becomes clear when you use a Mac on a daily basis. The thing is, in Windows, if you double-click a JPG...any JPG...it opens with the program that's the default for opening JPEGs. Obviously, this is silly, because you might want to have one JPEG associated with Photoshop and another associated with Preview, or whatever. That's what the resource fork allows the OS to do: separate the type of file from the creator of the file. It also frees the user from stupidly having to have a file extension on every file. So, you can just call your file "Letter to Bob Jones", rather than "Letter to Bob Jones.doc". Just easier from a user's standpoint. There was a lengthy article on ArsTechnica about this a while ago. I have my own opinions on file metadata which I won't go into now. ;) Cheers, Marc _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Thu Sep 4 17:04:11 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 17:04:11 -0400 Subject: [nycphp-talk] header() produces 403 Forbidden Message-ID: <159b01c37328$16d0bad0$67a76244@philofsoa> header("Location: http://$SERVER_NAME/index.php; target=\"top\""); I am getting a 403 Forbidden upon running this script, which is not what I wanted. Is there a way I can redirect, but at the same time redirect out of the frame that the redirection script is located to _top? I don't want to have to rely on Javascript to do this as this is a foreign site (European) where Javascript is often turned off. Thanks Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Thu Sep 4 17:20:45 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 17:20:45 -0400 Subject: [nycphp-talk] setcookie Pt. II Message-ID: <15bc01c3732a$67c350e0$67a76244@philofsoa> setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From psaw at pswebcode.com Thu Sep 4 17:24:31 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Thu, 4 Sep 2003 17:24:31 -0400 Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <15bc01c3732a$67c350e0$67a76244@philofsoa> Message-ID: <002a01c3732a$eeb84420$68e4a144@bronco> Setting the cookie time to some time in the past causes the cookie to expire as soon as browser is closed, giving you what you want. No? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 5:21 PM To: NYPHP Talk Subject: [nycphp-talk] setcookie Pt. II setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Thu Sep 4 17:34:57 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 17:34:57 -0400 Subject: [nycphp-talk] setcookie Pt. II References: <002a01c3732a$eeb84420$68e4a144@bronco> Message-ID: <15fa01c3732c$63776470$67a76244@philofsoa> MessageNo that deletes the cookie from what I understand instantly.. I want the cookie to exist but to exist under the browser session. So I don't set any time at all, but I still have to set the path in spite of setting no time! Phil ----- Original Message ----- From: pswebcode, nyc To: 'NYPHP Talk' Sent: Thursday, September 04, 2003 5:24 PM Subject: RE: [nycphp-talk] setcookie Pt. II Setting the cookie time to some time in the past causes the cookie to expire as soon as browser is closed, giving you what you want. No? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 5:21 PM To: NYPHP Talk Subject: [nycphp-talk] setcookie Pt. II setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From pat at vote.com Thu Sep 4 17:56:28 2003 From: pat at vote.com (Patrick Hunt) Date: Thu, 04 Sep 2003 17:56:28 -0400 Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <15bc01c3732a$67c350e0$67a76244@philofsoa> Message-ID: <20030904215628.C46FBA85E6@virtu.nyphp.org> set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Thu Sep 4 18:12:24 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 4 Sep 2003 15:12:24 -0700 (PDT) Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <15fa01c3732c$63776470$67a76244@philofsoa> Message-ID: <20030904221224.71474.qmail@web14309.mail.yahoo.com> --- Phil Powell wrote: > MessageNo that deletes the cookie from what I understand instantly. If you do not set an expiration time, it makes the cookie a session cookie, so it persists in the browser session only and is not written to disk. > So I don't set any time at all, but I still have to set the path in > spite of setting no time! header("Set-Cookie: nordicnet_registration=$uplinenumber"); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Thu Sep 4 18:14:31 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 18:14:31 -0400 Subject: [nycphp-talk] setcookie Pt. II References: <20030904221224.71474.qmail@web14309.mail.yahoo.com> Message-ID: <167601c37331$ea6f4ba0$67a76244@philofsoa> Thanx for the header() tip, however, I noticed that the path is not set and it will have to be as the cookie is being set within /Main_page/registrering.php which will set the path to "/Main_page" instead of "/" which is what I want. How do I notate that? Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" ; Sent: Thursday, September 04, 2003 6:12 PM Subject: Re: [nycphp-talk] setcookie Pt. II > --- Phil Powell wrote: > > MessageNo that deletes the cookie from what I understand instantly. > > If you do not set an expiration time, it makes the cookie a session cookie, so > it persists in the browser session only and is not written to disk. > > > So I don't set any time at all, but I still have to set the path in > > spite of setting no time! > > header("Set-Cookie: nordicnet_registration=$uplinenumber"); > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Thu Sep 4 18:14:57 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 18:14:57 -0400 Subject: [nycphp-talk] setcookie Pt. II References: <20030904215628.C46FBA85E6@virtu.nyphp.org> Message-ID: <168901c37331$fa0e51a0$67a76244@philofsoa> That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Thu Sep 4 18:21:28 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 4 Sep 2003 15:21:28 -0700 (PDT) Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <167601c37331$ea6f4ba0$67a76244@philofsoa> Message-ID: <20030904222128.10303.qmail@web14306.mail.yahoo.com> --- Phil Powell wrote: > Thanx for the header() tip, however, I noticed that the path is > not set and it will have to be as the cookie is being set within > /Main_page/registrering.php which will set the path to "/Main_page" > instead of "/" which is what I want. How do I notate that? This should do it: header("Set-Cookie: nordicnet_registration=$uplinenumber; path=/Main_page/"); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From shiflett at php.net Thu Sep 4 18:26:58 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 4 Sep 2003 15:26:58 -0700 (PDT) Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <169901c37333$1a3c4670$67a76244@philofsoa> Message-ID: <20030904222658.94486.qmail@web14311.mail.yahoo.com> --- Phil Powell wrote: > In my case it would be: > > header("Set-Cookie: nordicnet_registration=$uplinenumber; path=/"); Then the path is superfluous, and my original example was right. :-) Aside from name and value, cookie attributes are restrictive. Having path set to / is no more restrictive than not including the path attribute. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From wfan at encogent.com Thu Sep 4 18:28:22 2003 From: wfan at encogent.com (Wellington Fan) Date: Thu, 4 Sep 2003 18:28:22 -0400 Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <168901c37331$fa0e51a0$67a76244@philofsoa> Message-ID: Phil, >From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Thu Sep 4 18:33:43 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 18:33:43 -0400 Subject: [nycphp-talk] setcookie Pt. II References: Message-ID: <16cd01c37334$98e935e0$67a76244@philofsoa> Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:28 PM Subject: RE: [nycphp-talk] setcookie Pt. II Phil, From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From wfan at encogent.com Thu Sep 4 18:40:42 2003 From: wfan at encogent.com (Wellington Fan) Date: Thu, 4 Sep 2003 18:40:42 -0400 Subject: [nycphp-talk] setcookie Pt. II In-Reply-To: <16cd01c37334$98e935e0$67a76244@philofsoa> Message-ID: hahaha! serves me right for not reading THE VERY NEXT LINE: "The expire and secure arguments are integers and cannot be skipped with an empty string. Use a zero (0) instead" so try this: setcookie('nordicnet_registration', $uplinenumber, 0, "/" ); -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:28 PM Subject: RE: [nycphp-talk] setcookie Pt. II Phil, From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil ------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at mx2pro.com Thu Sep 4 19:33:22 2003 From: dan at mx2pro.com (Dan Horning) Date: Thu, 4 Sep 2003 19:33:22 -0400 Subject: [nycphp-talk] header() produces 403 Forbidden In-Reply-To: <159b01c37328$16d0bad0$67a76244@philofsoa> Message-ID: <001001c3733c$ef92c070$f2c8f63f@dwchome> the answer is no... but http://us2.php.net/manual/en/function.header.php at any rate... all this info ... the location header does not cause a redirect to a specific target you might just want to create a javascript page that says "in case your browser does not redirect you Click Here" although they turn javascript off .. those same people might be used to seeing that kind of page -dan 14.30 Location The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. Location = "Location" ":" absoluteURI An example is: Location: http://www.w3.org/pub/WWW/People.html Note: The Content-Location header field (section 14.14) differs from Location in that the Content-Location identifies the original location of the entity enclosed in the request. It is therefore possible for a response to contain header fields for both Location and Content-Location. Also see section 13.10 for cache requirements of some methods. - Dan Horning ------------------------------------------------------------------------ ------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? ------------------------------------------------------------------------ ------------ MX2 Productions, Media from concept to execution. PO Box 160, Clifton Park, NY 12065-0160 -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 5:04 PM To: NYPHP Talk Subject: [nycphp-talk] header() produces 403 Forbidden header("Location: http://$SERVER_NAME/index.php; target=\"top\""); I am getting a 403 Forbidden upon running this script, which is not what I wanted. Is there a way I can redirect, but at the same time redirect out of the frame that the redirection script is located to _top? I don't want to have to rely on Javascript to do this as this is a foreign site (European) where Javascript is often turned off. Thanks Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Thu Sep 4 22:23:50 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 4 Sep 2003 22:23:50 -0400 Subject: [nycphp-talk] header() produces 403 Forbidden References: <001001c3733c$ef92c070$f2c8f63f@dwchome> Message-ID: <178101c37354$bf37fb30$67a76244@philofsoa> MessageYep, I wound up using some text instead with a link with target=_top. So they have to do it manually. That sucks. Phil ----- Original Message ----- From: Dan Horning To: 'NYPHP Talk' Sent: Thursday, September 04, 2003 7:33 PM Subject: RE: [nycphp-talk] header() produces 403 Forbidden the answer is no... but http://us2.php.net/manual/en/function.header.php at any rate... all this info ... the location header does not cause a redirect to a specific target you might just want to create a javascript page that says "in case your browser does not redirect you Click Here" although they turn javascript off .. those same people might be used to seeing that kind of page -dan 14.30 Location The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. Location = "Location" ":" absoluteURI An example is: Location: http://www.w3.org/pub/WWW/People.html Note: The Content-Location header field (section 14.14) differs from Location in that the Content-Location identifies the original location of the entity enclosed in the request. It is therefore possible for a response to contain header fields for both Location and Content-Location. Also see section 13.10 for cache requirements of some methods. - Dan Horning ------------------------------------------------------------------------------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? ------------------------------------------------------------------------------------ MX2 Productions, Media from concept to execution. PO Box 160, Clifton Park, NY 12065-0160 -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 5:04 PM To: NYPHP Talk Subject: [nycphp-talk] header() produces 403 Forbidden header("Location: http://$SERVER_NAME/index.php; target=\"top\""); I am getting a 403 Forbidden upon running this script, which is not what I wanted. Is there a way I can redirect, but at the same time redirect out of the frame that the redirection script is located to _top? I don't want to have to rely on Javascript to do this as this is a foreign site (European) where Javascript is often turned off. Thanks Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Fri Sep 5 00:18:01 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 5 Sep 2003 00:18:01 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <002201c372d3$9534b070$6401a8c0@EZDSDELL> References: <002201c372d3$9534b070$6401a8c0@EZDSDELL> Message-ID: <20030905041801.GA11614@panix.com> Hey Folks: Quick response, since I'm busy... Most of my operations are on shared hosts and I do all of my development on my office machine. Here's how I configure. There are two include directories. One on the web server for unimportant stuff. One in the home directory. PHP scripts that need access to the secure files in the home directory are run in CGI mode. Here's a quick listing of some sample files and their contents... vvvvvvvvvvvvvvvvvvvv WEBSERVER /htdocs/username/.htaccess DirectoryIndex index.php AddType application/x-httpd-php .inc Deny from all Deny from all /htdocs/username/index.php include('./directory.inc'); include("$IncludeDir/inc-user.inc"); /htdocs/username/directory.inc $IncludeDir = './include'; /htdocs/username/include/index.php

Go Away!

/htdocs/username/include/ /htdocs/username/include/inc-user.inc # This makes the deployment portable! switch ($_SERVER['SERVER_NAME']) { case 'analysisandsolutions.localhost': $SafeIncludeDir = 'x:/blah/foo'; break; default: $SafeIncludeDir = '/users/username/include'; } include("$SafeIncludeDir/the.secure.settings.inc"); include("$IncludeDir/some.open.source.script.inc"); USERHOST /users/username/include/ /users/username/include/the.secure.settings.inc $UserName = 'canyou'; $Password = 'guess!'; ^^^^^^^^^^^^^^^^ Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From soazine at erols.com Fri Sep 5 00:54:53 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 00:54:53 -0400 Subject: [nycphp-talk] How can I be prompted for Windows Authentication w/o .htaccess? Message-ID: <002e01c37369$d84867d0$67a76244@philofsoa> I have a folder that requires Windows Authentication each time it is access. The remote system is Linux. However, there is no sign of .htaccess nor .htpasswd as I understand a UNIX-based system to have to prompt for Windows Authentication, yet each time I am always prompted, even if I call the folder directly w/o calling a specific file in that folder (this all done via the browser). Anyone there run into this and know what I should do about it? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at cain.sh Fri Sep 5 01:32:15 2003 From: dan at cain.sh (Daniel J Cain Jr.) Date: Fri, 05 Sep 2003 00:32:15 -0500 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: <20030904150929.68148.qmail@web14308.mail.yahoo.com> References: <20030904150929.68148.qmail@web14308.mail.yahoo.com> Message-ID: <1062739935.220.88.camel@gigabeast.home.cain.sh> On Thu, 2003-09-04 at 10:09, Chris Shiflett wrote: > 3. I place my includes outside of document root. It is a simple task, and it is > at least more secure than doing otherwise. It's been a long day, so please forgive me if it is too incoherent. I prefer number 3, supporting files held outside the web directory. If this option is not available, and the supporting files are IN the web directory I don't allow them to be accessed via a web browser. This snippet of the logic I put in the beginning of each file I want protected: if($_SERVER['PHP_SELF'] == basename(__FILE__)) { header('Location: http://whereverIwanttoSendTheBadGuy.com'); exit(); } This will allow it to be included but will not allow it to be accessed by a browser. You could use whatever code you wanted if it was accessed directly vs. inclusion from a legit script (verbose logging, take away their birthday, etc.). I also don't believe in the .inc, .class extensions for supporting files. I don't recall the bias origin but it was an article I read four years ago that convinced me. One plus is that everything is .php so one less dependency on specific configuration options(config file "cleaned up" by an overzealous admin at 3AM). I try to keep things portable and under one directory on systems I can have access to a dir outside a web directory. Which works well with multiple developers using CVS(once you get used to using CVS that is ;) ) to have a production site and multiple development sites keep completely isolated code bases. So along the lines of: Production ========== /usr/local/www/projectname <-- Main directory of this project /usr/local/www/projectname/htdocs <-- web directory /usr/local/www/projectname/classes <-- class definitions dir /usr/local/www/projectname/etc <-- config files, etc. /usr/local/www/projectname/libs <-- function definitions dir Development Area One ==================== /usr/home/dev1/projectname <-- Main directory of this project /usr/home/dev1/projectname/htdocs <-- web directory /usr/home/dev1/projectname/classes <-- class definitions dir /usr/home/dev1/projectname/etc <-- config files, etc. /usr/home/dev1/projectname/libs <-- function definitions dir An auto-prepend file modifies the include path so the site code uses require_once('libs/housekeeping.php'). It also sets up an ini_set('unserialize_callback_func','require_class') that handles pulling in object definitions if the session contains an unknown object in the require_class() user function. Which grants the site code the ability to require_class('user') that pulls in the "user" class definition like a require_once would (by first seeing if the class_exists() else require_once() the object definition file). Almost all of my projects have been created on servers that I had root access on, or known the admin of the box. So I definitely do get into some of the apache/httpd.conf stuff to tweak PHP settings and virtual hosts. From bpang at bpang.com Fri Sep 5 10:08:30 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 10:08:30 -0400 Subject: [nycphp-talk] How can I be prompted for Windows Authentication w/o .htaccess? Message-ID: maybe it's in the parent directory? if it is, it would apply recursively. > This is a multi-part message in MIME format. > > > I have a folder that requires Windows Authentication each time it is access. The remote system is Linux. However, there is no sign of .htaccess nor .htpasswd as I understand a UNIX-based system to have to prompt for Windows Authentication, yet each time I am always prompted, even if I call the folder directly w/o calling a specific file in that folder (this all done via the browser). > > Anyone there run into this and know what I should do about it? > > Thanx > Phil > From bpang at bpang.com Fri Sep 5 10:41:18 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 10:41:18 -0400 Subject: [nycphp-talk] How do I create a future date for a cookie? Message-ID: what's so kludgey about this, Phil? I'm actually curious why you want it set soooo far into the future? I usually only set it for 3 months on the long end. It's highly unlikely that your site will still exist in its current form in 100 years from now, let alone 2 or 3. Of course, you can always be optimistic. :) I don't know of any date limitations since I never look ahead that far (cookies, life, coding, etc), so I would go by tbe guidance of others regarding the 2038 date. > This is a multi-part message in MIME format. > > > well this is what I came up with, it's a kluge but it's the best I can think of: > > setcookie('myCookie', $val, time() + (86400 * 36500)); // SET TO 100 YEARS FROM NOW > > Phil > > ----- Original Message ----- > From: Phil Powell > To: NYPHP Talk > Sent: Thursday, September 04, 2003 2:22 PM > Subject: [nycphp-talk] How do I create a future date for a cookie? > > > I'm using setcookie() that I want to set "permanently" (set it to like 100 years from now), but looking up both date() and mktime() honestly made no sense to me as to how to do it. > > So, um, how do I do it? > > Thanx > Phil > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From southwell at dneba.com Fri Sep 5 10:45:41 2003 From: southwell at dneba.com (Michael Southwell) Date: Fri, 05 Sep 2003 10:45:41 -0400 Subject: [nycphp-talk] more on &$var in function Message-ID: <5.1.0.14.2.20030905104152.00b59218@mail.optonline.net> Thanks for responses to my question about the need for global $var within a function whose parameter is &$var (unnecessary; function is operating directly on the original because of the &). Now this raises another question. Given the above, in those cases where a function is intended to operate on a global variable--and only those cases, why wouldn't you *always* define the parameter with & instead of using a global statement? Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From jlacey at ix.netcom.com Fri Sep 5 10:46:24 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Fri, 05 Sep 2003 08:46:24 -0600 Subject: [nycphp-talk] How do I create a future date for a cookie? In-Reply-To: References: Message-ID: <3F58A1C0.7040006@ix.netcom.com> dare I say that we will all expire before Phil's cookie? :) Brian Pang wrote: >what's so kludgey about this, Phil? > >I'm actually curious why you want it set soooo far into the future? > >I usually only set it for 3 months on the long end. > >It's highly unlikely that your site will still exist in its current form >in 100 years from now, let alone 2 or 3. Of course, you can always be >optimistic. :) > >I don't know of any date limitations since I never look ahead that far >(cookies, life, coding, etc), so I would go by tbe guidance of others >regarding the 2038 date. > > > > > >>This is a multi-part message in MIME format. >> >> >>well this is what I came up with, it's a kluge but it's the best I can >> >> >think of: > > >>setcookie('myCookie', $val, time() + (86400 * 36500)); // SET TO 100 >> >> >YEARS FROM NOW > > >>Phil >> >> ----- Original Message ----- >> From: Phil Powell >> To: NYPHP Talk >> Sent: Thursday, September 04, 2003 2:22 PM >> Subject: [nycphp-talk] How do I create a future date for a cookie? >> >> >> I'm using setcookie() that I want to set "permanently" (set it to >> >> >like 100 years from now), but looking up both date() and mktime() >honestly made no sense to me as to how to do it. > > >> So, um, how do I do it? >> >> Thanx >> Phil >> >> >> >> >> >------------------------------------------------------------------------------ > > >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> >> >> >> > > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Fri Sep 5 10:53:27 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 07:53:27 -0700 (PDT) Subject: [nycphp-talk] more on &$var in function In-Reply-To: <5.1.0.14.2.20030905104152.00b59218@mail.optonline.net> Message-ID: <20030905145327.19397.qmail@web14307.mail.yahoo.com> --- Michael Southwell wrote: > why wouldn't you *always* define the parameter with & instead of > using a global statement? Speaking personally, it depends on whether I think the parameter is closely related to the function and how much data is already required to be passed in. Imagine if you need to declare 50 global variables (hypothetically speaking). If you had to pass these all in the function call, you would probably avoid calling that function whenever possible. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jeffknight at mac.com Fri Sep 5 11:09:56 2003 From: jeffknight at mac.com (Jeff Knight) Date: Fri, 5 Sep 2003 11:09:56 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... Message-ID: <024DB13B-DFB3-11D7-BA7A-000393B9FB36@mac.com> I recently had to move one of my php sites from one server to another and learned (once again) that not all php servers are the same (give me a break, I've had a hangover for about three days now (or is it four?)). One of the things that most attracted me to php after working with asp for so long was its lenience towards doing things on-the-fly without a lot of set up and declarations, etc. So I had some old code that worked on my 1st server: if ($_REQUEST['from']) { $from['rgb'] = $_REQUEST['from']; } else { $from['rgb'] = '000000'; } if ($_REQUEST['to']) { $to['rgb'] = $_REQUEST['to']; } else { $to['rgb'] = 'FFFFFF'; } echo "to: $to
"; echo "to[rgb]: {$to['rgb']}
"; echo "from: $from
"; echo "from[rgb]: {$from['rgb']}
"; Which produced the output: to: Array to[rgb]: FFFFFF from: Array from[rgb]: 000000 When I moved the code to a new server, the results were: to: FFFFFF to[rgb]: F from: 4563456 from[rgb]: 4 Of course, none of this was immediately obvious, since the code was inside a php script that generated a png and had no echo statements. Of course I should've originally said $from = array( 'rgb' => '000000'); But I'm lazy. I am a little curious about what setting in php.ini allows this behavior on my (development) server though, since I suppose I should turn it off so it matches with the outside world. Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From csnyder at chxo.com Fri Sep 5 11:16:26 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 05 Sep 2003 11:16:26 -0400 Subject: [nycphp-talk] more on &$var in function In-Reply-To: <20030905145327.19397.qmail@web14307.mail.yahoo.com> References: <20030905145327.19397.qmail@web14307.mail.yahoo.com> Message-ID: <3F58A8CA.5060509@chxo.com> Chris Shiflett wrote: >--- Michael Southwell wrote: > > >>why wouldn't you *always* define the parameter with & instead of >>using a global statement? >> >> > >Speaking personally, it depends on whether I think the parameter is closely >related to the function and how much data is already required to be passed in. > > I agree-- if you have a function that updates a number of global objects or variables, you don't want to force yourself to list them all as arguments every time you call the function. As a further note, I always use global statements in order to make objects available to the local scope, but for looking at or updating regular variables I tend to use the $GLOBALS array so that the local namespace doesn't get to crowded. csnyder From bpang at bpang.com Fri Sep 5 11:24:51 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 11:24:51 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... Message-ID: did this $from = array( 'rgb' => '000000'); fix it for you? which version of PHP on the old/new servers? I would have to guess that since you didn't initialize $to and $from as arrays, they didn't get echo'ed as such. that's at least for the typing issue. I'm not sure why the other results came up the way they did, even without declaring the arrays. A good reason to always initialize arrays before populating them. either. If you were going to be adding more entries to the same array, I would use $foo = array() and array_push() rather than using $foo = array('key' => 'value') each time Wouldn't the latter re-initialize the array and wipe out old values? > I recently had to move one of my php sites from one server to another > and learned (once again) that not all php servers are the same (give me > a break, I've had a hangover for about three days now (or is it > four?)). One of the things that most attracted me to php after working > with asp for so long was its lenience towards doing things on-the-fly > without a lot of set up and declarations, etc. So I had some old code > that worked on my 1st server: > > if ($_REQUEST['from']) { > $from['rgb'] = $_REQUEST['from']; > } else { > $from['rgb'] = '000000'; > } > if ($_REQUEST['to']) { > $to['rgb'] = $_REQUEST['to']; > } else { > $to['rgb'] = 'FFFFFF'; > } > > echo "to: $to
"; > echo "to[rgb]: {$to['rgb']}
"; > > echo "from: $from
"; > echo "from[rgb]: {$from['rgb']}
"; > > Which produced the output: > to: Array > to[rgb]: FFFFFF > from: Array > from[rgb]: 000000 > > When I moved the code to a new server, the results were: > to: FFFFFF > to[rgb]: F > from: 4563456 > from[rgb]: 4 > > Of course, none of this was immediately obvious, since the code was > inside a php script that generated a png and had no echo statements. Of > course I should've originally said > > $from = array( 'rgb' => '000000'); > > But I'm lazy. > > I am a little curious about what setting in php.ini allows this > behavior on my (development) server though, since I suppose I should > turn it off so it matches with the outside world. > > > > > > Jeff Knight > jeff at lushmedia.com > 212/213-6558 x 203 > LUSH media > 110 W 40th St #1502 > New York, NY 10018 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From csnyder at chxo.com Fri Sep 5 11:27:58 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 05 Sep 2003 11:27:58 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <024DB13B-DFB3-11D7-BA7A-000393B9FB36@mac.com> References: <024DB13B-DFB3-11D7-BA7A-000393B9FB36@mac.com> Message-ID: <3F58AB7E.50209@chxo.com> If that's an "outside world" setup, I think I'm happy to stay in my own little self-contained niche where I can declare an array implicitly. As far as I can tell, your original code would work on my servers. Jeff Knight wrote: > I am a little curious about what setting in php.ini allows this > behavior on my (development) server though, since I suppose I should > turn it off so it matches with the outside world. From csnyder at chxo.com Fri Sep 5 11:30:48 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 05 Sep 2003 11:30:48 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <024DB13B-DFB3-11D7-BA7A-000393B9FB36@mac.com> References: <024DB13B-DFB3-11D7-BA7A-000393B9FB36@mac.com> Message-ID: <3F58AC28.1090204@chxo.com> Waitaminit! What if the version of PHP on the new server didn't support $_REQUEST? And had register_globals turned on? I think you might get those results, then, eh? Jeff Knight wrote: > I recently had to move one of my php sites from one server to another > and learned (once again) that not all php servers are the same (give > me a break, I've had a hangover for about three days now (or is it > four?)). One of the things that most attracted me to php after working > with asp for so long was its lenience towards doing things on-the-fly > without a lot of set up and declarations, etc. So I had some old code > that worked on my 1st server: > > if ($_REQUEST['from']) { > $from['rgb'] = $_REQUEST['from']; > } else { > $from['rgb'] = '000000'; > } > if ($_REQUEST['to']) { > $to['rgb'] = $_REQUEST['to']; > } else { > $to['rgb'] = 'FFFFFF'; > } > > echo "to: $to
"; > echo "to[rgb]: {$to['rgb']}
"; > > echo "from: $from
"; > echo "from[rgb]: {$from['rgb']}
"; > > Which produced the output: > to: Array > to[rgb]: FFFFFF > from: Array > from[rgb]: 000000 > > When I moved the code to a new server, the results were: > to: FFFFFF > to[rgb]: F > from: 4563456 > from[rgb]: 4 > > Of course, none of this was immediately obvious, since the code was > inside a php script that generated a png and had no echo statements. > Of course I should've originally said > > $from = array( 'rgb' => '000000'); > > But I'm lazy. > > I am a little curious about what setting in php.ini allows this > behavior on my (development) server though, since I suppose I should > turn it off so it matches with the outside world. > > > > > > Jeff Knight > jeff at lushmedia.com > 212/213-6558 x 203 > LUSH media > 110 W 40th St #1502 > New York, NY 10018 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jeffknight at mac.com Fri Sep 5 11:40:20 2003 From: jeffknight at mac.com (Jeff Knight) Date: Fri, 5 Sep 2003 11:40:20 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <3F58AC28.1090204@chxo.com> Message-ID: <41AED082-DFB7-11D7-BA7A-000393B9FB36@mac.com> On Friday, September 5, 2003, at 11:30 AM, Chris Snyder wrote: > Waitaminit! > > What if the version of PHP on the new server didn't support $_REQUEST? > And had register_globals turned on? > I think you might get those results, then, eh? > Since Hans is the administrator of the server, I highly doubt that that is the case. On Friday, September 5, 2003, at 11:27 AM, Chris Snyder wrote: > If that's an "outside world" setup, I think I'm happy to stay in my > own little self-contained niche where I can declare an array > implicitly. > As far as I can tell, your original code would work on my servers. Events will always conspire to ensure that you will eventually come to regret not maintaining portability. Machines get fried, ISP's go out of business, somebody somewhere spills a drink and BAM! you've got to do the little dance. Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From csnyder at chxo.com Fri Sep 5 12:10:01 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 05 Sep 2003 12:10:01 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <41AED082-DFB7-11D7-BA7A-000393B9FB36@mac.com> References: <41AED082-DFB7-11D7-BA7A-000393B9FB36@mac.com> Message-ID: <3F58B559.4010904@chxo.com> Jeff Knight wrote: > On Friday, September 5, 2003, at 11:30 AM, Chris Snyder wrote: > >> What if the version of PHP on the new server didn't support >> $_REQUEST? And had register_globals turned on? >> I think you might get those results, then, eh? >> Hmmm, the results aren't -exactly- the same, but tantalizingly close. Very curious. original behavior: http://dev.nyphp.org/~csnyder/jktest.php?to=FFFFFF&from=4563456 new? behavior: http://dev.nyphp.org/~csnyder/jktest.php?to=FFFFFF&from=4563456&port=1 > When I moved the code to a new server, the results were: > to: FFFFFF > to[rgb]: F > from: 4563456 > from[rgb]: 4 From soazine at erols.com Fri Sep 5 12:12:57 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 12:12:57 -0400 Subject: [nycphp-talk] How can I be prompted for Windows Authenticationw/o .htaccess? References: Message-ID: <022201c373c8$9211cf40$67a76244@philofsoa> Between two of NYPHP's finest (Dan and Ian), we solved it by figuring out how to finally delete .htaccess! Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Friday, September 05, 2003 10:08 AM Subject: Re: [nycphp-talk] How can I be prompted for Windows Authenticationw/o .htaccess? > maybe it's in the parent directory? > if it is, it would apply recursively. > > > > This is a multi-part message in MIME format. > > > > > > I have a folder that requires Windows Authentication each time it is > access. The remote system is Linux. However, there is no sign of > .htaccess nor .htpasswd as I understand a UNIX-based system to have to > prompt for Windows Authentication, yet each time I am always prompted, > even if I call the folder directly w/o calling a specific file in that > folder (this all done via the browser). > > > > Anyone there run into this and know what I should do about it? > > > > Thanx > > Phil > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jeffknight at mac.com Fri Sep 5 12:17:42 2003 From: jeffknight at mac.com (Jeff Knight) Date: Fri, 5 Sep 2003 12:17:42 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <3F58B559.4010904@chxo.com> Message-ID: <79FFBA36-DFBC-11D7-BA7A-000393B9FB36@mac.com> Holy Smokes! register_globals is ON! That's what I get for assuming anything.... On Friday, September 5, 2003, at 12:10 PM, Chris Snyder wrote: > Hmmm, the results aren't -exactly- the same, but tantalizingly close. > Very curious. > Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From soazine at erols.com Fri Sep 5 12:26:09 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 12:26:09 -0400 Subject: [nycphp-talk] mysql freakish error! Message-ID: <026d01c373ca$6a4c7710$67a76244@philofsoa> I have never in my life ever seen this happen, but I am doing a typical mySQL insert statement: insert into nnet_usermetadata ( ... ) values ( .... ) if (!mysql_query(sql)) { // DO STUFF} the ID column field, nnet_userid, is an int auto-increment. This is where I have never in my career seen this happen before. The INSERT statement, upon execution, literally writes on top of another existing row, so instead of 5 or 6 rows I have only 1 row, same ID, values changed! The way it works is that once a new user is pre-registered, their information is stored in the db, a cookie is set with their userID (the infamous permanent cookie) and then they're shown a screen w/ link to click to go to the next page. They can then click onto the "Registrer" link and edit their pre-registration information based upon the cookie stored in their machine and submit. Once submitted this time it updates their information instead of inserts. I've checked my code and writing on top of an existing row should NOT happen unless a cookie is set on their machine with their userid. In short, if I pre-register for the first time I should have a cookie with userid of 1. If Sven pre-registers for the first time on HIS machine he should have a cookie with userid of 2. and so on. So, uh, HELP! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Fri Sep 5 13:31:09 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 10:31:09 -0700 (PDT) Subject: [nycphp-talk] mysql freakish error! In-Reply-To: <026d01c373ca$6a4c7710$67a76244@philofsoa> Message-ID: <20030905173109.15664.qmail@web14310.mail.yahoo.com> --- Phil Powell wrote: > I have never in my life ever seen this happen, but I am doing a typical > mySQL insert statement: > > insert into nnet_usermetadata ( > ... > ) values ( > .... > ) > > if (!mysql_query(sql)) { // DO STUFF} > > the ID column field, nnet_userid, is an int auto-increment. > > This is where I have never in my career seen this happen before. The > INSERT statement, upon execution, literally writes on top of another > existing row, so instead of 5 or 6 rows I have only 1 row, same ID, > values changed! Show us some sample code. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Fri Sep 5 13:33:22 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 13:33:22 -0400 Subject: [nycphp-talk] mysql freakish error! References: <20030905173109.15664.qmail@web14310.mail.yahoo.com> Message-ID: <031901c373d3$ce7fedd0$67a76244@philofsoa> This is the mySQL insert statement: INSERT INTO nnet_usermetadata (nnet_user_uplinenumber, nnet_user_firstname, nnet_user_lastname, nnet_user_email, nnet_user_address1, nnet_user_address2, nnet_user_city, nnet_user_zip_postal, nnet_user_country, nnet_user_homephone, nnet_user_workphone, nnet_user_fax, nnet_user_isAdmin, nnet_record_entered) values ('', 'Phil', 'Powell', 'soazine at erols.com', 'Ryttarsg?rdkyrkan', '', 'Link?ping', '', 'SWE', '011-571-437-4430', '', '', '0', 'now()') And here is the SQL that created the table in the first place: # TABLE TO CONTAIN FINESOCCER.COM REGISTERED (AND TO BE REGISTERED) USERS AND THEIR METADATA create table if not exists nnet_usermetadata ( nnet_userid int not null auto_increment, primary key(nnet_userid), nnet_username varchar(255), nnet_password varchar(255), nnet_user_firstname varchar(255) not null, nnet_user_lastname varchar(255) not null, nnet_user_email varchar(255) not null, nnet_user_address1 varchar(255) not null, nnet_user_address2 varchar(50), nnet_user_city varchar(255) not null, nnet_user_state_province varchar(255), nnet_user_zip_postal varchar(20), nnet_user_country varchar(255), nnet_user_homephone varchar(50) not null, nnet_user_workphone varchar(50), nnet_user_fax varchar(50), nnet_user_uplinenumber int default 0, nnet_user_registrationnumber int default 0, nnet_user_isRegisteredFromHome varchar(1) default '0', nnet_user_ip varchar(15), nnet_user_isAdmin varchar(1) not null default '0', nnet_record_entered datetime default 'NOW()' ); alter table nnet_usermetadata add index ix_nnet_username(nnet_username); alter table nnet_usermetadata add index ix_nnet_password(nnet_password); alter table nnet_usermetadata add index ix_nnet_user_firstname(nnet_user_firstname); alter table nnet_usermetadata add index ix_nnet_user_lastname(nnet_user_lastname); alter table nnet_usermetadata add index ix_nnet_user_email(nnet_user_email); alter table nnet_usermetadata add index ix_nnet_city(nnet_user_city); alter table nnet_usermetadata add index ix_nnet_user_state_province(nnet_user_state_province); alter table nnet_usermetadata add index ix_nnet_user_zip_postal(nnet_user_zip_postal); alter table nnet_usermetadata add index ix_nnet_user_country(nnet_user_country); alter table nnet_usermetadata add index ix_nnet_user_uplinenumber(nnet_user_uplinenumber); alter table nnet_usermetadata add index ix_nnet_user_registrationnumber(nnet_user_registrationnumber); alter table nnet_usermetadata add index ix_nnet_user_isRegisteredFromHome(nnet_user_isRegisteredFromHome); alter table nnet_usermetadata add index ix_nnet_user_ip(nnet_user_ip); HTH Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Friday, September 05, 2003 1:31 PM Subject: Re: [nycphp-talk] mysql freakish error! > --- Phil Powell wrote: > > I have never in my life ever seen this happen, but I am doing a typical > > mySQL insert statement: > > > > insert into nnet_usermetadata ( > > ... > > ) values ( > > .... > > ) > > > > if (!mysql_query(sql)) { // DO STUFF} > > > > the ID column field, nnet_userid, is an int auto-increment. > > > > This is where I have never in my career seen this happen before. The > > INSERT statement, upon execution, literally writes on top of another > > existing row, so instead of 5 or 6 rows I have only 1 row, same ID, > > values changed! > > Show us some sample code. :-) > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Fri Sep 5 13:49:49 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 10:49:49 -0700 (PDT) Subject: [nycphp-talk] mysql freakish error! In-Reply-To: <031901c373d3$ce7fedd0$67a76244@philofsoa> Message-ID: <20030905174949.22226.qmail@web14303.mail.yahoo.com> --- Phil Powell wrote: > This is the mySQL insert statement And you got this by echoing your $sql variable or something from your script, right? If not, that is something to try, just to make sure the query is exactly what you think it is. You can also not execute the query through PHP and just echo it instead. From the MySQL interactive prompt, try to see if you can reproduce the problem by entering the query yourself (copy/paste): mysql> select foo from bar; +-----+ | foo | +-----+ |blah | +-----+ 1 row in set (0.00 sec) mysql> insert into bar... Query OK, 1 row affected (0.00 sec) mysql> select foo from bar; +-----+ | foo | +-----+ |blah | +-----+ 1 row in set (0.00 sec) > And here is the SQL that created the table in the first place Can you show us the output of "desc nnet_usermetadata" as well? I think that would be helpful. I can't explain the behavior you described (yet). Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From dan at cain.sh Fri Sep 5 14:12:10 2003 From: dan at cain.sh (Daniel J Cain Jr.) Date: Fri, 05 Sep 2003 13:12:10 -0500 Subject: [nycphp-talk] How do I create a future date for a cookie? In-Reply-To: <14d001c37311$8a807ae0$67a76244@philofsoa> References: <14d001c37311$8a807ae0$67a76244@philofsoa> Message-ID: <1062785530.220.100.camel@gigabeast.home.cain.sh> A good function to use to obtain a future date is strtotime('+1 week 2 days 4 hours 2 seconds'). I have found it to be very useful and extremely easy to use. On Thu, 2003-09-04 at 13:22, Phil Powell wrote: > I'm using setcookie() that I want to set "permanently" (set it to like > 100 years from now), but looking up both date() and mktime() honestly > made no sense to me as to how to do it. > > So, um, how do I do it? > > Thanx > Phil > > ______________________________________________________________________ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From southwell at dneba.com Fri Sep 5 14:14:13 2003 From: southwell at dneba.com (Michael Southwell) Date: Fri, 05 Sep 2003 14:14:13 -0400 Subject: [nycphp-talk] more on &$var in function In-Reply-To: <3F58A8CA.5060509@chxo.com> References: <20030905145327.19397.qmail@web14307.mail.yahoo.com> <20030905145327.19397.qmail@web14307.mail.yahoo.com> Message-ID: <5.1.0.14.2.20030905140927.00b42e88@mail.optonline.net> At 11:16 AM 9/5/2003, you wrote: >Chris Shiflett wrote: > >>--- Michael Southwell wrote: >> >> >>>why wouldn't you *always* define the parameter with & instead of >>>using a global statement? >>> >> >>Speaking personally, it depends on whether I think the parameter is closely >>related to the function and how much data is already required to be >>passed in. >> > >I agree-- if you have a function that updates a number of global objects >or variables, you don't want to force yourself to list them all as >arguments every time you call the function. > >As a further note, I always use global statements in order to make objects >available to the local scope, but for looking at or updating regular >variables I tend to use the $GLOBALS array so that the local namespace >doesn't get to crowded. aha, you mean like this? $var1="something"; $var2="something else"; function dosomething($var1){ global $GLOBALS; etc. > csnyder > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From csnyder at chxo.com Fri Sep 5 15:06:52 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 05 Sep 2003 15:06:52 -0400 Subject: [nycphp-talk] more on &$var in function In-Reply-To: <5.1.0.14.2.20030905140927.00b42e88@mail.optonline.net> References: <20030905145327.19397.qmail@web14307.mail.yahoo.com> <20030905145327.19397.qmail@web14307.mail.yahoo.com> <5.1.0.14.2.20030905140927.00b42e88@mail.optonline.net> Message-ID: <3F58DECC.5080409@chxo.com> Michael Southwell wrote: > aha, you mean like this? > > $var1="something"; > $var2="something else"; > function dosomething($var1){ > global $GLOBALS; > etc. > No need to do that, the $GLOBALS array is always available in the local scope. Here's an example: // global variables -- these aren't going to change for this request $goatcolor= "red"; $goatname= "Quux"; $barn= new Barn; $barn->color= "green"; function findGoat($goatname) { // make the current $barn object available locally global $barn; if ( $barn->color== $GLOBALS['goatcolor'] ) { print "$goatname is in this barn."; $barn->empty= 0; } else { print "$goatname is not in the $barn->color barn."; $barn->empty= 1; } } I could make a better example. :-) By referencing $goatcolor as $GLOBALS['goatcolor'], I'm much less likely to change it by accident. And possibly the script is more readable, at least to me. csnyder From bpang at bpang.com Fri Sep 5 15:20:25 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 15:20:25 -0400 Subject: [nycphp-talk] How can I be prompted for Windows Authenticationw/o .htaccess? Message-ID: please share... and that's BRIAN.. ;) > Between two of NYPHP's finest (Dan and Ian), we solved it by figuring out > how to finally delete .htaccess! > > Phil > ----- Original Message ----- > From: "Brian Pang" > To: "NYPHP Talk" > Sent: Friday, September 05, 2003 10:08 AM > Subject: Re: [nycphp-talk] How can I be prompted for Windows > Authenticationw/o .htaccess? > > > > maybe it's in the parent directory? > > if it is, it would apply recursively. > > > > > > > This is a multi-part message in MIME format. > > > > > > > > > I have a folder that requires Windows Authentication each time it is > > access. The remote system is Linux. However, there is no sign of > > .htaccess nor .htpasswd as I understand a UNIX-based system to have to > > prompt for Windows Authentication, yet each time I am always prompted, > > even if I call the folder directly w/o calling a specific file in that > > folder (this all done via the browser). > > > > > > Anyone there run into this and know what I should do about it? > > > > > > Thanx > > > Phil > > > > > > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From soazine at erols.com Fri Sep 5 15:32:33 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 15:32:33 -0400 Subject: [nycphp-talk] How can I be prompted forWindows Authenticationw/o .htaccess? References: Message-ID: <003301c373e4$743d0680$67a76244@philofsoa> All I had to do was to delete .htaccess using command-line telnet. And guess where it was to delete it (because that file is hidden from view) Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Friday, September 05, 2003 3:20 PM Subject: Re: [nycphp-talk] How can I be prompted forWindows Authenticationw/o .htaccess? > please share... and that's BRIAN.. ;) > > > > Between two of NYPHP's finest (Dan and Ian), we solved it by figuring out > > how to finally delete .htaccess! > > > > Phil > > ----- Original Message ----- > > From: "Brian Pang" > > To: "NYPHP Talk" > > Sent: Friday, September 05, 2003 10:08 AM > > Subject: Re: [nycphp-talk] How can I be prompted for Windows > > Authenticationw/o .htaccess? > > > > > > > maybe it's in the parent directory? > > > if it is, it would apply recursively. > > > > > > > > > > This is a multi-part message in MIME format. > > > > > > > > > > > > I have a folder that requires Windows Authentication each time it is > > > access. The remote system is Linux. However, there is no sign of > > > .htaccess nor .htpasswd as I understand a UNIX-based system to have to > > > prompt for Windows Authentication, yet each time I am always prompted, > > > even if I call the folder directly w/o calling a specific file in that > > > folder (this all done via the browser). > > > > > > > > Anyone there run into this and know what I should do about it? > > > > > > > > Thanx > > > > Phil > > > > > > > > > > > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Fri Sep 5 15:37:00 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 15:37:00 -0400 Subject: [nycphp-talk] How can I be prompted forWindows Authenticationw/o .htaccess? Message-ID: Oh, I had assumed that you knew how to find it, deleted it and were still having an issue. Just in case there are still others that don't know, the command: ls -al will show the hidden files (that start with a period "."), too > All I had to do was to delete .htaccess using command-line telnet. And > guess where it was to delete it (because that file is hidden from view) > > Phil > ----- Original Message ----- > From: "Brian Pang" > To: "NYPHP Talk" > Sent: Friday, September 05, 2003 3:20 PM > Subject: Re: [nycphp-talk] How can I be prompted forWindows Authenticationw/o > .htaccess? > > > > please share... and that's BRIAN.. ;) > > > > > > > Between two of NYPHP's finest (Dan and Ian), we solved it by figuring > out > > > how to finally delete .htaccess! > > > > > > Phil > > > ----- Original Message ----- > > > From: "Brian Pang" > > > To: "NYPHP Talk" > > > Sent: Friday, September 05, 2003 10:08 AM > > > Subject: Re: [nycphp-talk] How can I be prompted for Windows > > > Authenticationw/o .htaccess? > > > > > > > > > > maybe it's in the parent directory? > > > > if it is, it would apply recursively. > > > > > > > > > > > > > This is a multi-part message in MIME format. > > > > > > > > > > > > > > > I have a folder that requires Windows Authentication each time it is > > > > access. The remote system is Linux. However, there is no sign of > > > > .htaccess nor .htpasswd as I understand a UNIX-based system to have to > > > > prompt for Windows Authentication, yet each time I am always prompted, > > > > even if I call the folder directly w/o calling a specific file in that > > > > folder (this all done via the browser). > > > > > > > > > > Anyone there run into this and know what I should do about it? > > > > > > > > > > Thanx > > > > > Phil > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > talk mailing list > > > > talk at lists.nyphp.org > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From kenrbnsn at rbnsn.com Fri Sep 5 15:40:33 2003 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Fri, 05 Sep 2003 15:40:33 -0400 Subject: [nycphp-talk] How can I be prompted forWindows Authenticationw/o .htaccess? In-Reply-To: <003301c373e4$743d0680$67a76244@philofsoa> References: <003301c373e4$743d0680$67a76244@philofsoa> Message-ID: <6.0.0.20.2.20030905153926.057dc008@mail.rbnsn.com> At 03:32 PM 9/5/2003, Phil Powell wrote: >All I had to do was to delete .htaccess using command-line telnet. And >guess where it was to delete it (because that file is hidden from view) This is on LInux? All you had to do was a 'ls -la' to see all of the files in the directory including those that start with a '.' Ken Robinson -------------- next part -------------- An HTML attachment was scrubbed... URL: From max at idsociety.com Fri Sep 5 16:09:16 2003 From: max at idsociety.com (max goldberg) Date: Fri, 05 Sep 2003 16:09:16 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: References: Message-ID: <3F58ED6C.20005@idsociety.com> David Sklar wrote: >>FUNDAMENTALS #1: Site Structure: Where to Locate Includes? >> >> > >I set things up like this: > >Document root: /www/www.sitename.com/docroot >Includes: /www/www.sitename.com/support > >Individual pathnames and directory names, of course, don't really matter, >but it's important to locate includes outside of the document root. You can >configure your web server to not server include files based on extension or >parse include files as PHP based on extension, but then you're in trouble if >you ever have an include file with a different extension (on purpose, by >accident, because you edited one in-place with emacs and ended up with >foo.inc~, etc.) > > > I worked for a company which at one point had a website where you could view any file's source by appending the filename with ~. Mmmmm emacs. From bpang at bpang.com Fri Sep 5 16:27:03 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 16:27:03 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: great responses from all so far. I have to admit, that most of the time, I use a subdirectory, but a parallel directory does make sense from a security standpoint. Using .inc is just way too confusing for me, so mine all get .php .inc doesn't tell me what language I'm dealing with, nor does it give good syntax coloring, at least not automatically. Regarding portability, at the beginning of every file I put require_once($_SERVER['DOCUMENT_ROOT'] . "/LIB.php"); where LIB.php sets some variables for me, like the location of includes, images, functions, webroot/domainname, classes, etc. as $INCLUDES, $FUNCTIONS, $IMAGES, $WEBROOT, etc I then use these everytime I call on an include or require a function require("$FUNCTIONS/nameOfFunction.php"); This way I can move from machine to machine and put those dirs whereever I want or am able. This really helps when you only have access to the www directory and can't use a parallel directory. Looking forward to reading the final review/synopsis on this first column. > FUNDAMENTALS #1: Site Structure: Where to Locate Includes? > > Index.php is always located in a website's document root, /var/www/html/ > on > a Linux box. > Where should includes be located? > > Here are some possibilities: > * in the same directory, /var/www/html/ > * in a subdirectory of document root, /var/www/html/includes/ > * in a parallel directory to document root, /var/www/includes > > What are the advantages and disadvantages of each possibility? > IN THE SAME DIRECTORY > * simple > * but confusing and cluttered if there are more than just a few > IN A SUBDIRECTORY > * provides a logical place for them > * but exposes them to browsers > IN A PARALLEL DIRECTORY > * provides a logical place for them > * doesn't expose them to browsers > * but perhaps write privileges are not available (or needed?) > > What does exposure matter? > If the include file contains html, it will be visible in the calling > file's > source code. > If it contains php code (like a database connection), it will never be > visible anyway. > > Are there important principles here, or is location just a matter of > preference? > > ======================================================================= > Don't know what this posting is all about? > See: http://lists.nyphp.org/pipermail/talk/2003-September/005049.html > ======================================================================= > > Jeff > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From pl at eskimo.com Fri Sep 5 17:26:28 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 17:26:28 -0400 Subject: [nycphp-talk] mail function slows down page loading Message-ID: <002401c373f4$60229740$8d2c0242@peter1> Hi, I am using the mail function on a page, and I noticed that the page tends to hang for a while when it loads, no doubt do to having to send an email. Is there a way to send the email in a separate process. Would placing the ampersand in the sendmail path in PHP.ini file work? Right now, on the server, the path is: /usr/sbin/sendmail -t -i Would it help to change the path to: /usr/sbin/sendmail -t -i & Also, could this be done through the ini_set() function instead of editing the actual PHP.ini file? Peter Lehrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From pl at eskimo.com Fri Sep 5 17:33:27 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 17:33:27 -0400 Subject: [nycphp-talk] mail function slows down page loading References: <002401c373f4$60229740$8d2c0242@peter1> Message-ID: <003b01c373f5$59a9fc40$8d2c0242@peter1> it looks like the sendmail path can only be changed in php.ini or httpd.conf. peter ----- Original Message ----- From: Peter Lehrer To: NYPHP Talk Sent: Friday, September 05, 2003 5:26 PM Subject: [nycphp-talk] mail function slows down page loading Hi, I am using the mail function on a page, and I noticed that the page tends to hang for a while when it loads, no doubt do to having to send an email. Is there a way to send the email in a separate process. Would placing the ampersand in the sendmail path in PHP.ini file work? Right now, on the server, the path is: /usr/sbin/sendmail -t -i Would it help to change the path to: /usr/sbin/sendmail -t -i & Also, could this be done through the ini_set() function instead of editing the actual PHP.ini file? Peter Lehrer ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at preston-campbell.com Fri Sep 5 17:40:58 2003 From: brian at preston-campbell.com (Preston-Campbell) Date: Fri, 5 Sep 2003 17:40:58 -0400 Subject: [nycphp-talk] mail function slows down page loading In-Reply-To: <002401c373f4$60229740$8d2c0242@peter1> References: <002401c373f4$60229740$8d2c0242@peter1> Message-ID: <200309051740.58361.brian@preston-campbell.com> IIRC in Perl /usr/sbin/sendmail -q will queue the message. It may make a difference -- I may also be blowin smoke. Brian On Friday 05 September 2003 05:26 pm, Peter Lehrer wrote: > Hi, > I am using the mail function on a page, and I noticed that the page tends > to hang for a while when it loads, no doubt do to having to send an email. > Is there a way to send the email in a separate process. Would placing the > ampersand in the sendmail path in PHP.ini file work? > > Right now, on the server, the path is: > > /usr/sbin/sendmail -t -i > > Would it help to change the path to: > > /usr/sbin/sendmail -t -i & > > Also, could this be done through the ini_set() function instead of editing > the actual PHP.ini file? > > Peter Lehrer From pl at eskimo.com Fri Sep 5 17:44:27 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 17:44:27 -0400 Subject: [nycphp-talk] DB.php Message-ID: <007a01c373f6$e2b0ea20$8d2c0242@peter1> Does anybody know where you can get DB.php and how to install it? Does it just go in your include directory? Peter Lehrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Fri Sep 5 17:56:21 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Fri, 5 Sep 2003 17:56:21 -0400 (EDT) Subject: [nycphp-talk] DB.php In-Reply-To: <007a01c373f6$e2b0ea20$8d2c0242@peter1> Message-ID: On Fri, 5 Sep 2003, Peter Lehrer wrote: > Does anybody know where you can get DB.php and how to install it? > Does it just go in your include directory? You install it using pear. See http://pear.php.net. PEAR files usually go in /usr/local/lib/php, but the PEAR Package Manager should take care of this for you. BTW, you may need to edit your php.ini file to add the new location to your include_path. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From pl at eskimo.com Fri Sep 5 18:06:02 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 18:06:02 -0400 Subject: [nycphp-talk] DB.php References: Message-ID: <008f01c373f9$eb0aa460$8d2c0242@peter1> I'm running php on windows. Will it work on windows? Peter ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Friday, September 05, 2003 5:56 PM Subject: Re: [nycphp-talk] DB.php > On Fri, 5 Sep 2003, Peter Lehrer wrote: > > > Does anybody know where you can get DB.php and how to install it? > > Does it just go in your include directory? > > You install it using pear. See http://pear.php.net. PEAR files usually > go in /usr/local/lib/php, but the PEAR Package Manager should take > care of this for you. BTW, you may need to edit your php.ini file to > add the new location to your include_path. > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dan at mx2pro.com Fri Sep 5 18:10:03 2003 From: dan at mx2pro.com (Dan Horning) Date: Fri, 5 Sep 2003 18:10:03 -0400 Subject: [nycphp-talk] How can I beprompted forWindows Authenticationw/o .htaccess? In-Reply-To: Message-ID: <000f01c373fa$77215fc0$e80f9942@dwchome> The issue was solved via windows command line FTP For more details .. We'll have to get Ian on here - Dan Horning ------------------------------------------------------------------------ ------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? ------------------------------------------------------------------------ ------------ MX2 Productions, Media from concept to execution. PO Box 160, Clifton Park, NY 12065-0160 > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Brian Pang > Sent: Friday, September 05, 2003 3:37 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] How can I beprompted forWindows > Authenticationw/o .htaccess? > > > Oh, I had assumed that you knew how to find it, deleted it and were > still having an issue. > > Just in case there are still others that don't know, the command: > ls -al > > will show the hidden files (that start with a period "."), too > > > > > All I had to do was to delete .htaccess using command-line > telnet. And > > guess where it was to delete it (because that file is > hidden from view) > > > > Phil > > ----- Original Message ----- > > From: "Brian Pang" > > To: "NYPHP Talk" > > Sent: Friday, September 05, 2003 3:20 PM > > Subject: Re: [nycphp-talk] How can I be prompted forWindows > Authenticationw/o > > .htaccess? > > > > > > > please share... and that's BRIAN.. ;) > > > > > > > > > > Between two of NYPHP's finest (Dan and Ian), we solved > it by figuring > > out > > > > how to finally delete .htaccess! > > > > > > > > Phil > > > > ----- Original Message ----- > > > > From: "Brian Pang" > > > > To: "NYPHP Talk" > > > > Sent: Friday, September 05, 2003 10:08 AM > > > > Subject: Re: [nycphp-talk] How can I be prompted for Windows > > > > Authenticationw/o .htaccess? > > > > > > > > > > > > > maybe it's in the parent directory? > > > > > if it is, it would apply recursively. > > > > > > > > > > > > > > > > This is a multi-part message in MIME format. > > > > > > > > > > > > > > > > > > I have a folder that requires Windows > Authentication each time > it is > > > > > access. The remote system is Linux. However, there > is no sign of > > > > > .htaccess nor .htpasswd as I understand a UNIX-based system to > have to > > > > > prompt for Windows Authentication, yet each time I am always > prompted, > > > > > even if I call the folder directly w/o calling a specific file > in that > > > > > folder (this all done via the browser). > > > > > > > > > > > > Anyone there run into this and know what I should > do about it? > > > > > > > > > > > > Thanx > > > > > > Phil > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > talk mailing list > > > > > talk at lists.nyphp.org > > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > _______________________________________________ > > > > talk mailing list > > > > talk at lists.nyphp.org > > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From shiflett at php.net Fri Sep 5 18:11:38 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 15:11:38 -0700 (PDT) Subject: [nycphp-talk] DB.php In-Reply-To: <008f01c373f9$eb0aa460$8d2c0242@peter1> Message-ID: <20030905221138.59655.qmail@web14303.mail.yahoo.com> --- Peter Lehrer wrote: > I'm running php on windows. Will it work on windows? http://pear.php.net/manual/en/faq.windows.php Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From pl at eskimo.com Fri Sep 5 18:26:52 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 18:26:52 -0400 Subject: [nycphp-talk] DB.php References: <20030905221138.59655.qmail@web14303.mail.yahoo.com> Message-ID: <00a801c373fc$d136fae0$8d2c0242@peter1> Is there a way to set up multiple include paths in the php.ini? ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Friday, September 05, 2003 6:11 PM Subject: Re: [nycphp-talk] DB.php > --- Peter Lehrer wrote: > > I'm running php on windows. Will it work on windows? > > http://pear.php.net/manual/en/faq.windows.php > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From pl at eskimo.com Fri Sep 5 18:27:46 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 5 Sep 2003 18:27:46 -0400 Subject: [nycphp-talk] DB.php References: <20030905221138.59655.qmail@web14303.mail.yahoo.com> <00a801c373fc$d136fae0$8d2c0242@peter1> Message-ID: <00b001c373fc$f0403b40$8d2c0242@peter1> i got it. ----- Original Message ----- From: "Peter Lehrer" To: ; "NYPHP Talk" Sent: Friday, September 05, 2003 6:26 PM Subject: Re: [nycphp-talk] DB.php > Is there a way to set up multiple include paths in the php.ini? > ----- Original Message ----- > From: "Chris Shiflett" > To: "NYPHP Talk" > Sent: Friday, September 05, 2003 6:11 PM > Subject: Re: [nycphp-talk] DB.php > > > > --- Peter Lehrer wrote: > > > I'm running php on windows. Will it work on windows? > > > > http://pear.php.net/manual/en/faq.windows.php > > > > Chris > > > > ===== > > Become a better Web developer with the HTTP Developer's Handbook > > http://httphandbook.org/ > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Fri Sep 5 19:24:59 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 5 Sep 2003 19:24:59 -0400 Subject: [nycphp-talk] setcookie Pt. III References: Message-ID: <02ec01c37404$ec8e0f10$67a76244@philofsoa> I tried setcookie('nordicnet_registration', $registrationNumber, 0, '/'); // FAILED I tried header("Set-cookie: nordicnet_registration=$registrationNumber; path=\"/\"\n"); // FAILED Basically, every combination of setting a session cookie in PHP has so far failed! I am now convinced that God does not want me to use sessions ever! Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:40 PM Subject: RE: [nycphp-talk] setcookie Pt. II hahaha! serves me right for not reading THE VERY NEXT LINE: "The expire and secure arguments are integers and cannot be skipped with an empty string. Use a zero (0) instead" so try this: setcookie('nordicnet_registration', $uplinenumber, 0, "/" ); -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:28 PM Subject: RE: [nycphp-talk] setcookie Pt. II Phil, From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil ---------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Fri Sep 5 19:52:58 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 19:52:58 -0400 Subject: [nycphp-talk] setcookie Pt. III Message-ID: try this... I think you're sposed to put the value in quotes setcookie("nordicnet_registration", "$registrationNumber", 0, "/"); > This is a multi-part message in MIME format. > > > > > I tried setcookie('nordicnet_registration', $registrationNumber, 0, '/'); // FAILED > > I tried header("Set-cookie: nordicnet_registration=$registrationNumber; path=\"/\"\n"); // FAILED > > Basically, every combination of setting a session cookie in PHP has so far failed! > > I am now convinced that God does not want me to use sessions ever! > > > > Phil > ----- Original Message ----- > From: Wellington Fan > To: NYPHP Talk > Sent: Thursday, September 04, 2003 6:40 PM > Subject: RE: [nycphp-talk] setcookie Pt. II > > > hahaha! serves me right for not reading THE VERY NEXT LINE: > "The expire and secure arguments are integers and cannot be skipped with an empty string. Use a zero (0) instead" > > so try this: > setcookie('nordicnet_registration', $uplinenumber, 0, "/" ); > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > Sent: Thursday, September 04, 2003 6:34 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] setcookie Pt. II > > > Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( > > Phil > ----- Original Message ----- > From: Wellington Fan > To: NYPHP Talk > Sent: Thursday, September 04, 2003 6:28 PM > Subject: RE: [nycphp-talk] setcookie Pt. II > > > Phil, > > From the setcookie page: > > You may also replace any argument with an empty string ("") in order to skip that argument. > > the full signature (most of the parameters are optional ): > setcookie ( name , value , expire, path , domain , secure ) > > your call: > setcookie('nordicnet_registration', $uplinenumber, "", "/" ); > > Try that -- I'm guessing it will work. > > -- > Wellington > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > Sent: Thursday, September 04, 2003 6:15 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] setcookie Pt. II > > > That does not work either, it sets the cookie onto disk and instantly deletes it. > > Phil > ----- Original Message ----- > From: Patrick Hunt > To: NYPHP Talk > Sent: Thursday, September 04, 2003 5:56 PM > Subject: Re: [nycphp-talk] setcookie Pt. II > > > > set the expire time to zero. > > > --Original Message Text--- > From: Phil Powell > Date: Thu, 4 Sep 2003 17:20:45 -0400 > > setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET > > I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. > > I want to set the path and NOT the time int. How do I do that? > > Phil > > > > > > ---------------------------------------------------------------------- > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > > -------------------------------------------------------------------------- > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From dorgan at optonline.net Fri Sep 5 20:01:20 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 05 Sep 2003 20:01:20 -0400 Subject: [nycphp-talk] First Big Client References: <20030904215628.C46FBA85E6@virtu.nyphp.org> <168901c37331$fa0e51a0$67a76244@philofsoa> Message-ID: <001401c3740a$015098a0$c801a8c0@dj> Ok i ahve been developing PHP web application for a couple fo years now but they have always been on a volunteer or personal basis. Now I have a client that wants a custom web application and I am not sure how much to charge them. So of the features that this web application included are: Contact Management Personal Appointment book as well as global appointment book Resume management meeting management admin features(Such as adding new users) Sending out template based email to well over 100 individuals dynamic word document creation and many other features... This system is replacing other application such as Goldmine, resume grabber, and will also eliminate many steps such as sending emails in outlook. if anyone has an idea on how much something like this goes for please let me know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Fri Sep 5 20:18:39 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 17:18:39 -0700 (PDT) Subject: [nycphp-talk] setcookie Pt. III In-Reply-To: <02ec01c37404$ec8e0f10$67a76244@philofsoa> Message-ID: <20030906001839.58369.qmail@web14305.mail.yahoo.com> --- Phil Powell wrote: > I tried header("Set-cookie: nordicnet_registration=$registrationNumber; > path=\"/\"\n"); // FAILED The C in Set-Cookie is uppercase, the path is not quoted, and there should not be a newline. header('Set-Cookie: var=value; path=/'); Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From shiflett at php.net Fri Sep 5 20:22:19 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 17:22:19 -0700 (PDT) Subject: [nycphp-talk] setcookie Pt. III In-Reply-To: Message-ID: <20030906002219.91181.qmail@web14311.mail.yahoo.com> > I am now convinced that God does not want me to use sessions ever! Are you trying to set a session cookie (a cookie that exists only in the browser session) or trying to use PHP sessions? Now I'm confused. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Fri Sep 5 20:22:23 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 5 Sep 2003 20:22:23 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: References: Message-ID: <20030906002223.GA5044@panix.com> On Fri, Sep 05, 2003 at 04:27:03PM -0400, Brian Pang wrote: > > Using .inc is just way too confusing for me, so mine all get .php > .inc doesn't tell me what language I'm dealing with, nor does it give > good syntax coloring, at least not automatically. Confusing to me is wondering if a file named "a.php" is a script which is going to be viewed/executed or is just a bunch of included functions. > Regarding portability, at the beginning of every file I put > require_once($_SERVER['DOCUMENT_ROOT'] . "/LIB.php"); And if your files are not in the document root and the tree structure differs between the development machine and the server? > where LIB.php sets some variables for me, like the location of includes, > images, functions, webroot/domainname, classes, etc. as $INCLUDES, > $FUNCTIONS, $IMAGES, $WEBROOT, etc Nice. --Dan ... snipped rest to save bandwidth and storage, the nice thing to do... -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From bpang at bpang.com Fri Sep 5 20:22:55 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 20:22:55 -0400 Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) Message-ID: You can dynamically create (MS) Word Docs with php? I better do my homework. > This is a multi-part message in MIME format. > > > Ok i ahve been developing PHP web application for a couple fo years now but they have always been on a volunteer or personal basis. Now I have a client that wants a custom web application and I am not sure how much to charge them. So of the features that this web application included are: > > Contact Management > Personal Appointment book as well as global appointment book > Resume management > meeting management > admin features(Such as adding new users) > Sending out template based email to well over 100 individuals > dynamic word document creation > and many other features... > From shiflett at php.net Fri Sep 5 20:25:37 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 5 Sep 2003 17:25:37 -0700 (PDT) Subject: [nycphp-talk] First Big Client In-Reply-To: <001401c3740a$015098a0$c801a8c0@dj> Message-ID: <20030906002537.28322.qmail@web14308.mail.yahoo.com> --- "Donald J. Organ IV" wrote: > if anyone has an idea on how much something like this goes for please > let me know. I think David would have the best advice for this type of thing, but there is one perspective you seem to be overlooking. Instead of trying to quantity the cost based on the perceived value of the software, maybe you can quantify the cost based on the amount of time you estimate will be involved combined with how valuable you believe your time to be. I think you are the best person to give such an estimate. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From bpang at bpang.com Fri Sep 5 20:30:02 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 20:30:02 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: > On Fri, Sep 05, 2003 at 04:27:03PM -0400, Brian Pang wrote: > > > > Using .inc is just way too confusing for me, so mine all get .php > > .inc doesn't tell me what language I'm dealing with, nor does it give > > good syntax coloring, at least not automatically. > > Confusing to me is wondering if a file named "a.php" is a script which is > going to be viewed/executed or is just a bunch of included functions. > I see your point, but it would be in the includes dir so that's how I would know. > > > Regarding portability, at the beginning of every file I put > > require_once($_SERVER['DOCUMENT_ROOT'] . "/LIB.php"); > > And if your files are not in the document root and the tree structure > differs between the development machine and the server? only the LIB.php needs to go in the document_root. Then it can set the $INCLUDES, $FUNCTIONS, etc vars to $INCLUDES = "/path/to/includes/dir"; I try to at least use sym links so that my servers have similar trees. Ideally, the machines are twins, but in the event that they are not (dev machine is a workstation?) you could just maintain 2 separate LIB.php files with different paths. dev $INCLUDES = "/dev/path/to/includes"; production $INCLUDES = "/prod/path/to/includes"; The files which call LIB.php can be anywhere under the www root as $_SERVER['DOCUMENT_ROOT'] won't change. Document_root is always the www root. > > > where LIB.php sets some variables for me, like the location of includes, > > images, functions, webroot/domainname, classes, etc. as $INCLUDES, > > $FUNCTIONS, $IMAGES, $WEBROOT, etc > > Nice. yeah, works for me > > --Dan > > ... snipped rest to save bandwidth and storage, the nice thing to do... > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From tom at supertom.com Fri Sep 5 20:41:52 2003 From: tom at supertom.com (Tom) Date: Fri, 05 Sep 2003 20:41:52 -0400 Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) In-Reply-To: Message-ID: I think I saw a class for this on phpclasses.org. Heck, I bet if you just put a doc extension on it and send the file download headers, Word would probably open it anyway. What you guys doing in front of a computer now anyway - it's Friday night! :-) Tom -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Brian Pang Sent: Friday, September 05, 2003 8:23 PM To: NYPHP Talk Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) You can dynamically create (MS) Word Docs with php? I better do my homework. > This is a multi-part message in MIME format. > > > Ok i ahve been developing PHP web application for a couple fo years now but they have always been on a volunteer or personal basis. Now I have a client that wants a custom web application and I am not sure how much to charge them. So of the features that this web application included are: > > Contact Management > Personal Appointment book as well as global appointment book > Resume management > meeting management > admin features(Such as adding new users) > Sending out template based email to well over 100 individuals > dynamic word document creation > and many other features... > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Fri Sep 5 20:36:37 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 20:36:37 -0400 Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) Message-ID: thanks, I'll take a look. That might work, but wait, who uses Word anymore anyways? I bet it's much easier to dynamically create and OpenOffice document. :) Where else would one be on a Friday nite? If you reply this evening, I'll know the answer. :P > I think I saw a class for this on phpclasses.org. > > Heck, I bet if you just put a doc extension on it and send the file download > headers, Word would probably open it anyway. > > What you guys doing in front of a computer now anyway - it's Friday night! > :-) > > Tom > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Brian Pang > Sent: Friday, September 05, 2003 8:23 PM > To: NYPHP Talk > Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big > Client) > > > You can dynamically create (MS) Word Docs with php? > > I better do my homework. > > > > This is a multi-part message in MIME format. > > > > > > Ok i ahve been developing PHP web application for a couple fo years > now but they have always been on a volunteer or personal basis. Now I > have a client that wants a custom web application and I am not sure how > much to charge them. So of the features that this web application > included are: > > > > Contact Management > > Personal Appointment book as well as global appointment book > > Resume management > > meeting management > > admin features(Such as adding new users) > > Sending out template based email to well over 100 individuals > > dynamic word document creation > > and many other features... > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From danielc at analysisandsolutions.com Fri Sep 5 20:38:20 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 5 Sep 2003 20:38:20 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure In-Reply-To: References: Message-ID: <20030906003819.GB5044@panix.com> On Fri, Sep 05, 2003 at 08:30:02PM -0400, Brian Pang wrote: > > only the LIB.php needs to go in the document_root. And if the server you're trying to move to is a shared server on which you don't have control over the document root? Or, on your development server, you develop lots of clients websites, so make subdirectories off of the main document root to do the designs in? Or... That's why I use one file in each directory which contains a relative path pointing back to the general includes dir. --Dan ... wonderin' what's so hard 'bout snippin... -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dorgan at optonline.net Fri Sep 5 20:38:12 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 05 Sep 2003 20:38:12 -0400 Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) References: Message-ID: <001101c3740f$27d5a470$c801a8c0@dj> well I am out of state right now and on vacation visiting my dad in Washington state its only about 5:30 here. ----- Original Message ----- From: "Tom" To: "NYPHP Talk" Sent: Friday, September 05, 2003 8:41 PM Subject: RE: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big Client) > I think I saw a class for this on phpclasses.org. > > Heck, I bet if you just put a doc extension on it and send the file download > headers, Word would probably open it anyway. > > What you guys doing in front of a computer now anyway - it's Friday night! > :-) > > Tom > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Brian Pang > Sent: Friday, September 05, 2003 8:23 PM > To: NYPHP Talk > Subject: Dynamic Word Doc Creation? (was Re: [nycphp-talk] First Big > Client) > > > You can dynamically create (MS) Word Docs with php? > > I better do my homework. > > > > This is a multi-part message in MIME format. > > > > > > Ok i ahve been developing PHP web application for a couple fo years > now but they have always been on a volunteer or personal basis. Now I > have a client that wants a custom web application and I am not sure how > much to charge them. So of the features that this web application > included are: > > > > Contact Management > > Personal Appointment book as well as global appointment book > > Resume management > > meeting management > > admin features(Such as adding new users) > > Sending out template based email to well over 100 individuals > > dynamic word document creation > > and many other features... > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From pat at vote.com Fri Sep 5 20:37:55 2003 From: pat at vote.com (Patrick Hunt) Date: Fri, 05 Sep 2003 20:37:55 -0400 Subject: [nycphp-talk] setcookie Pt. III Message-ID: <20030906003839.460E8A8729@virtu.nyphp.org> Phil, Please be patient with me while I ask a silly question: Exactly how are you evaluating the success/failure of your cookie code? I ask because earlier in this thread you said: >> That does not work either, it sets the cookie >> onto disk and instantly deletes it. are you using the existence of the cookie file in the OS to decide if the cookie was set? I don't know one way or the other whether that's a good indicator, and there's certainly better ways to check. My first check would of course be to redirect to a second script that looks in the $_COOKIE (or $HTTP_COOKIE_VARS) array. Unfortunately there's the faint possibility that the browser you're using has been (unbeknownst to you) configured to silently discard the cookies. Therefore I tend to look directly at the raw data that's received by the browser from the cookie setting script. If I execute the following one-liner: I get back the following header line in the reply: Set-Cookie: cname=cdata; expires=Sat, 06-Sep-03 01:30:36 GMT; path=/ which is what I wanted; a non-session cookie that expires in an hour. If I execute this one-liner: I get back the following header line in the reply: Set-Cookie: cname=cdata; path=/ which is, as far as I know, since it has NO expiration date, a true session cookie. If you haven't done so yet, I would strongly suggest you use telnet or some other low level tool to examine the exact headers you're getting back from the script. Of course you may have gone through all of this already, in which case sorry for wasting your time. Good luck. Pat Hunt ------------------------- --Original Message Text--- From: Phil Powell Date: Fri, 5 Sep 2003 19:24:59 -0400 I tried setcookie('nordicnet_registration', $registrationNumber, 0, '/'); // FAILED I tried header("Set-cookie: nordicnet_registration=$registrationNumber; path=\"/\"\n"); // FAILED Basically, every combination of setting a session cookie in PHP has so far failed! I am now convinced that God does not want me to use sessions ever! Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:40 PM Subject: RE: [nycphp-talk] setcookie Pt. II hahaha! serves me right for not reading THE VERY NEXT LINE: "The expire and secure arguments are integers and cannot be skipped with an empty string. Use a zero (0) instead" so try this: setcookie('nordicnet_registration', $uplinenumber, 0, "/" ); -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:28 PM Subject: RE: [nycphp-talk] setcookie Pt. II Phil, >From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Fri Sep 5 20:49:37 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 05 Sep 2003 20:49:37 -0400 Subject: [nycphp-talk] FUNDAMENTALS #1: Site Structure Message-ID: shared server meaning what? I don't think you mean virtual domain hosting where 1 server hosts multiple domains. Each domain would have it's own document root. if you mean where you are working entirely in a subdirectory on 1 domain; i.e. domain.com/site1 vs. domain.com/site2 maybe I'd beg to drop 1 file in the root with some obscure name other than LIB.php... even as .LIB.php so it's more hidden. or I would just append the dir name in the include include($_SERVER['DOCUMENT_ROOT'] . "/site1/LIB.php"); and "assume" that if it moves to another box that it would still stay within the site1 dir. Else, it's not a hard search/replace. on my dev server, I usually create multiple virtual domains > > > > only the LIB.php needs to go in the document_root. > > And if the server you're trying to move to is a shared server on which you > don't have control over the document root? Or, on your development > server, you develop lots of clients websites, so make subdirectories off > of the main document root to do the designs in? Or... > > ... wonderin' what's so hard 'bout snippin... it's not, just trying not to leave out so much of the thread that the thread is lost From soazine at erols.com Sat Sep 6 03:07:35 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 03:07:35 -0400 Subject: [nycphp-talk] setcookie Pt. III References: <20030906001839.58369.qmail@web14305.mail.yahoo.com> Message-ID: <03b201c37445$8c781030$67a76244@philofsoa> Tried all of those, Chris, they didn't set the cookie either. Went back to setcookie('nordicnet_registration', $registrationNumber, 0, '/'); And this time it worked. I am at a loss. Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Friday, September 05, 2003 8:18 PM Subject: Re: [nycphp-talk] setcookie Pt. III > --- Phil Powell wrote: > > I tried header("Set-cookie: nordicnet_registration=$registrationNumber; > > path=\"/\"\n"); // FAILED > > The C in Set-Cookie is uppercase, the path is not quoted, and there should not > be a newline. > > header('Set-Cookie: var=value; path=/'); > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 6 03:10:17 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 03:10:17 -0400 Subject: [nycphp-talk] setcookie Pt. III References: <20030906003839.460E8A8729@virtu.nyphp.org> Message-ID: <03d701c37445$ed774d10$67a76244@philofsoa> Thanx for the suggestions.. Ian and Dan can tell you the headache I'm dealing with with the remote server. I am forbidden to telnet nor ssh so neither of those are an option. I used $_COOKIE['nordicnet_registration'] within a PHP script to display it; upon setcookie it was still not there (this after redirecting to the script with the $_COOKIE element). What I wound up doing was literally changing it back to setcookie and walking away for the evening. Coming back, it works this time. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Friday, September 05, 2003 8:37 PM Subject: Re: [nycphp-talk] setcookie Pt. III Phil, Please be patient with me while I ask a silly question: Exactly how are you evaluating the success/failure of your cookie code? I ask because earlier in this thread you said: >> That does not work either, it sets the cookie >> onto disk and instantly deletes it. are you using the existence of the cookie file in the OS to decide if the cookie was set? I don't know one way or the other whether that's a good indicator, and there's certainly better ways to check. My first check would of course be to redirect to a second script that looks in the $_COOKIE (or $HTTP_COOKIE_VARS) array. Unfortunately there's the faint possibility that the browser you're using has been (unbeknownst to you) configured to silently discard the cookies. Therefore I tend to look directly at the raw data that's received by the browser from the cookie setting script. If I execute the following one-liner: I get back the following header line in the reply: Set-Cookie: cname=cdata; expires=Sat, 06-Sep-03 01:30:36 GMT; path=/ which is what I wanted; a non-session cookie that expires in an hour. If I execute this one-liner: I get back the following header line in the reply: Set-Cookie: cname=cdata; path=/ which is, as far as I know, since it has NO expiration date, a true session cookie. If you haven't done so yet, I would strongly suggest you use telnet or some other low level tool to examine the exact headers you're getting back from the script. Of course you may have gone through all of this already, in which case sorry for wasting your time. Good luck. Pat Hunt ------------------------- --Original Message Text--- From: Phil Powell Date: Fri, 5 Sep 2003 19:24:59 -0400 I tried setcookie('nordicnet_registration', $registrationNumber, 0, '/'); // FAILED I tried header("Set-cookie: nordicnet_registration=$registrationNumber; path=\"/\"\n"); // FAILED Basically, every combination of setting a session cookie in PHP has so far failed! I am now convinced that God does not want me to use sessions ever! Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:40 PM Subject: RE: [nycphp-talk] setcookie Pt. II hahaha! serves me right for not reading THE VERY NEXT LINE: "The expire and secure arguments are integers and cannot be skipped with an empty string. Use a zero (0) instead" so try this: setcookie('nordicnet_registration', $uplinenumber, 0, "/" ); -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II Yeah I tried that and got a parse error statement expected integer on the setcookie() line. I guess when it says [int expire] they MEAN int! :( Phil ----- Original Message ----- From: Wellington Fan To: NYPHP Talk Sent: Thursday, September 04, 2003 6:28 PM Subject: RE: [nycphp-talk] setcookie Pt. II Phil, >From the setcookie page: You may also replace any argument with an empty string ("") in order to skip that argument. the full signature (most of the parameters are optional ): setcookie ( name , value , expire, path , domain , secure ) your call: setcookie('nordicnet_registration', $uplinenumber, "", "/" ); Try that -- I'm guessing it will work. -- Wellington -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Thursday, September 04, 2003 6:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] setcookie Pt. II That does not work either, it sets the cookie onto disk and instantly deletes it. Phil ----- Original Message ----- From: Patrick Hunt To: NYPHP Talk Sent: Thursday, September 04, 2003 5:56 PM Subject: Re: [nycphp-talk] setcookie Pt. II set the expire time to zero. --Original Message Text--- From: Phil Powell Date: Thu, 4 Sep 2003 17:20:45 -0400 setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE SET I have this cookie I have to set that will be session-based (cookie deletes when browser session is closed, the classic). However, the cookie is set in /Main_page/registrering.php so the path for the cookie is incorrect; I want the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a path, I have to set a time int value at the same time. I want to set the path and NOT the time int. How do I do that? Phil _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Sat Sep 6 07:35:49 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sat, 06 Sep 2003 07:35:49 -0400 Subject: [nycphp-talk] Apache config question Message-ID: <003301c3746b$05a30bc0$6401a8c0@EZDSDELL> I'm not sure how to handle this. I'm setting up a new server at the office. I'd like to be able to set up a directory structure like this: /var/www/html/clientproj1 <= for client stuff /var/www/html/myproj <= for whatever other project I may work on I started effing around with virtual host (see below) which works fine for this one instance but it's not obvious how to set up another virtual host since I really don't have "names" for each one. I access everything using the IP address. This works! DocumentRoot /var/www/html/clientproj1 ServerName www.clientproj1.com This DOESN'T work if combined with above. The two "overlap" according to Apache's configtest. DocumentRoot /var/www/html/myproj ServerName www.myproj.com I think the answer is buried somewhere in here (http://httpd.apache.org/docs-2.1/vhosts/examples.html) but after trying a few different things, e.g., 192.168.1.111:8080, I couldn't get it to work with another subdir like "myproj." Suggestions? Jeff From suzerain at suzerain.com Sat Sep 6 07:54:33 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Sat, 6 Sep 2003 07:54:33 -0400 Subject: [nycphp-talk] Apache config question In-Reply-To: <003301c3746b$05a30bc0$6401a8c0@EZDSDELL> References: <003301c3746b$05a30bc0$6401a8c0@EZDSDELL> Message-ID: I have several dummy domains set up on my machine. I think your problem is that you're missing the first VirtualHost directive, which is the base one for the server (where the "Hey, your Apache install worked" page ends up). Then, you can append the other virtual hosts. And. here's my relevant snippet from httpd.conf: --- ServerName 127.0.0.1 DocumentRoot /Library/WebServer/Documents Include /private/etc/httpd/vhosts --- That first virtual host needs to be declared and then your others are handled separately. So, inside the vhosts directory, I have several text files, each containing a virtual host directive. Here's one: ServerName www.clientname.me DocumentRoot /Library/WebServer/Documents/clientname They all have different directories. (These are from dummy domains that I set up on my laptop to mirror my client's real ones, but in principle they work exactly the same with a server that's serving to other machines.) Just make sure the other machines know where to go to see www.testserver.com. Hope that helps. I am by no means an Apache server admin, but this works for me. Marc >I'm not sure how to handle this. I'm setting up a new server at the >office. I'd like to be able to set up a directory structure like this: > > /var/www/html/clientproj1 <= for client stuff > /var/www/html/myproj <= for whatever other project I may work on > >I started effing around with virtual host (see below) which works fine >for this one instance but it's not obvious how to set up another virtual >host since I really don't have "names" for each one. I access everything >using the IP address. > >This works! > > DocumentRoot /var/www/html/clientproj1 > ServerName www.clientproj1.com > > >This DOESN'T work if combined with above. The two "overlap" according to >Apache's configtest. > > DocumentRoot /var/www/html/myproj > ServerName www.myproj.com > > >I think the answer is buried somewhere in here >(http://httpd.apache.org/docs-2.1/vhosts/examples.html) but after trying >a few different things, e.g., 192.168.1.111:8080, I couldn't get it to >work with another subdir like "myproj." Suggestions? > >Jeff > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Sat Sep 6 08:03:49 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sat, 06 Sep 2003 08:03:49 -0400 Subject: [nycphp-talk] Apache config question In-Reply-To: <003301c3746b$05a30bc0$6401a8c0@EZDSDELL> Message-ID: <003601c3746e$ef7f7c80$6401a8c0@EZDSDELL> Why is it that within four minutes of posting something that you suddenly come up with the answer to your own question? Well...here's one solution that worked. Let me know if there are better ways to do this. I set Listen: Listen 80 Listen 192.168.1.111:8080 I then set: NameVirtualHost 192.168.1.111 Finally...I did this. DocumentRoot /var/www/html/clientproj1 ServerName www.clientproj1.com DocumentRoot /var/www/html/jeff ServerName www.myproj.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Sent: Saturday, September 06, 2003 6:36 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Apache config question I'm not sure how to handle this. I'm setting up a new server at the office. I'd like to be able to set up a directory structure like this: /var/www/html/clientproj1 <= for client stuff /var/www/html/myproj <= for whatever other project I may work on I started effing around with virtual host (see below) which works fine for this one instance but it's not obvious how to set up another virtual host since I really don't have "names" for each one. I access everything using the IP address. This works! DocumentRoot /var/www/html/clientproj1 ServerName www.clientproj1.com This DOESN'T work if combined with above. The two "overlap" according to Apache's configtest. DocumentRoot /var/www/html/myproj ServerName www.myproj.com I think the answer is buried somewhere in here (http://httpd.apache.org/docs-2.1/vhosts/examples.html) but after trying a few different things, e.g., 192.168.1.111:8080, I couldn't get it to work with another subdir like "myproj." Suggestions? Jeff _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Sat Sep 6 08:34:35 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sat, 06 Sep 2003 08:34:35 -0400 Subject: [nycphp-talk] Apache config question In-Reply-To: Message-ID: <003901c37473$3bc31e90$6401a8c0@EZDSDELL> So...when you want to view a particular client project, what would be the URL? That is, how do you get to clientproj1, clientproj2, in your browser? In my situation, since I use http://192.168.1.111 to view stuff in the browser, how do I get it - the browser - to go to those other virtual hosts? Am I overlooking something real obvious? Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Marc Antony Vose Sent: Saturday, September 06, 2003 6:55 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Apache config question I have several dummy domains set up on my machine. I think your problem is that you're missing the first VirtualHost directive, which is the base one for the server (where the "Hey, your Apache install worked" page ends up). Then, you can append the other virtual hosts. And. here's my relevant snippet from httpd.conf: --- ServerName 127.0.0.1 DocumentRoot /Library/WebServer/Documents Include /private/etc/httpd/vhosts --- That first virtual host needs to be declared and then your others are handled separately. So, inside the vhosts directory, I have several text files, each containing a virtual host directive. Here's one: ServerName www.clientname.me DocumentRoot /Library/WebServer/Documents/clientname They all have different directories. (These are from dummy domains that I set up on my laptop to mirror my client's real ones, but in principle they work exactly the same with a server that's serving to other machines.) Just make sure the other machines know where to go to see www.testserver.com. Hope that helps. I am by no means an Apache server admin, but this works for me. Marc >I'm not sure how to handle this. I'm setting up a new server at the >office. I'd like to be able to set up a directory structure like this: > > /var/www/html/clientproj1 <= for client stuff > /var/www/html/myproj <= for whatever other project I may work on > >I started effing around with virtual host (see below) which works fine >for this one instance but it's not obvious how to set up another virtual >host since I really don't have "names" for each one. I access everything >using the IP address. > >This works! > > DocumentRoot /var/www/html/clientproj1 > ServerName www.clientproj1.com > > >This DOESN'T work if combined with above. The two "overlap" according to >Apache's configtest. > > DocumentRoot /var/www/html/myproj > ServerName www.myproj.com > > >I think the answer is buried somewhere in here >(http://httpd.apache.org/docs-2.1/vhosts/examples.html) but after trying >a few different things, e.g., 192.168.1.111:8080, I couldn't get it to >work with another subdir like "myproj." Suggestions? > >Jeff > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 6 15:10:18 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 15:10:18 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: <055801c374aa$83079380$67a76244@philofsoa> Fourth attempt.. it fails now in login, I check by printing $_COOKIE['nordicnet_registration'] and there is no value there! Guys, what on earth do I do about this???? Here is the code that sets the cookie: if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { setcookie('nordicnet_registration', $row['nnet_user_registrationnumber'], 0, '/'); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . 'Takk for logging inn. For forsatte ' . "klikk her'; } else if (sizeof($_POST) > 0) { $errorMsg .= $font . '
  • Det finns en problem med db
  • '; $hasLoggedIn = 0; } Because the PHP script is in a frame, instead of using header() I print out some text with a link for the user to click and to go to another page. By then the cookie should be registered, yet it's not there! I'm at a complete loss. Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Sat Sep 6 15:22:26 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 15:22:26 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: Phil, can you send me your url so I can try it in my browser? I maintain my recommendation that you should quote the cookie value you wish to set. setcookie('nordicnet_registration', "$row['nnet_user_registrationnumber']", 0, '/'); > This is a multi-part message in MIME format. > > > Fourth attempt.. it fails now in login, I check by printing $_COOKIE['nordicnet_registration'] and there is no value there! Guys, what on earth do I do about this???? > > Here is the code that sets the cookie: > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > setcookie('nordicnet_registration', $row['nnet_user_registrationnumber'], 0, '/'); > @mysql_free_result($query); > mysql_close($dbConn) or die('Could not close db'); > $html .= $font . 'Takk for logging inn. For forsatte ' . > " ' target=_top>klikk her'; > } else if (sizeof($_POST) > 0) { > $errorMsg .= $font . '

  • Det finns en problem med db
  • '; > $hasLoggedIn = 0; > } > > > Because the PHP script is in a frame, instead of using header() I print out some text with a link for the user to click and to go to another page. By then the cookie should be registered, yet it's not there! > > I'm at a complete loss. > > Phil > From soazine at erols.com Sat Sep 6 15:25:02 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 15:25:02 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <058501c374ac$92268220$67a76244@philofsoa> http://www.nordicnet.no go to "Logg inn" and enter this username and password: ppowell100001 6vKYtEwM You should see a text with link, click onto the link and then either you'll go to the right URL or to logginn.php again (the WRONG URL!) Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 3:22 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > Phil, can you send me your url so I can try it in my browser? > > I maintain my recommendation that you should quote the cookie value you > wish to set. > > setcookie('nordicnet_registration', > "$row['nnet_user_registrationnumber']", 0, '/'); > > > > This is a multi-part message in MIME format. > > > > > > Fourth attempt.. it fails now in login, I check by printing > $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > what on earth do I do about this???? > > > > Here is the code that sets the cookie: > > > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > > setcookie('nordicnet_registration', > $row['nnet_user_registrationnumber'], 0, '/'); > > @mysql_free_result($query); > > mysql_close($dbConn) or die('Could not close db'); > > $html .= $font . 'Takk for logging inn. For > forsatte ' . > > " href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " . > > ' target=_top>klikk her'; > > } else if (sizeof($_POST) > 0) { > > $errorMsg .= $font . '

  • Det finns en problem > med db
  • '; > > $hasLoggedIn = 0; > > } > > > > > > Because the PHP script is in a frame, instead of using header() I > print out some text with a link for the > user to click and to go to another page. By then the cookie should be > registered, yet it's not there! > > > > I'm at a complete loss. > > > > Phil > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Sat Sep 6 15:41:53 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 15:41:53 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: ok, I ended up on the blue fruit of the loom page... is that the proper page? cookie manager (Mozilla 1.4; Linux) shows host: www.nordicnet.no name: nordicnet_registration content: {} what are you trying to store as the content? so, it looks like the cookie was set. Where on the blue page are you reading back the cookie data? > http://www.nordicnet.no go to "Logg inn" and enter this username and > password: > > ppowell100001 > 6vKYtEwM > > You should see a text with link, click onto the link and then either you'll > go to the right URL or to logginn.php again (the WRONG URL!) > > Phil > ----- Original Message ----- > From: "Brian Pang" > To: "NYPHP Talk" > Sent: Saturday, September 06, 2003 3:22 PM > Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > Phil, can you send me your url so I can try it in my browser? > > > > I maintain my recommendation that you should quote the cookie value you > > wish to set. > > > > setcookie('nordicnet_registration', > > "$row['nnet_user_registrationnumber']", 0, '/'); > > > > > > > This is a multi-part message in MIME format. > > > > > > > > > Fourth attempt.. it fails now in login, I check by printing > > $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > > what on earth do I do about this???? > > > > > > Here is the code that sets the cookie: > > > > > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > > > setcookie('nordicnet_registration', > > $row['nnet_user_registrationnumber'], 0, '/'); > > > @mysql_free_result($query); > > > mysql_close($dbConn) or die('Could not close db'); > > > $html .= $font . 'Takk for logging inn. For > > forsatte ' . > > > " > href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " > . > > > ' target=_top>klikk her'; > > > } else if (sizeof($_POST) > 0) { > > > $errorMsg .= $font . '

  • Det finns en problem > > med db
  • '; > > > $hasLoggedIn = 0; > > > } > > > > > > > > > Because the PHP script is in a frame, instead of using header() I > > print out some text with a link for the > > user to click and to go to another page. By then the cookie should be > > registered, yet it's not there! > > > > > > I'm at a complete loss. > > > > > > Phil > > > > > > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From bpang at bpang.com Sat Sep 6 15:42:48 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 15:42:48 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: Phil, let's take this off list. sorry for the extra posts, folks -brian From soazine at erols.com Sat Sep 6 15:42:33 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 15:42:33 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <05b601c374af$04353300$67a76244@philofsoa> I am now convinced that I am not meant to code. I did your solution and it failed. However, when I used a solution that earlier FAILED in registering.php (the header() solution) it WORKED in logginn.php! BUT.. setcookie() WORKS in registrering.php and FAILS in logginn.php Hans? Anyone? Explain that one! Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 3:22 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > Phil, can you send me your url so I can try it in my browser? > > I maintain my recommendation that you should quote the cookie value you > wish to set. > > setcookie('nordicnet_registration', > "$row['nnet_user_registrationnumber']", 0, '/'); > > > > This is a multi-part message in MIME format. > > > > > > Fourth attempt.. it fails now in login, I check by printing > $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > what on earth do I do about this???? > > > > Here is the code that sets the cookie: > > > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > > setcookie('nordicnet_registration', > $row['nnet_user_registrationnumber'], 0, '/'); > > @mysql_free_result($query); > > mysql_close($dbConn) or die('Could not close db'); > > $html .= $font . 'Takk for logging inn. For > forsatte ' . > > " href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " . > > ' target=_top>klikk her'; > > } else if (sizeof($_POST) > 0) { > > $errorMsg .= $font . '

  • Det finns en problem > med db
  • '; > > $hasLoggedIn = 0; > > } > > > > > > Because the PHP script is in a frame, instead of using header() I > print out some text with a link for the > user to click and to go to another page. By then the cookie should be > registered, yet it's not there! > > > > I'm at a complete loss. > > > > Phil > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From pat at vote.com Sat Sep 6 15:52:33 2003 From: pat at vote.com (Patrick Hunt) Date: Sat, 06 Sep 2003 15:52:33 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <058501c374ac$92268220$67a76244@philofsoa> Message-ID: <20030906195232.2749DA8611@virtu.nyphp.org> Phil, when I follow your login instructions I get the following header back from the login: HTTP/1.1 200 OK Date: Sat, 06 Sep 2003 19:44:59 GMT Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a FrontPage/5.0.2.2510 mod_layout/3.2 X-Powered-By: PHP/4.3.0 Set-Cookie: nordicnet_registration=deleted; expires=Fri, 06-Sep-2002 19:44:58 GMT; path=/ Connection: close Content-Type: text/html I think a different line of code is executing, cuz there's a date there, and it's a year old, which explains why it's not taking. Pat ------------------------------- On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: >http://www.nordicnet.no go to "Logg inn" and enter this username and >password: > >ppowell100001 >6vKYtEwM > >You should see a text with link, click onto the link and then either you'll >go to the right URL or to logginn.php again (the WRONG URL!) > >Phil >----- Original Message ----- >From: "Brian Pang" >To: "NYPHP Talk" >Sent: Saturday, September 06, 2003 3:22 PM >Subject: Re: [nycphp-talk] why does setcookie fail????? > > >> Phil, can you send me your url so I can try it in my browser? >> >> I maintain my recommendation that you should quote the cookie value you >> wish to set. >> >> setcookie('nordicnet_registration', >> "$row['nnet_user_registrationnumber']", 0, '/'); >> >> >> > This is a multi-part message in MIME format. >> > >> > >> > Fourth attempt.. it fails now in login, I check by printing >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, >> what on earth do I do about this???? >> > >> > Here is the code that sets the cookie: >> > >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { >> > setcookie('nordicnet_registration', >> $row['nnet_user_registrationnumber'], 0, '/'); >> > @mysql_free_result($query); >> > mysql_close($dbConn) or die('Could not close db'); >> > $html .= $font . 'Takk for logging inn. For >> forsatte ' . >> > "> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " >. >> > ' target=_top>klikk her'; >> > } else if (sizeof($_POST) > 0) { >> > $errorMsg .= $font . '

  • Det finns en problem >> med db
  • '; >> > $hasLoggedIn = 0; >> > } >> > >> > >> > Because the PHP script is in a frame, instead of using header() I >> print out some text with a link for the >> user to click and to go to another page. By then the cookie should be >> registered, yet it's not there! >> > >> > I'm at a complete loss. >> > >> > Phil >> > >> >> >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Sat Sep 6 15:53:49 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 15:53:49 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <20030906195232.2749DA8611@virtu.nyphp.org> Message-ID: <05dc01c374b0$972f2020$67a76244@philofsoa> Pat, how did you do that? I've never been able to figure out how to obtain headers like that from my browser. :( Phil ----- Original Message ----- From: "Patrick Hunt" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 3:52 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > Phil, > > when I follow your login instructions I get the following header > back from the login: > > HTTP/1.1 200 OK > Date: Sat, 06 Sep 2003 19:44:59 GMT > Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a > FrontPage/5.0.2.2510 mod_layout/3.2 > X-Powered-By: PHP/4.3.0 > Set-Cookie: nordicnet_registration=deleted; expires=Fri, > 06-Sep-2002 19:44:58 GMT; path=/ > Connection: close > Content-Type: text/html > > I think a different line of code is executing, cuz there's a date > there, and it's a year old, which explains why it's not taking. > > Pat > > ------------------------------- > > On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: > > >http://www.nordicnet.no go to "Logg inn" and enter this username and > >password: > > > >ppowell100001 > >6vKYtEwM > > > >You should see a text with link, click onto the link and then either you'll > >go to the right URL or to logginn.php again (the WRONG URL!) > > > >Phil > >----- Original Message ----- > >From: "Brian Pang" > >To: "NYPHP Talk" > >Sent: Saturday, September 06, 2003 3:22 PM > >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > >> Phil, can you send me your url so I can try it in my browser? > >> > >> I maintain my recommendation that you should quote the cookie value you > >> wish to set. > >> > >> setcookie('nordicnet_registration', > >> "$row['nnet_user_registrationnumber']", 0, '/'); > >> > >> > >> > This is a multi-part message in MIME format. > >> > > >> > > >> > Fourth attempt.. it fails now in login, I check by printing > >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > >> what on earth do I do about this???? > >> > > >> > Here is the code that sets the cookie: > >> > > >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > >> > setcookie('nordicnet_registration', > >> $row['nnet_user_registrationnumber'], 0, '/'); > >> > @mysql_free_result($query); > >> > mysql_close($dbConn) or die('Could not close db'); > >> > $html .= $font . 'Takk for logging inn. For > >> forsatte ' . > >> > " >> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " > >. > >> > ' target=_top>klikk her'; > >> > } else if (sizeof($_POST) > 0) { > >> > $errorMsg .= $font . '

  • Det finns en problem > >> med db
  • '; > >> > $hasLoggedIn = 0; > >> > } > >> > > >> > > >> > Because the PHP script is in a frame, instead of using header() I > >> print out some text with a link for the > >> user to click and to go to another page. By then the cookie should be > >> registered, yet it's not there! > >> > > >> > I'm at a complete loss. > >> > > >> > Phil > >> > > >> > >> > >> > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From pat at vote.com Sat Sep 6 15:56:19 2003 From: pat at vote.com (Patrick Hunt) Date: Sat, 06 Sep 2003 15:56:19 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <05dc01c374b0$972f2020$67a76244@philofsoa> Message-ID: <20030906195617.326B5A8651@virtu.nyphp.org> I didn't use a browser. I used a debugging tool. If you're running windows I can send you a copy, but I don't know of a similar tool for *NIX. pat ------------------------------ On Sat, 6 Sep 2003 15:53:49 -0400, Phil Powell wrote: >Pat, how did you do that? I've never been able to figure out how to obtain >headers like that from my browser. > >:( > >Phil >----- Original Message ----- >From: "Patrick Hunt" >To: "NYPHP Talk" >Sent: Saturday, September 06, 2003 3:52 PM >Subject: Re: [nycphp-talk] why does setcookie fail????? > > >> Phil, >> >> when I follow your login instructions I get the following header >> back from the login: >> >> HTTP/1.1 200 OK >> Date: Sat, 06 Sep 2003 19:44:59 GMT >> Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a >> FrontPage/5.0.2.2510 mod_layout/3.2 >> X-Powered-By: PHP/4.3.0 >> Set-Cookie: nordicnet_registration=deleted; expires=Fri, >> 06-Sep-2002 19:44:58 GMT; path=/ >> Connection: close >> Content-Type: text/html >> >> I think a different line of code is executing, cuz there's a date >> there, and it's a year old, which explains why it's not taking. >> >> Pat >> >> ------------------------------- >> >> On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: >> >> >http://www.nordicnet.no go to "Logg inn" and enter this username and >> >password: >> > >> >ppowell100001 >> >6vKYtEwM >> > >> >You should see a text with link, click onto the link and then either >you'll >> >go to the right URL or to logginn.php again (the WRONG URL!) >> > >> >Phil >> >----- Original Message ----- >> >From: "Brian Pang" >> >To: "NYPHP Talk" >> >Sent: Saturday, September 06, 2003 3:22 PM >> >Subject: Re: [nycphp-talk] why does setcookie fail????? >> > >> > >> >> Phil, can you send me your url so I can try it in my browser? >> >> >> >> I maintain my recommendation that you should quote the cookie value you >> >> wish to set. >> >> >> >> setcookie('nordicnet_registration', >> >> "$row['nnet_user_registrationnumber']", 0, '/'); >> >> >> >> >> >> > This is a multi-part message in MIME format. >> >> > >> >> > >> >> > Fourth attempt.. it fails now in login, I check by printing >> >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, >> >> what on earth do I do about this???? >> >> > >> >> > Here is the code that sets the cookie: >> >> > >> >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { >> >> > setcookie('nordicnet_registration', >> >> $row['nnet_user_registrationnumber'], 0, '/'); >> >> > @mysql_free_result($query); >> >> > mysql_close($dbConn) or die('Could not close db'); >> >> > $html .= $font . 'Takk for logging inn. For >> >> forsatte ' . >> >> > "> >> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php >" >> >. >> >> > ' target=_top>klikk her'; >> >> > } else if (sizeof($_POST) > 0) { >> >> > $errorMsg .= $font . '

  • Det finns en problem >> >> med db
  • '; >> >> > $hasLoggedIn = 0; >> >> > } >> >> > >> >> > >> >> > Because the PHP script is in a frame, instead of using header() I >> >> print out some text with a link for the >> >> user to click and to go to another page. By then the cookie should be >> >> registered, yet it's not there! >> >> > >> >> > I'm at a complete loss. >> >> > >> >> > Phil >> >> > >> >> >> >> >> >> >> >> _______________________________________________ >> >> talk mailing list >> >> talk at lists.nyphp.org >> >> http://lists.nyphp.org/mailman/listinfo/talk >> > >> >_______________________________________________ >> >talk mailing list >> >talk at lists.nyphp.org >> >http://lists.nyphp.org/mailman/listinfo/talk >> > >> >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > From bpang at bpang.com Sat Sep 6 16:00:07 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 16:00:07 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: good catch, tho my cookie manager shows expiration at end of session > Phil, > > when I follow your login instructions I get the following header > back from the login: > > HTTP/1.1 200 OK > Date: Sat, 06 Sep 2003 19:44:59 GMT > Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a > FrontPage/5.0.2.2510 mod_layout/3.2 > X-Powered-By: PHP/4.3.0 > Set-Cookie: nordicnet_registration=deleted; expires=Fri, > 06-Sep-2002 19:44:58 GMT; path=/ > Connection: close > Content-Type: text/html > > I think a different line of code is executing, cuz there's a date > there, and it's a year old, which explains why it's not taking. > > Pat > > ------------------------------- > > On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: > > >http://www.nordicnet.no go to "Logg inn" and enter this username and > >password: > > > >ppowell100001 > >6vKYtEwM > > > >You should see a text with link, click onto the link and then either you'll > >go to the right URL or to logginn.php again (the WRONG URL!) > > > >Phil > >----- Original Message ----- > >From: "Brian Pang" > >To: "NYPHP Talk" > >Sent: Saturday, September 06, 2003 3:22 PM > >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > >> Phil, can you send me your url so I can try it in my browser? > >> > >> I maintain my recommendation that you should quote the cookie value you > >> wish to set. > >> > >> setcookie('nordicnet_registration', > >> "$row['nnet_user_registrationnumber']", 0, '/'); > >> > >> > >> > This is a multi-part message in MIME format. > >> > > >> > > >> > Fourth attempt.. it fails now in login, I check by printing > >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > >> what on earth do I do about this???? > >> > > >> > Here is the code that sets the cookie: > >> > > >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > >> > setcookie('nordicnet_registration', > >> $row['nnet_user_registrationnumber'], 0, '/'); > >> > @mysql_free_result($query); > >> > mysql_close($dbConn) or die('Could not close db'); > >> > $html .= $font . 'Takk for logging inn. For > >> forsatte ' . > >> > " >> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " > >. > >> > ' target=_top>klikk her'; > >> > } else if (sizeof($_POST) > 0) { > >> > $errorMsg .= $font . '

  • Det finns en problem > >> med db
  • '; > >> > $hasLoggedIn = 0; > >> > } > >> > > >> > > >> > Because the PHP script is in a frame, instead of using header() I > >> print out some text with a link for the > >> user to click and to go to another page. By then the cookie should be > >> registered, yet it's not there! > >> > > >> > I'm at a complete loss. > >> > > >> > Phil > >> > > >> > >> > >> > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From soazine at erols.com Sat Sep 6 16:06:31 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:06:31 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <20030906195617.326B5A8651@virtu.nyphp.org> Message-ID: <05e701c374b2$5d99ff40$67a76244@philofsoa> Please do I'm running Win2000 Pro! Takk s? meget Phil ----- Original Message ----- From: "Patrick Hunt" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 3:56 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > I didn't use a browser. I used a debugging tool. If you're running > windows I can send you a copy, but I don't know of a similar tool > for *NIX. > > pat > > ------------------------------ > > On Sat, 6 Sep 2003 15:53:49 -0400, Phil Powell wrote: > > >Pat, how did you do that? I've never been able to figure out how to obtain > >headers like that from my browser. > > > >:( > > > >Phil > >----- Original Message ----- > >From: "Patrick Hunt" > >To: "NYPHP Talk" > >Sent: Saturday, September 06, 2003 3:52 PM > >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > >> Phil, > >> > >> when I follow your login instructions I get the following header > >> back from the login: > >> > >> HTTP/1.1 200 OK > >> Date: Sat, 06 Sep 2003 19:44:59 GMT > >> Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a > >> FrontPage/5.0.2.2510 mod_layout/3.2 > >> X-Powered-By: PHP/4.3.0 > >> Set-Cookie: nordicnet_registration=deleted; expires=Fri, > >> 06-Sep-2002 19:44:58 GMT; path=/ > >> Connection: close > >> Content-Type: text/html > >> > >> I think a different line of code is executing, cuz there's a date > >> there, and it's a year old, which explains why it's not taking. > >> > >> Pat > >> > >> ------------------------------- > >> > >> On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: > >> > >> >http://www.nordicnet.no go to "Logg inn" and enter this username and > >> >password: > >> > > >> >ppowell100001 > >> >6vKYtEwM > >> > > >> >You should see a text with link, click onto the link and then either > >you'll > >> >go to the right URL or to logginn.php again (the WRONG URL!) > >> > > >> >Phil > >> >----- Original Message ----- > >> >From: "Brian Pang" > >> >To: "NYPHP Talk" > >> >Sent: Saturday, September 06, 2003 3:22 PM > >> >Subject: Re: [nycphp-talk] why does setcookie fail????? > >> > > >> > > >> >> Phil, can you send me your url so I can try it in my browser? > >> >> > >> >> I maintain my recommendation that you should quote the cookie value you > >> >> wish to set. > >> >> > >> >> setcookie('nordicnet_registration', > >> >> "$row['nnet_user_registrationnumber']", 0, '/'); > >> >> > >> >> > >> >> > This is a multi-part message in MIME format. > >> >> > > >> >> > > >> >> > Fourth attempt.. it fails now in login, I check by printing > >> >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > >> >> what on earth do I do about this???? > >> >> > > >> >> > Here is the code that sets the cookie: > >> >> > > >> >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > >> >> > setcookie('nordicnet_registration', > >> >> $row['nnet_user_registrationnumber'], 0, '/'); > >> >> > @mysql_free_result($query); > >> >> > mysql_close($dbConn) or die('Could not close db'); > >> >> > $html .= $font . 'Takk for logging inn. For > >> >> forsatte ' . > >> >> > " >> >> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php > >" > >> >. > >> >> > ' target=_top>klikk her'; > >> >> > } else if (sizeof($_POST) > 0) { > >> >> > $errorMsg .= $font . '

  • Det finns en problem > >> >> med db
  • '; > >> >> > $hasLoggedIn = 0; > >> >> > } > >> >> > > >> >> > > >> >> > Because the PHP script is in a frame, instead of using header() I > >> >> print out some text with a link for the > >> >> user to click and to go to another page. By then the cookie should be > >> >> registered, yet it's not there! > >> >> > > >> >> > I'm at a complete loss. > >> >> > > >> >> > Phil > >> >> > > >> >> > >> >> > >> >> > >> >> _______________________________________________ > >> >> talk mailing list > >> >> talk at lists.nyphp.org > >> >> http://lists.nyphp.org/mailman/listinfo/talk > >> > > >> >_______________________________________________ > >> >talk mailing list > >> >talk at lists.nyphp.org > >> >http://lists.nyphp.org/mailman/listinfo/talk > >> > > >> > >> > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 6 16:08:05 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:08:05 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <20030906195232.2749DA8611@virtu.nyphp.org> Message-ID: <05f301c374b2$956e2450$67a76244@philofsoa> I closed and reopened my browser to refresh settings, and then I go to logginn.php to log in. I don't know what other line of code is running, but at this point I'm going to just totally violate protocol and dump the entire script to you to see. Phil

  • Skikka din brukernavn, takk!
  • '; } if ($hasLoggedIn && strlen($passord) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Skikka din passord, takk!
  • '; } if ($hasLoggedIn) { $sql = 'SELECT nnet_user_registrationnumber FROM nnet_usermetadata ' . 'WHERE nnet_username = \'' . $brukernavn . '\' ' . ' AND nnet_password = \'' . $passord . '\' '; $query = mysql_query($sql) or die('Could not perform query'); if (mysql_num_rows($query) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Vi kann ikke tykka brukernavnen eller passorden '. ' inn vår db
  • '; } } //---END OF SERVER-SIDE VALIDATION BLOCK------------------------------------------------------------- // IF hasLoggedIn IS STILL TRUE WE FOUND THEIR LOGIN INFORMATION - CLOSE UP, SET COOKIE AND REDIRECT if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { //setcookie('nordicnet_registration', "$row['nnet_user_registrationnumber']", 0, '/'); header("Set-Cookie:nordicnet_registration={" . $row['nnet_user_registrationnumber'] . "}; path=/"); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . 'Takk for logging inn. For forsatte ' . "klikk her"; } else if (sizeof($_POST) > 0) { $errorMsg .= $font . '

  • Det finns en problem med db
  • '; $hasLoggedIn = 0; } ?> <?= $brand ?>: Logg inn<? if ($hasLoggedIn) echo ' - Takk!'; ?> Logg inn til

    - Obligatoriske felt
    Brukernavn: 0) echo " value=\"$brukernavn\""; ?>>
    Passord:
    Glemt du din passord? Klikk her
    ----- Original Message ----- From: "Patrick Hunt" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 3:52 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > Phil, > > when I follow your login instructions I get the following header > back from the login: > > HTTP/1.1 200 OK > Date: Sat, 06 Sep 2003 19:44:59 GMT > Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a > FrontPage/5.0.2.2510 mod_layout/3.2 > X-Powered-By: PHP/4.3.0 > Set-Cookie: nordicnet_registration=deleted; expires=Fri, > 06-Sep-2002 19:44:58 GMT; path=/ > Connection: close > Content-Type: text/html > > I think a different line of code is executing, cuz there's a date > there, and it's a year old, which explains why it's not taking. > > Pat > > ------------------------------- > > On Sat, 6 Sep 2003 15:25:02 -0400, Phil Powell wrote: > > >http://www.nordicnet.no go to "Logg inn" and enter this username and > >password: > > > >ppowell100001 > >6vKYtEwM > > > >You should see a text with link, click onto the link and then either you'll > >go to the right URL or to logginn.php again (the WRONG URL!) > > > >Phil > >----- Original Message ----- > >From: "Brian Pang" > >To: "NYPHP Talk" > >Sent: Saturday, September 06, 2003 3:22 PM > >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > >> Phil, can you send me your url so I can try it in my browser? > >> > >> I maintain my recommendation that you should quote the cookie value you > >> wish to set. > >> > >> setcookie('nordicnet_registration', > >> "$row['nnet_user_registrationnumber']", 0, '/'); > >> > >> > >> > This is a multi-part message in MIME format. > >> > > >> > > >> > Fourth attempt.. it fails now in login, I check by printing > >> $_COOKIE['nordicnet_registration'] and there is no value there! Guys, > >> what on earth do I do about this???? > >> > > >> > Here is the code that sets the cookie: > >> > > >> > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > >> > setcookie('nordicnet_registration', > >> $row['nnet_user_registrationnumber'], 0, '/'); > >> > @mysql_free_result($query); > >> > mysql_close($dbConn) or die('Could not close db'); > >> > $html .= $font . 'Takk for logging inn. For > >> forsatte ' . > >> > " >> href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " > >. > >> > ' target=_top>klikk her'; > >> > } else if (sizeof($_POST) > 0) { > >> > $errorMsg .= $font . '
  • Det finns en problem > >> med db
  • '; > >> > $hasLoggedIn = 0; > >> > } > >> > > >> > > >> > Because the PHP script is in a frame, instead of using header() I > >> print out some text with a link for the > >> user to click and to go to another page. By then the cookie should be > >> registered, yet it's not there! > >> > > >> > I'm at a complete loss. > >> > > >> > Phil > >> > > >> > >> > >> > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From wfan at encogent.com Sat Sep 6 16:11:14 2003 From: wfan at encogent.com (Wellington Fan) Date: Sat, 6 Sep 2003 16:11:14 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <20030906195617.326B5A8651@virtu.nyphp.org> Message-ID: SamSpade is a gret little utility for windows that will allow you to examine hte headers returned from a HTTP request: http://www.samspade.org/ -- Wellington > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Patrick Hunt > Sent: Saturday, September 06, 2003 3:56 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] why does setcookie fail????? > > > I didn't use a browser. I used a debugging tool. If you're running > windows I can send you a copy, but I don't know of a similar tool > for *NIX. > > pat From csnyder at chxo.com Sat Sep 6 16:18:05 2003 From: csnyder at chxo.com (Chris Snyder) Date: Sat, 06 Sep 2003 16:18:05 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: References: Message-ID: <3F5A40FD.5060508@chxo.com> I'd like to recommend Mozilla with the Live HTTP Headers tool: http://livehttpheaders.mozdev.org/ It's saved my sanity on a number of occasions. csnyder Wellington Fan wrote: >SamSpade is a gret little utility for windows that will allow you to examine >hte headers returned from a HTTP request: >http://www.samspade.org/ > >-- >Wellington > > > > > > >>-----Original Message----- >>From: talk-bounces at lists.nyphp.org >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Patrick Hunt >>Sent: Saturday, September 06, 2003 3:56 PM >>To: NYPHP Talk >>Subject: Re: [nycphp-talk] why does setcookie fail????? >> >> >>I didn't use a browser. I used a debugging tool. If you're running >>windows I can send you a copy, but I don't know of a similar tool >>for *NIX. >> >>pat >> >> > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From soazine at erols.com Sat Sep 6 16:19:27 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:19:27 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <05fb01c374b4$2be180c0$67a76244@philofsoa> Thanx.. but I can't find the utility, unless you refer to the online decipher. I can't check Palogget%20S1.php either :( Phil ----- Original Message ----- From: "Wellington Fan" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:11 PM Subject: RE: [nycphp-talk] why does setcookie fail????? > SamSpade is a gret little utility for windows that will allow you to examine > hte headers returned from a HTTP request: > http://www.samspade.org/ > > -- > Wellington > > > > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Patrick Hunt > > Sent: Saturday, September 06, 2003 3:56 PM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > > I didn't use a browser. I used a debugging tool. If you're running > > windows I can send you a copy, but I don't know of a similar tool > > for *NIX. > > > > pat > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 6 16:20:52 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:20:52 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <3F5A40FD.5060508@chxo.com> Message-ID: <060301c374b4$5ebe2200$67a76244@philofsoa> Apparently my sanity is not to be saved. I can't install it, I get Javascript errors on the page! :( Phil ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:18 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > I'd like to recommend Mozilla with the Live HTTP Headers tool: > http://livehttpheaders.mozdev.org/ > > It's saved my sanity on a number of occasions. > > csnyder > > Wellington Fan wrote: > > >SamSpade is a gret little utility for windows that will allow you to examine > >hte headers returned from a HTTP request: > >http://www.samspade.org/ > > > >-- > >Wellington > > > > > > > > > > > > > >>-----Original Message----- > >>From: talk-bounces at lists.nyphp.org > >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Patrick Hunt > >>Sent: Saturday, September 06, 2003 3:56 PM > >>To: NYPHP Talk > >>Subject: Re: [nycphp-talk] why does setcookie fail????? > >> > >> > >>I didn't use a browser. I used a debugging tool. If you're running > >>windows I can send you a copy, but I don't know of a similar tool > >>for *NIX. > >> > >>pat > >> > >> > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Sat Sep 6 16:23:44 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 16:23:44 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: umm, with this piece of code the only instance of setcookie that I see is commented out From soazine at erols.com Sat Sep 6 16:28:18 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:28:18 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <063401c374b5$6835e150$67a76244@philofsoa> OK this is how I did my test: 1) I go to registrering.php and register fully, thereby setting the nordicnet_registration cookie. It's all set, everything is fine (uses setcookie() with 0 time). 2) I close my browser 3) I reboot computer (just for safety sake) 4) I reopen my browser and go to logginn.php 5) I log in, however, setcookie() this time does NOT work, the cookie is not set because AFTER I click the link to go to another page the $_COOKIE['nordicnet_registration'] value is empty, thus, no cookie. HOWEVER, header() DOES work in logginn.php! 6) I change the code in registrering.php to do header() instead of setcookie() (remember: setcookie() works, header() does NOT work in registrering.php) 7) I close the browser 8) I reboot computer 9) I reopen browser 10) I go to registrering.php Now THIS TIME I have header() and NOT setcookie() instead of the reverse. I register under a new name and email.. Registration is complete, the cookie SHOULD be set. I get a link to click. I click the link, go to my next page.. AND NO COOKIE! So.. this is what happens: registrering.php: Register -> setcookie('stuff', $stuff, 0, '/') WORKS -> click link -> there is the cookie! Register -> header() FAILS -> click link -> NO COOKIE logginn.php: Login -> setcookie('stuff', $stuff, 0, '/') FAILS -> click link -> NO COOKIE Login -> header() WORKS -> click link -> there is the cookie! Phil "Janwillem Borleffs" wrote in message news:3f5a3e0e$0$28899$1b62eedf at news.euronet.nl... > > "Phil Powell" schreef in bericht > news:AIq6b.126697$xf.39169 at lakeread04... > > Ok I've had it! PHP is losing its superiority status at this point! I am > > beginning to HATE this language!!!!!!!! > > > > PHP, nor any other language can teach the programmer the proper and logical > way of thinking. When you know that the third argument of a function that > creates a cookie sets its life time, you must realize that you should pass > it a value larger then zero to create it. > > > I did what you suggested and it worked.. but why is it that in logginn.php > > your header() solution worked, but it FAILED it registrering.php to do the > > EXACT SAME THING! However, THIS worked in registrering.php but FAILED in > > logginn.php: > > > > setcookie('nordicnet_registration', $registrationNumber, 0, '/'); > > > > Then you are probably facing a conflict with cookie names which overwrite > each other. Try other names to test this, eg: > > header("Set-Cookie: nordicnet_registration=1; path=/"); > > in registering.php and > > header("Set-Cookie: nordicnet_registration2=1; path=/"); > > in login.php. > > Also, don't forget that once a cookie has been created, it will only be > available after a reload of the page. > > So: > > header("Set-Cookie: nordicnet_registration=1; path=/"); > echo $_COOKIE['nordictnet_registration']; > ?> > > Displays nothing. > > > JW > > > ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:23 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > umm, with this piece of code the only instance of setcookie that I see > is commented out > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 6 16:28:50 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:28:50 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <063801c374b5$7b6b2d70$67a76244@philofsoa> here it is again:

  • Skikka din brukernavn, takk!
  • '; } if ($hasLoggedIn && strlen($passord) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Skikka din passord, takk!
  • '; } if ($hasLoggedIn) { $sql = 'SELECT nnet_user_registrationnumber FROM nnet_usermetadata ' . 'WHERE nnet_username = \'' . $brukernavn . '\' ' . ' AND nnet_password = \'' . $passord . '\' '; $query = mysql_query($sql) or die('Could not perform query'); if (mysql_num_rows($query) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Vi kann ikke tykka brukernavnen eller passorden '. ' inn vår db
  • '; } } //---END OF SERVER-SIDE VALIDATION BLOCK------------------------------------------------------------- // IF hasLoggedIn IS STILL TRUE WE FOUND THEIR LOGIN INFORMATION - CLOSE UP, SET COOKIE AND REDIRECT if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { setcookie('nordicnet_registration', "$row['nnet_user_registrationnumber']", 0, '/'); //header("Set-Cookie:nordicnet_registration={" . $row['nnet_user_registrationnumber'] . "}; path=/"); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . 'Takk for logging inn. For forsatte ' . "klikk her"; } else if (sizeof($_POST) > 0) { $errorMsg .= $font . '

  • Det finns en problem med db
  • '; $hasLoggedIn = 0; } ?> <?= $brand ?>: Logg inn<? if ($hasLoggedIn) echo ' - Takk!'; ?> Logg inn til

    - Obligatoriske felt
    Brukernavn: 0) echo " value=\"$brukernavn\""; ?>>
    Passord:
    Glemt du din passord? Klikk her
    Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:23 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > umm, with this piece of code the only instance of setcookie that I see > is commented out > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Sat Sep 6 16:33:42 2003 From: csnyder at chxo.com (Chris Snyder) Date: Sat, 06 Sep 2003 16:33:42 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <060301c374b4$5ebe2200$67a76244@philofsoa> References: <3F5A40FD.5060508@chxo.com> <060301c374b4$5ebe2200$67a76244@philofsoa> Message-ID: <3F5A44A6.3060505@chxo.com> I should have been more clear maybe? Live HTTP headers is a plugin for the Mozilla web browser, available at http://mozilla.org/ If you try the install link with Mozilla and you still get errors, then you need to upgrade. :-) One other hopefully unrelated note concerning Internet Explorer and cookies-- IE can be set to reject cookies from sites that don't set a P3P privacy header. This probably isn't happening to you, but it's something to keep in the back of your head if some IE users get your cookies and others don't. csnyder Phil Powell wrote: >Apparently my sanity is not to be saved. I can't install it, I get >Javascript errors on the page! :( > >Phil >----- Original Message ----- >From: "Chris Snyder" >To: "NYPHP Talk" >Sent: Saturday, September 06, 2003 4:18 PM >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > >>I'd like to recommend Mozilla with the Live HTTP Headers tool: >>http://livehttpheaders.mozdev.org/ >> >>It's saved my sanity on a number of occasions. >> >> csnyder >> >>Wellington Fan wrote: >> >> >> >>>SamSpade is a gret little utility for windows that will allow you to >>> >>> >examine > > >>>hte headers returned from a HTTP request: >>>http://www.samspade.org/ >>> >>>-- >>>Wellington >>> >>> >>> >>> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: talk-bounces at lists.nyphp.org >>>>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Patrick Hunt >>>>Sent: Saturday, September 06, 2003 3:56 PM >>>>To: NYPHP Talk >>>>Subject: Re: [nycphp-talk] why does setcookie fail????? >>>> >>>> >>>>I didn't use a browser. I used a debugging tool. If you're running >>>>windows I can send you a copy, but I don't know of a similar tool >>>>for *NIX. >>>> >>>>pat >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>talk mailing list >>>talk at lists.nyphp.org >>>http://lists.nyphp.org/mailman/listinfo/talk >>> >>> >>> >>> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From pat at vote.com Sat Sep 6 16:34:36 2003 From: pat at vote.com (Patrick Hunt) Date: Sat, 06 Sep 2003 16:34:36 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <063801c374b5$7b6b2d70$67a76244@philofsoa> Message-ID: <20030906203435.1A950A8611@virtu.nyphp.org> for header("Set-Cookie:nordicnet_registration={" .$row['nnet_user_registrationnumber'] . "}; path=/"); I see 2 things: 1. Do you want the value wrapped in curly braces? If not, it should be either: header("Set-Cookie:nordicnet_registration={$row['nnet_user_registrat ionnumber']}; path=/"); or header("Set-Cookie:nordicnet_registration=" .$row['nnet_user_registrationnumber'] . "; path=/"); 2. I suspect the real problem is that $row['nnet_user_registrationnumber'] is null. That would definitely make the browser discard the cookie. --Original Message Text--- From: Phil Powell Date: Sat, 6 Sep 2003 16:28:50 -0400 here again:
  • Skikka din brukernavn, takk!
  • '; } if ($hasLoggedIn && strlen($passord) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Skikka din passord, takk!
  • '; } if ($hasLoggedIn) { $sql = 'SELECT nnet_user_registrationnumber FROM nnet_usermetadata ' . 'WHERE nnet_username = \'' . $brukernavn . '\' ' . ' AND nnet_password = \'' . $passord . '\' '; $query = mysql_query($sql) or die('Could not perform query'); if (mysql_num_rows($query) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Vi kann ikke tykka brukernavnen eller passorden '. ' inn vår db
  • '; } } //---END OF SERVER-SIDE VALIDATION BLOCK------------------------------------------------------------- // IF hasLoggedIn IS STILL TRUE WE FOUND THEIR LOGIN INFORMATION - CLOSE UP, SET COOKIE AND REDIRECT if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { setcookie('nordicnet_registration', "$row['nnet_user_registrationnumber']", 0, '/'); //header("Set-Cookie:nordicnet_registration={" . $row['nnet_user_registrationnumber'] . "}; path=/"); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . 'Takk for logging inn. For forsatte ' . "klikk her"; } else if (sizeof($_POST) > 0) { $errorMsg .= $font . '

  • Det finns en problem med db
  • '; $hasLoggedIn = 0; } ?> : Logg inn Logg inn til " onSubmit="return isValidLogin()"> - Obligatoriske felt Brukernavn: 0) echo " value=\"$brukernavn\""; ?>> Passord: Glemt du din passord? Klikk her Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:23 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > umm, with this piece of code the only instance of setcookie that I see > is commented out > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Sat Sep 6 16:36:01 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 16:36:01 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: perhaps you should start by using a common function for both registration and login pages for setting the cookie that way you have a better chance of isolating the problem, rather than maintaining 2 separate pieces of code. duoble-check your IE settings as Chris suggested as it all seemed to work ok for me with Mozilla. > here it is again: From hans at nyphp.org Sat Sep 6 16:37:24 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 16:37:24 -0400 Subject: [nycphp-talk] A Cautionary Tale & then a question... In-Reply-To: <41AED082-DFB7-11D7-BA7A-000393B9FB36@mac.com> References: <41AED082-DFB7-11D7-BA7A-000393B9FB36@mac.com> Message-ID: <3F5A4584.30203@nyphp.org> Jeff Knight wrote: > On Friday, September 5, 2003, at 11:30 AM, Chris Snyder wrote: > >> Waitaminit! >> >> What if the version of PHP on the new server didn't support $_REQUEST? >> And had register_globals turned on? >> I think you might get those results, then, eh? >> > > Since Hans is the administrator of the server, I highly doubt that that > is the case. $_REQUEST is available, but register_globals is on :( *duck* It has to be on to support most third-parts apps. > On Friday, September 5, 2003, at 11:27 AM, Chris Snyder wrote: > >> If that's an "outside world" setup, I think I'm happy to stay in my >> own little self-contained niche where I can declare an array implicitly. >> As far as I can tell, your original code would work on my servers. > > > Events will always conspire to ensure that you will eventually come to > regret not maintaining portability. Machines get fried, ISP's go out of > business, somebody somewhere spills a drink and BAM! you've got to do > the little dance. It seems register_globals still haunts us. I think it's safe to say that register_globals was a *bad idea*. H From bpang at bpang.com Sat Sep 6 16:38:41 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 16:38:41 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: it's quite possible that $row['nnet_user_registrationnumber'] null, but my cookie was set with a value of {} which is not null, though probably not what was expected. but would indicate that the var was null/empty/undefined/false > 2. I suspect the real problem is that > $row['nnet_user_registrationnumber'] is null. That would definitely > make the browser discard the cookie. From soazine at erols.com Sat Sep 6 16:43:48 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:43:48 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <067801c374b7$929bff40$67a76244@philofsoa> Well this is how I solved it: if ($hasLoggedIn && ($row = mysql_fetch_row($query)) { setcookie('nordicnet_registration', $row[0], 0, '/'); ... } That works!! Apparently the problem was neither setcookie nor header, AND it was BOTH! Figure that one out, geniuses!!! ;) Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:38 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > it's quite possible that $row['nnet_user_registrationnumber'] null, but > my cookie was set with a value of > {} > > which is not null, though probably not what was expected. > but would indicate that the var was null/empty/undefined/false > > > 2. I suspect the real problem is that > > $row['nnet_user_registrationnumber'] is null. That would definitely > > make the browser discard the cookie. > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From pat at vote.com Sat Sep 6 16:48:02 2003 From: pat at vote.com (Patrick Hunt) Date: Sat, 06 Sep 2003 16:48:02 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <067801c374b7$929bff40$67a76244@philofsoa> Message-ID: <20030906204801.02A47A8611@virtu.nyphp.org> you changed from $row['nnet_user_registrationnumber'] to $row[0]. I'd bet that the name of column 0 in the sql resulset isn't 'nnet_user_registrationnumber' ---------------------------------------------- On Sat, 6 Sep 2003 16:43:48 -0400, Phil Powell wrote: >Well this is how I solved it: > >if ($hasLoggedIn && ($row = mysql_fetch_row($query)) { > setcookie('nordicnet_registration', $row[0], 0, '/'); > ... >} > >That works!! Apparently the problem was neither setcookie nor header, AND it >was BOTH! > >Figure that one out, geniuses!!! ;) > >Phil >----- Original Message ----- >From: "Brian Pang" >To: "NYPHP Talk" >Sent: Saturday, September 06, 2003 4:38 PM >Subject: Re: [nycphp-talk] why does setcookie fail????? > > >> it's quite possible that $row['nnet_user_registrationnumber'] null, but >> my cookie was set with a value of >> {} >> >> which is not null, though probably not what was expected. >> but would indicate that the var was null/empty/undefined/false >> >> > 2. I suspect the real problem is that >> > $row['nnet_user_registrationnumber'] is null. That would definitely >> > make the browser discard the cookie. >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Sat Sep 6 16:49:31 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 16:49:31 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <20030906204801.02A47A8611@virtu.nyphp.org> Message-ID: <069f01c374b8$5f516480$67a76244@philofsoa> Nope it was that... check it out: if ($hasLoggedIn) { $sql = 'SELECT nnet_user_registrationnumber FROM nnet_usermetadata ' . 'WHERE nnet_username = \'' . $brukernavn . '\' ' . ' AND nnet_password = \'' . $passord . '\' '; $query = mysql_query($sql) or die('Could not perform query'); if (mysql_num_rows($query) == 0) { $hasLoggedIn = 0; $errorMsg .= $font . '

  • Vi kann ikke tykka brukernavnen eller passorden '. ' inn vår db
  • '; } } //---END OF SERVER-SIDE VALIDATION BLOCK------------------------------------------------------------- // IF hasLoggedIn IS STILL TRUE WE FOUND THEIR LOGIN INFORMATION - CLOSE UP, SET COOKIE AND REDIRECT if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { setcookie('nordicnet_registration', $row[0], 0, '/'); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . 'Takk for logging inn. For forsatte ' . "klikk her"; } else if (sizeof($_POST) > 0) { $errorMsg .= $font . '

  • Det finns en problem med db
  • '; $hasLoggedIn = 0; } Phil ----- Original Message ----- From: "Patrick Hunt" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 4:48 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > > you changed from $row['nnet_user_registrationnumber'] to $row[0]. > > I'd bet that the name of column 0 in the sql resulset isn't > 'nnet_user_registrationnumber' > > ---------------------------------------------- > > On Sat, 6 Sep 2003 16:43:48 -0400, Phil Powell wrote: > > >Well this is how I solved it: > > > >if ($hasLoggedIn && ($row = mysql_fetch_row($query)) { > > setcookie('nordicnet_registration', $row[0], 0, '/'); > > ... > >} > > > >That works!! Apparently the problem was neither setcookie nor header, AND it > >was BOTH! > > > >Figure that one out, geniuses!!! ;) > > > >Phil > >----- Original Message ----- > >From: "Brian Pang" > >To: "NYPHP Talk" > >Sent: Saturday, September 06, 2003 4:38 PM > >Subject: Re: [nycphp-talk] why does setcookie fail????? > > > > > >> it's quite possible that $row['nnet_user_registrationnumber'] null, but > >> my cookie was set with a value of > >> {} > >> > >> which is not null, though probably not what was expected. > >> but would indicate that the var was null/empty/undefined/false > >> > >> > 2. I suspect the real problem is that > >> > $row['nnet_user_registrationnumber'] is null. That would definitely > >> > make the browser discard the cookie. > >> > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Sat Sep 6 16:52:03 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 16:52:03 -0400 Subject: [nycphp-talk] mail function slows down page loading In-Reply-To: <200309051740.58361.brian@preston-campbell.com> References: <002401c373f4$60229740$8d2c0242@peter1> <200309051740.58361.brian@preston-campbell.com> Message-ID: <3F5A48F3.3020807@nyphp.org> > IIRC in Perl > /usr/sbin/sendmail -q > will queue the message. It may make a difference -- I may also be blowin > smoke. The -q flag to sendmail proper will run the current queue. You'd need something like: sendmail -ODeliveryMode=q Nevertheless, this wouldn't help all that much, Peter. The lag you're seeing is because sendmail is verifying the recipient address, DNS, etc. When a message is queued, this verification still takes place. Simply, it's a real pain to avoid this delay when sending mail from PHP, running embedded in Apache. Long story short, you need to fork() out to a daemon; and this is particularly true when sending large amounts of mail. This might be a good FUNDAMENTALS topic sometime. H From bpang at bpang.com Sat Sep 6 16:58:49 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 16:58:49 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: Then perhaps the mysql fetch is not returning and ASSOCiative array or BOTH? Does your mysql_connect or mysql_pconnect specify either of these flags? are you able to use association to get other mysql fetched results? > Nope it was that... check it out: > > > you changed from $row['nnet_user_registrationnumber'] to $row[0]. > > > > I'd bet that the name of column 0 in the sql resulset isn't > > 'nnet_user_registrationnumber' > > From pat at vote.com Sat Sep 6 17:02:12 2003 From: pat at vote.com (Patrick Hunt) Date: Sat, 06 Sep 2003 17:02:12 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: Message-ID: <20030906210240.54C43A8611@virtu.nyphp.org> exactly. phil used: if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { which does not return an associative array. ------------------------------------- On Sat, 06 Sep 2003 16:58:49 -0400, Brian Pang wrote: >Then perhaps the mysql fetch is not returning and ASSOCiative array or BOTH? > >Does your mysql_connect or mysql_pconnect specify either of these flags? > >are you able to use association to get other mysql fetched results? > > >> Nope it was that... check it out: >> >> > you changed from $row['nnet_user_registrationnumber'] to $row[0]. >> > >> > I'd bet that the name of column 0 in the sql resulset isn't >> > 'nnet_user_registrationnumber' >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Sat Sep 6 17:11:35 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 17:11:35 -0400 Subject: [nycphp-talk] I'm on a roll, folks! Message-ID: <06b601c374bb$746a0f40$67a76244@philofsoa> loggout.php doesn't exactly redirect properly, and I have no idea what to do about it... I need to bust out of the frame and go to top, so, how do I do it? Code that I have that fails: Om du er her /index.php>klikk her Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Sat Sep 6 17:13:14 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 06 Sep 2003 17:13:14 -0400 Subject: [nycphp-talk] why does setcookie fail????? Message-ID: now, why didn't we catch that sooner!?!?! I guess I never attempt to use association from mysql fetched rows. note: ASSOCiation (or BOTH; default) DOES work with mysql_fetch_array() > exactly. > > phil used: > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > > which does not return an associative array. From soazine at erols.com Sat Sep 6 17:14:13 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 17:14:13 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <06d001c374bb$d24a0ac0$67a76244@philofsoa> I normally use mysql_fetch_array with the MYSQL_ASSOC constant, but since this is guaranteed to return 1 row (or no rows) I felt using a while() loop with mysql_fetch_array was a waste of time. Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 5:13 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > now, why didn't we catch that sooner!?!?! > > I guess I never attempt to use association from mysql fetched rows. > > note: ASSOCiation (or BOTH; default) DOES work with mysql_fetch_array() > > > > > exactly. > > > > phil used: > > > > if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { > > > > which does not return an associative array. > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From ejp at well.com Sat Sep 6 17:16:38 2003 From: ejp at well.com (Edward Potter) Date: Sat, 6 Sep 2003 17:16:38 -0400 Subject: [nycphp-talk] Yipes, i give in, can we get a Daily Digest mode? In-Reply-To: <20030906210240.54C43A8611@virtu.nyphp.org> Message-ID: <66DB4BB8-E0AF-11D7-9956-000393D9EBFA@well.com> Hi, At this point the PHP Talk list is crying out for Digest Mode! Just my 2 cents... - ed From hans at nyphp.org Sat Sep 6 17:21:40 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 17:21:40 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <067801c374b7$929bff40$67a76244@philofsoa> References: <067801c374b7$929bff40$67a76244@philofsoa> Message-ID: <3F5A4FE4.9010208@nyphp.org> Phil, Phil Powell wrote: > Well this is how I solved it: > > if ($hasLoggedIn && ($row = mysql_fetch_row($query)) { > setcookie('nordicnet_registration', $row[0], 0, '/'); > ... > } > > That works!! Apparently the problem was neither setcookie nor header, AND it > was BOTH! I just jumped into this thread, but it seems the development process is a bit, uhh, erratic :) Consider that you have have three essential peices of logic here, all of which have to come together to give the end result you require (logging, and remaining logged in). They are: 1) Database query and fetching of the result to determine if the proper user credentials were supplied. 2) Sending an indication to the browser that they've supplied the proper credentials (ie, writing the cookie to the browser) 3) Getting an indication from the browser that they have the proper credentials (ie, reading the cookie from the browser). Now you can troubleshoot each of these steps, and isolate where the exact problem is. For 1 above: make sure you don't have typeing issues, and that your DB is responding 100% correctly. Meaning, doing a boolean test of ($row = mysql_fetch_row($query)) is scarey to me. Pull a value explicitly out of the result set, or at least know that you're testing an int, ie: if( mysql_num_rows($result) === 1 ). Better yet, do a var_dump() of your final DB result variables (whether they be associative, numeric, etc. arrays) so you know exactly what data you're getting back. For 2 and 3 above: when working with cookies, or headers in general, I always use the livehttpheaders plugin for Mozilla. You can see exactly what is being sent between you and the web server, and can even edit and replay headers to test how your application behaves. Once you see exactly what you expect being sent back and forth as cookies/headers, you know that piece is working. If, however the end result expected behavior still isn't what you want, you know it must now be logic in your application that is checking if the user is logged in or not. Lastly, now use IE :) If things break, it's a quirk and Google or the php.net user notes will hopefully be able to help you. And please, try to trim your posts when replying. Thanks, H From hans at nyphp.org Sat Sep 6 17:23:30 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 17:23:30 -0400 Subject: [nycphp-talk] Yipes, i give in, can we get a Daily Digest mode? In-Reply-To: <66DB4BB8-E0AF-11D7-9956-000393D9EBFA@well.com> References: <66DB4BB8-E0AF-11D7-9956-000393D9EBFA@well.com> Message-ID: <3F5A5052.4060603@nyphp.org> > At this point the PHP Talk list is crying out for Digest Mode! Just my > 2 cents... There has been digest since we deployed Mailman (and, in fact, is a primary reason we went to Mailman). See the link below. > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Sat Sep 6 17:32:24 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 17:32:24 -0400 Subject: [nycphp-talk] more on &$var in function In-Reply-To: <5.1.0.14.2.20030905104152.00b59218@mail.optonline.net> References: <5.1.0.14.2.20030905104152.00b59218@mail.optonline.net> Message-ID: <3F5A5268.3010601@nyphp.org> Michael Southwell wrote: > Thanks for responses to my question about the need for global $var > within a function whose parameter is &$var (unnecessary; function is > operating directly on the original because of the &). > > Now this raises another question. Given the above, in those cases where > a function is intended to operate on a global variable--and only those > cases, why wouldn't you *always* define the parameter with & instead of > using a global statement? It's a matter of context and style, IMO. Function arguments are explicit to that function call, while a global variable isn't and is expected to be operated on regardless of a particular function. And, as Chris and Chris pointed out, you'll get some nasty-long function calls :) H From mwithington at PLMresearch.com Sat Sep 6 14:12:01 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Sat, 6 Sep 2003 14:12:01 -0400 Subject: [nycphp-talk] First Big Client Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE35875B932@network.PLMresearch.com> Here are some [probably obvious] thoughts: I would suggest thinking _not_ in terms of functionality (e.g. Content Management, Groupware, etc.) but rather value. Bluntly stated, what will the _output_ of all this stuff do for your client. How much money will they save? How many more prospects will it uncover? How much faster will it increase their cash cycle? In the perfect world, your invoice should be only slightly less than the value all of these combined - the delta being a function of client management...remember (pardon the crude analogy) the difference between rape and making love is salesmanship! -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Donald J. Organ IV Sent: Friday, September 05, 2003 8:01 PM To: NYPHP Talk Subject: [nycphp-talk] First Big Client Ok i ahve been developing PHP web application for a couple fo years now but they have always been on a volunteer or personal basis. Now I have a client that wants a custom web application and I am not sure how much to charge them. So of the features that this web application included are: Contact Management Personal Appointment book as well as global appointment book Resume management meeting management admin features(Such as adding new users) Sending out template based email to well over 100 individuals dynamic word document creation and many other features... This system is replacing other application such as Goldmine, resume grabber, and will also eliminate many steps such as sending emails in outlook. if anyone has an idea on how much something like this goes for please let me know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Sat Sep 6 17:53:14 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 17:53:14 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: <067801c374b7$929bff40$67a76244@philofsoa> <3F5A4FE4.9010208@nyphp.org> Message-ID: <072c01c374c1$45c67510$67a76244@philofsoa> Hans, getting me to think methodically like you do would be like asking a 900-year old corpse to code PHP. Honestly, I am not physically/mentally wired to do so, but hey, suggestions are always welcomed! :) Thanx though, the cookie issue has been resolved, now I can't figure out how to auto-redirect with a target! Phil ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Saturday, September 06, 2003 5:21 PM Subject: Re: [nycphp-talk] why does setcookie fail????? > > > Phil, > > Phil Powell wrote: > > Well this is how I solved it: > > > > if ($hasLoggedIn && ($row = mysql_fetch_row($query)) { > > setcookie('nordicnet_registration', $row[0], 0, '/'); > > ... > > } > > > > That works!! Apparently the problem was neither setcookie nor header, AND it > > was BOTH! > > I just jumped into this thread, but it seems the development process is a bit, uhh, erratic :) > > Consider that you have have three essential peices of logic here, all of which have to come together to give the end result you require (logging, and remaining logged in). They are: > > 1) Database query and fetching of the result to determine if the proper user credentials were supplied. > > 2) Sending an indication to the browser that they've supplied the proper credentials (ie, writing the cookie to the browser) > > 3) Getting an indication from the browser that they have the proper credentials (ie, reading the cookie from the browser). > > Now you can troubleshoot each of these steps, and isolate where the exact problem is. > > For 1 above: make sure you don't have typeing issues, and that your DB is responding 100% correctly. Meaning, doing a boolean test of ($row = mysql_fetch_row($query)) is scarey to me. Pull a value explicitly out of the result set, or at least know that you're testing an int, ie: if( mysql_num_rows($result) === 1 ). Better yet, do a var_dump() of your final DB result variables (whether they be associative, numeric, etc. arrays) so you know exactly what data you're getting back. > > For 2 and 3 above: when working with cookies, or headers in general, I always use the livehttpheaders plugin for Mozilla. You can see exactly what is being sent between you and the web server, and can even edit and replay headers to test how your application behaves. Once you see exactly what you expect being sent back and forth as cookies/headers, you know that piece is working. If, however the end result expected behavior still isn't what you want, you know it must now be logic in your application that is checking if the user is logged in or not. > > Lastly, now use IE :) If things break, it's a quirk and Google or the php.net user notes will hopefully be able to help you. > > And please, try to trim your posts when replying. Thanks, > > H > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Sat Sep 6 18:03:58 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 06 Sep 2003 18:03:58 -0400 Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <072c01c374c1$45c67510$67a76244@philofsoa> References: <067801c374b7$929bff40$67a76244@philofsoa> <3F5A4FE4.9010208@nyphp.org> <072c01c374c1$45c67510$67a76244@philofsoa> Message-ID: <3F5A59CE.1030303@nyphp.org> Phil Powell wrote: > Hans, getting me to think methodically like you do would be like asking a > 900-year old corpse to code PHP. Honestly, I am not physically/mentally > wired to do so, but hey, suggestions are always welcomed! :) > > Thanx though, the cookie issue has been resolved, now I can't figure out how > to auto-redirect with a target! Happy it's coming together. Sorry I can't help here (I've found being methodical doesn't help much when dealing with frames :) The NYFE Front-End list would probably be able to answer this one in a snap: http://lists.nyphp.org/mailman/listinfo/front-end http://nyfe.org Best, H From soazine at erols.com Sat Sep 6 20:33:52 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 6 Sep 2003 20:33:52 -0400 Subject: [nycphp-talk] can you do fopen on a binary file (jpg, pdf, etc.)? Message-ID: <07d001c374d7$b6f8b890$67a76244@philofsoa> I have a PHP script that would read in a binary file and display it as if it were , how would you do that w/o changing the header's MIME type? The entire file does not need to be changed. Thanks Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Sat Sep 6 23:54:54 2003 From: shiflett at php.net (Chris Shiflett) Date: Sat, 6 Sep 2003 20:54:54 -0700 (PDT) Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <20030906195617.326B5A8651@virtu.nyphp.org> Message-ID: <20030907035454.58118.qmail@web14307.mail.yahoo.com> --- Patrick Hunt wrote: > I didn't use a browser. I used a debugging tool. If you're running > windows I can send you a copy, but I don't know of a similar tool > for *NIX. There are tons for Unix. Most people don't have a reason not to just use tcpdump, which is on every Unix server I've ever seen. But, I wanted more. :-) I wrote an HTTP proxy in PHP (to play with the sockets extension) that displays the HTTP transaction for the parent resource at the bottom of the Web page (pretty convenient). It still lacks several features and sucks more than desired, so if anyone feels like making it suck less, feel free to improve it. :-) http://sf.net/projects/protoscope/ Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From csnyder at chxo.com Sun Sep 7 00:13:38 2003 From: csnyder at chxo.com (Chris Snyder) Date: Sun, 07 Sep 2003 00:13:38 -0400 Subject: [nycphp-talk] Retrieving remote files-- caution Message-ID: <3F5AB072.6090707@chxo.com> Learned a lesson tonight... If you're going to use file_get_contents() (or any function with fopen wrappers) to allow users to import a file from some other website, always check to make sure that the supplied url starts with "http://" and not, say, "/etc". function url_get_contents ( $url ) { $array= parse_url($url); if ( $array['scheme']=='http' || $array['scheme']=='ftp' ) { return file_get_contents($url); }else { return 0; } } I used to always use fsockopen for this, but file_get_contents seemed so easy by comparison -- except for the part where it was really built to handle local files. Doh! From adam at trachtenberg.com Sun Sep 7 05:39:14 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Sun, 7 Sep 2003 05:39:14 -0400 (EDT) Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: <072c01c374c1$45c67510$67a76244@philofsoa> Message-ID: On Sat, 6 Sep 2003, Phil Powell wrote: > Hans, getting me to think methodically like you do would be like asking a > 900-year old corpse to code PHP. Honestly, I am not physically/mentally > wired to do so, but hey, suggestions are always welcomed! :) Phil -- Maybe you should try and remember what a pain it was to debug the setcookie() issue in a non-methodical way. :) But seriously, my suggestion is whenever you're getting frustrated to take a deep breath, a five minute break, then come back and put together a step-by-step list of what you're trying to accomplish. Once you're armed with a list, you can then verify that each step is getting the correct input and providing the correct output. Often times, merely the process of figuring this out will trigger what you should do to fix the bug. > Thanx though, the cookie issue has been resolved, now I can't figure out how > to auto-redirect with a target! You can use the Set-Target header, but I believe this only works on Netscape and not IE. If you do figure out a way to solve this under IE, please let me know because I was trying to track this answer down for someone recently and couldn't come up with a solution. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From soazine at erols.com Sun Sep 7 08:24:53 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 7 Sep 2003 08:24:53 -0400 Subject: [nycphp-talk] why does setcookie fail????? References: Message-ID: <08d001c3753b$0af0cf60$67a76244@philofsoa> Thanx for the suggestion. The "five-minute break" is something I need to do more often, to be honest I frustrate myself into a corner and continually bang my head against the wall until I give myself a headache :) I did figure it out but it involves a total Javascript solution, afraid there is no other solution for this :( Phil ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Sunday, September 07, 2003 5:39 AM Subject: Re: [nycphp-talk] why does setcookie fail????? > On Sat, 6 Sep 2003, Phil Powell wrote: > > > Hans, getting me to think methodically like you do would be like asking a > > 900-year old corpse to code PHP. Honestly, I am not physically/mentally > > wired to do so, but hey, suggestions are always welcomed! :) > > Phil -- > > Maybe you should try and remember what a pain it was to debug the > setcookie() issue in a non-methodical way. :) > > But seriously, my suggestion is whenever you're getting frustrated > to take a deep breath, a five minute break, then come back and put > together a step-by-step list of what you're trying to > accomplish. Once you're armed with a list, you can then verify that > each step is getting the correct input and providing the correct > output. Often times, merely the process of figuring this out will > trigger what you should do to fix the bug. > > > Thanx though, the cookie issue has been resolved, now I can't figure out how > > to auto-redirect with a target! > > You can use the Set-Target header, but I believe this only works on > Netscape and not IE. If you do figure out a way to solve this under > IE, please let me know because I was trying to track this answer down > for someone recently and couldn't come up with a solution. > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sun Sep 7 08:31:07 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 7 Sep 2003 08:31:07 -0400 Subject: [nycphp-talk] mySQL datetime fields default now() fails Message-ID: <090801c3753b$e99da990$67a76244@philofsoa> I have a mySQL database table with a column field datatype of datetime that I set up in the original create table statement like this: create table nnet_usermetadata ( ... nnet_record_entered datetime default 'now()' ) However, upon execution, each time a record is entered into nnet_usermetadata the results are: 00-00-0000 00:00:00 Is there a way I can always ensure that the current date and time are always entered into the datetime field? I would prefer to not have a server-side PHP or any other scripting solution because by doing so would mean I would have to alter my table to do so, and after the barrage of questions you've received from me would you trust me to do so effectively? Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Sun Sep 7 11:36:32 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Sun, 7 Sep 2003 11:36:32 -0400 (EDT) Subject: [nycphp-talk] mySQL datetime fields default now() fails In-Reply-To: <090801c3753b$e99da990$67a76244@philofsoa> Message-ID: On Sun, 7 Sep 2003, Phil Powell wrote: > I have a mySQL database table with a column field datatype of > datetime that I set up in the original create table statement like > this: > > create table nnet_usermetadata ( > ... > nnet_record_entered datetime default 'now()' > ) > > However, upon execution, each time a record is entered into > nnet_usermetadata the results are: > > 00-00-0000 00:00:00 I believe this is because you are trying to enter the string 'now()' into the field instead of the results of the function named now(). However, I bet you tried it without the quotes first and got a MySQL error message like this: "You have an error in your SQL syntax near 'now())'" > Is there a way I can always ensure that the current date and time > are always entered into the datetime field? I would prefer to not > have a server-side PHP or any other scripting solution because by > doing so would mean I would have to alter my table to do so, and > after the barrage of questions you've received from me would you > trust me to do so effectively? I went to Google and typed in "default now() mysql" and unless things have changed in MySQL since 2001 (which is possible), you cannot do this because default values must be constants. (That's why MySQL spews that SQL syntax error.) However, I don't think you'd actually need to alter your table to make sure you always entered the date -- you'd just need to alter all your INSERTs and UPDATEs by adding some code to generate the date as part of your SQL. Of course, that may be worse, but what you need to do. Alternatively, it looks like MSSQL might support this syntax. :) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From soazine at erols.com Sun Sep 7 11:57:17 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 7 Sep 2003 11:57:17 -0400 Subject: [nycphp-talk] mySQL datetime fields default now() fails References: Message-ID: <097701c37558$b6cc73d0$67a76244@philofsoa> Ok, w/o spending 4.5 hours reinventing the wheel, is there an online example of how to insert the current date/time into a mySQL datetime column field? I only have to put it in one place for now but better to learn it now, thanx! Phil ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Sunday, September 07, 2003 11:36 AM Subject: Re: [nycphp-talk] mySQL datetime fields default now() fails > On Sun, 7 Sep 2003, Phil Powell wrote: > > > I have a mySQL database table with a column field datatype of > > datetime that I set up in the original create table statement like > > this: > > > > create table nnet_usermetadata ( > > ... > > nnet_record_entered datetime default 'now()' > > ) > > > > However, upon execution, each time a record is entered into > > nnet_usermetadata the results are: > > > > 00-00-0000 00:00:00 > > I believe this is because you are trying to enter the string 'now()' > into the field instead of the results of the function named > now(). However, I bet you tried it without the quotes first and got a > MySQL error message like this: "You have an error in your SQL syntax > near 'now())'" > > > Is there a way I can always ensure that the current date and time > > are always entered into the datetime field? I would prefer to not > > have a server-side PHP or any other scripting solution because by > > doing so would mean I would have to alter my table to do so, and > > after the barrage of questions you've received from me would you > > trust me to do so effectively? > > I went to Google and typed in "default now() mysql" and unless things > have changed in MySQL since 2001 (which is possible), you cannot do > this because default values must be constants. (That's why MySQL spews > that SQL syntax error.) > > However, I don't think you'd actually need to alter your table to make > sure you always entered the date -- you'd just need to alter all your > INSERTs and UPDATEs by adding some code to generate the date as part > of your SQL. Of course, that may be worse, but what you need to > do. Alternatively, it looks like MSSQL might support this syntax. :) > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sun Sep 7 12:07:05 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 7 Sep 2003 12:07:05 -0400 Subject: [nycphp-talk] mySQL datetime fields default now() fails References: Message-ID: <099801c3755a$151797c0$67a76244@philofsoa> I figured it out but it's a PHP solution, not a mySQL solution: date("Y-m-d H:i:s") How inferior. You can employ pre-defined constants in Oracle, SQL Server, even stinkin' ACCESS, but not mySQL? Phil ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Sunday, September 07, 2003 11:36 AM Subject: Re: [nycphp-talk] mySQL datetime fields default now() fails > On Sun, 7 Sep 2003, Phil Powell wrote: > > > I have a mySQL database table with a column field datatype of > > datetime that I set up in the original create table statement like > > this: > > > > create table nnet_usermetadata ( > > ... > > nnet_record_entered datetime default 'now()' > > ) > > > > However, upon execution, each time a record is entered into > > nnet_usermetadata the results are: > > > > 00-00-0000 00:00:00 > > I believe this is because you are trying to enter the string 'now()' > into the field instead of the results of the function named > now(). However, I bet you tried it without the quotes first and got a > MySQL error message like this: "You have an error in your SQL syntax > near 'now())'" > > > Is there a way I can always ensure that the current date and time > > are always entered into the datetime field? I would prefer to not > > have a server-side PHP or any other scripting solution because by > > doing so would mean I would have to alter my table to do so, and > > after the barrage of questions you've received from me would you > > trust me to do so effectively? > > I went to Google and typed in "default now() mysql" and unless things > have changed in MySQL since 2001 (which is possible), you cannot do > this because default values must be constants. (That's why MySQL spews > that SQL syntax error.) > > However, I don't think you'd actually need to alter your table to make > sure you always entered the date -- you'd just need to alter all your > INSERTs and UPDATEs by adding some code to generate the date as part > of your SQL. Of course, that may be worse, but what you need to > do. Alternatively, it looks like MSSQL might support this syntax. :) > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Sun Sep 7 12:49:02 2003 From: bpang at bpang.com (Brian Pang) Date: Sun, 07 Sep 2003 12:49:02 -0400 Subject: [nycphp-talk] mySQL datetime fields default now() fails Message-ID: Phil, I think you want to be using the timestamp column type instead. http://www.mysql.com/doc/en/DATETIME.html note that the value will be automatically set if you do not explicity provide a value for it. meaning... if you want to preserve the original value on update, you need to return the original value with the update query. alternately, there are other mysql date/time functions you can use with now() or current() that should work, just don't put them in quotes in the insert statement. > I figured it out but it's a PHP solution, not a mySQL solution: > > date("Y-m-d H:i:s") > > How inferior. You can employ pre-defined constants in Oracle, SQL Server, > even stinkin' ACCESS, but not mySQL? > From shiflett at php.net Sun Sep 7 14:27:07 2003 From: shiflett at php.net (Chris Shiflett) Date: Sun, 7 Sep 2003 11:27:07 -0700 (PDT) Subject: [nycphp-talk] why does setcookie fail????? In-Reply-To: Message-ID: <20030907182707.376.qmail@web14310.mail.yahoo.com> --- Adam Maccabee Trachtenberg wrote: > But seriously, my suggestion is whenever you're getting frustrated > to take a deep breath, a five minute break, then come back and put > together a step-by-step list of what you're trying to > accomplish. Once you're armed with a list, you can then verify that > each step is getting the correct input and providing the correct > output. Often times, merely the process of figuring this out will > trigger what you should do to fix the bug. This is great advice. The setcookie line of questioning perfectly illustrates why erroneous assumptions can make simple problems into very complex ones. For example, consider this calculation: (25 * 4) * 10 There are basically three pieces of data here that are combined together in two operations to produce the final output. Now, consider this question: Does anyone know WHY I can multiply 100 by 10 and get 1250??? See if you can explain THAT one!!! After scores of messages back and forth, it is realized that the error was that the following calculation was actually being performed: (25 * 5) * 10 So, if the question asked had been why 5 was being returned by something instead of 4, the answer would have been much easier (and less misleading). Breaking things down is essential to solving problems. This should have been the first test to prove the assumption wrong: 100 * 10 This would have given 1000, not 1250, so the erroneous assumption should never even be mentioned in the question. A little effort up front can save a lot of time for everyone. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From pl at eskimo.com Sun Sep 7 16:32:10 2003 From: pl at eskimo.com (Peter Lehrer) Date: Sun, 7 Sep 2003 16:32:10 -0400 Subject: [nycphp-talk] mySQL datetime fields default now() fails References: <097701c37558$b6cc73d0$67a76244@philofsoa> Message-ID: <001a01c3757f$27e01880$4c2c0242@peter1> INSERT INTO table (date) VALUES(now()); Peter Lehrer ----- Original Message ----- From: "Phil Powell" To: "NYPHP Talk" Sent: Sunday, September 07, 2003 11:57 AM Subject: Re: [nycphp-talk] mySQL datetime fields default now() fails > Ok, w/o spending 4.5 hours reinventing the wheel, is there an online example > of how to insert the current date/time into a mySQL datetime column field? > I only have to put it in one place for now but better to learn it now, > thanx! > > Phil > ----- Original Message ----- > From: "Adam Maccabee Trachtenberg" > To: "NYPHP Talk" > Sent: Sunday, September 07, 2003 11:36 AM > Subject: Re: [nycphp-talk] mySQL datetime fields default now() fails > > > > On Sun, 7 Sep 2003, Phil Powell wrote: > > > > > I have a mySQL database table with a column field datatype of > > > datetime that I set up in the original create table statement like > > > this: > > > > > > create table nnet_usermetadata ( > > > ... > > > nnet_record_entered datetime default 'now()' > > > ) > > > > > > However, upon execution, each time a record is entered into > > > nnet_usermetadata the results are: > > > > > > 00-00-0000 00:00:00 > > > > I believe this is because you are trying to enter the string 'now()' > > into the field instead of the results of the function named > > now(). However, I bet you tried it without the quotes first and got a > > MySQL error message like this: "You have an error in your SQL syntax > > near 'now())'" > > > > > Is there a way I can always ensure that the current date and time > > > are always entered into the datetime field? I would prefer to not > > > have a server-side PHP or any other scripting solution because by > > > doing so would mean I would have to alter my table to do so, and > > > after the barrage of questions you've received from me would you > > > trust me to do so effectively? > > > > I went to Google and typed in "default now() mysql" and unless things > > have changed in MySQL since 2001 (which is possible), you cannot do > > this because default values must be constants. (That's why MySQL spews > > that SQL syntax error.) > > > > However, I don't think you'd actually need to alter your table to make > > sure you always entered the date -- you'd just need to alter all your > > INSERTs and UPDATEs by adding some code to generate the date as part > > of your SQL. Of course, that may be worse, but what you need to > > do. Alternatively, it looks like MSSQL might support this syntax. :) > > > > -adam > > > > -- > > adam at trachtenberg.com > > author of o'reilly's php cookbook > > avoid the holiday rush, buy your copy today! > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Sun Sep 7 07:13:40 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sun, 7 Sep 2003 07:13:40 -0400 Subject: [nycphp-talk] Retrieving remote files-- caution References: <3F5AB072.6090707@chxo.com> Message-ID: <002b01c37531$17862360$6b00a8c0@thinkpad> Thanks for pointing this out since I always use the function... it would be nice to see some type of basic security policy for PHP in regards to certain methods like these ... most languages go by the notion that "bytes are bytes" no matter where u get them from, but it would be safer to define walls for certain "dangerous methods" + include them in php.ini for better safekeeping. I always thought it would be nice to do something like what you did beyond a policy that was saying "you can do this" "you can't do that", like in Java + instead have security handlers instead ... for example a policy would maybe be like: file_get_contents.allow or file_get_contents.deny but instead allow a security handler to check params globally ... file_get_contents.handler = (some method to check w/ first) ... - Jon ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Sunday, September 07, 2003 12:13 AM Subject: [nycphp-talk] Retrieving remote files-- caution > Learned a lesson tonight... > > If you're going to use file_get_contents() (or any function with fopen > wrappers) to allow users to import a file from some other website, > always check to make sure that the supplied url starts with "http://" > and not, say, "/etc". > > function url_get_contents ( $url ) { > $array= parse_url($url); > if ( $array['scheme']=='http' || $array['scheme']=='ftp' ) { > return file_get_contents($url); > }else { > return 0; > } > } > > I used to always use fsockopen for this, but file_get_contents seemed so > easy by comparison -- except for the part where it was really built to > handle local files. Doh! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Sun Sep 7 21:40:12 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 7 Sep 2003 21:40:12 -0400 Subject: [nycphp-talk] working with a PHP class - help! Message-ID: <0aa701c375aa$25b0f4f0$67a76244@philofsoa> My first time working with a PHP class, and after 6 hours of working out the kinks I am unable to return a value from the class, so now I appeal to the general audience what on earth did I do wrong this time? This is the code the retrieves the values: if (($hasRegistered || $hasPreRegistered) && !empty($uplinenumber)) { // CHECK TO SEE IF UPLINE NUMBER IS A VALID NUMBER $regNumberGenerator = new RegNumberGenerator($uplinenumber, $email, $dbConn); if (!$regNumberGenerator->isValidUplinenumber()) { $hasRegistered = 0; $hasPreRegistered = 0; $errorMsg .= $font . '

  • Du måste skicka geltig upline nr., takk!' . '
  • '; // ERROR PRODUCED UPON REG OR PRE-REG MODE - FORM WILL BE REPOPULATED BY $_POST ELEMENTS // NO NEED FOR DB ANY FURTHER @mysql_free_result($query); // FREE RESOURCES BUT SUPPRESS WARNINGS IF NON-SELECT QUERY mysql_close($dbConn); // CLOSE DB CONNECTION } else { $registrationNumber = $regNumberGenerator->getRegNumber(); $registrationNumberForUsername = $regNumberGenerator->getRegNumberDecDigits($registrationNumber); $registrationNumberForEmail = $regNumberGenerator->getRegNumberDecDigits($registrationNumber, '-'); } } And here is the class itself: /*------------------------------------------------------------------------------------------- Class RegNumberGenerator - this class consists of the following: 1. Method isValidUplinenumber - Boolean return if the upline number is a valid one according to a db call 2. Method getRegNumber - String method to return the hexidecimal registration number 3. Method getRegNumberDecDigits - String method to return the reg number as decimal digits 4. Private method hasFoundNextAvailRegNumber - Boolean method that searches for the inputted number as a registration number in the db 5. Private method incrUplinenumber - String method to increase next-to-last digit of upline number by 1 (to get to the next "leg") Input parameters: 1. $dbConn - your database connection resource link 2. $uplinenumber - your upline number 3. $email - your email address --------------------------------------------------------------------------------------------*/ class RegNumberGenerator { // STRING TO HOUSE GENERATED REGISTRATION NUMBER BASED ON UPLINE # var $paddedUplinenumber = ''; var $regNumber = ''; var $canStopMethod = 0; // BOOLEAN TO DETERMINE TO STOP SEARCHING FOR NEXT VALID REG # // CONSTRUCTOR function RegNumberGenerator($uplinenumber, $email, $dbConn) { $this->uplinenumber = $uplinenumber; $this->email = $email; $this->dbConn = $dbConn; } // BOOLEAN METHOD function isValidUplinenumber() { // CHECK TO SEE IF SINGLE-DIGIT UPLINENUMBER IS NUMERIC VALUE ONLY if (strlen($this->uplinenumber) == 0 || (strlen($this->uplinenumber) == 1 && !is_numeric($this->uplinenumber)) ) { $canStopMethod = 1; return 0; } // CHECK TO SEE IF UPLINENUMBER IS VALID (IS HEXADECIMAL NUMBER STRING) if (preg_match('/[^a-fA-F0-9]+/i', $this->uplinenumber) && !$canStopMethod) { $canStopMethod = 1; return 0; } // CHECK TO SEE THAT IF THIS IS A TOP UPLINENUMBER THAT IT IS A VALID TOP UPLINE NUMBER IN DB if (strlen($this->uplinenumber) == 1 && !$canStopMethod) { $sql = 'SELECT nnet_user_email FROM nnet_top_uplinenumber ' . 'WHERE nnet_user_uplinenumber = ' . (int)$this->uplinenumber; $query = mysql_query($sql, $this->dbConn) or die('Could not perform query'); if (mysql_num_rows($query) == 0) { $canStopMethod = 1; return 0; // NOT VALID TOP UPLINENUMBER } } // CHECK TO SEE IF SINGLE-DIGIT UPLINENUMBER WAS ENTERED BY A TOP USER (RAGNAR, DAVID, ETC) if (strlen($this->uplinenumber) == 1 && !$canStopMethod) { if ($row = mysql_fetch_row($query)) { $topUserEmail = $row[0]; // OBTAIN TOP USER EMAIL ADDRESS FOR COMPARISON $sql = 'SELECT nnet_userid FROM nnet_usermetadata ' . 'WHERE nnet_user_email = \'' . $this->email . '\' ' . ' AND nnet_user_registrationnumber = \'' . $this->uplinenumber . '\' '; $query = mysql_query($sql, $this->dbConn) or die('Could not perform query #2'); if (mysql_num_rows($query) > 0) { // THEY ARE A TOP USER BUT ALREADY FOUND IN USERMETADATA - RETURN FALSE $canStopMethod = 1; return 0; } elseif (strcmp($topUserEmail, $this->email) == 0) { // THEY ARE A TOP USER NOT FOUND YET IN USERMETADATA - SET REG # TO UPLINE # & SET TRUE $regNumber = $this->uplinenumber; $canStopMethod = 1; return 1; } } } // CHECK TO SEE IF THIS IS SOMEONE'S REGISTRATION NUMBER if (!$canStopMethod && !$this->hasFoundNextAvailRegNumber($this->uplinenumber)) { $canStopMethod = 1; return 0; } // THIS IS SOMEONE'S REG # - WE NOW HAVE TO CALCULATE THE NEXT AVAILABLE LEG if (!$canStopMethod) { $paddedUplinenumber .= $this->uplinenumber . '11'; if (!$this->hasFoundNextAvailRegNumber($paddedUplinenumber)) { $canStopMethod = 1; return 0; } // KEEP INCREASING NEXT_TO_LAST DIGIT BY 1 UNTIL NO LONGER FOUND IN DB AS REG # while ($this->hasFoundNextAvailRegNumber($paddedUplinenumber)) $paddedUplinenumber = $this->incrUplinenumber($paddedUplinenumber); $regNumber = $paddedUplinenumber; return 1; } } // STRING METHOD function incrUplinenumber($myUplinenumber) { $hexDigit = substr($myUplinenumber, strlen($myUplinenumber) - 2, 1); // NEXT_TO_LAST DIGIT $nextDecDigit = (int)hexdec($hexDigit) + 1; return substr($myUplinenumber, 0, strlen($myUplinenumber) - 2) . dechex($nextDecDigit) . substr($myUplinenumber, strlen($myUplinenumber) - 1, 1); } // BOOLEAN METHOD function hasFoundNextAvailRegNumber($paddedUplinenumber) { global $dbConn; $sql = 'SELECT nnet_userid FROM nnet_usermetadata ' . 'WHERE nnet_user_registrationnumber = \'' . $paddedUplinenumber . '\' '; $query = mysql_query($sql, $dbConn) or die('Could not perform query #3'); if (mysql_num_rows($query) == 0) { // NO ONE HAS THIS UPLINE # AS THEIR REG # - INVALID UPLINE NUMBER return 0; } else { return 1; } } // STRING METHOD TO RETURN HEX REG NUMBER function getRegNumber() { return $regNumber; } // STRING METHOD TO RETURN DECIMAL-DIGITS REG NUMBER (NOT TRUE NUMBER) WITH OPTIONAL CHAR // DIVIDER function getRegNumberDecDigits($myRegNumber, $divider = '') { for ($i = 0; $i < strlen($myRegNumber); $i++) $decRegNumber .= '' . hexdec(substr($myRegNumber, $i, 1)) . $divider; return $decRegNumber; } } //---END OF CLASS--------------------------------------------------------------------------- Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From xml at aumcomputers.com Mon Sep 8 07:42:23 2003 From: xml at aumcomputers.com (Anirudh Zala) Date: Mon, 8 Sep 2003 17:12:23 +0530 Subject: [nycphp-talk] Script terminates after certain amount of time period Message-ID: <087b01c375fe$4a05e870$3500a8c0@com1> Hello all, I am facing 1 problem of script termination by browser. My problem is: My php script generates PDF document that takes approx 2 mins to generate 1.5 MB PFD depending upon criteria, But if i choose more data and when PDF size is to be needed more than 2 MB and higher, browser says "The page cannot be displayed" after few mins, ie php scripts is terminated. However i don't get any php error like "Maximum executon time over" or "Memory size limit exceeded" etc. I have used "set_time_limit();" to increase script execution time but it is not working, also i have tried "sleep()" to delay program execution but it is not also working, or may be it is to be used in another way but i am sure i am using it in proper way. Hence is there any other way to keep my browser happy, when it is time to execute long process and to generate heavy output file by executing any script from browser ? Thanks, Anirudh Zala -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Mon Sep 8 09:08:16 2003 From: shiflett at php.net (Chris Shiflett) Date: Mon, 8 Sep 2003 06:08:16 -0700 (PDT) Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <087b01c375fe$4a05e870$3500a8c0@com1> Message-ID: <20030908130816.53546.qmail@web14306.mail.yahoo.com> --- Anirudh Zala wrote: > My php script generates PDF document that takes approx 2 mins to > generate 1.5 MB PFD depending upon criteria, But if i choose more > data and when PDF size is to be needed more than 2 MB and higher, > browser says "The page cannot be displayed" after few mins, ie php > scripts is terminated. There are two problems, I think: 1. Set your time limit to something big for this script. 2. Are you using IE? Don't. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From pl at eskimo.com Mon Sep 8 11:08:34 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 08 Sep 2003 11:08:34 -0400 Subject: [nycphp-talk] mysql tree directory for php installation Message-ID: <3F5C9B72.4574B841@eskimo.com> Hi, I just installed the mysql rpm and now I need to know the location of the mysql tree to install php. However, when I checked, it seems that mysql is installed all over the place. The system I installed mysql is mandrake 7.0. Does anyone know the correct mysql tree to use with the installation flag with-mysql=DIR in this case - mysql installed from an rpm. Below is output from locate mysql: /etc/rc.d/init.d/mysql /etc/rc.d/rc0.d/K90mysql /etc/rc.d/rc1.d/K90mysql /etc/rc.d/rc2.d/S90mysql /etc/rc.d/rc3.d/S90mysql /etc/rc.d/rc4.d/S90mysql /etc/rc.d/rc5.d/S90mysql /etc/rc.d/rc6.d/K90mysql /etc/logrotate.d/mysql /var/lib/mysql /var/lib/mysql/mysql /var/lib/mysql/test /var/lib/mysql/localhost.localdomain.err /var/lib/mysql/mysql.sock /var/lib/mysql/localhost.localdomain.pid /var/lock/subsys/mysql /usr/bin/mysqlbug /usr/bin/mysql_convert_table_format /usr/bin/mysql_fix_privilege_tables /usr/bin/mysql_zap /usr/bin/mysql_install_db /usr/bin/mysql_setpermission /usr/bin/mysqld_multi /usr/bin/mysqldumpslow /usr/bin/mysqlhotcopy /usr/bin/mysqltest /usr/bin/safe_mysqld /usr/bin/msql2mysql /usr/bin/mysql /usr/bin/mysql_find_rows /usr/bin/mysqlaccess /usr/bin/mysqladmin /usr/bin/mysqlbinlog /usr/bin/mysqlcheck /usr/bin/mysqldump /usr/bin/mysqlimport /usr/bin/mysqlshow /usr/bin/mysql_config /usr/include/mysql /usr/include/mysql/chardefs.h /usr/include/mysql/dbug.h /usr/include/mysql/errmsg.h /usr/include/mysql/history.h /usr/include/mysql/keymaps.h /usr/include/mysql/m_ctype.h /usr/include/mysql/m_string.h /usr/include/mysql/my_config.h /usr/include/mysql/my_global.h /usr/include/mysql/my_list.h /usr/include/mysql/my_net.h /usr/include/mysql/my_no_pthread.h /usr/include/mysql/my_pthread.h /usr/include/mysql/my_sys.h /usr/include/mysql/mysql.h /usr/include/mysql/mysql_com.h /usr/include/mysql/mysql_version.h /usr/include/mysql/mysqld_error.h /usr/include/mysql/raid.h /usr/include/mysql/readline.h /usr/include/mysql/sslopt-case.h /usr/include/mysql/sslopt-longopts.h /usr/include/mysql/sslopt-usage.h /usr/include/mysql/sslopt-vars.h /usr/include/mysql/tilde.h /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.3.20.32a /usr/lib/libmysqlclient.so.4 /usr/lib/mysql /usr/lib/mysql/mysqld.sym /usr/lib/mysql/mysqld-max.sym /usr/lib/mysql/libdbug.a /usr/lib/mysql/libheap.a /usr/lib/mysql/libmerge.a /usr/lib/mysql/libmyisam.a /usr/lib/mysql/libmyisammrg.a /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmystrings.a /usr/lib/mysql/libmysys.a /usr/lib/mysql/libnisam.a /usr/sbin/mysqld /usr/sbin/mysqld-max /usr/share/info/mysql.info.gz /usr/share/man/man1/mysql_zap.1.gz /usr/share/man/man1/mysqld.1.gz /usr/share/man/man1/mysqld_multi.1.gz /usr/share/man/man1/safe_mysqld.1.gz /usr/share/man/man1/mysql.1.gz /usr/share/man/man1/mysqlaccess.1.gz /usr/share/man/man1/mysqladmin.1.gz /usr/share/man/man1/mysqldump.1.gz /usr/share/man/man1/mysqlshow.1.gz /usr/share/mysql /usr/share/mysql/binary-configure /usr/share/mysql/charsets /usr/share/mysql/charsets/Index /usr/share/mysql/charsets/README /usr/share/mysql/charsets/cp1251.conf /usr/share/mysql/charsets/cp1257.conf /usr/share/mysql/charsets/croat.conf /usr/share/mysql/charsets/danish.conf /usr/share/mysql/charsets/dec8.conf /usr/share/mysql/charsets/dos.conf /usr/share/mysql/charsets/estonia.conf /usr/share/mysql/charsets/german1.conf /usr/share/mysql/charsets/greek.conf /usr/share/mysql/charsets/hebrew.conf /usr/share/mysql/charsets/hp8.conf /usr/share/mysql/charsets/hungarian.conf /usr/share/mysql/charsets/koi8_ru.conf /usr/share/mysql/charsets/koi8_ukr.conf /usr/share/mysql/charsets/latin1.conf /usr/share/mysql/charsets/latin2.conf /usr/share/mysql/charsets/latin5.conf /usr/share/mysql/charsets/swe7.conf /usr/share/mysql/charsets/usa7.conf /usr/share/mysql/charsets/win1250.conf /usr/share/mysql/charsets/win1251.conf /usr/share/mysql/charsets/win1251ukr.conf /usr/share/mysql/czech /usr/share/mysql/czech/errmsg.sys /usr/share/mysql/czech/errmsg.txt /usr/share/mysql/danish /usr/share/mysql/danish/errmsg.sys /usr/share/mysql/danish/errmsg.txt /usr/share/mysql/dutch /usr/share/mysql/dutch/errmsg.sys /usr/share/mysql/dutch/errmsg.txt /usr/share/mysql/english /usr/share/mysql/english/errmsg.sys /usr/share/mysql/english/errmsg.txt /usr/share/mysql/estonian /usr/share/mysql/estonian/errmsg.sys /usr/share/mysql/estonian/errmsg.txt /usr/share/mysql/french /usr/share/mysql/french/errmsg.sys /usr/share/mysql/french/errmsg.txt /usr/share/mysql/german /usr/share/mysql/german/errmsg.sys /usr/share/mysql/german/errmsg.txt /usr/share/mysql/greek /usr/share/mysql/greek/errmsg.sys /usr/share/mysql/greek/errmsg.txt /usr/share/mysql/hungarian /usr/share/mysql/hungarian/errmsg.sys /usr/share/mysql/hungarian/errmsg.txt /usr/share/mysql/italian /usr/share/mysql/italian/errmsg.sys /usr/share/mysql/italian/errmsg.txt /usr/share/mysql/japanese /usr/share/mysql/japanese/errmsg.sys /usr/share/mysql/japanese/errmsg.txt /usr/share/mysql/korean /usr/share/mysql/korean/errmsg.sys /usr/share/mysql/korean/errmsg.txt /usr/share/mysql/make_binary_distribution /usr/share/mysql/mi_test_all /usr/share/mysql/mi_test_all.res /usr/share/mysql/my-huge.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-small.cnf /usr/share/mysql/mysql-3.23.57.spec /usr/share/mysql/mysql-log-rotate /usr/share/mysql/mysql.server /usr/share/mysql/norwegian /usr/share/mysql/norwegian/errmsg.sys /usr/share/mysql/norwegian/errmsg.txt /usr/share/mysql/norwegian-ny /usr/share/mysql/norwegian-ny/errmsg.sys /usr/share/mysql/norwegian-ny/errmsg.txt /usr/share/mysql/polish /usr/share/mysql/polish/errmsg.sys /usr/share/mysql/polish/errmsg.txt /usr/share/mysql/portuguese /usr/share/mysql/portuguese/errmsg.sys /usr/share/mysql/portuguese/errmsg.txt /usr/share/mysql/romanian /usr/share/mysql/romanian/errmsg.sys /usr/share/mysql/romanian/errmsg.txt /usr/share/mysql/russian /usr/share/mysql/russian/errmsg.sys /usr/share/mysql/russian/errmsg.txt /usr/share/mysql/slovak /usr/share/mysql/slovak/errmsg.sys /usr/share/mysql/slovak/errmsg.txt /usr/share/mysql/spanish /usr/share/mysql/spanish/errmsg.sys /usr/share/mysql/spanish/errmsg.txt /usr/share/mysql/swedish /usr/share/mysql/swedish/errmsg.sys /usr/share/mysql/swedish/errmsg.txt /usr/share/mysql/ukrainian /usr/share/mysql/ukrainian/errmsg.sys /usr/share/mysql/ukrainian/errmsg.txt Thanks, Peter Lehrer From bpang at bpang.com Mon Sep 8 11:11:51 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 08 Sep 2003 11:11:51 -0400 Subject: [nycphp-talk] First Big Client Message-ID: Mark's advise is very sage. Other things to consider are what you think they can afford and/or what you can afford to do it for and whether or not there is likely to be any follow-on work. To address what you can afford to do it for; i.e. how low can you go; consider how it impacts your capacity to do other work that might pay a better rate. If you have nothing to do, need the money and have no other prospects, doing a project for "not very much money" is a whole lot better than doing nothing for no money. I often am in the position to consider whether or not I will receive any additional work from a client when I am pricing initial jobs for them. If I am certain that it is a one-off, I will be far less inclined to give them any price breaks to secure the business. If there is a good chance that there will be more work coming from them, I will want to develop the relationship and may consider giving them a lower or more competitive price so that I can be a prefered vendor for them. One forty hour job at $100/hour ($4000) is not as valuable to me as two forty hour jobs at $65/hour ($5200) with the prospect for more work. I have them over a barrel, I will usually give them my top hourly rate, because, well, I can. Still, I won't overdo it and ask for $1,000/hour because they never truly are over a barrel. There's always someone else who can do it for $500/hour. In considering what they can afford, you have to examine who they are. Are they off-broadway actors (notoriously poor) or lawyers (notoriously well-to-do). Start-up or well-established? Don't price yourself out of their range of affordability. Of course, if you can get them to divulge their budget, things get a lot easier. If not, it can take a very keen sense to arrive at figures that both parties are happy with. Always leave yourself open to discussion and review of the feature sets and price. I try not to allow the client to go ala carte with features, but often their original requests contain parts of the site that are very complex to implement and have little ROI. Identify those things, cut them out and give them a revised quote. Sorry for the lengthy reply that doesn't directly address your question. :) Hope you/someone finds it useful. Regarding your pricing, you need to start by breaking down the list of features into sub-components. "Content Management" is way to large to consider on its own. Next, look at those sub-components and their details, then estimate how long it might take you to implement (err on the high side, you'll be glad you did later after returning to this list to seek additional guidance). Add that all up, multiply by your targeted hourly rate and add 10%-15% (this is easy to knock-off later in negotiations without feeling like you're getting ripped off). If I were to price this out (not knowing what's involved in "and many other features...") I would be solidly in the 5-figures range ($10,000-$99,000), maybe more. After all, you did say it was "custom." :) Brian > > Here are some [probably obvious] thoughts: > > I would suggest thinking _not_ in terms of functionality (e.g. Content > Management, Groupware, etc.) but rather value. Bluntly stated, what will > the _output_ of all this stuff do for your client. How much money will they > save? How many more prospects will it uncover? How much faster will it > increase their cash cycle? In the perfect world, your invoice should be > only slightly less than the value all of these combined - the delta being a > function of client management...remember (pardon the crude analogy) the > difference between rape and making love is salesmanship! > > > > > Ok i ahve been developing PHP web application for a couple fo years now but > they have always been on a volunteer or personal basis. Now I have a client > that wants a custom web application and I am not sure how much to charge > them. So of the features that this web application included are: > > Contact Management > Personal Appointment book as well as global appointment book > Resume management > meeting management > admin features(Such as adding new users) > Sending out template based email to well over 100 individuals > dynamic word document creation > and many other features... > > This system is replacing other application such as Goldmine, resume grabber, > and will also eliminate many steps such as sending emails in outlook. > > if anyone has an idea on how much something like this goes for please let me > know. From hans at nyphp.org Mon Sep 8 11:23:06 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 11:23:06 -0400 Subject: [nycphp-talk] Development methodology WAS: why does setcookie fail????? In-Reply-To: <20030907182707.376.qmail@web14310.mail.yahoo.com> References: <20030907182707.376.qmail@web14310.mail.yahoo.com> Message-ID: <3F5C9EDA.90507@nyphp.org> Chris Shiflett wrote: > --- Adam Maccabee Trachtenberg wrote: > >>But seriously, my suggestion is whenever you're getting frustrated >>to take a deep breath, a five minute break, then come back and put >>together a step-by-step list of what you're trying to >>accomplish. Once you're armed with a list, you can then verify that >>each step is getting the correct input and providing the correct >>output. Often times, merely the process of figuring this out will >>trigger what you should do to fix the bug. > > > This is great advice. The setcookie line of questioning perfectly illustrates > why erroneous assumptions can make simple problems into very complex ones. > > For example, consider this calculation: > > (25 * 4) * 10 > > There are basically three pieces of data here that are combined together in two > operations to produce the final output. Now, consider this question: > > Does anyone know WHY I can multiply 100 by 10 and get 1250??? See if you can > explain THAT one!!! > > After scores of messages back and forth, it is realized that the error was that > the following calculation was actually being performed: > > (25 * 5) * 10 > > So, if the question asked had been why 5 was being returned by something > instead of 4, the answer would have been much easier (and less misleading). > > Breaking things down is essential to solving problems. This should have been > the first test to prove the assumption wrong: > > 100 * 10 > > This would have given 1000, not 1250, so the erroneous assumption should never > even be mentioned in the question. A little effort up front can save a lot of > time for everyone. > > Hope that helps. This is great stuff. Let's get something like this formalized and added into the Fundamentals website, alongside the Ten Commandments. Website development is unqiue, in that there are several very seperate, yet equally vital, parts of the equation (for example, browser interaction, DB interaction, and application logic). If any of these are broken, the whole system breaks, yet it can be difficult to know where the problem stems from. H From jonbaer at jonbaer.net Sun Sep 7 22:30:58 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sun, 7 Sep 2003 22:30:58 -0400 Subject: [nycphp-talk] mysql tree directory for php installation References: <3F5C9B72.4574B841@eskimo.com> Message-ID: <008101c375b1$3d57c7d0$6c00a8c0@thinkpad> In your case it would be /usr/include/mysql but did you try to compile with just --with-mysql + no directory option ... it normally works fine. - Jon ----- Original Message ----- From: "Peter Lehrer" To: Sent: Monday, September 08, 2003 11:08 AM Subject: [nycphp-talk] mysql tree directory for php installation > Hi, > > I just installed the mysql rpm and now I need to know the location of > the mysql tree to install php. However, when I checked, it seems that > mysql is installed all over the place. The system I installed mysql is > mandrake 7.0. > > Does anyone know the correct mysql tree to use with the installation > flag > > with-mysql=DIR > > in this case - mysql installed from an rpm. > > Below is output from locate mysql: > > /etc/rc.d/init.d/mysql > /etc/rc.d/rc0.d/K90mysql > /etc/rc.d/rc1.d/K90mysql > /etc/rc.d/rc2.d/S90mysql > /etc/rc.d/rc3.d/S90mysql > /etc/rc.d/rc4.d/S90mysql > /etc/rc.d/rc5.d/S90mysql > /etc/rc.d/rc6.d/K90mysql > /etc/logrotate.d/mysql > /var/lib/mysql > /var/lib/mysql/mysql > /var/lib/mysql/test > /var/lib/mysql/localhost.localdomain.err > /var/lib/mysql/mysql.sock > /var/lib/mysql/localhost.localdomain.pid > /var/lock/subsys/mysql > /usr/bin/mysqlbug > /usr/bin/mysql_convert_table_format > /usr/bin/mysql_fix_privilege_tables > /usr/bin/mysql_zap > /usr/bin/mysql_install_db > /usr/bin/mysql_setpermission > /usr/bin/mysqld_multi > /usr/bin/mysqldumpslow > /usr/bin/mysqlhotcopy > /usr/bin/mysqltest > /usr/bin/safe_mysqld > /usr/bin/msql2mysql > /usr/bin/mysql > /usr/bin/mysql_find_rows > /usr/bin/mysqlaccess > /usr/bin/mysqladmin > /usr/bin/mysqlbinlog > /usr/bin/mysqlcheck > /usr/bin/mysqldump > /usr/bin/mysqlimport > /usr/bin/mysqlshow > /usr/bin/mysql_config > /usr/include/mysql > /usr/include/mysql/chardefs.h > /usr/include/mysql/dbug.h > /usr/include/mysql/errmsg.h > /usr/include/mysql/history.h > /usr/include/mysql/keymaps.h > /usr/include/mysql/m_ctype.h > /usr/include/mysql/m_string.h > /usr/include/mysql/my_config.h > /usr/include/mysql/my_global.h > /usr/include/mysql/my_list.h > /usr/include/mysql/my_net.h > /usr/include/mysql/my_no_pthread.h > /usr/include/mysql/my_pthread.h > /usr/include/mysql/my_sys.h > /usr/include/mysql/mysql.h > /usr/include/mysql/mysql_com.h > /usr/include/mysql/mysql_version.h > /usr/include/mysql/mysqld_error.h > /usr/include/mysql/raid.h > /usr/include/mysql/readline.h > /usr/include/mysql/sslopt-case.h > /usr/include/mysql/sslopt-longopts.h > /usr/include/mysql/sslopt-usage.h > /usr/include/mysql/sslopt-vars.h > /usr/include/mysql/tilde.h > /usr/lib/libmysqlclient.so > /usr/lib/libmysqlclient.so.3.20.32a > /usr/lib/libmysqlclient.so.4 > /usr/lib/mysql > /usr/lib/mysql/mysqld.sym > /usr/lib/mysql/mysqld-max.sym > /usr/lib/mysql/libdbug.a > /usr/lib/mysql/libheap.a > /usr/lib/mysql/libmerge.a > /usr/lib/mysql/libmyisam.a > /usr/lib/mysql/libmyisammrg.a > /usr/lib/mysql/libmysqlclient.a > /usr/lib/mysql/libmystrings.a > /usr/lib/mysql/libmysys.a > /usr/lib/mysql/libnisam.a > /usr/sbin/mysqld > /usr/sbin/mysqld-max > /usr/share/info/mysql.info.gz > /usr/share/man/man1/mysql_zap.1.gz > /usr/share/man/man1/mysqld.1.gz > /usr/share/man/man1/mysqld_multi.1.gz > /usr/share/man/man1/safe_mysqld.1.gz > /usr/share/man/man1/mysql.1.gz > /usr/share/man/man1/mysqlaccess.1.gz > /usr/share/man/man1/mysqladmin.1.gz > /usr/share/man/man1/mysqldump.1.gz > /usr/share/man/man1/mysqlshow.1.gz > /usr/share/mysql > /usr/share/mysql/binary-configure > /usr/share/mysql/charsets > /usr/share/mysql/charsets/Index > /usr/share/mysql/charsets/README > /usr/share/mysql/charsets/cp1251.conf > /usr/share/mysql/charsets/cp1257.conf > /usr/share/mysql/charsets/croat.conf > /usr/share/mysql/charsets/danish.conf > /usr/share/mysql/charsets/dec8.conf > /usr/share/mysql/charsets/dos.conf > /usr/share/mysql/charsets/estonia.conf > /usr/share/mysql/charsets/german1.conf > /usr/share/mysql/charsets/greek.conf > /usr/share/mysql/charsets/hebrew.conf > /usr/share/mysql/charsets/hp8.conf > /usr/share/mysql/charsets/hungarian.conf > /usr/share/mysql/charsets/koi8_ru.conf > /usr/share/mysql/charsets/koi8_ukr.conf > /usr/share/mysql/charsets/latin1.conf > /usr/share/mysql/charsets/latin2.conf > /usr/share/mysql/charsets/latin5.conf > /usr/share/mysql/charsets/swe7.conf > /usr/share/mysql/charsets/usa7.conf > /usr/share/mysql/charsets/win1250.conf > /usr/share/mysql/charsets/win1251.conf > /usr/share/mysql/charsets/win1251ukr.conf > /usr/share/mysql/czech > /usr/share/mysql/czech/errmsg.sys > /usr/share/mysql/czech/errmsg.txt > /usr/share/mysql/danish > /usr/share/mysql/danish/errmsg.sys > /usr/share/mysql/danish/errmsg.txt > /usr/share/mysql/dutch > /usr/share/mysql/dutch/errmsg.sys > /usr/share/mysql/dutch/errmsg.txt > /usr/share/mysql/english > /usr/share/mysql/english/errmsg.sys > /usr/share/mysql/english/errmsg.txt > /usr/share/mysql/estonian > /usr/share/mysql/estonian/errmsg.sys > /usr/share/mysql/estonian/errmsg.txt > /usr/share/mysql/french > /usr/share/mysql/french/errmsg.sys > /usr/share/mysql/french/errmsg.txt > /usr/share/mysql/german > /usr/share/mysql/german/errmsg.sys > /usr/share/mysql/german/errmsg.txt > /usr/share/mysql/greek > /usr/share/mysql/greek/errmsg.sys > /usr/share/mysql/greek/errmsg.txt > /usr/share/mysql/hungarian > /usr/share/mysql/hungarian/errmsg.sys > /usr/share/mysql/hungarian/errmsg.txt > /usr/share/mysql/italian > /usr/share/mysql/italian/errmsg.sys > /usr/share/mysql/italian/errmsg.txt > /usr/share/mysql/japanese > /usr/share/mysql/japanese/errmsg.sys > /usr/share/mysql/japanese/errmsg.txt > /usr/share/mysql/korean > /usr/share/mysql/korean/errmsg.sys > /usr/share/mysql/korean/errmsg.txt > /usr/share/mysql/make_binary_distribution > /usr/share/mysql/mi_test_all > /usr/share/mysql/mi_test_all.res > /usr/share/mysql/my-huge.cnf > /usr/share/mysql/my-large.cnf > /usr/share/mysql/my-medium.cnf > /usr/share/mysql/my-small.cnf > /usr/share/mysql/mysql-3.23.57.spec > /usr/share/mysql/mysql-log-rotate > /usr/share/mysql/mysql.server > /usr/share/mysql/norwegian > /usr/share/mysql/norwegian/errmsg.sys > /usr/share/mysql/norwegian/errmsg.txt > /usr/share/mysql/norwegian-ny > /usr/share/mysql/norwegian-ny/errmsg.sys > /usr/share/mysql/norwegian-ny/errmsg.txt > /usr/share/mysql/polish > /usr/share/mysql/polish/errmsg.sys > /usr/share/mysql/polish/errmsg.txt > /usr/share/mysql/portuguese > /usr/share/mysql/portuguese/errmsg.sys > /usr/share/mysql/portuguese/errmsg.txt > /usr/share/mysql/romanian > /usr/share/mysql/romanian/errmsg.sys > /usr/share/mysql/romanian/errmsg.txt > /usr/share/mysql/russian > /usr/share/mysql/russian/errmsg.sys > /usr/share/mysql/russian/errmsg.txt > /usr/share/mysql/slovak > /usr/share/mysql/slovak/errmsg.sys > /usr/share/mysql/slovak/errmsg.txt > /usr/share/mysql/spanish > /usr/share/mysql/spanish/errmsg.sys > /usr/share/mysql/spanish/errmsg.txt > /usr/share/mysql/swedish > /usr/share/mysql/swedish/errmsg.sys > /usr/share/mysql/swedish/errmsg.txt > /usr/share/mysql/ukrainian > /usr/share/mysql/ukrainian/errmsg.sys > /usr/share/mysql/ukrainian/errmsg.txt > > > Thanks, > Peter Lehrer > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From hans at nyphp.org Mon Sep 8 11:27:02 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 11:27:02 -0400 Subject: [nycphp-talk] working with a PHP class - help! In-Reply-To: <0aa701c375aa$25b0f4f0$67a76244@philofsoa> References: <0aa701c375aa$25b0f4f0$67a76244@philofsoa> Message-ID: <3F5C9FC6.3090206@nyphp.org> Phil Powell wrote: > My first time working with a PHP class, and after 6 hours of working out > the kinks I am unable to return a value from the class, so now I appeal > to the general audience what on earth did I do wrong this time? I think you'll need to step back and revisit the code. There's nothing special about return a value from a class method (in this case anyway). However: > $registrationNumber = $regNumberGenerator->getRegNumber(); When I examine the code you posted, that function is only defined as: function getRegNumber() { return $regNumber; } Which doesn't do anything. H From pl at eskimo.com Mon Sep 8 11:22:54 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 08 Sep 2003 11:22:54 -0400 Subject: [nycphp-talk] mysql tree directory for php installation References: <3F5C9B72.4574B841@eskimo.com> <008101c375b1$3d57c7d0$6c00a8c0@thinkpad> Message-ID: <3F5C9ECE.4D04F178@eskimo.com> No I haven't compiled yet because it said in a book I am using that the default is /usr/local. Thanks for the help, Peter Lehrer jon baer wrote: > In your case it would be /usr/include/mysql but did you try to compile with > just --with-mysql + no directory option ... it normally works fine. > > - Jon > > ----- Original Message ----- > From: "Peter Lehrer" > To: > Sent: Monday, September 08, 2003 11:08 AM > Subject: [nycphp-talk] mysql tree directory for php installation > > > Hi, > > > > I just installed the mysql rpm and now I need to know the location of > > the mysql tree to install php. However, when I checked, it seems that > > mysql is installed all over the place. The system I installed mysql is > > mandrake 7.0. > > > > Does anyone know the correct mysql tree to use with the installation > > flag > > > > with-mysql=DIR > > > > in this case - mysql installed from an rpm. > > > > Below is output from locate mysql: > > > > /etc/rc.d/init.d/mysql > > /etc/rc.d/rc0.d/K90mysql > > /etc/rc.d/rc1.d/K90mysql > > /etc/rc.d/rc2.d/S90mysql > > /etc/rc.d/rc3.d/S90mysql > > /etc/rc.d/rc4.d/S90mysql > > /etc/rc.d/rc5.d/S90mysql > > /etc/rc.d/rc6.d/K90mysql > > /etc/logrotate.d/mysql > > /var/lib/mysql > > /var/lib/mysql/mysql > > /var/lib/mysql/test > > /var/lib/mysql/localhost.localdomain.err > > /var/lib/mysql/mysql.sock > > /var/lib/mysql/localhost.localdomain.pid > > /var/lock/subsys/mysql > > /usr/bin/mysqlbug > > /usr/bin/mysql_convert_table_format > > /usr/bin/mysql_fix_privilege_tables > > /usr/bin/mysql_zap > > /usr/bin/mysql_install_db > > /usr/bin/mysql_setpermission > > /usr/bin/mysqld_multi > > /usr/bin/mysqldumpslow > > /usr/bin/mysqlhotcopy > > /usr/bin/mysqltest > > /usr/bin/safe_mysqld > > /usr/bin/msql2mysql > > /usr/bin/mysql > > /usr/bin/mysql_find_rows > > /usr/bin/mysqlaccess > > /usr/bin/mysqladmin > > /usr/bin/mysqlbinlog > > /usr/bin/mysqlcheck > > /usr/bin/mysqldump > > /usr/bin/mysqlimport > > /usr/bin/mysqlshow > > /usr/bin/mysql_config > > /usr/include/mysql > > /usr/include/mysql/chardefs.h > > /usr/include/mysql/dbug.h > > /usr/include/mysql/errmsg.h > > /usr/include/mysql/history.h > > /usr/include/mysql/keymaps.h > > /usr/include/mysql/m_ctype.h > > /usr/include/mysql/m_string.h > > /usr/include/mysql/my_config.h > > /usr/include/mysql/my_global.h > > /usr/include/mysql/my_list.h > > /usr/include/mysql/my_net.h > > /usr/include/mysql/my_no_pthread.h > > /usr/include/mysql/my_pthread.h > > /usr/include/mysql/my_sys.h > > /usr/include/mysql/mysql.h > > /usr/include/mysql/mysql_com.h > > /usr/include/mysql/mysql_version.h > > /usr/include/mysql/mysqld_error.h > > /usr/include/mysql/raid.h > > /usr/include/mysql/readline.h > > /usr/include/mysql/sslopt-case.h > > /usr/include/mysql/sslopt-longopts.h > > /usr/include/mysql/sslopt-usage.h > > /usr/include/mysql/sslopt-vars.h > > /usr/include/mysql/tilde.h > > /usr/lib/libmysqlclient.so > > /usr/lib/libmysqlclient.so.3.20.32a > > /usr/lib/libmysqlclient.so.4 > > /usr/lib/mysql > > /usr/lib/mysql/mysqld.sym > > /usr/lib/mysql/mysqld-max.sym > > /usr/lib/mysql/libdbug.a > > /usr/lib/mysql/libheap.a > > /usr/lib/mysql/libmerge.a > > /usr/lib/mysql/libmyisam.a > > /usr/lib/mysql/libmyisammrg.a > > /usr/lib/mysql/libmysqlclient.a > > /usr/lib/mysql/libmystrings.a > > /usr/lib/mysql/libmysys.a > > /usr/lib/mysql/libnisam.a > > /usr/sbin/mysqld > > /usr/sbin/mysqld-max > > /usr/share/info/mysql.info.gz > > /usr/share/man/man1/mysql_zap.1.gz > > /usr/share/man/man1/mysqld.1.gz > > /usr/share/man/man1/mysqld_multi.1.gz > > /usr/share/man/man1/safe_mysqld.1.gz > > /usr/share/man/man1/mysql.1.gz > > /usr/share/man/man1/mysqlaccess.1.gz > > /usr/share/man/man1/mysqladmin.1.gz > > /usr/share/man/man1/mysqldump.1.gz > > /usr/share/man/man1/mysqlshow.1.gz > > /usr/share/mysql > > /usr/share/mysql/binary-configure > > /usr/share/mysql/charsets > > /usr/share/mysql/charsets/Index > > /usr/share/mysql/charsets/README > > /usr/share/mysql/charsets/cp1251.conf > > /usr/share/mysql/charsets/cp1257.conf > > /usr/share/mysql/charsets/croat.conf > > /usr/share/mysql/charsets/danish.conf > > /usr/share/mysql/charsets/dec8.conf > > /usr/share/mysql/charsets/dos.conf > > /usr/share/mysql/charsets/estonia.conf > > /usr/share/mysql/charsets/german1.conf > > /usr/share/mysql/charsets/greek.conf > > /usr/share/mysql/charsets/hebrew.conf > > /usr/share/mysql/charsets/hp8.conf > > /usr/share/mysql/charsets/hungarian.conf > > /usr/share/mysql/charsets/koi8_ru.conf > > /usr/share/mysql/charsets/koi8_ukr.conf > > /usr/share/mysql/charsets/latin1.conf > > /usr/share/mysql/charsets/latin2.conf > > /usr/share/mysql/charsets/latin5.conf > > /usr/share/mysql/charsets/swe7.conf > > /usr/share/mysql/charsets/usa7.conf > > /usr/share/mysql/charsets/win1250.conf > > /usr/share/mysql/charsets/win1251.conf > > /usr/share/mysql/charsets/win1251ukr.conf > > /usr/share/mysql/czech > > /usr/share/mysql/czech/errmsg.sys > > /usr/share/mysql/czech/errmsg.txt > > /usr/share/mysql/danish > > /usr/share/mysql/danish/errmsg.sys > > /usr/share/mysql/danish/errmsg.txt > > /usr/share/mysql/dutch > > /usr/share/mysql/dutch/errmsg.sys > > /usr/share/mysql/dutch/errmsg.txt > > /usr/share/mysql/english > > /usr/share/mysql/english/errmsg.sys > > /usr/share/mysql/english/errmsg.txt > > /usr/share/mysql/estonian > > /usr/share/mysql/estonian/errmsg.sys > > /usr/share/mysql/estonian/errmsg.txt > > /usr/share/mysql/french > > /usr/share/mysql/french/errmsg.sys > > /usr/share/mysql/french/errmsg.txt > > /usr/share/mysql/german > > /usr/share/mysql/german/errmsg.sys > > /usr/share/mysql/german/errmsg.txt > > /usr/share/mysql/greek > > /usr/share/mysql/greek/errmsg.sys > > /usr/share/mysql/greek/errmsg.txt > > /usr/share/mysql/hungarian > > /usr/share/mysql/hungarian/errmsg.sys > > /usr/share/mysql/hungarian/errmsg.txt > > /usr/share/mysql/italian > > /usr/share/mysql/italian/errmsg.sys > > /usr/share/mysql/italian/errmsg.txt > > /usr/share/mysql/japanese > > /usr/share/mysql/japanese/errmsg.sys > > /usr/share/mysql/japanese/errmsg.txt > > /usr/share/mysql/korean > > /usr/share/mysql/korean/errmsg.sys > > /usr/share/mysql/korean/errmsg.txt > > /usr/share/mysql/make_binary_distribution > > /usr/share/mysql/mi_test_all > > /usr/share/mysql/mi_test_all.res > > /usr/share/mysql/my-huge.cnf > > /usr/share/mysql/my-large.cnf > > /usr/share/mysql/my-medium.cnf > > /usr/share/mysql/my-small.cnf > > /usr/share/mysql/mysql-3.23.57.spec > > /usr/share/mysql/mysql-log-rotate > > /usr/share/mysql/mysql.server > > /usr/share/mysql/norwegian > > /usr/share/mysql/norwegian/errmsg.sys > > /usr/share/mysql/norwegian/errmsg.txt > > /usr/share/mysql/norwegian-ny > > /usr/share/mysql/norwegian-ny/errmsg.sys > > /usr/share/mysql/norwegian-ny/errmsg.txt > > /usr/share/mysql/polish > > /usr/share/mysql/polish/errmsg.sys > > /usr/share/mysql/polish/errmsg.txt > > /usr/share/mysql/portuguese > > /usr/share/mysql/portuguese/errmsg.sys > > /usr/share/mysql/portuguese/errmsg.txt > > /usr/share/mysql/romanian > > /usr/share/mysql/romanian/errmsg.sys > > /usr/share/mysql/romanian/errmsg.txt > > /usr/share/mysql/russian > > /usr/share/mysql/russian/errmsg.sys > > /usr/share/mysql/russian/errmsg.txt > > /usr/share/mysql/slovak > > /usr/share/mysql/slovak/errmsg.sys > > /usr/share/mysql/slovak/errmsg.txt > > /usr/share/mysql/spanish > > /usr/share/mysql/spanish/errmsg.sys > > /usr/share/mysql/spanish/errmsg.txt > > /usr/share/mysql/swedish > > /usr/share/mysql/swedish/errmsg.sys > > /usr/share/mysql/swedish/errmsg.txt > > /usr/share/mysql/ukrainian > > /usr/share/mysql/ukrainian/errmsg.sys > > /usr/share/mysql/ukrainian/errmsg.txt > > > > > > Thanks, > > Peter Lehrer > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Mon Sep 8 12:37:08 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 8 Sep 2003 12:37:08 -0400 Subject: [nycphp-talk] PHP growth Message-ID: <000001c37627$728b9be0$bf8d3818@OBERON1> Thought this might be of interest: Posted August 30, 2003 01:42 PM @ news.netcraft.com Although PHP is universally thought of as implying Linux, Apache and MySQL, nearly 7% of PHP sites [when counting by ip address] run on Windows. This has doubled over the last year, and on its current growth trajectory PHP will overtake (my emphasis) Cold Fusion as the most popular non-Microsoft scripting language used on Windows during the next year. Web site developers are less dogmatic than many analysts like to portray, and are prepared to mix development paradigms when it suits their purpose. .. Scripting languages are seeing the best growth of any class of web technologies presently as site owners seek to make their sites more sophisticated and see a good return on the development time invested. Excerpted from: http://news.netcraft.com/archives/2003/08/30/php_growing_surprisingly_strong ly_on_windows.html Tim G. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 145 bytes Desc: not available URL: From rudy at taytek.com Mon Sep 8 14:02:23 2003 From: rudy at taytek.com (Rudy Gamberini) Date: Mon, 08 Sep 2003 14:02:23 -0400 Subject: [nycphp-talk] Include File Access Message-ID: Give the following web site file architecture: Root | ----------------------------- | | | | page1 page2 page3 inc I place my util.php file in the "inc" directory. As it turns out I need to access this file from the Root directory as well as the various page directories. While I can place the relative path to the include file with { include "./inc/util.php" } for the Root and { include "../inc/util.php" } for the sub-pages, this causes problems with my common code. I construct my pages with common code that controls the left side of the page. This code utilizes the functions in the util.php include. As it stands now the include fails because the util.php file cannot be found. I really don't want to modify this include statement for each of my pages depending on their depth relative to the directory containing the include files. Granted I could flatten the site structure and get rid of this problem but that would create considerable complexity when trying to work on the site. I was thinking about creating an environment PATH to the inc directory as one way to keep the include code that same and still be able to access the util.php file. Any suggestions?? Thanks, Rudy --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Mon Sep 8 14:17:45 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 08 Sep 2003 14:17:45 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: Message-ID: <005601c37635$80ef0c40$6401a8c0@EZDSDELL> You may want to examine this thread (http://lists.nyphp.org/pipermail/talk/2003-September/005065.html ) since we were just discussing this very question. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Rudy Gamberini Sent: Monday, September 08, 2003 1:02 PM To: NYPHP Talk Subject: [nycphp-talk] Include File Access Give the following web site file architecture: Root | ----------------------------- | | | | page1 page2 page3 inc I place my util.php file in the "inc" directory. As it turns out I need to access this file from the Root directory as well as the various page directories. While I can place the relative path to the include file with { include "./inc/util.php" } for the Root and { include "../inc/util.php" } for the sub-pages, this causes problems with my common code. I construct my pages with common code that controls the left side of the page. This code utilizes the functions in the util.php include. As it stands now the include fails because the util.php file cannot be found. I really don't want to modify this include statement for each of my pages depending on their depth relative to the directory containing the include files. Granted I could flatten the site structure and get rid of this problem but that would create considerable complexity when trying to work on the site. I was thinking about creating an environment PATH to the inc directory as one way to keep the include code that same and still be able to access the util.php file. Any suggestions?? Thanks, Rudy -------------- next part -------------- An HTML attachment was scrubbed... URL: From southwell at dneba.com Mon Sep 8 14:27:41 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 08 Sep 2003 14:27:41 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: Message-ID: <5.1.0.14.2.20030908142612.00b64e48@mail.optonline.net> This is precisely what the recent Fundamentals topic was. Within a week we should have a beta of "best [or at least common] practices"--no help to you now, I realize--except that you have just contributed yet another element to the complexity of the example. At 02:02 PM 9/8/2003, you wrote: >Give the following web site file architecture: > > Root > | > ----------------------------- > | | | | >page1 page2 page3 inc > >I place my util.php file in the "inc" directory. As it turns out I need >to access this file from the Root directory as well as the various page >directories. While I can place the relative path to the include file >with { include "./inc/util.php" } for the Root and { include >"../inc/util.php" } for the sub-pages, this causes problems with my >common code. > >I construct my pages with common code that controls the left side of the >page. This code utilizes the functions in the util.php include. As it >stands now the include fails because the util.php file cannot be found. I >really don't want to modify this include statement for each of my pages >depending on their depth relative to the directory containing the include >files. > >Granted I could flatten the site structure and get rid of this problem but >that would create considerable complexity when trying to work on the site. > >I was thinking about creating an environment PATH to the inc directory as >one way to keep the include code that same and still be able to access the >util.php file. > >Any suggestions?? > >Thanks, >Rudy > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From southwell at dneba.com Mon Sep 8 14:28:44 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 08 Sep 2003 14:28:44 -0400 Subject: [nycphp-talk] Fwd: Re: [nycphp-dev] Sept. Presentation/Meeting Message-ID: <5.1.0.14.2.20030908142805.00b65e90@wheresmymailserver.com> >Date: Mon, 08 Sep 2003 14:24:07 -0400 >To: NYPHP Development >From: Michael Southwell >Subject: Re: [nycphp-dev] Sept. Presentation/Meeting > >At 12:07 PM 9/8/2003, you wrote: >>>H, >>>I won't have time to prepare a full presentation, but I could fill in about >>>1 hour. Lets try to get another shorty and have a double espresso ! >> >>OK, we can go with that then. Anyone have ideas for another short >>presentation (like half an hour?) or would like to give one >>themselves? Maybe even a crash course on a PHP extension, application or >>technique? Heck, even a newbie corner, or a review of the last >>Fundamentals topic? > >yes, Hans, you can show the beta of the note (I'll leave it at dneba.com >but fix it later today) and people can tear it apart (I hope not). Then >we'll have our final version. I meant on the $var evaluation topic >>Heh, there's a lot of options; what would people like to see? >> >>H >> >>_______________________________________________ >>dev mailing list >>dev at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/dev > >Michael G. Southwell ================================= >DNEBA Enterprises >81 South Road >Bloomingdale, NJ 07403-1419 >973/492-7873 (voice and fax) >southwell at dneba.com >http://www.dneba.com >====================================================== Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From rudy at taytek.com Mon Sep 8 14:35:57 2003 From: rudy at taytek.com (Rudy Gamberini) Date: Mon, 08 Sep 2003 14:35:57 -0400 Subject: [nycphp-talk] Development methodology WAS: why does setcookiefail????? In-Reply-To: <3F5C9EDA.90507@nyphp.org> Message-ID: Hans, Was it by design that you picked db interaction (Model), Browser interaction (View), Application logic (Controller). Sounds a lot like MVC architecture. I have been building dynamic sites for a while now and have been use MVC as my approach. It is implement via three state machines, Business State Machine (Controller), Forms State Machine (View) and a Message State Machine (not part of the MVC). Underneath it all is the database which goes almost without saying (Model). I been using NetObjects Fusion as my html tool of choice and it has provided a framework that is very object like. Hardly ideal but workable. I try to be as object oriented in my approach as possible meaning that most visual objects carry with them their behavior. As the business state changes the objects respond accordingly either by making themselves visible or changing configuration. I have found that by focusing my design to individual objects, the implementation is greatly simplified. While a complex page may consist of many individual objects they are all being driven by the business state machine. Just food for thought. Rudy -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Monday, September 08, 2003 11:23 AM To: NYPHP Talk Subject: [nycphp-talk] Development methodology WAS: why does setcookiefail????? Chris Shiflett wrote: > --- Adam Maccabee Trachtenberg wrote: > >>But seriously, my suggestion is whenever you're getting frustrated >>to take a deep breath, a five minute break, then come back and put >>together a step-by-step list of what you're trying to >>accomplish. Once you're armed with a list, you can then verify that >>each step is getting the correct input and providing the correct >>output. Often times, merely the process of figuring this out will >>trigger what you should do to fix the bug. > > > This is great advice. The setcookie line of questioning perfectly illustrates > why erroneous assumptions can make simple problems into very complex ones. > > For example, consider this calculation: > > (25 * 4) * 10 > > There are basically three pieces of data here that are combined together in two > operations to produce the final output. Now, consider this question: > > Does anyone know WHY I can multiply 100 by 10 and get 1250??? See if you can > explain THAT one!!! > > After scores of messages back and forth, it is realized that the error was that > the following calculation was actually being performed: > > (25 * 5) * 10 > > So, if the question asked had been why 5 was being returned by something > instead of 4, the answer would have been much easier (and less misleading). > > Breaking things down is essential to solving problems. This should have been > the first test to prove the assumption wrong: > > 100 * 10 > > This would have given 1000, not 1250, so the erroneous assumption should never > even be mentioned in the question. A little effort up front can save a lot of > time for everyone. > > Hope that helps. This is great stuff. Let's get something like this formalized and added into the Fundamentals website, alongside the Ten Commandments. Website development is unqiue, in that there are several very seperate, yet equally vital, parts of the equation (for example, browser interaction, DB interaction, and application logic). If any of these are broken, the whole system breaks, yet it can be difficult to know where the problem stems from. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 From rudy at taytek.com Mon Sep 8 14:40:57 2003 From: rudy at taytek.com (Rudy Gamberini) Date: Mon, 08 Sep 2003 14:40:57 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: <5.1.0.14.2.20030908142612.00b64e48@mail.optonline.net> Message-ID: Thanks for the info. Before posting this question I reviewed the Fundamentals topic and wasn't able to find a solution. I try to stay current with this list and feel like I taking a college course that requires considerable reading every night. If I figure out an approach to my issue you can be sure I will offer it up to the Fundamentals topic. For now I'll do some trail blazing of my own. Rudy -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Michael Southwell Sent: Monday, September 08, 2003 2:28 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Include File Access This is precisely what the recent Fundamentals topic was. Within a week we should have a beta of "best [or at least common] practices"--no help to you now, I realize--except that you have just contributed yet another element to the complexity of the example. At 02:02 PM 9/8/2003, you wrote: >Give the following web site file architecture: > > Root > | > ----------------------------- > | | | | >page1 page2 page3 inc > >I place my util.php file in the "inc" directory. As it turns out I need >to access this file from the Root directory as well as the various page >directories. While I can place the relative path to the include file >with { include "./inc/util.php" } for the Root and { include >"../inc/util.php" } for the sub-pages, this causes problems with my >common code. > >I construct my pages with common code that controls the left side of the >page. This code utilizes the functions in the util.php include. As it >stands now the include fails because the util.php file cannot be found. I >really don't want to modify this include statement for each of my pages >depending on their depth relative to the directory containing the include >files. > >Granted I could flatten the site structure and get rid of this problem but >that would create considerable complexity when trying to work on the site. > >I was thinking about creating an environment PATH to the inc directory as >one way to keep the include code that same and still be able to access the >util.php file. > >Any suggestions?? > >Thanks, >Rudy > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 From dorgan at optonline.net Mon Sep 8 14:45:02 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 08 Sep 2003 14:45:02 -0400 Subject: [nycphp-talk] First Big Client References: Message-ID: <00a001c37639$509325a0$c801a8c0@dj> Thanks Mark, everyone that has responded to the post, both on and off the list, I thank you every bit of information helps. ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Monday, September 08, 2003 11:11 AM Subject: RE: [nycphp-talk] First Big Client > Mark's advise is very sage. > > Other things to consider are what you think they can afford and/or what > you can afford to do it for and whether or not there is likely to be any > follow-on work. > > To address what you can afford to do it for; i.e. how low can you go; > consider how it impacts your capacity to do other work that might pay a > better rate. If you have nothing to do, need the money and have no other > prospects, doing a project for "not very much money" is a whole lot > better than doing nothing for no money. > > I often am in the position to consider whether or not I will receive any > additional work from a client when I am pricing initial jobs for them. > If I am certain that it is a one-off, I will be far less inclined to > give them any price breaks to secure the business. If there is a good > chance that there will be more work coming from them, I will want to > develop the relationship and may consider giving them a lower or more > competitive price so that I can be a prefered vendor for them. > > One forty hour job at $100/hour ($4000) is not as valuable to me as two > forty hour jobs at $65/hour ($5200) with the prospect for more work. > > I have them over a barrel, I will usually give them my top hourly rate, > because, well, I can. Still, I won't overdo it and ask for $1,000/hour > because they never truly are over a barrel. There's always someone else > who can do it for $500/hour. > > In considering what they can afford, you have to examine who they are. > Are they off-broadway actors (notoriously poor) or lawyers (notoriously > well-to-do). Start-up or well-established? Don't price yourself out of > their range of affordability. > > Of course, if you can get them to divulge their budget, things get a lot > easier. If not, it can take a very keen sense to arrive at figures that > both parties are happy with. > > Always leave yourself open to discussion and review of the feature sets > and price. I try not to allow the client to go ala carte with features, > but often their original requests contain parts of the site that are > very complex to implement and have little ROI. Identify those things, > cut them out and give them a revised quote. > > > Sorry for the lengthy reply that doesn't directly address your question. > :) Hope you/someone finds it useful. > > > Regarding your pricing, you need to start by breaking down the list of > features into sub-components. > "Content Management" is way to large to consider on its own. > > Next, look at those sub-components and their details, then estimate how > long it might take you to implement (err on the high side, you'll be > glad you did later after returning to this list to seek additional > guidance). > > Add that all up, multiply by your targeted hourly rate and add 10%-15% > (this is easy to knock-off later in negotiations without feeling like > you're getting ripped off). > > > If I were to price this out (not knowing what's involved in "and many > other features...") I would be solidly in the 5-figures range > ($10,000-$99,000), maybe more. After all, you did say it was "custom." :) > > Brian > > > > > Here are some [probably obvious] thoughts: > > > > I would suggest thinking _not_ in terms of functionality (e.g. Content > > Management, Groupware, etc.) but rather value. Bluntly stated, what will > > the _output_ of all this stuff do for your client. How much money > will they > > save? How many more prospects will it uncover? How much faster will it > > increase their cash cycle? In the perfect world, your invoice should be > > only slightly less than the value all of these combined - the delta > being a > > function of client management...remember (pardon the crude analogy) the > > difference between rape and making love is salesmanship! > > > > > > > > > > Ok i ahve been developing PHP web application for a couple fo years > now but > > they have always been on a volunteer or personal basis. Now I have a > client > > that wants a custom web application and I am not sure how much to charge > > them. So of the features that this web application included are: > > > > Contact Management > > Personal Appointment book as well as global appointment book > > Resume management > > meeting management > > admin features(Such as adding new users) > > Sending out template based email to well over 100 individuals > > dynamic word document creation > > and many other features... > > > > This system is replacing other application such as Goldmine, resume > grabber, > > and will also eliminate many steps such as sending emails in outlook. > > > > if anyone has an idea on how much something like this goes for please > let me > > know. > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Mon Sep 8 14:46:28 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 08 Sep 2003 14:46:28 -0400 Subject: [nycphp-talk] First Big Client References: <00a001c37639$509325a0$c801a8c0@dj> Message-ID: <00db01c37639$839ec620$c801a8c0@dj> I meant thanx Brian also, that was the first name the drew my attention but like I said thank you to everyone that has responded both on and off the list ----- Original Message ----- From: "Donald J. Organ IV" To: "NYPHP Talk" Sent: Monday, September 08, 2003 2:45 PM Subject: Re: [nycphp-talk] First Big Client > Thanks Mark, everyone that has responded to the post, both on and off the > list, I thank you every bit of information helps. > > ----- Original Message ----- > From: "Brian Pang" > To: "NYPHP Talk" > Sent: Monday, September 08, 2003 11:11 AM > Subject: RE: [nycphp-talk] First Big Client > > > > Mark's advise is very sage. > > > > Other things to consider are what you think they can afford and/or what > > you can afford to do it for and whether or not there is likely to be any > > follow-on work. > > > > To address what you can afford to do it for; i.e. how low can you go; > > consider how it impacts your capacity to do other work that might pay a > > better rate. If you have nothing to do, need the money and have no other > > prospects, doing a project for "not very much money" is a whole lot > > better than doing nothing for no money. > > > > I often am in the position to consider whether or not I will receive any > > additional work from a client when I am pricing initial jobs for them. > > If I am certain that it is a one-off, I will be far less inclined to > > give them any price breaks to secure the business. If there is a good > > chance that there will be more work coming from them, I will want to > > develop the relationship and may consider giving them a lower or more > > competitive price so that I can be a prefered vendor for them. > > > > One forty hour job at $100/hour ($4000) is not as valuable to me as two > > forty hour jobs at $65/hour ($5200) with the prospect for more work. > > > > I have them over a barrel, I will usually give them my top hourly rate, > > because, well, I can. Still, I won't overdo it and ask for $1,000/hour > > because they never truly are over a barrel. There's always someone else > > who can do it for $500/hour. > > > > In considering what they can afford, you have to examine who they are. > > Are they off-broadway actors (notoriously poor) or lawyers (notoriously > > well-to-do). Start-up or well-established? Don't price yourself out of > > their range of affordability. > > > > Of course, if you can get them to divulge their budget, things get a lot > > easier. If not, it can take a very keen sense to arrive at figures that > > both parties are happy with. > > > > Always leave yourself open to discussion and review of the feature sets > > and price. I try not to allow the client to go ala carte with features, > > but often their original requests contain parts of the site that are > > very complex to implement and have little ROI. Identify those things, > > cut them out and give them a revised quote. > > > > > > Sorry for the lengthy reply that doesn't directly address your question. > > :) Hope you/someone finds it useful. > > > > > > Regarding your pricing, you need to start by breaking down the list of > > features into sub-components. > > "Content Management" is way to large to consider on its own. > > > > Next, look at those sub-components and their details, then estimate how > > long it might take you to implement (err on the high side, you'll be > > glad you did later after returning to this list to seek additional > > guidance). > > > > Add that all up, multiply by your targeted hourly rate and add 10%-15% > > (this is easy to knock-off later in negotiations without feeling like > > you're getting ripped off). > > > > > > If I were to price this out (not knowing what's involved in "and many > > other features...") I would be solidly in the 5-figures range > > ($10,000-$99,000), maybe more. After all, you did say it was "custom." :) > > > > Brian > > > > > > > > Here are some [probably obvious] thoughts: > > > > > > I would suggest thinking _not_ in terms of functionality (e.g. Content > > > Management, Groupware, etc.) but rather value. Bluntly stated, what > will > > > the _output_ of all this stuff do for your client. How much money > > will they > > > save? How many more prospects will it uncover? How much faster will it > > > increase their cash cycle? In the perfect world, your invoice should be > > > only slightly less than the value all of these combined - the delta > > being a > > > function of client management...remember (pardon the crude analogy) the > > > difference between rape and making love is salesmanship! > > > > > > > > > > > > > > > Ok i ahve been developing PHP web application for a couple fo years > > now but > > > they have always been on a volunteer or personal basis. Now I have a > > client > > > that wants a custom web application and I am not sure how much to charge > > > them. So of the features that this web application included are: > > > > > > Contact Management > > > Personal Appointment book as well as global appointment book > > > Resume management > > > meeting management > > > admin features(Such as adding new users) > > > Sending out template based email to well over 100 individuals > > > dynamic word document creation > > > and many other features... > > > > > > This system is replacing other application such as Goldmine, resume > > grabber, > > > and will also eliminate many steps such as sending emails in outlook. > > > > > > if anyone has an idea on how much something like this goes for please > > let me > > > know. > > > > > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Mon Sep 8 14:55:45 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 08 Sep 2003 14:55:45 -0400 Subject: [nycphp-talk] Include File Access Message-ID: look again at my approach.. of course, my opinion is biased that this is the best way to go http://lists.nyphp.org/pipermail/talk/2003-September/005156.html http://lists.nyphp.org/pipermail/talk/2003-September/005137.html anyone know why my posts don't continue within the threads? Sorry, I don't mean for that to happen. > Thanks for the info. Before posting this question I reviewed the > Fundamentals topic and wasn't able to find a solution. I try to stay > current with this list and feel like I taking a college course that requires > considerable reading every night. From csnyder at chxo.com Mon Sep 8 15:01:35 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 08 Sep 2003 15:01:35 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: References: Message-ID: <3F5CD20F.5090806@chxo.com> Obviously a quick solution would be to just use the absolute path to the util.php file... or am I missing something? If you had a number of such paths that you needed to set (or other vlaues that you wanted to make available to every script in the application), you could define() them as constants in a config.php file: config.php: Thanks for the info. Before posting this question I reviewed the >Fundamentals topic and wasn't able to find a solution. I try to stay >current with this list and feel like I taking a college course that requires >considerable reading every night. > >If I figure out an approach to my issue you can be sure I will offer it up >to the Fundamentals topic. For now I'll do some trail blazing of my own. > >Rudy > > >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Michael Southwell >Sent: Monday, September 08, 2003 2:28 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] Include File Access > > >This is precisely what the recent Fundamentals topic was. Within a week we >should have a beta of "best [or at least common] practices"--no help to you >now, I realize--except that you have just contributed yet another element >to the complexity of the example. > > >At 02:02 PM 9/8/2003, you wrote: > > >>Give the following web site file architecture: >> >> Root >> | >> ----------------------------- >> | | | | >>page1 page2 page3 inc >> >>I place my util.php file in the "inc" directory. As it turns out I need >>to access this file from the Root directory as well as the various page >>directories. While I can place the relative path to the include file >>with { include "./inc/util.php" } for the Root and { include >>"../inc/util.php" } for the sub-pages, this causes problems with my >>common code. >> >>I construct my pages with common code that controls the left side of the >>page. This code utilizes the functions in the util.php include. As it >>stands now the include fails because the util.php file cannot be found. I >>really don't want to modify this include statement for each of my pages >>depending on their depth relative to the directory containing the include >>files. >> >>Granted I could flatten the site structure and get rid of this problem but >>that would create considerable complexity when trying to work on the site. >> >>I was thinking about creating an environment PATH to the inc directory as >>one way to keep the include code that same and still be able to access the >>util.php file. >> >>Any suggestions?? >> >>Thanks, >>Rudy >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> > >Michael G. Southwell ================================= >DNEBA Enterprises >81 South Road >Bloomingdale, NJ 07403-1419 >973/492-7873 (voice and fax) >southwell at dneba.com >http://www.dneba.com >====================================================== > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03 > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From dkrook at hotmail.com Mon Sep 8 15:03:26 2003 From: dkrook at hotmail.com (D C Krook) Date: Mon, 08 Sep 2003 15:03:26 -0400 Subject: [nycphp-talk] Include File Access Message-ID: Rudy, If you structure your include statement look like this, it will work no matter where you place the calling page: include($_SERVER['DOCUMENT_ROOT'].'/inc/util.php); >I was thinking about creating an environment PATH to the inc directory as >one way to keep the include code that same and still be able to access the >util.php file. > >Any suggestions?? _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From dmintz at panix.com Mon Sep 8 15:08:47 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 8 Sep 2003 15:08:47 -0400 (EDT) Subject: [nycphp-talk] First Big Client In-Reply-To: References: Message-ID: Brian's et al's comments are most helpful to this semi-professionl PHP dude who would like to get more work. There are lots of intriguing questions that I have about hourly rates, going rates, care and feeding of clients, and perhaps most important, how to estimate the hours that a project will take. I used to think ewerything took me 8 times longer than I thought it should because of my incompetence. Now I think, yeah, I'm a plodder, that's part of it... but it ain't the whole story. This stuff takes time. (Yeah I know, all other things being equal, the genius will bang it out in an afternoon while three weeks later, the non-genius' brain will be fried, eyes stinging from too much monitor-staring, the job still not done.) Some of these are delicate questions that are perhaps best discussed in a nonpublic forum, Once upon a time the translation and interpretation industry (in which I have my day job) was the subject of FTC investigation for price-fixing, because people were talking about what to charge. It was not pleasant. Maybe I'll show up at that party on the 19th and pick you-guys' brains. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From hans at nyphp.org Mon Sep 8 15:19:13 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 15:19:13 -0400 Subject: [nycphp-talk] Development methodology WAS: why does setcookiefail????? In-Reply-To: References: Message-ID: <3F5CD631.7030604@nyphp.org> Rudy Gamberini wrote: > Hans, > Was it by design that you picked db interaction (Model), Browser interaction > (View), Application logic (Controller). Sounds a lot like MVC architecture. Yes and no. I've always felt that a well designed and architectured site is divided up into these three main areas. Regardless of the label, or the implementation itself, good design is good design. > I have been building dynamic sites for a while now and have been use MVC as > my approach. It is implement via three state machines, Business State > Machine (Controller), Forms State Machine (View) and a Message State Machine > (not part of the MVC). Underneath it all is the database which goes almost > without saying (Model). I agree to a large degree. All sites, no matter how complex, have these three main segments. It's a matter of implementation, at the architectural and code levels, how successful and well designed a site is. > I been using NetObjects Fusion as my html tool of choice and it has provided > a framework that is very object like. Hardly ideal but workable. > > I try to be as object oriented in my approach as possible meaning that most > visual objects carry with them their behavior. As the business state > changes the objects respond accordingly either by making themselves visible > or changing configuration. I have found that by focusing my design to > individual objects, the implementation is greatly simplified. While a > complex page may consist of many individual objects they are all being > driven by the business state machine. Personally, I'm not a big fan of complex OO designs, especially in PHP4. Putting aside performance issues, I've found classes/objects become inflexible and hackish as they start to grow in complexity. And by complexity, I mean complex logic and processes; they're great for storing "physically" related data. I think most would be hard pressed to show an 100% OO site. There are always some "glue" functions, and instead of forcing a lot of logic into classes, a bit more equally weighted OO/procedural design can be great. The most successful model I've found is a hybrid of OO and procedural. That is to say, an object representing a more-or-less physical item or data, which is then processed and handled by various functions. This is still MVC in an architectural sense, but I've found it allows a greater degree of seperation between logic and data. Granted, with PHP4 you're not going to see much of a performance boost versus strict OOD. Just a couple of cents, H From bpang at bpang.com Mon Sep 8 15:13:09 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 08 Sep 2003 15:13:09 -0400 Subject: [nycphp-talk] Include File Access Message-ID: This is what I used to do until I changed servers and then had to change all those paths... I see now that dckrook is on the $_SERVER['DOCUMENT_ROOT'] bandwagon... > require_once('/path/to/config.php'); From hans at nyphp.org Mon Sep 8 15:26:38 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 15:26:38 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: References: Message-ID: <3F5CD7EE.5080708@nyphp.org> You might be able to leverage include_path a bit? -- in php.ini itself -- using a .htaccess or httpd.conf "Apache time" configuration change -- http://us2.php.net/manual/en/function.set-include-path.php -- ini_set() You can then change the include path, even at run time, as needed. While this can be hugely powerful and useful, stay on your toes; it can also get out of control :) Brian Pang wrote: > anyone know why my posts don't continue within the threads? Sorry, I > don't mean for that to happen. For whatever reason, your mail client isn't maintaining the MessageID, References and related email headers. H From csnyder at chxo.com Mon Sep 8 15:30:01 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 08 Sep 2003 15:30:01 -0400 Subject: [nycphp-talk] Include File Access In-Reply-To: References: Message-ID: <3F5CD8B9.90604@chxo.com> That's a much more elegant solution, as long as all of your scripts are being called via the web. I misread the line "As it turns out I need to access this file from the Root directory as well" as meaning that he had scripts that were being called from a cron job or other via CLI. Sorry! Brian Pang wrote: >This is what I used to do until I changed servers and then had to change >all those paths... >I see now that dckrook is on the $_SERVER['DOCUMENT_ROOT'] bandwagon... > > > >> require_once('/path/to/config.php'); >> >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From jsiegel1 at optonline.net Mon Sep 8 15:32:12 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 08 Sep 2003 15:32:12 -0400 Subject: [nycphp-talk] Virtual Hosts Message-ID: <006801c3763f$e8782130$6401a8c0@EZDSDELL> I was looking at Dan Kushner's presentation on Setup/Dev under Win2000 at http://www.nyphp.org/content/presentations/ampintro3/ I found this on slide 19 of the presentation. DocumentRoot "c:\sites\foo.localhost" ServerName foo.localhost php_value auto_prepend_file "c:\sites\foo.localhost\prepend.inc" DocumentRoot "c:\sites\bar.localhost" ServerName bar.localhost The question is, how do I adapt this for the following scenario: My development is done on a separate server (Linux box) and is accessed solely with an IP address. Therefore, I'm not doing development on the same box as PHP and, correct me if I'm wrong, I can't use "localhost" as part of the address to get to the Linux box. How do I accomplish the virtual hosting thing in this scenario? (At present I'm using port numbers but that's kinda clumsy.) Jeff From csnyder at chxo.com Mon Sep 8 15:44:38 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 08 Sep 2003 15:44:38 -0400 Subject: [nycphp-talk] Virtual Hosts In-Reply-To: <006801c3763f$e8782130$6401a8c0@EZDSDELL> References: <006801c3763f$e8782130$6401a8c0@EZDSDELL> Message-ID: <3F5CDC26.3070200@chxo.com> You could add the remote machine to your local /etc/hosts (*nix) or c:/windows/hosts (win -- at least win98 and me) so that you could access it with a host name (or names) that weren't resolved via DNS. From my /etc/hosts file: 192.168.123.60 mothra 192.168.123.60 sub.mothra 192.168.123.60 is a box on my local network, no DNS records for it but I can still go to http://mothra/ or http://sub.mothra/ and end up where I want to be. The httpd.conf on mothra has name virtual hosts that correspond to those hostnames. csnyder Jeff wrote: >I was looking at Dan Kushner's presentation on Setup/Dev under Win2000 >at >http://www.nyphp.org/content/presentations/ampintro3/ > >I found this on slide 19 of the presentation. > > > DocumentRoot "c:\sites\foo.localhost" > ServerName foo.localhost > php_value auto_prepend_file >"c:\sites\foo.localhost\prepend.inc" > > > > DocumentRoot "c:\sites\bar.localhost" > ServerName bar.localhost > > >The question is, how do I adapt this for the following scenario: > >My development is done on a separate server (Linux box) and is accessed >solely with an IP address. Therefore, I'm not doing development on the >same box as PHP and, correct me if I'm wrong, I can't use "localhost" as >part of the address to get to the Linux box. How do I accomplish the >virtual hosting thing in this scenario? (At present I'm using port >numbers but that's kinda clumsy.) > >Jeff > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From jonbaer at jonbaer.net Mon Sep 8 03:09:59 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 03:09:59 -0400 Subject: [nycphp-talk] Virtual Hosts References: <006801c3763f$e8782130$6401a8c0@EZDSDELL> Message-ID: <009001c375d8$379d7e80$6c00a8c0@thinkpad> it works in conjunction with your host file windows/system32/drivers/etc/hosts in which case ur ip will be given a local name to use as part of the "host:" header to allow for multiple setups. you need to edit the file in order to get a developmental virtual hosting setup running. 192.168.0.7 linuxbox typing in "linuxbox" would resolve to 192.168.0.7 and DocumentRoot "c:\somewhere" ServerName linuxbox would let you map it back ... you can also use a mounted DocumentRoot (x:, y:, z:, etc) - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 08, 2003 3:32 PM Subject: [nycphp-talk] Virtual Hosts > I was looking at Dan Kushner's presentation on Setup/Dev under Win2000 > at > http://www.nyphp.org/content/presentations/ampintro3/ > > I found this on slide 19 of the presentation. > > > DocumentRoot "c:\sites\foo.localhost" > ServerName foo.localhost > php_value auto_prepend_file > "c:\sites\foo.localhost\prepend.inc" > > > > DocumentRoot "c:\sites\bar.localhost" > ServerName bar.localhost > > > The question is, how do I adapt this for the following scenario: > > My development is done on a separate server (Linux box) and is accessed > solely with an IP address. Therefore, I'm not doing development on the > same box as PHP and, correct me if I'm wrong, I can't use "localhost" as > part of the address to get to the Linux box. How do I accomplish the > virtual hosting thing in this scenario? (At present I'm using port > numbers but that's kinda clumsy.) > > Jeff > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Mon Sep 8 16:33:14 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 08 Sep 2003 16:33:14 -0400 Subject: [nycphp-talk] Virtual Hosts In-Reply-To: <009001c375d8$379d7e80$6c00a8c0@thinkpad> Message-ID: <007a01c37648$71d89c90$6401a8c0@EZDSDELL> Thank you Chris and Jon. I think I'm almost there. This is what I have in my "hosts" file on WinXP: 192.168.1.111 unap 192.168.1.111 myproj When I run apachectl configtest it comes back with this message. [warn] NameVirtualHost 192.168.1.111:80 has no VirtualHosts Obviously...I'm missing some setting. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Monday, September 08, 2003 2:10 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Virtual Hosts it works in conjunction with your host file windows/system32/drivers/etc/hosts in which case ur ip will be given a local name to use as part of the "host:" header to allow for multiple setups. you need to edit the file in order to get a developmental virtual hosting setup running. 192.168.0.7 linuxbox typing in "linuxbox" would resolve to 192.168.0.7 and DocumentRoot "c:\somewhere" ServerName linuxbox would let you map it back ... you can also use a mounted DocumentRoot (x:, y:, z:, etc) - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 08, 2003 3:32 PM Subject: [nycphp-talk] Virtual Hosts > I was looking at Dan Kushner's presentation on Setup/Dev under Win2000 > at > http://www.nyphp.org/content/presentations/ampintro3/ > > I found this on slide 19 of the presentation. > > > DocumentRoot "c:\sites\foo.localhost" > ServerName foo.localhost > php_value auto_prepend_file > "c:\sites\foo.localhost\prepend.inc" > > > > DocumentRoot "c:\sites\bar.localhost" > ServerName bar.localhost > > > The question is, how do I adapt this for the following scenario: > > My development is done on a separate server (Linux box) and is accessed > solely with an IP address. Therefore, I'm not doing development on the > same box as PHP and, correct me if I'm wrong, I can't use "localhost" as > part of the address to get to the Linux box. How do I accomplish the > virtual hosting thing in this scenario? (At present I'm using port > numbers but that's kinda clumsy.) > > Jeff > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Mon Sep 8 16:51:03 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 16:51:03 -0400 Subject: [nycphp-talk] Virtual Hosts In-Reply-To: <007a01c37648$71d89c90$6401a8c0@EZDSDELL> References: <007a01c37648$71d89c90$6401a8c0@EZDSDELL> Message-ID: <3F5CEBB7.3060101@nyphp.org> Jeff wrote: > Thank you Chris and Jon. I think I'm almost there. > > This is what I have in my "hosts" file on WinXP: > > 192.168.1.111 unap > 192.168.1.111 myproj > > > When I run apachectl configtest it comes back with this message. > [warn] NameVirtualHost 192.168.1.111:80 has no VirtualHosts I'm guessing you have something like: Blah blah blah Change it to: Blah blah blah making sure that the: NameVirtualHost 192.168.1.111:80 comes first. And that "Blah blah blah" is critical :) H From soazine at erols.com Mon Sep 8 16:53:41 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 8 Sep 2003 16:53:41 -0400 Subject: [nycphp-talk] PHP and IRC Message-ID: <029e01c3764b$49363560$67a76244@philofsoa> Does anyone have any recommendations on either using IRC as a real-time chat plug-in or would they recommend somethng else? I built my own chat client in Java once but it only works if I install it on the machine I have direct access to, so I would have to do this remotely. Suggestions? Just wondering, no major rush on this one. For once. :) Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Mon Sep 8 16:56:41 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 08 Sep 2003 16:56:41 -0400 Subject: [nycphp-talk] PHP and IRC In-Reply-To: <029e01c3764b$49363560$67a76244@philofsoa> References: <029e01c3764b$49363560$67a76244@philofsoa> Message-ID: <3F5CED09.2020101@nyphp.org> Phil Powell wrote: > Does anyone have any recommendations on either using IRC as a real-time > chat plug-in or would they recommend somethng else? I built my own chat > client in Java once but it only works if I install it on the machine I > have direct access to, so I would have to do this remotely. I've used mIRC on Windows and BitchX on Linux. http://www.mirc.com/ http://www.bitchx.com/ IRC can be great, and a lot of fun; as long as you have nothing else to do :) > Suggestions? Just wondering, no major rush on this one. For once. :) For PHP specifically, there's: http://us2.php.net/ircg HTH, H From xml at aumcomputers.com Tue Sep 9 08:15:30 2003 From: xml at aumcomputers.com (Anirudh Zala) Date: Tue, 9 Sep 2003 17:45:30 +0530 Subject: [nycphp-talk] Script terminates after certain amount of time period References: <20030908130816.53546.qmail@web14306.mail.yahoo.com> Message-ID: <02ce01c376cc$2786d6a0$0164a8c0@com1> Chris, As i have mentioned, it is also not working at all, just "Page can not be displayed" after few mins. Looks like browser loose connection with server. Any other ideas...? Zala ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Monday, 08 September, 2003 6:38 PM Subject: Re: [nycphp-talk] Script terminates after certain amount of time period > --- Anirudh Zala wrote: > > My php script generates PDF document that takes approx 2 mins to > > generate 1.5 MB PFD depending upon criteria, But if i choose more > > data and when PDF size is to be needed more than 2 MB and higher, > > browser says "The page cannot be displayed" after few mins, ie php > > scripts is terminated. > > There are two problems, I think: > > 1. Set your time limit to something big for this script. > > 2. Are you using IE? Don't. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From anthony at tanzola.com Tue Sep 9 09:12:00 2003 From: anthony at tanzola.com (Anthony Tanzola) Date: Tue, 9 Sep 2003 06:12:00 -0700 Subject: [nycphp-talk] ASP resources? In-Reply-To: <25ED70AC-DD63-11D7-BD59-0003930D07F2@email.smith.edu> Message-ID: Hey Aaron! I have a solution, switch ISP's. I work for an ISP, we support all ASP, are running IIS 5.0 and 6.0 on Advanced Server 2000 and Server 2003 respectively and CDONTS are enabled! Plus we also support PHP and Perl on both servers as well as on Apache/Linux. And PostgreSql/MySQL/MS SQLServer. And I admin the servers so I would be happy to troubleshoot any problems you are having. If your interested, contact me either here of off the list. Also, here is a good resource for ASP: http://www.4guysfromrolla.com/ Anthony Tanzola EMR Data Services Phone: 623.581.2875 Fax: 623.582.5499 anthony at emr.net EMR Internet A Serious Internet Experience ** 56K Dial-up ** DSL ** Web-hosting ** ** Co-location ** T1s ** ISDN ** ** High-Speed Fiber Backbone ** Linux powered ** ** Support for all Windows & Linux platforms ** ** Custom Web Design ** Site Development ** ** Search Engine Placement & Web Consultation ** **** Visit us at http://www.emr.net! **** Ask about our reseller programs! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Aaron Fischer >Sent: Tuesday, September 02, 2003 9:33 AM >To: NYPHP Talk >Subject: Re: [nycphp-talk] ASP resources? > > >Thanks all, those are great leads. Unfortunately the ISP is pretty >dated with Win NT and IIS 4.0. I tried one solution using CDONTS and >came up with errors that I believe are indicating that it is not >enabled. Ugh, I will never take a project like this again. > >-Aaron > > >On Tuesday, Sep 2, 2003, at 12:23 US/Eastern, D C Krook wrote: > >> Aaron, >> >> I've got some simple scripts for this sort of thing online: >> >> http://dev.krook.org/src.php?i=7&t=asp >> >> Make sure that you have CDONTS enabled on the server to send mail. If >> you want to do redirects, VBScript provides this functionality in >> Response.Redirect("http://example.com/") > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From nyphp at websapp.com Tue Sep 9 09:34:33 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 9 Sep 2003 09:34:33 -0400 Subject: [nycphp-talk] PHP in Corporate US Message-ID: http://biz.yahoo.com/prnews/030908/sfm088_1.html RAMAT GAN, Israel, Sept. 8 /PRNewswire-FirstCall/ -- Growing adoption and legitimacy of Linux and Apache within enterprise organizations is driving the proliferation of mission critical applications written in PHP. Apache, now with over 63% server market share across all domains and PHP, which accounts for roughly 26% of all domains on the Internet, are now a genuine option for enterprises deploying mission critical Web applications. From bpang at bpang.com Tue Sep 9 10:11:47 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 09 Sep 2003 10:11:47 -0400 Subject: [nycphp-talk] Script terminates after certain amount of time period Message-ID: maybe use this instead? ini_set('max_execution_time', '600'); however, if you are running in safe mode, you can only change this via php.ini phpinfo() will tell you if you have safe mode on or off > Chris, As i have mentioned, it is also not working at all, just "Page can > not be displayed" after few mins. Looks like browser loose connection with > server. > > Any other ideas...? > > Zala > > ----- Original Message ----- > From: "Chris Shiflett" > To: "NYPHP Talk" > Sent: Monday, 08 September, 2003 6:38 PM > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > period > > > > --- Anirudh Zala wrote: > > > My php script generates PDF document that takes approx 2 mins to > > > generate 1.5 MB PFD depending upon criteria, But if i choose more > > > data and when PDF size is to be needed more than 2 MB and higher, > > > browser says "The page cannot be displayed" after few mins, ie php > > > scripts is terminated. > > > > There are two problems, I think: > > > > 1. Set your time limit to something big for this script. > > > > 2. Are you using IE? Don't. > > > > Hope that helps. > > > > Chris > > > > ===== > > Become a better Web developer with the HTTP Developer's Handbook > > http://httphandbook.org/ > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From shiflett at php.net Tue Sep 9 11:19:08 2003 From: shiflett at php.net (Chris Shiflett) Date: Tue, 9 Sep 2003 08:19:08 -0700 (PDT) Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <02ce01c376cc$2786d6a0$0164a8c0@com1> Message-ID: <20030909151908.63404.qmail@web14311.mail.yahoo.com> --- Anirudh Zala wrote: > Chris, As i have mentioned, it is also not working at all, just "Page > can not be displayed" after few mins. Looks like browser loose > connection with server. Read my response again. Specifically: > > 2. Are you using IE? Don't. What I meant by this is that IE is likely giving you the BS error message, and it isn't the least bit helpful. In fact, it is usually very misleading. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From tom at supertom.com Tue Sep 9 11:32:55 2003 From: tom at supertom.com (tom at supertom.com) Date: Tue, 09 Sep 2003 11:32:55 -0400 Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <20030909151908.63404.qmail@web14311.mail.yahoo.com> Message-ID: Chris is right, I would pull it up in another browser, just to make sure that you are actually getting the real error message. Also, depending on how big the PDF files are that are being created, you may want to look into the memory limit entry in php.ini, to make sure that you have enough to allow the PDF to be created. memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) Sorry, I came into this post late, please excuse me if this has already been suggested. Good Luck! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett Sent: Tuesday, September 09, 2003 11:19 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Script terminates after certain amount of time period --- Anirudh Zala wrote: > Chris, As i have mentioned, it is also not working at all, just "Page > can not be displayed" after few mins. Looks like browser loose > connection with server. Read my response again. Specifically: > > 2. Are you using IE? Don't. What I meant by this is that IE is likely giving you the BS error message, and it isn't the least bit helpful. In fact, it is usually very misleading. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Tue Sep 9 12:39:57 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 09 Sep 2003 12:39:57 -0400 Subject: [nycphp-talk] PHP growth In-Reply-To: <000001c37627$728b9be0$bf8d3818@OBERON1> References: <000001c37627$728b9be0$bf8d3818@OBERON1> Message-ID: <3F5E025D.2070807@nyphp.org> Tim Gales wrote: > Thought this might be of interest: > > Posted August 30, 2003 01:42 PM @ news.netcraft.com > > Although PHP is universally thought of as implying Linux, Apache and > MySQL, nearly 7% of PHP sites [when counting by ip address] run on > Windows. This has doubled over the last year, and on its current growth > trajectory PHP will *overtake* (my emphasis) Cold Fusion as the most > popular non-Microsoft scripting language used on Windows during the next > year. Wow, I would have said a Java variant was number two. > Web site developers are less dogmatic than many analysts like to > portray, and are prepared to mix development paradigms when it suits > their purpose. ?. Scripting languages are seeing the best growth of any > class of web technologies presently as site owners seek to make their > sites more sophisticated and see a good return on the development time > invested. > > Excerpted from: > http://news.netcraft.com/archives/2003/08/30/php_growing_surprisingly_strongly_on_windows.html It's where it's at: AMP Technology From patrick.fee at baesystems.com Tue Sep 9 12:39:59 2003 From: patrick.fee at baesystems.com (Fee, Patrick J) Date: Tue, 9 Sep 2003 12:39:59 -0400 Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke IMEDIATELY.... Message-ID: Guys, I need some web space and a MySQL access to set up a post nuke site within the next 8 hours. Anybody got any suggestions? To start with I'll simply link to the needed dynamic pages for the next month or so..... But it needs to be up by tonight. Patrick J. Fee Web & Database Group Manager BAE SYSTEMS 600 Maryland Ave. SW Suite 700 Washington D.C. 20024 Patrick.Fee at BAESYSTEMS.com Tel: (202) 548-3759 Fax: (202) 608-5970 From nyphp at websapp.com Tue Sep 9 12:46:21 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 9 Sep 2003 12:46:21 -0400 Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke IMEDIATELY.... In-Reply-To: Message-ID: Hi Patrick, I can warmly recommend TheHostingCompany (http://thehostingcomany.us). Ran by a few members of the NYPHP team :) Best, Daniel Kushner > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Fee, Patrick J > Sent: Tuesday, September 09, 2003 12:40 PM > To: 'NYPHP Talk' > Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke > IMEDIATELY.... > > > Guys, > > I need some web space and a MySQL access to set up a post nuke site within > the next 8 hours. Anybody got any suggestions? > > To start with I'll simply link to the needed dynamic pages for the next > month or so..... But it needs to be up by tonight. > > Patrick J. Fee > Web & Database Group Manager > BAE SYSTEMS > 600 Maryland Ave. SW Suite 700 > Washington D.C. 20024 > Patrick.Fee at BAESYSTEMS.com > Tel: (202) 548-3759 > Fax: (202) 608-5970 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Tue Sep 9 12:53:45 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Tue, 09 Sep 2003 12:53:45 -0400 Subject: [nycphp-talk] Need to house a MySQL site for Post NukeIMEDIATELY.... References: Message-ID: <001b01c376f2$f02a8ef0$c801a8c0@dj> Does anyone know if they offer discounts to NYPHP members if so what is the promotional code? ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 12:46 PM Subject: RE: [nycphp-talk] Need to house a MySQL site for Post NukeIMEDIATELY.... > Hi Patrick, > > I can warmly recommend TheHostingCompany (http://thehostingcomany.us). Ran > by a few members of the NYPHP team :) > > Best, > Daniel Kushner > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Fee, Patrick J > > Sent: Tuesday, September 09, 2003 12:40 PM > > To: 'NYPHP Talk' > > Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke > > IMEDIATELY.... > > > > > > Guys, > > > > I need some web space and a MySQL access to set up a post nuke site within > > the next 8 hours. Anybody got any suggestions? > > > > To start with I'll simply link to the needed dynamic pages for the next > > month or so..... But it needs to be up by tonight. > > > > Patrick J. Fee > > Web & Database Group Manager > > BAE SYSTEMS > > 600 Maryland Ave. SW Suite 700 > > Washington D.C. 20024 > > Patrick.Fee at BAESYSTEMS.com > > Tel: (202) 548-3759 > > Fax: (202) 608-5970 > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Mon Sep 8 11:11:24 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 11:11:24 -0400 Subject: [nycphp-talk] PHP growth References: <000001c37627$728b9be0$bf8d3818@OBERON1> <3F5E025D.2070807@nyphp.org> Message-ID: <006401c3761b$78221540$6c00a8c0@thinkpad> i have always thought that companies would move away from the licensing towards free components + put more money back into programmers pockets but then the fear over shipping development overseas gets to me ... do most of you here work in a case related to where there is transitions taking place? (ie Java, CFM, ASP-> PHP)? id be interested in hearing stories ... - jon > > sites more sophisticated and see a good return on the development time > > invested. > > > > Excerpted from: > > http://news.netcraft.com/archives/2003/08/30/php_growing_surprisingly_strong ly_on_windows.html > > It's where it's at: AMP Technology From nyphp at websapp.com Tue Sep 9 13:03:38 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 9 Sep 2003 13:03:38 -0400 Subject: [nycphp-talk] Need to house a MySQL site for PostNukeIMEDIATELY.... In-Reply-To: <001b01c376f2$f02a8ef0$c801a8c0@dj> Message-ID: Using the promo code NYPLAT will get you a free month on the Platinum Package. --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Donald J. Organ IV > Sent: Tuesday, September 09, 2003 12:54 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Need to house a MySQL site for > PostNukeIMEDIATELY.... > > > Does anyone know if they offer discounts to NYPHP members if so > what is the > promotional code? > > ----- Original Message ----- > From: "Daniel Kushner" > To: "NYPHP Talk" > Sent: Tuesday, September 09, 2003 12:46 PM > Subject: RE: [nycphp-talk] Need to house a MySQL site for Post > NukeIMEDIATELY.... > > > > Hi Patrick, > > > > I can warmly recommend TheHostingCompany (http://thehostingcomany.us). Ran > by a few members of the NYPHP team :) > > Best, > Daniel Kushner > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Fee, Patrick J > > Sent: Tuesday, September 09, 2003 12:40 PM > > To: 'NYPHP Talk' > > Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke > > IMEDIATELY.... > > > > > > Guys, > > > > I need some web space and a MySQL access to set up a post nuke site within > > the next 8 hours. Anybody got any suggestions? > > > > To start with I'll simply link to the needed dynamic pages for the next > > month or so..... But it needs to be up by tonight. > > > > Patrick J. Fee > > Web & Database Group Manager > > BAE SYSTEMS > > 600 Maryland Ave. SW Suite 700 > > Washington D.C. 20024 > > Patrick.Fee at BAESYSTEMS.com > > Tel: (202) 548-3759 > > Fax: (202) 608-5970 > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Tue Sep 9 13:11:27 2003 From: dmintz at panix.com (David Mintz) Date: Tue, 9 Sep 2003 13:11:27 -0400 (EDT) Subject: [nycphp-talk] Travelocity sucks (semi-OT) In-Reply-To: <3F5CED09.2020101@nyphp.org> References: <029e01c3764b$49363560$67a76244@philofsoa> <3F5CED09.2020101@nyphp.org> Message-ID: OK, this may be a little OT, but OTOH it's about web/database programming (and the Customer Experience). I have been back and forth with Travelocity's customer service because I complained about the following phenomenon. You search for flights; you select an outboound flight priced at $405/round trip; you select a return flight priced at $405/round trip; then you come to a screen that says oh, sorry, make that $652 for this itinerary. Fine, you say; prices are volatile so let's try again. You repeat the procedure, with the reasonable, almost unconscious expectation that their data will have been updated, and guess what, you get the exact same behavior. Not amusing! Now, their customer service folks have given me a series of ever more muddled and inconsistent explanations. First they said, > Our system pulls the information from the Sabre network onto the site > based on the data you enter in your search parameters. The airlines, car > rental agencies, and hotels publish their information in Sabre and are > responsible for updating it at least 5 times a day at times of their own > choosing. Because the availability is sold in real time, the information > can become past-dated between updates. Depending on your search method, > you may see rates/fares offered that have no availability left, or > itineraries that show valid prices based on our most current > information, but are actually no longer available at that price when > checked against actual availability in the system. But when I insisted that I was the customer and I said it sucked that they were displaying stale data regardless of the excuse, they said (and I wish I were making this up): <> <> What is it with the airline/travel website industry? If they have the wherewithal to connect with wherever and fetch current data at the moment you are about to go for your plastic, then they can do it before they display the prices, can't they? Perhaps switch-and-bat is their true intention. But if they want to get it right, they should hire some NYPHPers to rebuild the whole deal from the ground up (-: --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From jonbaer at jonbaer.net Mon Sep 8 11:30:26 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 11:30:26 -0400 Subject: [nycphp-talk] Travelocity sucks (semi-OT) References: <029e01c3764b$49363560$67a76244@philofsoa><3F5CED09.2020101@nyphp.org> Message-ID: <009e01c3761e$211cae10$6c00a8c0@thinkpad> What's even worse is when you are going to be color coded before your flight :-) http://money.cnn.com/2003/09/09/pf/saving/travel/passenger_screening/index.h tm Quite interesting how *that* would work online ... - Jon >>> What is it with the airline/travel website industry? If they have the wherewithal to connect with wherever and fetch current data at the moment you are about to go for your plastic, then they can do it before they display the prices, can't they? <<< From chendry at nyc.rr.com Tue Sep 9 13:31:57 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Tue, 9 Sep 2003 13:31:57 -0400 Subject: [nycphp-talk] Travelocity sucks (semi-OT) In-Reply-To: Message-ID: unfortunately, the problem comes in with the cost of the searches. There are multiple levels of searches available to the Travelocities of the world - the most expensive being the up-to-the-minute fares. If they provided each person casually browsing for flights the up-to-the-minute prices, they'd go out of business. These sites only see about a 1% conversion. What you're seeing when you first search is not avialable fares, but cached fares (a much cheaper search .00066 compared with .05 - or something like that) - the travel sites will not show you the available fares until you say you'd like to book. That said, not all engines use the Sabre GDS (though most do) - which is the one that charges the most for look-for-book fares - so try other sites and you should get better results. Though Sabre is the only GDS that offers webfares (ie, better rates on the web than available through travel agents). ps - one of the sites (to remain unnamed) has hired some of us NYPHPers and once the backend is complete, I'll be sure to release the site (and hopefully friends & family rates) to NYPHPers, so keep your chin up, help is on the way... -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org -> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Mintz -> Sent: Tuesday, September 09, 2003 1:11 PM -> To: NYPHP Talk -> Subject: [nycphp-talk] Travelocity sucks (semi-OT) -> -> -> -> OK, this may be a little OT, but OTOH it's about web/database programming -> (and the Customer Experience). -> -> I have been back and forth with Travelocity's customer service because I -> complained about the following phenomenon. You search for flights; you -> select an outboound flight priced at $405/round trip; you select a return -> flight priced at $405/round trip; then you come to a screen that says -> oh, sorry, make that $652 for this itinerary. Fine, you say; prices are -> volatile so let's try again. You repeat the procedure, with the -> reasonable, almost unconscious expectation that their data will have been -> updated, and guess what, you get the exact same behavior. Not amusing! -> -> Now, their customer service folks have given me a series of ever more -> muddled and inconsistent explanations. First they said, -> -> > Our system pulls the information from the Sabre network onto the site -> > based on the data you enter in your search parameters. The -> airlines, car -> > rental agencies, and hotels publish their information in Sabre and are -> > responsible for updating it at least 5 times a day at times of -> their own -> > choosing. Because the availability is sold in real time, the -> information -> > can become past-dated between updates. Depending on your search method, -> > you may see rates/fares offered that have no availability left, or -> > itineraries that show valid prices based on our most current -> > information, but are actually no longer available at that price when -> > checked against actual availability in the system. -> -> But when I insisted that I was the customer and I said it sucked -> that they -> were displaying stale data regardless of the excuse, they said -> (and I wish -> I were making this up): -> -> < which is it is supplied. We do not have have a direct connect to -> availability, once a request is made, the new request is sent to the the -> airlines to check against availability.>> -> -> < there. As the availability is constantly changing, so is the -> availability. [sic] >> -> -> What is it with the airline/travel website industry? If they have the -> wherewithal to connect with wherever and fetch current data at the moment -> you are about to go for your plastic, then they can do it before they -> display the prices, can't they? -> -> Perhaps switch-and-bat is their true intention. But if they want -> to get it -> right, they should hire some NYPHPers to rebuild the whole deal from the -> ground up (-: -> -> -> --- -> David Mintz -> http://davidmintz.org/ -> Email: See http://dmintzweb.com/whitelist.php first! -> -> "Y d?le p'abajo" -> -> Tito Rojas -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> From crisscott at netzero.com Tue Sep 9 14:20:09 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Tue, 9 Sep 2003 18:20:09 GMT Subject: [nycphp-talk] PHP growth (getting OT) Message-ID: <20030909.112050.16221.266709@webmail11.lax.untd.com> All of this growth in PHP use is great but what I want to know is where is all of the growth in the PHP jobs? Especially in NY. In Delaware I had no trouble getting interviews or even job offers but since I moved up here, I have trouble just trying to find places accepting resumes. This wouldn't be such a problem if it weren't for that three hour commute to Wilmington. Does anyone have any good resources or pointers for a guy new to the big city looking for a job? Thanks Scott Mattocks From jonbaer at jonbaer.net Mon Sep 8 12:46:57 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 12:46:57 -0400 Subject: [nycphp-talk] phpbb issues (XSS) ... Message-ID: <003401c37628$d13c5f70$6700a8c0@thinkpad> maybe someone else on the list can try this out on their version but i just noticed all of mine are acceptable to this nasty bit of code using bbcode for forums: [url=http://www.test.com" onmouseover="document.location='http://www.playboy.com'"]this is the link[/url] - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From bpang at bpang.com Tue Sep 9 14:49:00 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 09 Sep 2003 14:49:00 -0400 Subject: [nycphp-talk] PHP growth Message-ID: > do most of you here work in a case related to where there is transitions > taking place? (ie Java, CFM, ASP-> PHP)? most of what I do is (thankfully) fresh development rather than porting someone else's crappy code. This way, if the code is crappy, it's at least crappy in my own style. To answer the other post about where to find PHP jobs in NY(C)... I have seen scant few actual FT positions available. I do all my work on a freelance/consulting basis. I might suspect that the best way to do PHP FT would be to get a job doing ASP or PERL and then work on getting PHP to replace those languages where you can. From brent at landover.com Tue Sep 9 14:51:01 2003 From: brent at landover.com (Brent Baisley) Date: Tue, 9 Sep 2003 14:51:01 -0400 Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <20030909.112050.16221.266709@webmail11.lax.untd.com> Message-ID: <8EC577D6-E2F6-11D7-8706-0050E4C5CF70@landover.com> I work for a technical recruiting company in NYC and I can tell you that most of the jobs we have are for C++, Java or .NET. That's not to say these companies don't use open source tools, they just don't actively recruit for those skills. Linux being an exception to that. Most of your larger companies are more interested in scalability and support rather than time to development. They can always hire more people to speed up a project. The midsize companies who are outgrowing Access and/or FileMaker are ideal candidates for PHP and MySQL, but they don't know enough about them to go that direction. I've done some consulting on the side and I've had clients who wanted a completely web based system with Filemaker as the backend (egads!). They have Filemaker (or Access) and are comfortable with them. I've actually gotten my foot in the door many times because I knew Filemaker, not because I knew PHP and MySQL. Although I've ended up doing the project in PHP/MySQL. I believe there still needs to be more growth in the PHP market share before you'll start seeing a big demand for it. Cold Fusion has a larger market share, but there aren't many jobs on the job boards for it in the NYC area. What job boards have you looked on? You may have more success looking at one of the non-commercial job boards like Craigs List. On Tuesday, September 9, 2003, at 02:20 PM, crisscott at netzero.com wrote: > All of this growth in PHP use is great but what I want to know is > where is all of the growth in the PHP jobs? Especially in NY. In > Delaware I had no trouble getting interviews or even job offers but > since I moved up here, I have trouble just trying to find places > accepting resumes. This wouldn't be such a problem if it weren't for > that three hour commute to Wilmington. Does anyone have any good > resources or pointers for a guy new to the big city looking for a job? > Thanks > Scott Mattocks > -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 From bpang at bpang.com Tue Sep 9 14:57:34 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 09 Sep 2003 14:57:34 -0400 Subject: [nycphp-talk] PHP growth Message-ID: True, but it still perplexes me why anyone, who has opted to and received the a-ok to implement an AMP solution, would still elect to have the end product be WAMP instead of LAMP I guess it's some irrational fear of the command-line. > >http://news.netcraft.com/archives/2003/08/30/php_growing_surprisingly_strongly_on_windows.html > > It's where it's at: AMP Technology From jlacey at ix.netcom.com Tue Sep 9 15:03:57 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Tue, 09 Sep 2003 13:03:57 -0600 Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <8EC577D6-E2F6-11D7-8706-0050E4C5CF70@landover.com> References: <8EC577D6-E2F6-11D7-8706-0050E4C5CF70@landover.com> Message-ID: <3F5E241D.8090100@ix.netcom.com> your comments are right on... one major piece that the OSS/FS community needs to develop is marketing savvy and practices... now THAT ('scuse the caps) would be a great meeting subject John Brent Baisley wrote: > I work for a technical recruiting company in NYC and I can tell you > that most of the jobs we have are for C++, Java or .NET. That's not to > say these companies don't use open source tools, they just don't > actively recruit for those skills. Linux being an exception to that. > Most of your larger companies are more interested in scalability and > support rather than time to development. They can always hire more > people to speed up a project. > The midsize companies who are outgrowing Access and/or FileMaker are > ideal candidates for PHP and MySQL, but they don't know enough about > them to go that direction. I've done some consulting on the side and > I've had clients who wanted a completely web based system with > Filemaker as the backend (egads!). They have Filemaker (or Access) and > are comfortable with them. > I've actually gotten my foot in the door many times because I knew > Filemaker, not because I knew PHP and MySQL. Although I've ended up > doing the project in PHP/MySQL. > > I believe there still needs to be more growth in the PHP market share > before you'll start seeing a big demand for it. Cold Fusion has a > larger market share, but there aren't many jobs on the job boards for > it in the NYC area. > > What job boards have you looked on? You may have more success looking > at one of the non-commercial job boards like Craigs List. > > > On Tuesday, September 9, 2003, at 02:20 PM, crisscott at netzero.com wrote: > >> All of this growth in PHP use is great but what I want to know is >> where is all of the growth in the PHP jobs? Especially in NY. In >> Delaware I had no trouble getting interviews or even job offers but >> since I moved up here, I have trouble just trying to find places >> accepting resumes. This wouldn't be such a problem if it weren't for >> that three hour commute to Wilmington. Does anyone have any good >> resources or pointers for a guy new to the big city looking for a job? >> Thanks >> Scott Mattocks >> From kenrbnsn at rbnsn.com Tue Sep 9 15:08:53 2003 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Tue, 09 Sep 2003 15:08:53 -0400 Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <8EC577D6-E2F6-11D7-8706-0050E4C5CF70@landover.com> References: <20030909.112050.16221.266709@webmail11.lax.untd.com> <8EC577D6-E2F6-11D7-8706-0050E4C5CF70@landover.com> Message-ID: <6.0.0.22.2.20030909150649.078e4c98@mail.rbnsn.com> At 02:51 PM 9/9/2003, Brent Baisley wrote (in part): >What job boards have you looked on? You may have more success looking at >one of the non-commercial job boards like Craigs List. This was just posted on Craigs List... >Subject: (internet engineering jobs) php programmer with oracle >experience (NYC) >Date: 9 Sep 2003 19:03:07 -0000 >From: job-16021377 at craigslist.org >X-cl-list: nyc-internet-engineering-jobs-i >X-cl-postingID: 16021377 > >Poster used an @earthlink.net address We are looking for a php programmer >with at least 5 years experience writing and supporting php applications. >The candidate we are looking for must have at least 3 years experience >working with Oracle 8i. > >Please do not apply if you do not have solid oracle experience. > >Please send your resume, contact info for last 3 employers, list of php >applications you have developed, as well as salary history. Ken Robinson kenrbnsn at rbnsn.com (also looking for PHP work in NYC/NJ area) (my expertise is in OpenVMS, but can't find work doing that either. :-( ) From jeffknight at mac.com Tue Sep 9 15:25:53 2003 From: jeffknight at mac.com (Jeff Knight) Date: Tue, 9 Sep 2003 15:25:53 -0400 Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <3F5E241D.8090100@ix.netcom.com> Message-ID: <6D8C4BA9-E2FB-11D7-A33F-000393B9FB36@mac.com> Marco Tabini of php|architect http://www.phparch.com/editorial.php gave a good talk about this at PHPCon, but I can't find the session materials online http://php-con.com/2003/east/materials.php On Tuesday, September 9, 2003, at 03:03 PM, John Lacey wrote: > your comments are right on... one major piece that the OSS/FS > community needs to develop is marketing savvy and practices... now > THAT ('scuse the caps) would be a great meeting subject > > John > Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From crisscott at netzero.com Tue Sep 9 15:41:13 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Tue, 9 Sep 2003 19:41:13 GMT Subject: [nycphp-talk] PHP growth (getting OT) Message-ID: <20030909.124146.16221.268397@webmail11.lax.untd.com> Thanks. That's what I love about this list. You guys posted a half dozen responses in less than 45 minutes and I have seen more relevant material on Craigslist (which I didn't know existed) in the last 5 minutes than I have seen on multiple job boards in the last 5 months. You guys are the best! Thanks again Scott Mattocks From jonbaer at jonbaer.net Mon Sep 8 13:52:25 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 13:52:25 -0400 Subject: [nycphp-talk] PHP growth (getting OT) References: <20030909.124146.16221.268397@webmail11.lax.untd.com> Message-ID: <006901c37631$f691ef20$6700a8c0@thinkpad> Hey try to save some of those jobs for us too u know! :-) - Jon ----- Original Message ----- From: To: Sent: Tuesday, September 09, 2003 3:41 PM Subject: Re: [nycphp-talk] PHP growth (getting OT) > > Thanks. That's what I love about this list. You guys posted a half dozen responses in less than 45 minutes and I have seen more relevant material on Craigslist (which I didn't know existed) in the last 5 minutes than I have seen on multiple job boards in the last 5 months. You guys are the best! Thanks again > Scott Mattocks From chendry at nyc.rr.com Tue Sep 9 15:50:00 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Tue, 9 Sep 2003 15:50:00 -0400 Subject: [nycphp-talk] FW: XML SIG 16 Sept -- Sam Hunting on new developments in Topic Maps Message-ID: Thought some might be interested in this - I've been to a number of their meetings, with mixed results - depending on the topic: -----Original Message----- From: Walter Perry [mailto:wperry at xml-sig.org] Sent: Monday, September 08, 2003 12:31 PM Subject: XML SIG 16 Sept -- Sam Hunting on new developments in Topic Maps Greetings XML Special Interest Group. We begin our sixth (!) year of meetings this month. Goldman Sachs will continue to provide the facilities without which our meetings would not be feasible. I am most grateful for that, and to all of the Goldman people who have worked with us to make these SIG meetings possible. Our 'home' in the training center at 125 Broad Street has now been closed, however, and the regular venue for our meetings will be the Goldman Sachs Training Center on the 31st Floor at 180 Maiden Lane. Please note this change. I'll look forward to seeing many of you at meetings this year. The next meeting of the XML Special Interest Group will be Tuesday, 16 September, 7-9 p.m., hosted by Goldman Sachs at 180 Maiden Lane, 31st Floor. Our speaker will be Sam Hunting, presenting his perspective on the latest developments in Topic Maps. One point which Sam emphasizes is the formal rigor that compliance with ISO 13250 introduces to topic map implementations. Questions of such formally demonstrable capability seem to be recently more numerous and insistent, as, e. g. the XML-DEV thread late last month on whether XML vocabularies are at an advantage or disadvantage versus the apparent formal rigor of the relational model. Sam writes: The latest on Topic Maps: Hard thinking, actual clients, new and better tools The talk is a tour d'horizon of current topic map technologies: * Theory as mathematical model * Practice at the USGS * New free tools Theory of topic maps will present--for the first time--a set-theoretic mathematical formalism for topic maps, developed by Neill Kipp with Steve Newcomb and Sam Hunting. This work is important from a technical perspective, since such a formalism can ensure that developers of topic map standards and implementations are "all on the same page" with respect the meaning of the text of ISO 13250. From a marketing perspective, the work means that, for the first time, topic mappers can claim formal rigor with the same force that proponents of the relational model can. Practice of topic maps will present--again, for the first time--the prototype of the topic map system developed for the United States Geological Survey by eTopicality, Inc. The USGS has requirements that can be met only by an implementation of the topic map paradigm: A federated system that permits free navigation between multiple, overlapping taxonomies. The implementation to be presented is the first step toward this goal: It is a topic map that implements a "subject catalog" for USGS holdings on coastal and marine geology data that allows entries into the catalog to be edited, all using open source software and an ordinary browser. New tools for topic maps will showcase--again, for the first time--the newest release from the GooseWorks project, tmtk-0.8. This open source toolkit permits people to create Topic Map Applications (TMAs) using a simple XML DTD. The Standard Application Model developed by TopicMaps.Org ("XTM") is one such application, but others may be necessary to serve client needs. XTM, for example, permits addressing only by URI, but other forms of addressing may be required: Library of Congress subject headings, astronomical coordinates, latitude and longitude, etc. Sam Hunting is the president of eTopicality, Inc., a consultancy whose service offerings include topic maps, content analysis, and taxonomy and DTD development. He was a founding member of TopicMaps.Org, which developed the XML Topic Maps (XTM) specification. He is a co-author of the XTM 1.0 DTD. He is the technical editor of _XML Topic Maps: Creating and Maintaining Topic Maps for the Web_, from Addison-Wesley. He is a co-founder of the GooseWorks project for creating open source topic map tools (http:/www.gooseworks.org). He has been working with markup technology for over 10 years. (http://www.etopicality.com) To reserve a place at this meeting, or to subscribe to our email list for announcement of future meetings, please send a request by email direct to me mailto:wperry at xml-sig.org. You will receive a confirmation by return email. Security requires that those attending this meeting be registered at least a day in advance so that their names are available to check against attendance at the door. Please register before Monday, 15 September, to insure that you will be admitted. Walter Perry XML SIG Leader From jsiegel1 at optonline.net Tue Sep 9 15:50:02 2003 From: jsiegel1 at optonline.net (Jeff) Date: Tue, 09 Sep 2003 15:50:02 -0400 Subject: [nycphp-talk] phpbb issues (XSS) ... In-Reply-To: <003401c37628$d13c5f70$6700a8c0@thinkpad> Message-ID: <008601c3770b$965081f0$6401a8c0@EZDSDELL> Is that exactly what was entered? I can't reproduce it on ver. 2.0.4. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Monday, September 08, 2003 11:47 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] phpbb issues (XSS) ... maybe someone else on the list can try this out on their version but i just noticed all of mine are acceptable to this nasty bit of code using bbcode for forums: [url=http://www.test.com" onmouseover="document.location='http://www.playboy.com'"]this is the link[/url] - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Tue Sep 9 15:59:18 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 09 Sep 2003 15:59:18 -0400 Subject: [nycphp-talk] First Big Client Message-ID: > Maybe I'll show up at that party on the 19th and pick you-guys' brains. David, feel free to contact me off-list regarding these topics since I won't be at the meeting on the 19th (getting married the next day, woo hoo!) Something else that I wanted to stress was the writing of the proposal. If it is going to be an involved project as had been origially posted, a well-written proposal can go a long way in communicating to the potential client that you have a deep understanding of the project they are asking you to bid on as well as justification for the price you have delivered, especially if they find it on the high side. (is that a run-on sentence or what?) Strong proposals have won me more business than I've lost or not-won and often when I've known that my price was 5-8 times more than what the competition was quoting in a "proposal" that was a simple 1 page email. Why? Because my proposals demonstrate that I have taken the time to understanding the client's business and needs regarding the project, have considered a myriad of possibilities for increased complexity and taken into account the full development cycle. All of this helps to assure them that you will have minimal cost overruns that you might have to come back to them for later asking for more money. Sometimes, I still don't win the job for whatever reason, and the effort is all for naught (save the learning experience), but at least I know I gave it the "old college try." (ok, i didn't go to college, who's counting?) Then there is the whole topic of requirements and specifications, but really, that is part of the development process. > > Brian's et al's comments are most helpful to this semi-professionl PHP > dude who would like to get more work. Great. Nice to hear. I'd be more than happy to offer my services in helping you price work and/or the proposal process as well as req & spec. Brian From joshmccormack at travelersdiary.com Tue Sep 9 16:06:47 2003 From: joshmccormack at travelersdiary.com (joshmccormack at travelersdiary.com) Date: Tue, 9 Sep 2003 15:06:47 -0500 (CDT) Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <20030909.124146.16221.268397@webmail11.lax.untd.com> Message-ID: It's best if you can contact companies before they make their opening known, and make the contact as personal as possible. Try using http://news.netcraft.com/ to find out what companies you're interested in are running (hey, I wouldn't mind working on The Yankees website, do they run PHP?), then hunt for leads there and approach them directly. Takes some work and guts, but may be more fruitful than responding with 100,000 others to ads. Josh On Tue, 9 Sep 2003 crisscott at netzero.com wrote: > > Thanks. That's what I love about this list. You guys posted a half dozen responses in less than 45 minutes and I have seen more relevant material on Craigslist (which I didn't know existed) in the last 5 minutes than I have seen on multiple job boards in the last 5 months. You guys are the best! Thanks again > Scott Mattocks > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From shiflett at php.net Tue Sep 9 16:07:05 2003 From: shiflett at php.net (Chris Shiflett) Date: Tue, 9 Sep 2003 13:07:05 -0700 (PDT) Subject: [nycphp-talk] PHP growth (getting OT) In-Reply-To: <20030909.112050.16221.266709@webmail11.lax.untd.com> Message-ID: <20030909200705.17929.qmail@web14307.mail.yahoo.com> --- crisscott at netzero.com wrote: > All of this growth in PHP use is great but what I want to know is > where is all of the growth in the PHP jobs? Especially in NY. I just moved here about three months ago, and I found the most opportunities through craigslist.org. One disappointing thing about the job market is the number of inexperienced people who are doing the design and recruitment for large software projects. If you want to be doing any serious programming, it is almost essential that you find a technologically-savvy company. For example, mod_perl developers tend to flock to Ticketmaster/CitySearch or Amazon. Serious PHP/MySQL developers migrate toward Yahoo!. Python/C experts go for Google. Things like that. Google happens to be hiring a lot of developers for their next-generation search engine, and they are hiring them for their NYC office. While it seems counterintuitive, I think the job market for advanced developers is smaller than beginners, simply because the people hiring tend to only understand that which is beneath them. It makes for a challenging situation if you don't want to sacrifice your standards to find a job, but sometimes gainful employment is more important. This decision is entirely up to you, of course, but I recommend keeping your standards high. It will make you happier down the road. I held my ground when looking for a job and turned my head from the Microsoft shops and Java-based financial institutions. While doing so limited my choices, it actually helped me in the end, because my choices were all *good* choices. If you lower your standards too much, you will find yourself trying to decide between jobs that you don't want, and it is tough to pass up job offers (I had to turn down three due to my strict time constraints) when everyone is telling you how hard the job market is here. So, there's some advice based on recent experience. Hope it helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From wfan at encogent.com Tue Sep 9 16:45:23 2003 From: wfan at encogent.com (Wellington Fan) Date: Tue, 9 Sep 2003 16:45:23 -0400 Subject: [nycphp-talk] (OT) DNS Management In-Reply-To: <20030909200705.17929.qmail@web14307.mail.yahoo.com> Message-ID: Dear Listfolk, I have a client that has registered about 30-40 domains. What are some (easy/cheap) options for managing the DNS for these domains? Some possiblities: Widge.net: $2.45(!)/domain http://dns.widge.net/ easyDNS: $13/domain http://support.easydns.com/service/subscription.php3 What other options do I have? I'm no dummy, but not too experienced with zone files, etc. I know what 'A' and 'CNAME' records are and generally how DNS works, but I don't wanna hafta become a DNS wizard (unless it's easy!) to manage my client's domains. Thanks! -- Wellington From hans at nyphp.org Tue Sep 9 16:47:42 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 09 Sep 2003 16:47:42 -0400 Subject: [nycphp-talk] (OT) DNS Management In-Reply-To: References: Message-ID: <3F5E3C6E.8090801@nyphp.org> Wellington Fan wrote: > Dear Listfolk, > > I have a client that has registered about 30-40 domains. What are some > (easy/cheap) options for managing the DNS for these domains? > > Some possiblities: > Widge.net: > $2.45(!)/domain > http://dns.widge.net/ > easyDNS: > $13/domain > http://support.easydns.com/service/subscription.php3 > > What other options do I have? I'm no dummy, but not too experienced with zone > files, etc. I know what 'A' and 'CNAME' records are and generally how DNS > works, but I don't wanna hafta become a DNS wizard (unless it's easy!) to > manage my client's domains. I'd highly recommend ZoneEdit, http://zoneedit.com. They're a Manhattan company that provides perfect DNS services (and no, doing your own DNS is not fun). H From jonbaer at jonbaer.net Mon Sep 8 15:23:26 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 8 Sep 2003 15:23:26 -0400 Subject: [nycphp-talk] phpbb issues (XSS) ... References: <008601c3770b$965081f0$6401a8c0@EZDSDELL> Message-ID: <00b501c3763e$adbe0fb0$6700a8c0@thinkpad> yeah .... seems like the *only* version not affected ... wierd ... - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Tuesday, September 09, 2003 3:50 PM Subject: RE: [nycphp-talk] phpbb issues (XSS) ... > Is that exactly what was entered? I can't reproduce it on ver. 2.0.4. > From jim at bizcomputinginc.com Tue Sep 9 17:38:51 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Tue, 9 Sep 2003 17:38:51 -0400 Subject: [nycphp-talk] (OT) DNS Management References: Message-ID: <03e301c3771a$c31d53c0$6501a8c0@Notebook> I use godaddy.com, it's something like 9.95 a year per domain. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Wellington Fan" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 4:45 PM Subject: [nycphp-talk] (OT) DNS Management > Dear Listfolk, > > I have a client that has registered about 30-40 domains. What are some > (easy/cheap) options for managing the DNS for these domains? > > Some possiblities: > Widge.net: > $2.45(!)/domain > http://dns.widge.net/ > easyDNS: > $13/domain > http://support.easydns.com/service/subscription.php3 > > What other options do I have? I'm no dummy, but not too experienced with zone > files, etc. I know what 'A' and 'CNAME' records are and generally how DNS > works, but I don't wanna hafta become a DNS wizard (unless it's easy!) to > manage my client's domains. > > Thanks! > > -- > Wellington > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From jim at bizcomputinginc.com Tue Sep 9 17:40:31 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Tue, 9 Sep 2003 17:40:31 -0400 Subject: [nycphp-talk] (OT) DNS Management References: <03e301c3771a$c31d53c0$6501a8c0@Notebook> Message-ID: <03ed01c3771a$feae0ba0$6501a8c0@Notebook> oops, I should have read the message, I thought you were looking for cheap domain registration. Sorry. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Jim Hendricks" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 5:38 PM Subject: Re: [nycphp-talk] (OT) DNS Management > I use godaddy.com, it's something like 9.95 a year per domain. > > Jim > ______________________________________________________________ > Jim Hendricks, President, Biz Computing, Inc > Phone: (201) 599-9380 Email: jim at bizcomputinginc.com > Web: www.bizcomputinginc.com > Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, > NJ 07646 > ______________________________________________________________ > > ----- Original Message ----- > From: "Wellington Fan" > To: "NYPHP Talk" > Sent: Tuesday, September 09, 2003 4:45 PM > Subject: [nycphp-talk] (OT) DNS Management > > > > Dear Listfolk, > > > > I have a client that has registered about 30-40 domains. What are some > > (easy/cheap) options for managing the DNS for these domains? > > > > Some possiblities: > > Widge.net: > > $2.45(!)/domain > > http://dns.widge.net/ > > easyDNS: > > $13/domain > > http://support.easydns.com/service/subscription.php3 > > > > What other options do I have? I'm no dummy, but not too experienced with > zone > > files, etc. I know what 'A' and 'CNAME' records are and generally how DNS > > works, but I don't wanna hafta become a DNS wizard (unless it's easy!) to > > manage my client's domains. > > > > Thanks! > > > > -- > > Wellington > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From jsiegel1 at optonline.net Tue Sep 9 17:41:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Tue, 09 Sep 2003 17:41:55 -0400 Subject: [nycphp-talk] phpbb issues (XSS) ... In-Reply-To: <00b501c3763e$adbe0fb0$6700a8c0@thinkpad> Message-ID: <009801c3771b$316d87f0$6401a8c0@EZDSDELL> I just got lucky on my version selection. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Monday, September 08, 2003 2:23 PM To: NYPHP Talk Subject: Re: [nycphp-talk] phpbb issues (XSS) ... yeah .... seems like the *only* version not affected ... wierd ... - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Tuesday, September 09, 2003 3:50 PM Subject: RE: [nycphp-talk] phpbb issues (XSS) ... > Is that exactly what was entered? I can't reproduce it on ver. 2.0.4. > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Tue Sep 9 18:01:06 2003 From: shiflett at php.net (Chris Shiflett) Date: Tue, 9 Sep 2003 15:01:06 -0700 (PDT) Subject: [nycphp-talk] (OT) DNS Management In-Reply-To: <03ed01c3771a$feae0ba0$6501a8c0@Notebook> Message-ID: <20030909220106.64865.qmail@web14308.mail.yahoo.com> > I have a client that has registered about 30-40 domains. What are > some (easy/cheap) options for managing the DNS for these domains? I've never used them, but DynDNS seems to have a good reputation, and I think they specialize in this sort of thing. Disclaimer: They bought me a lot of free beer at OSCON. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Tue Sep 9 18:27:12 2003 From: soazine at erols.com (Phil Powell) Date: Tue, 9 Sep 2003 18:27:12 -0400 Subject: [nycphp-talk] PHP Excel Parser Message-ID: <092b01c37721$83efe8f0$67a76244@philofsoa> What would one best recommend to parse an existing Excel spreadsheet (was done in Excel 97 or 2000 not sure to be honest)? I am looking for the most practical way of parsing an existing spreadsheet to place contents into a mySQL db. Thanx, Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Tue Sep 9 19:45:57 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 09 Sep 2003 19:45:57 -0400 Subject: [nycphp-talk] PHP Excel Parser Message-ID: save it as a comma-separated text file and use phpMyAdmin to import it > This is a multi-part message in MIME format. > > > What would one best recommend to parse an existing Excel spreadsheet (was done in Excel 97 or 2000 not sure to be honest)? I am looking for the most practical way of parsing an existing spreadsheet to place contents into a mySQL db. > > Thanx, Phil > From soazine at erols.com Tue Sep 9 22:09:37 2003 From: soazine at erols.com (Phil Powell) Date: Tue, 9 Sep 2003 22:09:37 -0400 Subject: [nycphp-talk] PHP Excel Parser References: Message-ID: <006201c37740$96813bd0$67a76244@philofsoa> I can't save it as .csv as I don't have Excel (and w/o a working CD-ROM no means of getting it installed either). Since that's not an option what else would you recommend? Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 7:45 PM Subject: Re: [nycphp-talk] PHP Excel Parser > save it as a comma-separated text file and use phpMyAdmin to import it > > > > This is a multi-part message in MIME format. > > > > > > What would one best recommend to parse an existing Excel spreadsheet > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > the most practical way of parsing an existing spreadsheet to place > contents into a mySQL db. > > > > Thanx, Phil > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From adam at trachtenberg.com Tue Sep 9 22:16:34 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 9 Sep 2003 22:16:34 -0400 (EDT) Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: <006201c37740$96813bd0$67a76244@philofsoa> Message-ID: On Tue, 9 Sep 2003, Phil Powell wrote: > I can't save it as .csv as I don't have Excel (and w/o a working CD-ROM no > means of getting it installed either). Since that's not an option what else > would you recommend? OpenOffice? Gnumeric? Going to the public library and using one of their computers? Kinkos? -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From soazine at erols.com Tue Sep 9 22:17:44 2003 From: soazine at erols.com (Phil Powell) Date: Tue, 9 Sep 2003 22:17:44 -0400 Subject: [nycphp-talk] PHP Excel Parser References: Message-ID: <007001c37741$b8be6190$67a76244@philofsoa> Kinko's here is too expensive an option when you're unemployed, and the western DC suburbs don't have public libraries you can find.. Couldn't I just use PHP's COM objects to parse the Excel spreadsheet instead? Phil ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 10:16 PM Subject: Re: [nycphp-talk] PHP Excel Parser > On Tue, 9 Sep 2003, Phil Powell wrote: > > > I can't save it as .csv as I don't have Excel (and w/o a working CD-ROM no > > means of getting it installed either). Since that's not an option what else > > would you recommend? > > OpenOffice? Gnumeric? Going to the public library and using one of > their computers? Kinkos? > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From adam at trachtenberg.com Tue Sep 9 23:00:22 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 9 Sep 2003 23:00:22 -0400 (EDT) Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: <007001c37741$b8be6190$67a76244@philofsoa> Message-ID: On Tue, 9 Sep 2003, Phil Powell wrote: > Kinko's here is too expensive an option when you're unemployed, and the > western DC suburbs don't have public libraries you can find.. http://www.mont.lib.md.us/branchinfo/map.asp > Couldn't I just use PHP's COM objects to parse the Excel spreadsheet > instead? I believe that in order for you to talk to a program using COM you actually need to have that program on your computer. In any case, that still seems like a heck of a lot harder than just downloading some Office clone and exporting as CSV. However, if you're determined to do this in PHP, this site may have something that can help: http://badblue.com/helpphpo.htm Alternatively, you could download a demo version of this product and use this function: > Added MS Excel->MySQL builder. This is plugin (PHP program) - output > in MySQL database. This program imports data extracted by ABC Excel > Parser Pro from an Excel file into a MySQL database table. There > are no PHP programming skills required to create MySQL database from > your Excel file. http://www.zakkis.ca/products/abc_excelparser/index.php -adam PS: I found most of these by typing "PHP Excel" into Google. -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From soazine at erols.com Wed Sep 10 00:58:16 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 00:58:16 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema - HELP! Message-ID: <00fb01c37758$263bb360$67a76244@philofsoa> create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null ); create table if not exists nnet_produkt_farge ( nnet_produkt_farge_id int not null auto_increment, primary key(nnet_produkt_farge_id), nnet_produkt_farge_code varchar(5) not null, nnet_produkt_farge_navn varchar(255) not null ); alter table nnet_produkt_farge add index ix_nnet_produkt_farge_code(nnet_produkt_farge.nnet_produkt_farge_code); create table if not exists nnet_produkt_storrelse ( nnet_produkt_storrelse_id int not null auto_increment, primary key(nnet_produkt_storrelse_id), nnet_produkt_storrelse_navn varchar(255) not null ); create table if not exists nnet_produkt ( nnet_produkt_id int not null auto_increment, primary key(nnet_produkt_id), nnet_produkt_varenr varchar(50) not null, nnet_produkt_navn varchar(255) not null, nnet_produkt_farge_code varchar(5), nnet_produkt_storrelse_id int default 0, nnet_produkt_kvalitet_id int default 0, nnet_produkt_krage varchar(255), nnet_produkt_innpris decimal(6,2) not null, nnet_produkt_utpris decimal(6,2) not null, nnet_produkt_netto decimal(6,2) not null, nnet_produkt_forhandler_rabatt decimal(6,2) not null, nnet_produkt_bonus decimal(6,2) default 0.00, nnet_produkt_toppbonus decimal(6,2) default 0.00, nnet_produkt_bto decimal(6,2) default 0.00, nnet_produkt_quantity int default 0 ); alter table nnet_produkt add index ix_nnet_produkt_varenr(nnet_produkt_varenr); alter table nnet_produkt add index ix_nnet_produkt_navn(nnet_produkt_navn); alter table nnet_produkt add index ix_nnet_produkt_fargecode(nnet_produkt.nnet_produkt_farge_code); alter table nnet_produkt add index ix_nnet_produkt_storrelse_id(nnet_produkt_storrelse_id); alter table nnet_produkt add index ix_nnet_produkt_innpris(nnet_produkt_innpris); alter table nnet_produkt add index ix_nnet_produkt_utpris(nnet_produkt_utpris); alter table nnet_produkt add index ix_nnet_produkt_netto(nnet_produkt_netto); alter table nnet_produkt add index ix_nnet_produkt_forhandler_rabatt(nnet_produkt_forhandler_rabatt); alter table nnet_produkt add index ix_nnet_produkt_bonus(nnet_produkt_bonus); alter table nnet_produkt add index ix_nnet_produkt_toppbonus(nnet_produkt_toppbonus); alter table nnet_produkt add index ix_nnet_produkt_bto(nnet_produkt_bto); alter table nnet_produkt add index ix_nnet_produkt_quantity(nnet_produkt_quantity); I cannot create the indices I need considering the schema structure I am listing. How on earth do I create something like a foreign key constraints if it doesn't let you? mySQL is starting to SUCK!!!!!! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From dkrook at hotmail.com Wed Sep 10 01:35:07 2003 From: dkrook at hotmail.com (D C Krook) Date: Wed, 10 Sep 2003 01:35:07 -0400 Subject: [nycphp-talk] PHP Excel Parser Message-ID: Phil, I would recommend going with Adam's suggestion and downloading an Excel clone. OpenOffice's Calc may be what you need to open the .xls and export as .csv. It's a hefty download but may be your best option. http://www.openoffice.org/ Download for Windows http://www.openoffice.org/dev_docs/source/1.1rc4/index.html#windows >I can't save it as .csv as I don't have Excel (and w/o a working CD-ROM no >means of getting it installed either). Since that's not an option what >else >would you recommend? _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From soazine at erols.com Wed Sep 10 01:48:08 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 01:48:08 -0400 Subject: [nycphp-talk] PHP Excel Parser References: Message-ID: <018801c3775f$1cefec70$67a76244@philofsoa> My luck runneth over.. I downloaded OpenOffice for Windows.. and it won't install!!! The bloody thing won't work! Phil ----- Original Message ----- From: "D C Krook" To: Sent: Wednesday, September 10, 2003 1:35 AM Subject: Re: [nycphp-talk] PHP Excel Parser > Phil, > > I would recommend going with Adam's suggestion and downloading an Excel > clone. > > OpenOffice's Calc may be what you need to open the .xls and export as .csv. > It's a hefty download but may be your best option. > > http://www.openoffice.org/ > > Download for Windows > http://www.openoffice.org/dev_docs/source/1.1rc4/index.html#windows > > > >I can't save it as .csv as I don't have Excel (and w/o a working CD-ROM no > >means of getting it installed either). Since that's not an option what > >else > >would you recommend? > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 01:52:01 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 01:52:01 -0400 Subject: [nycphp-talk] PHP Excel Parser References: Message-ID: <018e01c3775f$a7cb8fc0$67a76244@philofsoa> See below. >:( ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Tuesday, September 09, 2003 11:00 PM Subject: Re: [nycphp-talk] PHP Excel Parser > On Tue, 9 Sep 2003, Phil Powell wrote: > > > Kinko's here is too expensive an option when you're unemployed, and the > > western DC suburbs don't have public libraries you can find.. > > http://www.mont.lib.md.us/branchinfo/map.asp > I live 20 - 25 mins from every one of those libraries. I'm in Virginia, not Maryland. > > Couldn't I just use PHP's COM objects to parse the Excel spreadsheet > > instead? > > I believe that in order for you to talk to a program using COM you > actually need to have that program on your computer. In any case, that > still seems like a heck of a lot harder than just downloading some > Office clone and exporting as CSV. > > However, if you're determined to do this in PHP, this site may have > something that can help: > > http://badblue.com/helpphpo.htm > I'll look into it as OpenOffice was apparently a bad option for me. I downloaded it but cannot install it (got the Windows version and setup.exe does absolutely nothing) > Alternatively, you could download a demo version of this product and > use this function: > > > Added MS Excel->MySQL builder. This is plugin (PHP program) - output > > in MySQL database. This program imports data extracted by ABC Excel > > Parser Pro from an Excel file into a MySQL database table. There > > are no PHP programming skills required to create MySQL database from > > your Excel file. > > http://www.zakkis.ca/products/abc_excelparser/index.php > Isn't there a free "non-pro" version of this? I saw it on the Web the other day but can't remember where. > -adam > > PS: I found most of these by typing "PHP Excel" into Google. > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 02:09:18 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 02:09:18 -0400 Subject: [nycphp-talk] Excel Spreadsheet Pt II Message-ID: <01c101c37762$11f93170$67a76244@philofsoa> Ok guys I give up. I can't do this one at all. Could literally someone do it for me? The spreadsheet is at http://valsignalandet.com/fruit.xls I have no ability to do this, OpenOffice won't install, and I have a job interview tomorrow and leave for Tampa on Thursday for a final interview. Since the COM class only works for PHP in Windows, I can't use that either, so I'm out of options altogether. AUGH! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ny-tech.net Wed Sep 10 02:57:26 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 10 Sep 2003 02:57:26 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema - HELP! In-Reply-To: <00fb01c37758$263bb360$67a76244@philofsoa> Message-ID: <001501c37768$cc5ae940$6401a8c0@main> As far as I know the foreign key constraints are only for "InnoDB" type tables. The way you have listed your schema, it seems like you didn't specify the type of the table. The default type is myISAM. I might be way off on this one :) - Nasir -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 12:58 AM To: NYPHP Talk Subject: [nycphp-talk] can't create foreign key constraints in schema - HELP! create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null ); create table if not exists nnet_produkt_farge ( nnet_produkt_farge_id int not null auto_increment, primary key(nnet_produkt_farge_id), nnet_produkt_farge_code varchar(5) not null, nnet_produkt_farge_navn varchar(255) not null ); alter table nnet_produkt_farge add index ix_nnet_produkt_farge_code(nnet_produkt_farge.nnet_produkt_farge_code); create table if not exists nnet_produkt_storrelse ( nnet_produkt_storrelse_id int not null auto_increment, primary key(nnet_produkt_storrelse_id), nnet_produkt_storrelse_navn varchar(255) not null ); create table if not exists nnet_produkt ( nnet_produkt_id int not null auto_increment, primary key(nnet_produkt_id), nnet_produkt_varenr varchar(50) not null, nnet_produkt_navn varchar(255) not null, nnet_produkt_farge_code varchar(5), nnet_produkt_storrelse_id int default 0, nnet_produkt_kvalitet_id int default 0, nnet_produkt_krage varchar(255), nnet_produkt_innpris decimal(6,2) not null, nnet_produkt_utpris decimal(6,2) not null, nnet_produkt_netto decimal(6,2) not null, nnet_produkt_forhandler_rabatt decimal(6,2) not null, nnet_produkt_bonus decimal(6,2) default 0.00, nnet_produkt_toppbonus decimal(6,2) default 0.00, nnet_produkt_bto decimal(6,2) default 0.00, nnet_produkt_quantity int default 0 ); alter table nnet_produkt add index ix_nnet_produkt_varenr(nnet_produkt_varenr); alter table nnet_produkt add index ix_nnet_produkt_navn(nnet_produkt_navn); alter table nnet_produkt add index ix_nnet_produkt_fargecode(nnet_produkt.nnet_produkt_farge_code); alter table nnet_produkt add index ix_nnet_produkt_storrelse_id(nnet_produkt_storrelse_id); alter table nnet_produkt add index ix_nnet_produkt_innpris(nnet_produkt_innpris); alter table nnet_produkt add index ix_nnet_produkt_utpris(nnet_produkt_utpris); alter table nnet_produkt add index ix_nnet_produkt_netto(nnet_produkt_netto); alter table nnet_produkt add index ix_nnet_produkt_forhandler_rabatt(nnet_produkt_forhandler_rabatt); alter table nnet_produkt add index ix_nnet_produkt_bonus(nnet_produkt_bonus); alter table nnet_produkt add index ix_nnet_produkt_toppbonus(nnet_produkt_toppbonus); alter table nnet_produkt add index ix_nnet_produkt_bto(nnet_produkt_bto); alter table nnet_produkt add index ix_nnet_produkt_quantity(nnet_produkt_quantity); I cannot create the indices I need considering the schema structure I am listing. How on earth do I create something like a foreign key constraints if it doesn't let you? mySQL is starting to SUCK!!!!!! Phil From soazine at erols.com Wed Sep 10 02:57:37 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 02:57:37 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! References: <001501c37768$cc5ae940$6401a8c0@main> Message-ID: <022201c37768$d21ebdc0$67a76244@philofsoa> You completely lost me. :( Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 2:57 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! As far as I know the foreign key constraints are only for "InnoDB" type tables. The way you have listed your schema, it seems like you didn't specify the type of the table. The default type is myISAM. I might be way off on this one :) - Nasir -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 12:58 AM To: NYPHP Talk Subject: [nycphp-talk] can't create foreign key constraints in schema - HELP! create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null ); create table if not exists nnet_produkt_farge ( nnet_produkt_farge_id int not null auto_increment, primary key(nnet_produkt_farge_id), nnet_produkt_farge_code varchar(5) not null, nnet_produkt_farge_navn varchar(255) not null ); alter table nnet_produkt_farge add index ix_nnet_produkt_farge_code(nnet_produkt_farge.nnet_produkt_farge_code); create table if not exists nnet_produkt_storrelse ( nnet_produkt_storrelse_id int not null auto_increment, primary key(nnet_produkt_storrelse_id), nnet_produkt_storrelse_navn varchar(255) not null ); create table if not exists nnet_produkt ( nnet_produkt_id int not null auto_increment, primary key(nnet_produkt_id), nnet_produkt_varenr varchar(50) not null, nnet_produkt_navn varchar(255) not null, nnet_produkt_farge_code varchar(5), nnet_produkt_storrelse_id int default 0, nnet_produkt_kvalitet_id int default 0, nnet_produkt_krage varchar(255), nnet_produkt_innpris decimal(6,2) not null, nnet_produkt_utpris decimal(6,2) not null, nnet_produkt_netto decimal(6,2) not null, nnet_produkt_forhandler_rabatt decimal(6,2) not null, nnet_produkt_bonus decimal(6,2) default 0.00, nnet_produkt_toppbonus decimal(6,2) default 0.00, nnet_produkt_bto decimal(6,2) default 0.00, nnet_produkt_quantity int default 0 ); alter table nnet_produkt add index ix_nnet_produkt_varenr(nnet_produkt_varenr); alter table nnet_produkt add index ix_nnet_produkt_navn(nnet_produkt_navn); alter table nnet_produkt add index ix_nnet_produkt_fargecode(nnet_produkt.nnet_produkt_farge_code); alter table nnet_produkt add index ix_nnet_produkt_storrelse_id(nnet_produkt_storrelse_id); alter table nnet_produkt add index ix_nnet_produkt_innpris(nnet_produkt_innpris); alter table nnet_produkt add index ix_nnet_produkt_utpris(nnet_produkt_utpris); alter table nnet_produkt add index ix_nnet_produkt_netto(nnet_produkt_netto); alter table nnet_produkt add index ix_nnet_produkt_forhandler_rabatt(nnet_produkt_forhandler_rabatt); alter table nnet_produkt add index ix_nnet_produkt_bonus(nnet_produkt_bonus); alter table nnet_produkt add index ix_nnet_produkt_toppbonus(nnet_produkt_toppbonus); alter table nnet_produkt add index ix_nnet_produkt_bto(nnet_produkt_bto); alter table nnet_produkt add index ix_nnet_produkt_quantity(nnet_produkt_quantity); I cannot create the indices I need considering the schema structure I am listing. How on earth do I create something like a foreign key constraints if it doesn't let you? mySQL is starting to SUCK!!!!!! Phil _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Wed Sep 10 03:05:41 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 10 Sep 2003 03:05:41 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! In-Reply-To: <022201c37768$d21ebdc0$67a76244@philofsoa> Message-ID: <001601c37769$f3d74a30$6401a8c0@main> http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In MySQL Server 3.23.44 and up, InnoDB tables support checking of foreign key constraints, including CASCADE, ON DELETE, and ON UPDATE." Looking at the schema you gave, you are not creating "innoDB" tables. For example, you will need to change the first table definition from this: create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null ); To this: create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null )TYPE=INNODB; When you leave off the "TYPE" in your table definition, mySQL assumes it to be "TYPE=MYISAM", which doesn't support foreign keys. More on table types: http://www.mysql.com/doc/en/Table_types.html Hope it helps :D - Nasir -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 2:58 AM To: NYPHP Talk Subject: Re: [nycphp-talk] can't create foreign key constraints in schema -HELP! You completely lost me. :( Phil From soazine at erols.com Wed Sep 10 03:08:43 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 03:08:43 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! References: <001601c37769$f3d74a30$6401a8c0@main> Message-ID: <024501c3776a$5ec4f270$67a76244@philofsoa> Let me preface it by saying I've done Oracle for almost 5 years... this is brand new to me!!! I checked using phpMySQLAdmin and InnoDB isn't given as a table type option (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't remember).. You see, with Oracle, SQL Server and even Access, I've never had to specify table type because I would always get - I guess - InnoDB and so foreign key constraints were a normal part of table schema design.. Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:05 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In MySQL > Server 3.23.44 and up, InnoDB tables support checking of foreign key > constraints, including CASCADE, ON DELETE, and ON UPDATE." > > Looking at the schema you gave, you are not creating "innoDB" tables. > > For example, you will need to change the first table definition from this: > > create table if not exists nnet_produkt_varegruppe ( > nnet_produkt_varegruppe_id int not null auto_increment, > primary key(nnet_produkt_varegruppe_id), > nnet_produkt_varegruppe_navn varchar(255) not null > ); > > To this: > > create table if not exists nnet_produkt_varegruppe ( > nnet_produkt_varegruppe_id int not null auto_increment, > primary key(nnet_produkt_varegruppe_id), > nnet_produkt_varegruppe_navn varchar(255) not null > )TYPE=INNODB; > > When you leave off the "TYPE" in your table definition, mySQL assumes it to > be "TYPE=MYISAM", which doesn't support foreign keys. > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > Hope it helps :D > > - Nasir > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 2:58 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > You completely lost me. :( > > Phil > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Wed Sep 10 03:25:52 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 10 Sep 2003 03:25:52 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! In-Reply-To: <024501c3776a$5ec4f270$67a76244@philofsoa> Message-ID: <000001c3776c$c58755a0$6401a8c0@main> In that case you'll have to do it manually, using the following query: ALTER TABLE [table name] TYPE = INNODB; What version of PMA you are running? I have 2.4.0 and it show all supported types, including InnoDB. Perhaps your mysql is running with "--skip-innodb" switch. -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 3:09 AM To: NYPHP Talk Subject: Re: [nycphp-talk] can't create foreign key constraints in schema -HELP! Let me preface it by saying I've done Oracle for almost 5 years... this is brand new to me!!! I checked using phpMySQLAdmin and InnoDB isn't given as a table type option (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't remember).. You see, with Oracle, SQL Server and even Access, I've never had to specify table type because I would always get - I guess - InnoDB and so foreign key constraints were a normal part of table schema design.. Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:05 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In > MySQL Server 3.23.44 and up, InnoDB tables support checking of foreign > key constraints, including CASCADE, ON DELETE, and ON UPDATE." > > Looking at the schema you gave, you are not creating "innoDB" tables. > > For example, you will need to change the first table definition from > this: > > create table if not exists nnet_produkt_varegruppe ( > nnet_produkt_varegruppe_id int not null auto_increment, primary > key(nnet_produkt_varegruppe_id), > nnet_produkt_varegruppe_navn varchar(255) not null > ); > > To this: > > create table if not exists nnet_produkt_varegruppe ( > nnet_produkt_varegruppe_id int not null auto_increment, primary > key(nnet_produkt_varegruppe_id), > nnet_produkt_varegruppe_navn varchar(255) not null )TYPE=INNODB; > > When you leave off the "TYPE" in your table definition, mySQL assumes > it to > be "TYPE=MYISAM", which doesn't support foreign keys. > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > Hope it helps :D > > - Nasir > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 2:58 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in > schema -HELP! > > > You completely lost me. :( > > Phil > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 03:27:42 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 03:27:42 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! References: <000001c3776c$c58755a0$6401a8c0@main> Message-ID: <027a01c3776d$060d9580$67a76244@philofsoa> 2.3.3 is what they're running. Don't know if that version has any option for InnoDB Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:25 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > In that case you'll have to do it manually, using the following query: > > ALTER TABLE [table name] TYPE = INNODB; > > What version of PMA you are running? I have 2.4.0 and it show all supported > types, including InnoDB. Perhaps your mysql is running with "--skip-innodb" > switch. > > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 3:09 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > Let me preface it by saying I've done Oracle for almost 5 years... this is > brand new to me!!! > > I checked using phpMySQLAdmin and InnoDB isn't given as a table type option > (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't remember).. > > You see, with Oracle, SQL Server and even Access, I've never had to specify > table type because I would always get - I guess - InnoDB and so foreign key > constraints were a normal part of table schema design.. > > Phil > ----- Original Message ----- > From: "Nasir Zubair" > To: "'NYPHP Talk'" > Sent: Wednesday, September 10, 2003 3:05 AM > Subject: RE: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In > > MySQL Server 3.23.44 and up, InnoDB tables support checking of foreign > > key constraints, including CASCADE, ON DELETE, and ON UPDATE." > > > > Looking at the schema you gave, you are not creating "innoDB" tables. > > > > For example, you will need to change the first table definition from > > this: > > > > create table if not exists nnet_produkt_varegruppe ( > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > key(nnet_produkt_varegruppe_id), > > nnet_produkt_varegruppe_navn varchar(255) not null > > ); > > > > To this: > > > > create table if not exists nnet_produkt_varegruppe ( > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > key(nnet_produkt_varegruppe_id), > > nnet_produkt_varegruppe_navn varchar(255) not null )TYPE=INNODB; > > > > When you leave off the "TYPE" in your table definition, mySQL assumes > > it > to > > be "TYPE=MYISAM", which doesn't support foreign keys. > > > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > > > Hope it helps :D > > > > - Nasir > > > > -----Original Message----- > > From: Phil Powell [mailto:soazine at erols.com] > > Sent: Wednesday, September 10, 2003 2:58 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > schema -HELP! > > > > > > You completely lost me. :( > > > > Phil > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Wed Sep 10 03:47:25 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 10 Sep 2003 03:47:25 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! In-Reply-To: <027a01c3776d$060d9580$67a76244@philofsoa> Message-ID: <000001c3776f$c8484300$6401a8c0@main> Latest one is 2.5.3. See if using that gives you the option. Of course you'll have to install it first ;) http://www.phpmyadmin.net/ - Nasir -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 3:28 AM To: NYPHP Talk Subject: Re: [nycphp-talk] can't create foreign key constraints in schema -HELP! 2.3.3 is what they're running. Don't know if that version has any option for InnoDB Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:25 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > In that case you'll have to do it manually, using the following query: > > ALTER TABLE [table name] TYPE = INNODB; > > What version of PMA you are running? I have 2.4.0 and it show all supported > types, including InnoDB. Perhaps your mysql is running with "--skip-innodb" > switch. > > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 3:09 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in > schema -HELP! > > > Let me preface it by saying I've done Oracle for almost 5 years... > this is brand new to me!!! > > I checked using phpMySQLAdmin and InnoDB isn't given as a table type option > (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't remember).. > > You see, with Oracle, SQL Server and even Access, I've never had to specify > table type because I would always get - I guess - InnoDB and so > foreign key > constraints were a normal part of table schema design.. > > Phil > ----- Original Message ----- > From: "Nasir Zubair" > To: "'NYPHP Talk'" > Sent: Wednesday, September 10, 2003 3:05 AM > Subject: RE: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In > > MySQL Server 3.23.44 and up, InnoDB tables support checking of > > foreign key constraints, including CASCADE, ON DELETE, and ON > > UPDATE." > > > > Looking at the schema you gave, you are not creating "innoDB" > > tables. > > > > For example, you will need to change the first table definition from > > this: > > > > create table if not exists nnet_produkt_varegruppe ( > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > key(nnet_produkt_varegruppe_id), > > nnet_produkt_varegruppe_navn varchar(255) not null > > ); > > > > To this: > > > > create table if not exists nnet_produkt_varegruppe ( > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > key(nnet_produkt_varegruppe_id), > > nnet_produkt_varegruppe_navn varchar(255) not null > > )TYPE=INNODB; > > > > When you leave off the "TYPE" in your table definition, mySQL > > assumes it > to > > be "TYPE=MYISAM", which doesn't support foreign keys. > > > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > > > Hope it helps :D > > > > - Nasir > > > > -----Original Message----- > > From: Phil Powell [mailto:soazine at erols.com] > > Sent: Wednesday, September 10, 2003 2:58 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > schema -HELP! > > > > > > You completely lost me. :( > > > > Phil > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 03:48:43 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 03:48:43 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! References: <000001c3776f$c8484300$6401a8c0@main> Message-ID: <02a301c3776f$f555c520$67a76244@philofsoa> Install it.. where? This is on a remote server that is approximately 5000 miles away! And I don't even have telnet, much less SSH access. Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:47 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > Latest one is 2.5.3. See if using that gives you the option. Of course > you'll have to install it first ;) http://www.phpmyadmin.net/ > > > - Nasir > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 3:28 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > 2.3.3 is what they're running. Don't know if that version has any option > for InnoDB > > Phil > ----- Original Message ----- > From: "Nasir Zubair" > To: "'NYPHP Talk'" > Sent: Wednesday, September 10, 2003 3:25 AM > Subject: RE: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > > In that case you'll have to do it manually, using the following query: > > > > ALTER TABLE [table name] TYPE = INNODB; > > > > What version of PMA you are running? I have 2.4.0 and it show all > supported > > types, including InnoDB. Perhaps your mysql is running with > "--skip-innodb" > > switch. > > > > > > -----Original Message----- > > From: Phil Powell [mailto:soazine at erols.com] > > Sent: Wednesday, September 10, 2003 3:09 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > schema -HELP! > > > > > > Let me preface it by saying I've done Oracle for almost 5 years... > > this is brand new to me!!! > > > > I checked using phpMySQLAdmin and InnoDB isn't given as a table type > option > > (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't > remember).. > > > > You see, with Oracle, SQL Server and even Access, I've never had to > specify > > table type because I would always get - I guess - InnoDB and so > > foreign > key > > constraints were a normal part of table schema design.. > > > > Phil > > ----- Original Message ----- > > From: "Nasir Zubair" > > To: "'NYPHP Talk'" > > Sent: Wednesday, September 10, 2003 3:05 AM > > Subject: RE: [nycphp-talk] can't create foreign key constraints in schema > > -HELP! > > > > > > > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In > > > MySQL Server 3.23.44 and up, InnoDB tables support checking of > > > foreign key constraints, including CASCADE, ON DELETE, and ON > > > UPDATE." > > > > > > Looking at the schema you gave, you are not creating "innoDB" > > > tables. > > > > > > For example, you will need to change the first table definition from > > > this: > > > > > > create table if not exists nnet_produkt_varegruppe ( > > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > > key(nnet_produkt_varegruppe_id), > > > nnet_produkt_varegruppe_navn varchar(255) not null > > > ); > > > > > > To this: > > > > > > create table if not exists nnet_produkt_varegruppe ( > > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > > key(nnet_produkt_varegruppe_id), > > > nnet_produkt_varegruppe_navn varchar(255) not null > > > )TYPE=INNODB; > > > > > > When you leave off the "TYPE" in your table definition, mySQL > > > assumes it > > to > > > be "TYPE=MYISAM", which doesn't support foreign keys. > > > > > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > > > > > Hope it helps :D > > > > > > - Nasir > > > > > > -----Original Message----- > > > From: Phil Powell [mailto:soazine at erols.com] > > > Sent: Wednesday, September 10, 2003 2:58 AM > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > > schema -HELP! > > > > > > > > > You completely lost me. :( > > > > > > Phil > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Wed Sep 10 03:53:03 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 10 Sep 2003 03:53:03 -0400 Subject: [nycphp-talk] can't create foreign key constraints in schema -HELP! In-Reply-To: <02a301c3776f$f555c520$67a76244@philofsoa> Message-ID: <000001c37770$918d60b0$6401a8c0@main> Oh, it's just a bunch of php files. Just edit the config file and dump 'em all into a subdirectory of your account ( via FTP). -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Wednesday, September 10, 2003 3:49 AM To: NYPHP Talk Subject: Re: [nycphp-talk] can't create foreign key constraints in schema -HELP! Install it.. where? This is on a remote server that is approximately 5000 miles away! And I don't even have telnet, much less SSH access. Phil ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Wednesday, September 10, 2003 3:47 AM Subject: RE: [nycphp-talk] can't create foreign key constraints in schema -HELP! > Latest one is 2.5.3. See if using that gives you the option. Of course > you'll have to install it first ;) http://www.phpmyadmin.net/ > > > - Nasir > > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Wednesday, September 10, 2003 3:28 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] can't create foreign key constraints in > schema -HELP! > > > 2.3.3 is what they're running. Don't know if that version has any > option for InnoDB > > Phil > ----- Original Message ----- > From: "Nasir Zubair" > To: "'NYPHP Talk'" > Sent: Wednesday, September 10, 2003 3:25 AM > Subject: RE: [nycphp-talk] can't create foreign key constraints in schema > -HELP! > > > > In that case you'll have to do it manually, using the following > > query: > > > > ALTER TABLE [table name] TYPE = INNODB; > > > > What version of PMA you are running? I have 2.4.0 and it show all > supported > > types, including InnoDB. Perhaps your mysql is running with > "--skip-innodb" > > switch. > > > > > > -----Original Message----- > > From: Phil Powell [mailto:soazine at erols.com] > > Sent: Wednesday, September 10, 2003 3:09 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > schema -HELP! > > > > > > Let me preface it by saying I've done Oracle for almost 5 years... > > this is brand new to me!!! > > > > I checked using phpMySQLAdmin and InnoDB isn't given as a table type > option > > (only ISAM, Berkeley DB, Heap, myISAM and one other one I don't > remember).. > > > > You see, with Oracle, SQL Server and even Access, I've never had to > specify > > table type because I would always get - I guess - InnoDB and so > > foreign > key > > constraints were a normal part of table schema design.. > > > > Phil > > ----- Original Message ----- > > From: "Nasir Zubair" > > To: "'NYPHP Talk'" > > Sent: Wednesday, September 10, 2003 3:05 AM > > Subject: RE: [nycphp-talk] can't create foreign key constraints in > > schema -HELP! > > > > > > > http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html states "In > > > MySQL Server 3.23.44 and up, InnoDB tables support checking of > > > foreign key constraints, including CASCADE, ON DELETE, and ON > > > UPDATE." > > > > > > Looking at the schema you gave, you are not creating "innoDB" > > > tables. > > > > > > For example, you will need to change the first table definition > > > from > > > this: > > > > > > create table if not exists nnet_produkt_varegruppe ( > > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > > key(nnet_produkt_varegruppe_id), > > > nnet_produkt_varegruppe_navn varchar(255) not null ); > > > > > > To this: > > > > > > create table if not exists nnet_produkt_varegruppe ( > > > nnet_produkt_varegruppe_id int not null auto_increment, primary > > > key(nnet_produkt_varegruppe_id), > > > nnet_produkt_varegruppe_navn varchar(255) not null > > > )TYPE=INNODB; > > > > > > When you leave off the "TYPE" in your table definition, mySQL > > > assumes it > > to > > > be "TYPE=MYISAM", which doesn't support foreign keys. > > > > > > More on table types: http://www.mysql.com/doc/en/Table_types.html > > > > > > Hope it helps :D > > > > > > - Nasir > > > > > > -----Original Message----- > > > From: Phil Powell [mailto:soazine at erols.com] > > > Sent: Wednesday, September 10, 2003 2:58 AM > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] can't create foreign key constraints in > > > schema -HELP! > > > > > > > > > You completely lost me. :( > > > > > > Phil > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 05:54:05 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 05:54:05 -0400 Subject: [nycphp-talk] Excel Spreadsheet Pt II In-Reply-To: <01c101c37762$11f93170$67a76244@philofsoa> Message-ID: <003701c37781$7996fa50$6401a8c0@EZDSDELL> I tried to open it. Excel (I'm using the latest Office ver) says the file is corrupted and can not be repaired. While the file does, nonetheless, open up, there are some formulas that are not working. Not sure if it is worth exporting if these calculations are missing. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Wednesday, September 10, 2003 1:09 AM To: NYPHP Talk Subject: [nycphp-talk] Excel Spreadsheet Pt II Ok guys I give up. I can't do this one at all. Could literally someone do it for me? The spreadsheet is at http://valsignalandet.com/fruit.xls I have no ability to do this, OpenOffice won't install, and I have a job interview tomorrow and leave for Tampa on Thursday for a final interview. Since the COM class only works for PHP in Windows, I can't use that either, so I'm out of options altogether. AUGH! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Sep 10 07:55:09 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Wed, 10 Sep 2003 07:55:09 -0400 Subject: [nycphp-talk] Excel Spreadsheet Pt II References: <01c101c37762$11f93170$67a76244@philofsoa> Message-ID: <003701c37792$62bb04a0$6501a8c0@Notebook> I concur on the file corruption. On my system the spreadsheet won't even open, seems to think it is locked and won't even offer to open it read only. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 10, 2003 2:09 AM Subject: [nycphp-talk] Excel Spreadsheet Pt II Ok guys I give up. I can't do this one at all. Could literally someone do it for me? The spreadsheet is at http://valsignalandet.com/fruit.xls I have no ability to do this, OpenOffice won't install, and I have a job interview tomorrow and leave for Tampa on Thursday for a final interview. Since the COM class only works for PHP in Windows, I can't use that either, so I'm out of options altogether. AUGH! Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkamm at att.com Wed Sep 10 08:20:43 2003 From: wkamm at att.com (Kamm, William R (Bill), ALABS) Date: Wed, 10 Sep 2003 07:20:43 -0500 Subject: [nycphp-talk] Excel Spreadsheet Pt II Message-ID: I was able to open the file, but it is corrupted, and could not be successfully repaired. When I saved it as a csv file, I got a further message that it may contain features (maybe macros?) that cannot be saved into a csv file. Anyway, if you want to see what it exported, it is here: http://216.74.101.242/nyphp/fruit.csv Bill -----Original Message----- From: Jim Hendricks [mailto:jim at bizcomputinginc.com] Sent: Wednesday, September 10, 2003 7:55 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Excel Spreadsheet Pt II I concur on the file corruption. On my system the spreadsheet won't even open, seems to think it is locked and won't even offer to open it read only. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 10, 2003 2:09 AM Subject: [nycphp-talk] Excel Spreadsheet Pt II Ok guys I give up. I can't do this one at all. Could literally someone do it for me? The spreadsheet is at http://valsignalandet.com/fruit.xls I have no ability to do this, OpenOffice won't install, and I have a job interview tomorrow and leave for Tampa on Thursday for a final interview. Since the COM class only works for PHP in Windows, I can't use that either, so I'm out of options altogether. AUGH! Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Wed Sep 10 08:40:38 2003 From: tom at supertom.com (tom at supertom.com) Date: Wed, 10 Sep 2003 08:40:38 -0400 Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: Message-ID: I agree, CSV is the way to go. If that is not an option, check out phpclasses.org - there are some classes listed that do this, along with other Excel-related things: http://www.phpclasses.org/search.html?words=excel&go_search=1 Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Brian Pang Sent: Tuesday, September 09, 2003 7:46 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Excel Parser save it as a comma-separated text file and use phpMyAdmin to import it > This is a multi-part message in MIME format. > > > What would one best recommend to parse an existing Excel spreadsheet (was done in Excel 97 or 2000 not sure to be honest)? I am looking for the most practical way of parsing an existing spreadsheet to place contents into a mySQL db. > > Thanx, Phil > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From sailer at bnl.gov Wed Sep 10 08:53:35 2003 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 10 Sep 2003 08:53:35 -0400 Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: <092b01c37721$83efe8f0$67a76244@philofsoa> References: <092b01c37721$83efe8f0$67a76244@philofsoa> Message-ID: <20030910125335.GB3169@bnl.gov> On Tue, Sep 09, 2003 at 06:27:12PM -0400, Phil Powell wrote: > What would one best recommend to parse an existing Excel spreadsheet > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > the most practical way of parsing an existing spreadsheet to place > contents into a mySQL db. If you know a bit of perl, get the package to read xls files, and just do a basic read and dump to csv, as other folks are talking about Tim -- Tim Sailer Information and Special Technologies Program Office of CounterIntelligence Brookhaven National Laboratory (631) 344-3001 From dmintz at panix.com Wed Sep 10 09:29:00 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 10 Sep 2003 09:29:00 -0400 (EDT) Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: References: Message-ID: I know your subject line says PHP, but you could use Perl, DBI, DBI::Excel and DBI::mysql. I can show you a sample if you're interested. Sorry if this is too sacrilegious (-: --David On Tue, 9 Sep 2003, Brian Pang wrote: > save it as a comma-separated text file and use phpMyAdmin to import it > > > > This is a multi-part message in MIME format. > > > > > > What would one best recommend to parse an existing Excel spreadsheet > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > the most practical way of parsing an existing spreadsheet to place > contents into a mySQL db. > > > > Thanx, Phil --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From ejp at well.com Wed Sep 10 09:33:21 2003 From: ejp at well.com (Edward Potter) Date: Wed, 10 Sep 2003 09:33:21 -0400 Subject: [nycphp-talk] Need to house a MySQL site for PostNukeIMEDIATELY.... In-Reply-To: Message-ID: <58B25BEA-E393-11D7-BB87-000393D9EBFA@well.com> I'm 110% satisfied with dreamhost.com, also not for profits get 50% off hosting costs. - ed On Tuesday, September 9, 2003, at 01:03 PM, Daniel Kushner wrote: > Using the promo code NYPLAT will get you a free month on the Platinum > Package. > > --Daniel > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org >> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Donald J. Organ IV >> Sent: Tuesday, September 09, 2003 12:54 PM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Need to house a MySQL site for >> PostNukeIMEDIATELY.... >> >> >> Does anyone know if they offer discounts to NYPHP members if so >> what is the >> promotional code? >> >> ----- Original Message ----- >> From: "Daniel Kushner" >> To: "NYPHP Talk" >> Sent: Tuesday, September 09, 2003 12:46 PM >> Subject: RE: [nycphp-talk] Need to house a MySQL site for Post >> NukeIMEDIATELY.... >> >> >>> Hi Patrick, >>> >>> I can warmly recommend TheHostingCompany > (http://thehostingcomany.us). Ran >> by a few members of the NYPHP team :) >> >> Best, >> Daniel Kushner >> >>> -----Original Message----- >>> From: talk-bounces at lists.nyphp.org >>> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Fee, Patrick J >>> Sent: Tuesday, September 09, 2003 12:40 PM >>> To: 'NYPHP Talk' >>> Subject: [nycphp-talk] Need to house a MySQL site for Post Nuke >>> IMEDIATELY.... >>> >>> >>> Guys, >>> >>> I need some web space and a MySQL access to set up a post nuke site > within >>> the next 8 hours. Anybody got any suggestions? >>> >>> To start with I'll simply link to the needed dynamic pages for the >>> next >>> month or so..... But it needs to be up by tonight. >>> >>> Patrick J. Fee >>> Web & Database Group Manager >>> BAE SYSTEMS >>> 600 Maryland Ave. SW Suite 700 >>> Washington D.C. 20024 >>> Patrick.Fee at BAESYSTEMS.com >>> Tel: (202) 548-3759 >>> Fax: (202) 608-5970 >>> >>> _______________________________________________ >>> talk mailing list >>> talk at lists.nyphp.org >>> http://lists.nyphp.org/mailman/listinfo/talk >> >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From brian at preston-campbell.com Wed Sep 10 09:42:14 2003 From: brian at preston-campbell.com (Preston-Campbell) Date: Wed, 10 Sep 2003 09:42:14 -0400 Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: References: Message-ID: <200309100942.14087.brian@preston-campbell.com> Why apologize? Some things can simply be accomplished in Perl more easily than PHP, for those of us that have used both. -- Puts on flameproof overalls -- Not to say that I don't believe in the future of PHP, but given the urgency of the situation, the fastest solution gets the job done. On Wednesday 10 September 2003 09:29 am, David Mintz wrote: > I know your subject line says PHP, but you could use Perl, DBI, > DBI::Excel and DBI::mysql. I can show you a sample if you're interested. > Sorry if this is too sacrilegious (-: > > --David > > On Tue, 9 Sep 2003, Brian Pang wrote: > > save it as a comma-separated text file and use phpMyAdmin to import it > > > > > This is a multi-part message in MIME format. > > > > > > > > > What would one best recommend to parse an existing Excel spreadsheet > > > > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > > the most practical way of parsing an existing spreadsheet to place > > contents into a mySQL db. > > > > > Thanx, Phil > > --- > David Mintz > http://davidmintz.org/ > Email: See http://dmintzweb.com/whitelist.php first! > > "Y d?le p'abajo" > > Tito Rojas > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Wed Sep 10 10:40:47 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 10 Sep 2003 10:40:47 -0400 (EDT) Subject: [nycphp-talk] PHP Excel Parser In-Reply-To: <200309100942.14087.brian@preston-campbell.com> References: <200309100942.14087.brian@preston-campbell.com> Message-ID: On Wed, 10 Sep 2003, Preston-Campbell wrote: > Why apologize? I put a smiley in there after "Sorry if this is too sacrilegious", didn't I? Let's try again: > Some things can simply be accomplished in Perl more easily > than PHP, for those of us that have used both. -- Puts on flameproof overalls > -- Not to say that I don't believe in the future of PHP, but given the > urgency of the situation, the fastest solution gets the job done. > > On Wednesday 10 September 2003 09:29 am, David Mintz wrote: > > I know your subject line says PHP, but you could use Perl, DBI, > > DBI::Excel and DBI::mysql. I can show you a sample if you're interested. > > Sorry if this is too sacrilegious (-: --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From bpang at bpang.com Wed Sep 10 11:05:33 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 11:05:33 -0400 Subject: [nycphp-talk] Excel Spreadsheet Pt II Message-ID: I couldn't open it at all using OpenOffice1.0.1 or Gnumeric > do it for me? The spreadsheet is at http://valsignalandet.com/fruit.xls ok, ok, I'll fire up the windows machine... ugh.. do you know if this file was created in Windows or Mac? I can try a mac, too, if necessary From bpang at bpang.com Wed Sep 10 11:17:31 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 11:17:31 -0400 Subject: [nycphp-talk] Excel Spreadsheet Pt II Message-ID: Here ya go, Phil. File was badly corrupted. So bad that Excel was unable to repair it, but did manage to open it and produce the following... http://38.117.145.89/fruit.csv I'm not sure if that was the extent of the data or not. From soazine at erols.com Wed Sep 10 15:19:48 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 15:19:48 -0400 Subject: [nycphp-talk] PHP Excel Parser References: Message-ID: <00bf01c377d0$817de400$67a76244@philofsoa> Thanx all.. I wound up having Ian receiving the .xls file and he converted it himself; I had and continue to have no capability to do so myself. Phil ----- Original Message ----- From: To: "NYPHP Talk" Sent: Wednesday, September 10, 2003 8:40 AM Subject: RE: [nycphp-talk] PHP Excel Parser > I agree, CSV is the way to go. If that is not an option, check out > phpclasses.org - there are some classes listed that do this, along with > other Excel-related things: > > http://www.phpclasses.org/search.html?words=excel&go_search=1 > > Tom > > > > > > *************************************************** > What's Tom listening to right now? Find out here: > http://www.supertom.com/current_track.php > > > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Brian Pang > Sent: Tuesday, September 09, 2003 7:46 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Excel Parser > > > save it as a comma-separated text file and use phpMyAdmin to import it > > > > This is a multi-part message in MIME format. > > > > > > What would one best recommend to parse an existing Excel spreadsheet > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > the most practical way of parsing an existing spreadsheet to place > contents into a mySQL db. > > > > Thanx, Phil > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 15:20:35 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 15:20:35 -0400 Subject: [nycphp-talk] PHP Excel Parser References: <200309100942.14087.brian@preston-campbell.com> Message-ID: <00cb01c377d0$9c7a4eb0$67a76244@philofsoa> That would require that I use Perl, which I have not done so in several years. In short, I know ZERO Perl! :( Phil ----- Original Message ----- From: "Preston-Campbell" To: "NYPHP Talk" Sent: Wednesday, September 10, 2003 9:42 AM Subject: Re: [nycphp-talk] PHP Excel Parser Why apologize? Some things can simply be accomplished in Perl more easily than PHP, for those of us that have used both. -- Puts on flameproof overalls -- Not to say that I don't believe in the future of PHP, but given the urgency of the situation, the fastest solution gets the job done. On Wednesday 10 September 2003 09:29 am, David Mintz wrote: > I know your subject line says PHP, but you could use Perl, DBI, > DBI::Excel and DBI::mysql. I can show you a sample if you're interested. > Sorry if this is too sacrilegious (-: > > --David > > On Tue, 9 Sep 2003, Brian Pang wrote: > > save it as a comma-separated text file and use phpMyAdmin to import it > > > > > This is a multi-part message in MIME format. > > > > > > > > > What would one best recommend to parse an existing Excel spreadsheet > > > > (was done in Excel 97 or 2000 not sure to be honest)? I am looking for > > the most practical way of parsing an existing spreadsheet to place > > contents into a mySQL db. > > > > > Thanx, Phil > > --- > David Mintz > http://davidmintz.org/ > Email: See http://dmintzweb.com/whitelist.php first! > > "Y d?le p'abajo" > > Tito Rojas > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 15:21:57 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 15:21:57 -0400 Subject: [nycphp-talk] Fw: kontakt.php Message-ID: <00da01c377d0$cd61d6b0$67a76244@philofsoa> Ok, guys I'm having mail() problems with my form, can someone address this, I'm at a loss. I'm attaching the code itself, it's quite small. This is becoming routine, every single task I am tasked to do for this project I physically am unable to do. :( Phil ----- Original Message ----- From: Ragnar To: Phil Powell (E-post) Sent: Wednesday, September 10, 2003 10:13 AM Subject: kontakt.php Phil 1. When using the form everything looks wery nice, BUT when I recieve the mail it says sender is: nobody [nobody at dns1.itpays.no] And the information entered in the form is missing except the comments in the comment field. 2. In the registrer.php the same sender appear BUT there I get all information. Sorry if I made a mess earlier with the code in kontakt.php this could mitgh be the reason, but afterall you fixed it nicely. lookin in to it? Takker s? mye = tackar s? mycket. "Ut?lmodighet bidrar ofte til at vi svarer f?r du sp?r!" ("Our inpatience often contribute in our answers even before you ask!") Med vennlig hilsen / Best regards Ragnar Zaal Daglig leder / Manager ******************************************************* Apoco as Ekebergveien 223C N-1162 Oslo Office: +47 69 89 96 93 Mobile: +47 920 60 240 http://www.apoco.no ******************************************************** a.. This mail is scanned by Norton 2003 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kontakt.php Type: application/octet-stream Size: 4801 bytes Desc: not available URL: From jsiegel1 at optonline.net Wed Sep 10 15:34:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 15:34:55 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters Message-ID: <006001c377d2$a41f7b70$6401a8c0@EZDSDELL> My client doesn't want anyone who visits his website to enter an email address like www.me at mydomain.com. So, I have two checks to validate the email entered by the user. Each check uses preg_match. Here's the pattern used for the first match: '/^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$/i', Then the email goes through a second check: ( preg_match('/^www\./', trim($_POST['email'])) ) Somehow someone managed to sneak through an email address with a www at the beginning and I'm a bit puzzled as to how they managed to do it. Is it possible that they entered some sort of non-printable character, like a character with an ASCII value less than 33, which would foil the data check? Or is it something obvious that I'm overlooking? Jeff Siegel From bpang at bpang.com Wed Sep 10 15:39:14 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 15:39:14 -0400 Subject: [nycphp-talk] Fw: kontakt.php Message-ID: Phil, Have you considered reading the online PHP manual for the functions you are experiencing difficulty with? This "problem" is quite easily solved in the first user comment on this page: http://us2.php.net/manual/en/ref.mail.php Without looking at your code, I am going to tell you that you need to set the message headers. The online PHP manual is great. I have never read a PHP book and don't think I'll ever need to (sorry to you PHP book authors out there) and I have no formal programming education (I'm a natural, what can I say?) > This is a multi-part message in MIME format. > > > Ok, guys I'm having mail() problems with my form, can someone address this, I'm at a loss. I'm attaching the code itself, it's quite small. > > This is becoming routine, every single task I am tasked to do for this project I physically am unable to do. :( > > Phil > ----- Original Message ----- > From: Ragnar > To: Phil Powell (E-post) > Sent: Wednesday, September 10, 2003 10:13 AM > Subject: kontakt.php > > > Phil > 1. When using the form everything looks wery nice, BUT when I recieve the mail it says sender is: nobody [nobody at dns1.itpays.no] > And the information entered in the form is missing except the comments in the comment field. > 2. In the registrer.php the same sender appear BUT there I get all information. > > Sorry if I made a mess earlier with the code in kontakt.php this could mitgh be the reason, but afterall you fixed it nicely. > > lookin in to it? > > Takker s? mye = tackar s? mycket. > > > > "Ut?lmodighet bidrar ofte til at vi svarer f?r du sp?r!" > ("Our inpatience often contribute in our answers even before you ask!") > > Med vennlig hilsen / Best regards > Ragnar Zaal > Daglig leder / Manager > > ******************************************************* > Apoco as > Ekebergveien 223C > N-1162 Oslo > Office: +47 69 89 96 93 Mobile: +47 920 60 240 > http://www.apoco.no > ******************************************************** > a.. This mail is scanned by Norton 2003 > > From bpang at bpang.com Wed Sep 10 15:49:55 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 15:49:55 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters Message-ID: without asking why someone's email can't start with "www"... shouldn't the www in the second check be in parenthesis? preg_match('/^(www\.)/', trim($_POST['email'])) ) maybe I'm wrong,, regular expressions get so confusing... alternately, and probably slower, you could just check for a match in the first 4 chars if (substr(trim($_POST['email']), 0, 4) == "www.") very brute, but very clear :) > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. > So, I have two checks to validate the email entered by the user. Each > check uses preg_match. > > Here's the pattern used for the first match: > '/^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$/i', > > Then the email goes through a second check: ( preg_match('/^www\./', > trim($_POST['email'])) ) > > Somehow someone managed to sneak through an email address with a www at > the beginning and I'm a bit puzzled as to how they managed to do it. Is > it possible that they entered some sort of non-printable character, like > a character with an ASCII value less than 33, which would foil the data > check? Or is it something obvious that I'm overlooking? > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From sklar at sklar.com Wed Sep 10 15:52:18 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 10 Sep 2003 15:52:18 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <006001c377d2$a41f7b70$6401a8c0@EZDSDELL> Message-ID: What is the e-mail address they snuck through? You probably want to escape the . in the character class before the @ in the first regex -- otherwise you're matching ^.+@ Separately, why does your client want to do this? www.me at mydomain.com is a perfectly valid e-mail address. David On Wednesday, September 10, 2003 3:35 PM, wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. > So, I have two checks to validate the email entered by the user. Each > check uses preg_match. > > Here's the pattern used for the first match: > '/^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$/i', > > Then the email goes through a second check: ( preg_match('/^www\./', > trim($_POST['email'])) ) > > Somehow someone managed to sneak through an email address with a www > at the beginning and I'm a bit puzzled as to how they managed to do > it. Is it possible that they entered some sort of non-printable > character, like a character with an ASCII value less than 33, which > would foil the data check? Or is it something obvious that I'm > overlooking? > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From sklar at sklar.com Wed Sep 10 15:54:27 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 10 Sep 2003 15:54:27 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: Message-ID: > without asking why someone's email can't start with "www"... shouldn't > the www in the second check be in parenthesis? > > preg_match('/^(www\.)/', trim($_POST['email'])) ) > > maybe I'm wrong,, regular expressions get so confusing... /^www\./ and /^(www\.)/ match identically. The only difference is that the one with the parentheses captures the enclosed text for later use, if you want it. > alternately, and probably slower, you could just check for a match in > the first 4 chars > > if (substr(trim($_POST['email']), 0, 4) == "www.") > > very brute, but very clear :) Actually, this is faster. And better style, IMHO. If you are using a regex with no metacharacters (like ^www\.), you should use the string functions instead. David From suzerain at suzerain.com Wed Sep 10 16:08:08 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 10 Sep 2003 16:08:08 -0400 Subject: [nycphp-talk] Need to house a MySQL site for PostNukeIMEDIATELY.... In-Reply-To: <58B25BEA-E393-11D7-BB87-000393D9EBFA@well.com> References: <58B25BEA-E393-11D7-BB87-000393D9EBFA@well.com> Message-ID: >I'm 110% satisfied with dreamhost.com, also not for profits get 50% >off hosting costs. > just wanted to echo this. dreamhost pretty much kicks ass. i've moved about 10 domains there. highly recommended. -- Marc Antony Vose http://www.suzerain.com/ The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently. -- Nietzsche From shiflett at php.net Wed Sep 10 16:19:20 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 10 Sep 2003 13:19:20 -0700 (PDT) Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <006001c377d2$a41f7b70$6401a8c0@EZDSDELL> Message-ID: <20030910201920.58150.qmail@web14302.mail.yahoo.com> --- Jeff wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. Others have mentioned this, but that is a perfectly valid email address. Maybe instead of spending time writing a regex to exclude some special case, you should take the time to make sure your client understands what an email address is. Is there a valid reason to exclude some email addresses and not others? Why? Don't hesitate to question a client. As a consultant, I would consider it my responsibility to do so. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From csnyder at chxo.com Wed Sep 10 16:34:19 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 10 Sep 2003 16:34:19 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: References: Message-ID: <3F5F8ACB.8030705@chxo.com> As to forensics, are you sure the sneaker didn't put a space in front of their www address, like " www.sneaky at example.com"? Just a thought. >>Somehow someone managed to sneak through an email address with a www at >>the beginning and I'm a bit puzzled as to how they managed to do it. >> From tom at supertom.com Wed Sep 10 16:32:16 2003 From: tom at supertom.com (tom at supertom.com) Date: Wed, 10 Sep 2003 16:32:16 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <20030910201920.58150.qmail@web14302.mail.yahoo.com> Message-ID: Although it is true that it is "technically" a valid address, in reality, it is an incorrect one. I see this all the time, in data that I receive from my clients, and even in printed material from companies. And I can't tell you how many times these addresses have bounced back (I too was once from the school of "try it, may it REALLY IS their address"). Something needs to be done to ensure that the customers type in valid email addresses, and this is what this fellow's client came up with. As we have all noticed, it is not fool-proof. Perhaps I would suggest a 2nd textbox to confirm that the user typed the address in correctly, and perhaps even a confirmation link in an email to that address, to prove a customer actually receives email at that address. But, I suspect that this doesn't happen often enough to justify those programming changes, so I would just go with removing the beginning 'www.' as well. Or, perhaps some other scrubbing mechanism somewhere else in the chain (perhaps when the email addresses are exported, etc.). The solution has to fit the problem, and I would be very interested to see the "big contract" that is sent from the address "www.someexecutive at bigcompany.com". Good Luck! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett Sent: Wednesday, September 10, 2003 4:19 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Sneaking in unwanted characters --- Jeff wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. Others have mentioned this, but that is a perfectly valid email address. Maybe instead of spending time writing a regex to exclude some special case, you should take the time to make sure your client understands what an email address is. Is there a valid reason to exclude some email addresses and not others? Why? Don't hesitate to question a client. As a consultant, I would consider it my responsibility to do so. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 10 16:36:39 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 16:36:39 -0400 Subject: [nycphp-talk] Fw: kontakt.php References: Message-ID: <020601c377db$3d06b9e0$67a76244@philofsoa> The online PHP manual did not help me with this one.. turns out it was sending it twice, from $email and from nobody at itpays.no. No offense to you or to the PHP online manual, but sometimes nothing helps except a miracle. Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Wednesday, September 10, 2003 3:39 PM Subject: Re: [nycphp-talk] Fw: kontakt.php > Phil, > > Have you considered reading the online PHP manual for the functions you > are experiencing difficulty with? > > This "problem" is quite easily solved in the first user comment on this > page: > http://us2.php.net/manual/en/ref.mail.php > > Without looking at your code, I am going to tell you that you need to > set the message headers. > > The online PHP manual is great. I have never read a PHP book and don't > think I'll ever need to (sorry to you PHP book authors out there) and I > have no formal programming education (I'm a natural, what can I say?) > > > > > > > This is a multi-part message in MIME format. > > > > > > Ok, guys I'm having mail() problems with my form, can someone address > this, I'm at a loss. I'm attaching the code itself, it's quite small. > > > > This is becoming routine, every single task I am tasked to do for this > project I physically am unable to do. :( > > > > Phil > > ----- Original Message ----- > > From: Ragnar > > To: Phil Powell (E-post) > > Sent: Wednesday, September 10, 2003 10:13 AM > > Subject: kontakt.php > > > > > > Phil > > 1. When using the form everything looks wery nice, BUT when I > recieve the mail it says sender is: nobody [nobody at dns1.itpays.no] > > And the information entered in the form is missing except the > comments in the comment field. > > 2. In the registrer.php the same sender appear BUT there I get all > information. > > > > Sorry if I made a mess earlier with the code in kontakt.php this could > mitgh be the reason, but afterall you fixed it nicely. > > > > lookin in to it? > > > > Takker s? mye = tackar s? mycket. > > > > > > > > "Ut?lmodighet bidrar ofte til at vi svarer f?r du sp?r!" > > ("Our inpatience often contribute in our answers even before you ask!") > > > > Med vennlig hilsen / Best regards > > Ragnar Zaal > > Daglig leder / Manager > > > > ******************************************************* > > Apoco as > > Ekebergveien 223C > > N-1162 Oslo > > Office: +47 69 89 96 93 Mobile: +47 920 60 240 > > http://www.apoco.no > > ******************************************************** > > a.. This mail is scanned by Norton 2003 > > > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Wed Sep 10 16:41:05 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 16:41:05 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters Message-ID: he's using trim() so that should take care of the space > As to forensics, are you sure the sneaker didn't put a space in front of > their www address, like " www.sneaky at example.com"? > Just a thought. > > >>Somehow someone managed to sneak through an email address with a www at > >>the beginning and I'm a bit puzzled as to how they managed to do it. > >> > From jsiegel1 at optonline.net Wed Sep 10 16:44:15 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 16:44:15 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: Message-ID: <006c01c377dc$4d532170$6401a8c0@EZDSDELL> So...substr is the way to go...or at least try. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Sklar Sent: Wednesday, September 10, 2003 2:54 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Sneaking in unwanted characters > without asking why someone's email can't start with "www"... shouldn't > the www in the second check be in parenthesis? > > preg_match('/^(www\.)/', trim($_POST['email'])) ) > > maybe I'm wrong,, regular expressions get so confusing... /^www\./ and /^(www\.)/ match identically. The only difference is that the one with the parentheses captures the enclosed text for later use, if you want it. > alternately, and probably slower, you could just check for a match in > the first 4 chars > > if (substr(trim($_POST['email']), 0, 4) == "www.") > > very brute, but very clear :) Actually, this is faster. And better style, IMHO. If you are using a regex with no metacharacters (like ^www\.), you should use the string functions instead. David _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 16:44:15 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 16:44:15 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <20030910201920.58150.qmail@web14302.mail.yahoo.com> Message-ID: <006b01c377dc$4d021b40$6401a8c0@EZDSDELL> I explained it but...the client pays the bills so...do as the client says. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Wednesday, September 10, 2003 3:19 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Sneaking in unwanted characters --- Jeff wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. Others have mentioned this, but that is a perfectly valid email address. Maybe instead of spending time writing a regex to exclude some special case, you should take the time to make sure your client understands what an email address is. Is there a valid reason to exclude some email addresses and not others? Why? Don't hesitate to question a client. As a consultant, I would consider it my responsibility to do so. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 16:44:15 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 16:44:15 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: Message-ID: <006d01c377dc$4d6faa20$6401a8c0@EZDSDELL> To answer the second question first, when an email comes through my client's website it gets sent to a lot of people and the email address goes into the body of the email. Outlook interprets me at mydomain.com as an email address but if it says www.me at mydomain.com it treats it as a URL. Hence the client request to eliminate addresses with "www." The email address they snuck through was www.RMujanovic at aol.com. I'll see if escaping the period (.) helps but...I still wonder how they did it? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Sklar Sent: Wednesday, September 10, 2003 2:52 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Sneaking in unwanted characters What is the e-mail address they snuck through? You probably want to escape the . in the character class before the @ in the first regex -- otherwise you're matching ^.+@ Separately, why does your client want to do this? www.me at mydomain.com is a perfectly valid e-mail address. David On Wednesday, September 10, 2003 3:35 PM, wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. > So, I have two checks to validate the email entered by the user. Each > check uses preg_match. > > Here's the pattern used for the first match: > '/^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$/i', > > Then the email goes through a second check: ( preg_match('/^www\./', > trim($_POST['email'])) ) > > Somehow someone managed to sneak through an email address with a www > at the beginning and I'm a bit puzzled as to how they managed to do > it. Is it possible that they entered some sort of non-printable > character, like a character with an ASCII value less than 33, which > would foil the data check? Or is it something obvious that I'm > overlooking? > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 16:44:15 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 16:44:15 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <3F5F8ACB.8030705@chxo.com> Message-ID: <006a01c377dc$4ca04c30$6401a8c0@EZDSDELL> Closed that hole a while ago with a trim statement. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Snyder Sent: Wednesday, September 10, 2003 3:34 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Sneaking in unwanted characters As to forensics, are you sure the sneaker didn't put a space in front of their www address, like " www.sneaky at example.com"? Just a thought. >>Somehow someone managed to sneak through an email address with a www at >>the beginning and I'm a bit puzzled as to how they managed to do it. >> _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From chendry at nyc.rr.com Wed Sep 10 17:00:40 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Wed, 10 Sep 2003 17:00:40 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <006b01c377dc$4d021b40$6401a8c0@EZDSDELL> Message-ID: I gotta agree with Chris on this one - one of the reasons the client is paying you is for your experience and expertise in the field. Sometimes you just gotta say no to a client, and hit them over the nose with a rolled-up newspaper. -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org -> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff -> Sent: Wednesday, September 10, 2003 4:44 PM -> To: shiflett at php.net; 'NYPHP Talk' -> Subject: RE: [nycphp-talk] Sneaking in unwanted characters -> -> -> I explained it but...the client pays the bills so...do as the client -> says. -> -> Jeff Siegel -> -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] -> On Behalf Of Chris Shiflett -> Sent: Wednesday, September 10, 2003 3:19 PM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] Sneaking in unwanted characters -> -> -> --- Jeff wrote: -> > My client doesn't want anyone who visits his website to enter an email -> > address like www.me at mydomain.com. -> -> Others have mentioned this, but that is a perfectly valid email address. -> Maybe -> instead of spending time writing a regex to exclude some special case, -> you -> should take the time to make sure your client understands what an email -> address -> is. Is there a valid reason to exclude some email addresses and not -> others? -> Why? Don't hesitate to question a client. -> -> As a consultant, I would consider it my responsibility to do so. -> -> Chris -> -> ===== -> Become a better Web developer with the HTTP Developer's Handbook -> http://httphandbook.org/ -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> From jsiegel1 at optonline.net Wed Sep 10 17:23:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 17:23:55 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: Message-ID: <007101c377e1$d764cbc0$6401a8c0@EZDSDELL> I you want to do it...I'll give you his name and address. ;) I'm not wimping out here...sometimes...if you are going to go head to head with a client you have to pick your battles. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Christopher Hendry Sent: Wednesday, September 10, 2003 4:01 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Sneaking in unwanted characters I gotta agree with Chris on this one - one of the reasons the client is paying you is for your experience and expertise in the field. Sometimes you just gotta say no to a client, and hit them over the nose with a rolled-up newspaper. -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org -> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff -> Sent: Wednesday, September 10, 2003 4:44 PM -> To: shiflett at php.net; 'NYPHP Talk' -> Subject: RE: [nycphp-talk] Sneaking in unwanted characters -> -> -> I explained it but...the client pays the bills so...do as the client -> says. -> -> Jeff Siegel -> -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] -> On Behalf Of Chris Shiflett -> Sent: Wednesday, September 10, 2003 3:19 PM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] Sneaking in unwanted characters -> -> -> --- Jeff wrote: -> > My client doesn't want anyone who visits his website to enter an email -> > address like www.me at mydomain.com. -> -> Others have mentioned this, but that is a perfectly valid email address. -> Maybe -> instead of spending time writing a regex to exclude some special case, -> you -> should take the time to make sure your client understands what an email -> address -> is. Is there a valid reason to exclude some email addresses and not -> others? -> Why? Don't hesitate to question a client. -> -> As a consultant, I would consider it my responsibility to do so. -> -> Chris -> -> ===== -> Become a better Web developer with the HTTP Developer's Handbook -> http://httphandbook.org/ -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 17:23:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 17:23:55 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting Message-ID: <007201c377e1$d783c570$6401a8c0@EZDSDELL> After posting a message concerning virtual hosting, I assembled the different ideas/suggestions into a single article. Below is the link to the draft version. Please comment and let me know if anything has been overlooked or requires clarification. http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt Jeff Siegel From nyphp at websapp.com Wed Sep 10 17:30:30 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 10 Sep 2003 17:30:30 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: <007201c377e1$d783c570$6401a8c0@EZDSDELL> Message-ID: My comments: DocumentRoot of the Virtual Hosts don't need be under the main document root (/var/www/html). They can be where ever you want (e.g.: /home/daniel/www/project1) My name is Daniel (not Dan) :) --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff > Sent: Wednesday, September 10, 2003 5:24 PM > To: 'NYPHP Talk' > Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting > > > After posting a message concerning virtual hosting, I assembled the > different ideas/suggestions into a single article. Below is the link to > the draft version. Please comment and let me know if anything has been > overlooked or requires clarification. > > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 17:43:23 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 17:43:23 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: Message-ID: <007801c377e4$8f234cd0$6401a8c0@EZDSDELL> Dear Not Dan, Good point! Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Kushner Sent: Wednesday, September 10, 2003 4:31 PM To: NYPHP Talk Subject: RE: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting My comments: DocumentRoot of the Virtual Hosts don't need be under the main document root (/var/www/html). They can be where ever you want (e.g.: /home/daniel/www/project1) My name is Daniel (not Dan) :) --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff > Sent: Wednesday, September 10, 2003 5:24 PM > To: 'NYPHP Talk' > Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting > > > After posting a message concerning virtual hosting, I assembled the > different ideas/suggestions into a single article. Below is the link to > the draft version. Please comment and let me know if anything has been > overlooked or requires clarification. > > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 10 18:11:39 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 10 Sep 2003 18:11:39 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: Message-ID: <007c01c377e8$82336470$6401a8c0@EZDSDELL> Well...as noted in the "Validate Email" section of this page - http://www.phphelp.com/start - "The most comprehensive regular expression currently available for testing if an email address is valid was published in Mastering Regular Expressions from O'Reilly Publishing. It appears on page 316 and weighs in at more than six thousand characters...." I'm sure there's a better way. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of tom at supertom.com Sent: Wednesday, September 10, 2003 3:32 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Sneaking in unwanted characters Although it is true that it is "technically" a valid address, in reality, it is an incorrect one. I see this all the time, in data that I receive from my clients, and even in printed material from companies. And I can't tell you how many times these addresses have bounced back (I too was once from the school of "try it, may it REALLY IS their address"). Something needs to be done to ensure that the customers type in valid email addresses, and this is what this fellow's client came up with. As we have all noticed, it is not fool-proof. Perhaps I would suggest a 2nd textbox to confirm that the user typed the address in correctly, and perhaps even a confirmation link in an email to that address, to prove a customer actually receives email at that address. But, I suspect that this doesn't happen often enough to justify those programming changes, so I would just go with removing the beginning 'www.' as well. Or, perhaps some other scrubbing mechanism somewhere else in the chain (perhaps when the email addresses are exported, etc.). The solution has to fit the problem, and I would be very interested to see the "big contract" that is sent from the address "www.someexecutive at bigcompany.com". Good Luck! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett Sent: Wednesday, September 10, 2003 4:19 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Sneaking in unwanted characters --- Jeff wrote: > My client doesn't want anyone who visits his website to enter an email > address like www.me at mydomain.com. Others have mentioned this, but that is a perfectly valid email address. Maybe instead of spending time writing a regex to exclude some special case, you should take the time to make sure your client understands what an email address is. Is there a valid reason to exclude some email addresses and not others? Why? Don't hesitate to question a client. As a consultant, I would consider it my responsibility to do so. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From rdumas at cmj.com Wed Sep 10 18:21:10 2003 From: rdumas at cmj.com (Robert Dumas) Date: Wed, 10 Sep 2003 18:21:10 -0400 Subject: [nycphp-talk] Simple parse/replace Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FBA8@webproxy.uat.dbinsight.com> Hey all: I have cobbled together a simple changelog system for the web folks here at work, using php and some flat text files. The script simply concatenates the fields, with \t characters in between each variable, into a file for that particular server. The format looks roughly like this: $timestamp\t$modby\t$files\t$notes\n for example: 9/10/2003, 5:41 PM Robert D. changelog/add.php Got basic Changelog service up and running. (Those are tabs between each field) There's also a simple viewing page which (you guessed it) lets you view the file. What I want to do is output it in a nice table, with the tabs replaced with table cells. How would I parse it as such? Bear in mind that the text files must remain tab-delimited, so as not to boff up an analysis script, so I can't output table data into the text file (nor would I want to, if I could; that is far too kludgy). Cheers --RD ----------------------------- Robert Dumas CMJ Associate Internet Primate 151 West Twenty-Fifth Street Twelfth Floor New York, NY 10001 p: 917.606.1908 f: 917.606.1914 w: www.cmj.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Wed Sep 10 18:42:17 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 10 Sep 2003 15:42:17 -0700 (PDT) Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <007c01c377e8$82336470$6401a8c0@EZDSDELL> Message-ID: <20030910224217.23439.qmail@web14301.mail.yahoo.com> --- Jeff wrote: > "The most comprehensive regular expression currently available for > testing if an email address is valid was published in Mastering Regular > Expressions from O'Reilly Publishing. It appears on page 316 and weighs > in at more than six thousand characters...." > > I'm sure there's a better way. Most of the RFCs either have example regular expressions or a very specific grammar that can be used to build one. I've seen that one in the back of the O'Reilly book, and my instinct tells me it shouldn't have to be that complicated. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From csnyder at chxo.com Wed Sep 10 19:00:35 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 10 Sep 2003 19:00:35 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: References: Message-ID: <3F5FAD13.8050600@chxo.com> This could be one of those areas where I'm not entirely clear on Unix philosophy, but I think of /var as being for data of a more transient nature, and subject to overwrite on OS upgrade. Also, most distros don't give /var much space by default. I consider /home and /usr/local as safer places for long-term storage. I generally put virtual host webroots in /home/domain/http for single-site domains, or /home/orgname/domain/http for organizations with multiple domains. csnyder Daniel Kushner wrote: >My comments: > >DocumentRoot of the Virtual Hosts don't need be under the main document root >(/var/www/html). They can be where ever you want (e.g.: >/home/daniel/www/project1) > >My name is Daniel (not Dan) :) > >--Daniel > > > >>-----Original Message----- >>From: talk-bounces at lists.nyphp.org >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff >>Sent: Wednesday, September 10, 2003 5:24 PM >>To: 'NYPHP Talk' >>Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting >> >> >>After posting a message concerning virtual hosting, I assembled the >>different ideas/suggestions into a single article. Below is the link to >>the draft version. Please comment and let me know if anything has been >>overlooked or requires clarification. >> >>http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt >> >>Jeff Siegel >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From soazine at erols.com Wed Sep 10 19:00:27 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 19:00:27 -0400 Subject: [nycphp-talk] can't populate db table with csv - I can't believe this! Message-ID: <029801c377ef$53cf00b0$67a76244@philofsoa> At the rate I'm going, please don't ask me to do I'll break that too! Go to http://www.nordicnet.no/admin/alle_produkter.php and you can see the damage! Otherwise, I'm going to have to send the code to you guys, along with the .csv file and maybe you can do what I cannot. I might as well quit this project! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alle_produkter.php Type: application/octet-stream Size: 1535 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kalkyle-underwear-fruit.csv Type: application/octet-stream Size: 1508 bytes Desc: not available URL: From adam at trachtenberg.com Wed Sep 10 19:26:46 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 10 Sep 2003 19:26:46 -0400 (EDT) Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <20030910224217.23439.qmail@web14301.mail.yahoo.com> Message-ID: On Wed, 10 Sep 2003, Chris Shiflett wrote: > Most of the RFCs either have example regular expressions or a very specific > grammar that can be used to build one. I've seen that one in the back of the > O'Reilly book, and my instinct tells me it shouldn't have to be that > complicated. :-) The full valid e-mail spec is really nasty, cause you can have comments inside the address and other weird things. Here is the regex from PHP Cookbook that allows most real-world addresses, but not everything that's okay: / ^ # anchor at the beginning [^@\s]+ # name is all characters except @ and whitespace @ # the @ divides name and domain ( [-a-z0-9]+ # (sub)domains are letters, numbers, and hyphens \. # separated by a period )+ # and we can have one or more of them ( [a-z]{2} # TLDs can be a two-letter alphabetical country code |com|net # or one of |edu|org # many |gov|mil # possible |int|biz # three-letter |pro # combinations |info|arpa # or even |aero|coop # a few |name # four-letter ones |museum # plus one that's six-letters long! ) $ # anchor at the end /ix # and everything is case-insensitive Alternatively, check out imap_rfc822_parse_adrlist(). -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From adam at trachtenberg.com Wed Sep 10 19:34:38 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 10 Sep 2003 19:34:38 -0400 (EDT) Subject: [nycphp-talk] Simple parse/replace In-Reply-To: <2ADC7BED20C3D711BFF100508B8FA3E307FBA8@webproxy.uat.dbinsight.com> Message-ID: On Wed, 10 Sep 2003, Robert Dumas wrote: > What I want to do is output it in a nice table, with the tabs replaced with > table cells. How would I parse it as such? Bear in mind that the text files > must remain tab-delimited, so as not to boff up an analysis script, so I > can't output table data into the text file (nor would I want to, if I could; > that is far too kludgy). This should be enough to get you started: $fp = fopen('foo.tab', 'r'); print "\n"; while ($line = fgetcsv($fp, 1000, "\t")) { print " \n \n \n \n"; } print "
    "; print join("", $line); print "
    \n"; fclose($fp); -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From hans at nyphp.org Wed Sep 10 20:22:21 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 10 Sep 2003 20:22:21 -0400 Subject: [nycphp-talk] can't populate db table with csv - I can't believe this! In-Reply-To: <029801c377ef$53cf00b0$67a76244@philofsoa> References: <029801c377ef$53cf00b0$67a76244@philofsoa> Message-ID: <3F5FC03D.4020707@nyphp.org> Phil, > Go to http://www.nordicnet.no/admin/alle_produkter.php and you can see > the damage! You need to learn some basics of working with SQL. In MySQL, Oracle, PostgreSQL, and just about everything else, values should always be enclosed in single quotes [1]. With the SQL you show above, none of the values are enclosed in single quotes, and since one of the values contains a single quote itself, it gives an error. You'll also need to use mysql_escape_string() for every value you create a SQL statement from; this escapes special chars that SQL will interpret as having meaning. See http://php.net/mysql_escape_string > Otherwise, I'm going to have to send the code to you guys, along with > the .csv file and maybe you can do what I cannot. I might as well quit > this project! I think you might have to move to a pay-per-incident support plan :) But this is a simple problem to resolve; you should have no problem with it. H [1] For the purposes of this discussion From hans at nyphp.org Wed Sep 10 20:33:10 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 10 Sep 2003 20:33:10 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: References: Message-ID: <3F5FC2C6.5030503@nyphp.org> Adam Maccabee Trachtenberg wrote: > On Wed, 10 Sep 2003, Chris Shiflett wrote: > > >>Most of the RFCs either have example regular expressions or a very specific >>grammar that can be used to build one. I've seen that one in the back of the >>O'Reilly book, and my instinct tells me it shouldn't have to be that >>complicated. :-) > > > The full valid e-mail spec is really nasty, cause you can have > comments inside the address and other weird things. Here is the regex > from PHP Cookbook that allows most real-world addresses, but not > everything that's okay: Yes; with RFC2822 they really managed to add a lot of unneeded complexity. Ahhh, acadamentia. http://cvs.nyphp.org/cvsweb.cgi/pmail/pmail.inc?rev=1.5&content-type=text/x-cvsweb-markup Some functions in there may help as well. H > > / > ^ # anchor at the beginning > [^@\s]+ # name is all characters except @ and whitespace > @ # the @ divides name and domain > ( > [-a-z0-9]+ # (sub)domains are letters, numbers, and hyphens > \. # separated by a period > )+ # and we can have one or more of them > ( > [a-z]{2} # TLDs can be a two-letter alphabetical country > code > |com|net # or one of > |edu|org # many > |gov|mil # possible > |int|biz # three-letter > |pro # combinations > |info|arpa # or even > |aero|coop # a few > |name # four-letter ones > |museum # plus one that's six-letters long! > ) > $ # anchor at the end > /ix # and everything is case-insensitive > > > Alternatively, check out imap_rfc822_parse_adrlist(). > > -adam > From soazine at erols.com Wed Sep 10 22:22:56 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 22:22:56 -0400 Subject: [nycphp-talk] can't populate db table with csv - I can't believethis! References: <029801c377ef$53cf00b0$67a76244@philofsoa> <3F5FC03D.4020707@nyphp.org> Message-ID: <02ca01c3780b$9d0e9da0$67a76244@philofsoa> Um, I don't understand. Every single thing should be encased in '' and is escaped with mysql_escape_string(). I know the basics of SQL too. I just can't do this bit of code! Phil ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Wednesday, September 10, 2003 8:22 PM Subject: Re: [nycphp-talk] can't populate db table with csv - I can't believethis! > > Phil, > > > Go to http://www.nordicnet.no/admin/alle_produkter.php and you can see > > the damage! > > You need to learn some basics of working with SQL. In MySQL, Oracle, PostgreSQL, and just about everything else, values should always be enclosed in single quotes [1]. > > With the SQL you show above, none of the values are enclosed in single quotes, and since one of the values contains a single quote itself, it gives an error. You'll also need to use mysql_escape_string() for every value you create a SQL statement from; this escapes special chars that SQL will interpret as having meaning. See http://php.net/mysql_escape_string > > > Otherwise, I'm going to have to send the code to you guys, along with > > the .csv file and maybe you can do what I cannot. I might as well quit > > this project! > > I think you might have to move to a pay-per-incident support plan :) > > But this is a simple problem to resolve; you should have no problem with it. > > H > > [1] For the purposes of this discussion > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Wed Sep 10 22:32:17 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 10 Sep 2003 22:32:17 -0400 Subject: [nycphp-talk] can't populate db table with csv - I can't believethis! Message-ID: yes, everything if the string being enclosed in single quotes contains an apostrophe, or other instance of a single quote, it will need to be escaped like \' I think that Hans is recommending using mysql_escape_string() to ensure that everything is escaped that might need it (like double quotes). HOWEVER if your php script is attempting to insert any variables, you will need to use double quotes in place of the single quote as the encapsulator. PHP doesn't parse within the single quote. You would still want to use mysql_escape_string() I always use double quotes even though it means that values are being parsed for no reason. It's just easier for me that way and I haven't (been fortunate enough to have) had a problem with it creating excessive load, yet. > Um, I don't understand. Every single thing should be encased in '' and is > escaped with mysql_escape_string(). I know the basics of SQL too. I just > can't do this bit of code! > > Phil > ----- Original Message ----- > From: "Hans Zaunere" > To: "NYPHP Talk" > Sent: Wednesday, September 10, 2003 8:22 PM > Subject: Re: [nycphp-talk] can't populate db table with csv - I can't > believethis! > > > > > > Phil, > > > > > Go to http://www.nordicnet.no/admin/alle_produkter.php and you can see > > > the damage! > > > > You need to learn some basics of working with SQL. In MySQL, Oracle, > PostgreSQL, and just about everything else, values should always be enclosed > in single quotes [1]. > > > > With the SQL you show above, none of the values are enclosed in single > quotes, and since one of the values contains a single quote itself, it gives > an error. You'll also need to use mysql_escape_string() for every value you > create a SQL statement from; this escapes special chars that SQL will > interpret as having meaning. See http://php.net/mysql_escape_string > > > > > Otherwise, I'm going to have to send the code to you guys, along with > > > the .csv file and maybe you can do what I cannot. I might as well quit > > > this project! > > > > I think you might have to move to a pay-per-incident support plan :) > > > > But this is a simple problem to resolve; you should have no problem with > it. > > > > H > > > > [1] For the purposes of this discussion > > > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From soazine at erols.com Wed Sep 10 22:35:36 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 10 Sep 2003 22:35:36 -0400 Subject: [nycphp-talk] can't populate db table with csv - Ican't believethis! References: Message-ID: <031c01c3780d$61b3b0e0$67a76244@philofsoa> Um, guys I &*AM* using double quotes AND single quotes AND mysql_escape_string().. see for yourself: $rowNumber = 1; $sql = ''; $startSQL = ''; $varcharArray = array('varenr', 'navn', 'farge_code'); while ($row = fgetcsv($fileID, 100000, ',')) { if ($rowNumber == 1) { $startSQL .= 'INSERT INTO nnet_produkt('; for ($i = 0; $i < sizeof($row); $i++) $startSQL .= 'nnet_produkt_' . $row[$i] . ', '; $startSQL = trim($startSQL, ', ') . ') VALUES ('; } if ($rowNumber > 1) { for ($i = 0; $i < sizeof($row); $i++) { print_r("row number $rowNumber: " . $row[$i] . "\n

    "); if (!in_array($row[$i], $varcharArray) && strlen($row[$i]) > 0) { $sql .= $row[$i] . ', '; } elseif (strlen($row[$i]) > 0) { $sql .= "'" . mysql_escape_string(htmlspecialchars($row[$i])) . "', "; } elseif (!in_array($row[$i], $varcharArray)) { $sql .= 0 . ', '; } else { $sql .= "'', "; } } $sql = $startSQL . trim($sql) . ')'; } if ($rowNumber > 1) { print_r($sql . "\n

    "); if (!mysql_query($sql)) die('Could not perform insert: ' . $sql . ' ' . mysql_error()); $sql = ''; } $rowNumber++; } Phil ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Wednesday, September 10, 2003 10:32 PM Subject: Re: [nycphp-talk] can't populate db table with csv - Ican't believethis! > yes, everything > > if the string being enclosed in single quotes contains an apostrophe, or > other instance of a single quote, it will need to be escaped like \' > > I think that Hans is recommending using mysql_escape_string() to ensure > that everything is escaped that might need it (like double quotes). > > > HOWEVER > > if your php script is attempting to insert any variables, you will need > to use double quotes in place of the single quote as the encapsulator. > > PHP doesn't parse within the single quote. > > You would still want to use mysql_escape_string() > > > I always use double quotes even though it means that values are being > parsed for no reason. It's just easier for me that way and I haven't > (been fortunate enough to have) had a problem with it creating excessive > load, yet. > > > > > > > Um, I don't understand. Every single thing should be encased in '' and is > > escaped with mysql_escape_string(). I know the basics of SQL too. I just > > can't do this bit of code! > > > > Phil > > ----- Original Message ----- > > From: "Hans Zaunere" > > To: "NYPHP Talk" > > Sent: Wednesday, September 10, 2003 8:22 PM > > Subject: Re: [nycphp-talk] can't populate db table with csv - I can't > > believethis! > > > > > > > > > > Phil, > > > > > > > Go to http://www.nordicnet.no/admin/alle_produkter.php and you can see > > > > the damage! > > > > > > You need to learn some basics of working with SQL. In MySQL, Oracle, > > PostgreSQL, and just about everything else, values should always be > enclosed > > in single quotes [1]. > > > > > > With the SQL you show above, none of the values are enclosed in single > > quotes, and since one of the values contains a single quote itself, it > gives > > an error. You'll also need to use mysql_escape_string() for every > value you > > create a SQL statement from; this escapes special chars that SQL will > > interpret as having meaning. See http://php.net/mysql_escape_string > > > > > > > Otherwise, I'm going to have to send the code to you guys, along with > > > > the .csv file and maybe you can do what I cannot. I might as > well quit > > > > this project! > > > > > > I think you might have to move to a pay-per-incident support plan :) > > > > > > But this is a simple problem to resolve; you should have no problem with > > it. > > > > > > H > > > > > > [1] For the purposes of this discussion > > > > > > > > > _______________________________________________ > > > talk mailing list > > > talk at lists.nyphp.org > > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Thu Sep 11 00:07:25 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 11 Sep 2003 00:07:25 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <20030910224217.23439.qmail@web14301.mail.yahoo.com> Message-ID: <000301c3781a$37776440$6401a8c0@EZDSDELL> Agreed...six thousand characters to check an email address seems excessive. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Wednesday, September 10, 2003 5:42 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Sneaking in unwanted characters --- Jeff wrote: > "The most comprehensive regular expression currently available for > testing if an email address is valid was published in Mastering Regular > Expressions from O'Reilly Publishing. It appears on page 316 and weighs > in at more than six thousand characters...." > > I'm sure there's a better way. Most of the RFCs either have example regular expressions or a very specific grammar that can be used to build one. I've seen that one in the back of the O'Reilly book, and my instinct tells me it shouldn't have to be that complicated. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Thu Sep 11 00:07:25 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 11 Sep 2003 00:07:25 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: <3F5FAD13.8050600@chxo.com> Message-ID: <000501c3781a$38e8f5a0$6401a8c0@EZDSDELL> The directory /var/www/html as the Apache document root seems to be the default location when installing Red Hat. Found this on Google: http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/ref-guide/s1-ins tallation-upgradingapache.html "In the version of Apache included in Red Hat Linux 7.1, the DocumentRoot is /var/www/html. " I recently installed Red Hat 9 and this is still the default DocumentRoot directory. Sure...you could make DocumentRoot just about any directory you want as long as you change the httpd.conf file. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Snyder Sent: Wednesday, September 10, 2003 6:01 PM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting This could be one of those areas where I'm not entirely clear on Unix philosophy, but I think of /var as being for data of a more transient nature, and subject to overwrite on OS upgrade. Also, most distros don't give /var much space by default. I consider /home and /usr/local as safer places for long-term storage. I generally put virtual host webroots in /home/domain/http for single-site domains, or /home/orgname/domain/http for organizations with multiple domains. csnyder Daniel Kushner wrote: >My comments: > >DocumentRoot of the Virtual Hosts don't need be under the main document root >(/var/www/html). They can be where ever you want (e.g.: >/home/daniel/www/project1) > >My name is Daniel (not Dan) :) > >--Daniel > > > >>-----Original Message----- >>From: talk-bounces at lists.nyphp.org >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff >>Sent: Wednesday, September 10, 2003 5:24 PM >>To: 'NYPHP Talk' >>Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting >> >> >>After posting a message concerning virtual hosting, I assembled the >>different ideas/suggestions into a single article. Below is the link to >>the draft version. Please comment and let me know if anything has been >>overlooked or requires clarification. >> >>http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt >> >>Jeff Siegel >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Thu Sep 11 01:26:26 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 11 Sep 2003 01:26:26 -0400 Subject: [nycphp-talk] Sneaking in unwanted characters In-Reply-To: <006001c377d2$a41f7b70$6401a8c0@EZDSDELL> References: <006001c377d2$a41f7b70$6401a8c0@EZDSDELL> Message-ID: <20030911052626.GA25015@panix.com> On Wed, Sep 10, 2003 at 03:34:55PM -0400, Jeff wrote: > > Somehow someone managed to sneak through an email address with a www at > the beginning and I'm a bit puzzled as to how they managed to do it. You posted the actual address later on in the thread. What happens if you put in that email address yourself? Does it get through? If so, then there's definitely a flaw in the code. Perhaps the variable being checked isn't the same as the one that gets used. If not, maybe there's some other older version of the scripts laying around that the person in question used. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From lists at ny-tech.net Thu Sep 11 01:28:29 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Thu, 11 Sep 2003 01:28:29 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: <000501c3781a$38e8f5a0$6401a8c0@EZDSDELL> Message-ID: <000201c37825$89dea9e0$6401a8c0@main> Not sure about Ensim or anything else, but servers running Cpanel/WHM control panels usually have /home/USERNAME as the document root for a user. I'm pretty sure that quite a lot of virtual hosting providers use a separate drive/partition for user data, such as /home. -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, September 11, 2003 12:07 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting The directory /var/www/html as the Apache document root seems to be the default location when installing Red Hat. Found this on Google: http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/ref-guide/s1-ins tallation-upgradingapache.html "In the version of Apache included in Red Hat Linux 7.1, the DocumentRoot is /var/www/html. " I recently installed Red Hat 9 and this is still the default DocumentRoot directory. Sure...you could make DocumentRoot just about any directory you want as long as you change the httpd.conf file. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Snyder Sent: Wednesday, September 10, 2003 6:01 PM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting This could be one of those areas where I'm not entirely clear on Unix philosophy, but I think of /var as being for data of a more transient nature, and subject to overwrite on OS upgrade. Also, most distros don't give /var much space by default. I consider /home and /usr/local as safer places for long-term storage. I generally put virtual host webroots in /home/domain/http for single-site domains, or /home/orgname/domain/http for organizations with multiple domains. csnyder Daniel Kushner wrote: >My comments: > >DocumentRoot of the Virtual Hosts don't need be under the main document root >(/var/www/html). They can be where ever you want (e.g.: >/home/daniel/www/project1) > >My name is Daniel (not Dan) :) > >--Daniel > > > >>-----Original Message----- >>From: talk-bounces at lists.nyphp.org >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff >>Sent: Wednesday, September 10, 2003 5:24 PM >>To: 'NYPHP Talk' >>Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting >> >> >>After posting a message concerning virtual hosting, I assembled the >>different ideas/suggestions into a single article. Below is the link to >>the draft version. Please comment and let me know if anything has been >>overlooked or requires clarification. >> >>http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt >> >>Jeff Siegel >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk >> >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Thu Sep 11 07:02:10 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 11 Sep 2003 07:02:10 -0400 Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting In-Reply-To: <000201c37825$89dea9e0$6401a8c0@main> Message-ID: <000701c37854$26145ac0$6401a8c0@EZDSDELL> That's my experience too...but as pointed out in the article (and perhaps it needs to be made clearer) the actual path could be whatever works for you. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Nasir Zubair Sent: Thursday, September 11, 2003 12:28 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting Not sure about Ensim or anything else, but servers running Cpanel/WHM control panels usually have /home/USERNAME as the document root for a user. I'm pretty sure that quite a lot of virtual hosting providers use a separate drive/partition for user data, such as /home. -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, September 11, 2003 12:07 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting The directory /var/www/html as the Apache document root seems to be the default location when installing Red Hat. Found this on Google: http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/ref-guide/s1-ins tallation-upgradingapache.html "In the version of Apache included in Red Hat Linux 7.1, the DocumentRoot is /var/www/html. " I recently installed Red Hat 9 and this is still the default DocumentRoot directory. Sure...you could make DocumentRoot just about any directory you want as long as you change the httpd.conf file. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Snyder Sent: Wednesday, September 10, 2003 6:01 PM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting This could be one of those areas where I'm not entirely clear on Unix philosophy, but I think of /var as being for data of a more transient nature, and subject to overwrite on OS upgrade. Also, most distros don't give /var much space by default. I consider /home and /usr/local as safer places for long-term storage. I generally put virtual host webroots in /home/domain/http for single-site domains, or /home/orgname/domain/http for organizations with multiple domains. csnyder Daniel Kushner wrote: >My comments: > >DocumentRoot of the Virtual Hosts don't need be under the main document root >(/var/www/html). They can be where ever you want (e.g.: >/home/daniel/www/project1) > >My name is Daniel (not Dan) :) > >--Daniel > > > >>-----Original Message----- >>From: talk-bounces at lists.nyphp.org >>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff >>Sent: Wednesday, September 10, 2003 5:24 PM >>To: 'NYPHP Talk' >>Subject: [nycphp-talk] FUNDAMENTALS Article on Virtual Hosting >> >> >>After posting a message concerning virtual hosting, I assembled the >>different ideas/suggestions into a single article. Below is the link to >>the draft version. Please comment and let me know if anything has been >>overlooked or requires clarification. >> >>http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt >> >>Jeff Siegel >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk >> >> > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From evan.heller at alum.rpi.edu Thu Sep 11 17:14:39 2003 From: evan.heller at alum.rpi.edu (Evan Heller) Date: Thu, 11 Sep 2003 17:14:39 -0400 Subject: [nycphp-talk] windows help OT Message-ID: <001f01c378a9$b7174eb0$6501a8c0@palacenew> Ok, somehow my windows machine was compromised and started to send out a dos attack against an irc server (so i was told). I do keep up with the patches and I run windows 2000 server. I do not run IIS. I also run norton antivuris corporate and have come up with nothing. I could not find anything with a trojan horse cleaner nor could I detect if I was compromised. Does anyone have any way of determining if I was compromised? Any utilities I could use to check this out without the hassle of a rebuild of the entire machine. I would like to avoid rebuilding but what other choice do I have if I cannot determine the cause of the intrusion and the extend of the damage. (as of now I can see no damage). -Evan From markert at optonline.net Thu Sep 11 20:52:13 2003 From: markert at optonline.net (John W. Markert) Date: Thu, 11 Sep 2003 20:52:13 -0400 Subject: [nycphp-talk] Sessions help Message-ID: <00a501c378c8$1b3cfd40$0300a8c0@dads> When I execute the following code: -------------- -------------- I get the following error: -------------------------------- Warning: session_start() [function.session-start]: open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 retStat is: 1 Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 ---------------------------- Do I interpret this as I am missing a /tmp directory? If so, what is that a subdirectory of? Thanks, John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Thu Sep 11 21:43:21 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 11 Sep 2003 21:43:21 -0400 Subject: [nycphp-talk] Sessions help Message-ID: even tho the errors are reporting an error with line 2, which would be the $retStat = session_start(); line, make sure that there is NOTHING above the opening This is a multi-part message in MIME format. > > > When I execute the following code: > > -------------- > > $retStat = session_start(); > echo "retStat is: $retStat"; > ?> > > -------------- > > I get the following error: > > -------------------------------- > > > Warning: session_start() [function.session-start]: open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > retStat is: 1 > Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 > > Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 > ---------------------------- > > Do I interpret this as I am missing a /tmp directory? If so, what is that a subdirectory of? > > Thanks, > > John > > ___________________________________________ > > John W. Markert > 14 Joanna Way > Kinnelon, NJ 07405 > Phone: (973)838-8956 > Cell: (201)788-1740 > Fax: (973)838-4561 > email: markert at optonline.net > > From chendry at nyc.rr.com Thu Sep 11 21:45:34 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 11 Sep 2003 21:45:34 -0400 Subject: [nycphp-talk] Sessions help In-Reply-To: <00a501c378c8$1b3cfd40$0300a8c0@dads> Message-ID: sounds like you're on the right track, perhaps if you set your session.save_path in php.ini to an actual directory on your C drive, that'll fix things up...ie, session.save_path="c:/tmp" (making sure c:/tmp exists, of course) C -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of John W. Markert Sent: Thursday, September 11, 2003 8:52 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Sessions help When I execute the following code: -------------- -------------- I get the following error: -------------------------------- Warning: session_start() [function.session-start]: open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 retStat is: 1 Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 ---------------------------- Do I interpret this as I am missing a /tmp directory? If so, what is that a subdirectory of? Thanks, John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From markert at optonline.net Thu Sep 11 21:59:17 2003 From: markert at optonline.net (John W. Markert) Date: Thu, 11 Sep 2003 21:59:17 -0400 Subject: [nycphp-talk] Sessions help References: Message-ID: <00fc01c378d1$79d89180$0300a8c0@dads> Brian & Christopher... Thanks so much for your help. I had never configured session.save_path when I installed PHP. John ----- Original Message ----- From: Christopher Hendry To: NYPHP Talk Sent: Thursday, September 11, 2003 9:45 PM Subject: RE: [nycphp-talk] Sessions help sounds like you're on the right track, perhaps if you set your session.save_path in php.ini to an actual directory on your C drive, that'll fix things up...ie, session.save_path="c:/tmp" (making sure c:/tmp exists, of course) C -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of John W. Markert Sent: Thursday, September 11, 2003 8:52 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Sessions help When I execute the following code: -------------- -------------- I get the following error: -------------------------------- Warning: session_start() [function.session-start]: open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 retStat is: 1 Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 ---------------------------- Do I interpret this as I am missing a /tmp directory? If so, what is that a subdirectory of? Thanks, John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ny-tech.net Fri Sep 12 00:29:00 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Fri, 12 Sep 2003 00:29:00 -0400 Subject: [nycphp-talk] Get the value of a variable regardless of GET or POST In-Reply-To: <00fc01c378d1$79d89180$0300a8c0@dads> Message-ID: <000401c378e6$6553fc80$6401a8c0@main> Right now I'm using the following code to get the value of $action, since I'm either mixing GET/POST within my project OR am not sure about how the template will be setup ( yet ). $action = (empty($_POST['action'])) ? $_GET['action'] : ""; Is there another way of acomplishing the same thing? From bpang at bpang.com Fri Sep 12 00:38:03 2003 From: bpang at bpang.com (Brian Pang) Date: Fri, 12 Sep 2003 00:38:03 -0400 Subject: [nycphp-talk] Get the value of a variable regardless of GET or POST Message-ID: $_REQUEST['action'] or, you can turn on register_globals and access it as $action, but I wouldn't advise it. Using the $_REQUEST array is good. Be aware of the "security" implications, however, that someone could override intended $_POST vars by appending to the query string. Also note that you can dynamically add to the $_REQUEST array, but those values will not be available in $_POST or $_GET > Right now I'm using the following code to get the value of $action, since > I'm either mixing GET/POST within my project OR am not sure about how the > template will be setup ( yet ). > > $action = (empty($_POST['action'])) ? $_GET['action'] : ""; > > Is there another way of acomplishing the same thing? > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From xml at aumcomputers.com Fri Sep 12 04:07:01 2003 From: xml at aumcomputers.com (Anirudh Zala) Date: Fri, 12 Sep 2003 13:37:01 +0530 Subject: [nycphp-talk] Script terminates after certain amount of time period References: Message-ID: <03d401c37905$0fffb700$3500a8c0@com1> Thanks all, BUT nothing is working. I have also increased memory limit upto 20MB, and tried all of your's suggestions, but still result is 0. While testing this script on Netscape and other browser same error occures except message is different that "Document contains no data". Looks like it needs huge amount of memory resources as finally over 15 MB PDF document is to be created by that script. Perhaps Apache or Php is not able to handle this much amount of data in memory. Any other suggestions will be welcomed. Thanks Anirudh Zala ----- Original Message ----- From: To: "NYPHP Talk" Sent: Tuesday, 09 September, 2003 9:02 PM Subject: RE: [nycphp-talk] Script terminates after certain amount of time period > Chris is right, I would pull it up in another browser, just to make sure > that you are actually getting the real error message. > > Also, depending on how big the PDF files are that are being created, you may > want to look into the memory limit entry in php.ini, to make sure that you > have enough to allow the PDF to be created. > > memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) > > Sorry, I came into this post late, please excuse me if this has already been > suggested. > > Good Luck! > > Tom > > > > > > *************************************************** > What's Tom listening to right now? Find out here: > http://www.supertom.com/current_track.php > > > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > Sent: Tuesday, September 09, 2003 11:19 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > period > > > --- Anirudh Zala wrote: > > Chris, As i have mentioned, it is also not working at all, just "Page > > can not be displayed" after few mins. Looks like browser loose > > connection with server. > > Read my response again. Specifically: > > > > 2. Are you using IE? Don't. > > What I meant by this is that IE is likely giving you the BS error message, > and > it isn't the least bit helpful. In fact, it is usually very misleading. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From cahoyos at us.ibm.com Fri Sep 12 05:54:01 2003 From: cahoyos at us.ibm.com (Carlos A Hoyos) Date: Fri, 12 Sep 2003 11:54:01 +0200 Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <03d401c37905$0fffb700$3500a8c0@com1> Message-ID: Start by modify your program to run from the command line (take the arguments via argv, and write the output to disk). This will allow you to do some profiling and find out what execution time and resources usage are. If you can't optimize it, you will have to fork it: When the user calls your script, you execute your pdf-generator program in the background via "exec" and just echo a message that the "pdf is being generated" and some javascript that after some few seconds will change the location to a second php page. This second page will check if the pdf generator has already created the file, and if it has it will serve it, otherwise it will wait for another 10 seconds before reloading. The whole thing is not hard to implement, but be careful about the little details and security validation in each of the steps. Carlos "Anirudh Zala" .com> cc: Sent by: Subject: Re: [nycphp-talk] Script terminates after certain amount of time period talk-bounces at list s.nyphp.org 09/12/2003 10:07 AM Please respond to NYPHP Talk Thanks all, BUT nothing is working. I have also increased memory limit upto 20MB, and tried all of your's suggestions, but still result is 0. While testing this script on Netscape and other browser same error occures except message is different that "Document contains no data". Looks like it needs huge amount of memory resources as finally over 15 MB PDF document is to be created by that script. Perhaps Apache or Php is not able to handle this much amount of data in memory. Any other suggestions will be welcomed. Thanks Anirudh Zala From tom at supertom.com Fri Sep 12 08:01:48 2003 From: tom at supertom.com (tom at supertom.com) Date: Fri, 12 Sep 2003 08:01:48 -0400 Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <03d401c37905$0fffb700$3500a8c0@com1> Message-ID: Anirudh, If you try this with a "small" PDF (like 1 page, light graphics), do you still have the same results? Thanks, Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Anirudh Zala Sent: Friday, September 12, 2003 4:07 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Script terminates after certain amount of time period Thanks all, BUT nothing is working. I have also increased memory limit upto 20MB, and tried all of your's suggestions, but still result is 0. While testing this script on Netscape and other browser same error occures except message is different that "Document contains no data". Looks like it needs huge amount of memory resources as finally over 15 MB PDF document is to be created by that script. Perhaps Apache or Php is not able to handle this much amount of data in memory. Any other suggestions will be welcomed. Thanks Anirudh Zala ----- Original Message ----- From: To: "NYPHP Talk" Sent: Tuesday, 09 September, 2003 9:02 PM Subject: RE: [nycphp-talk] Script terminates after certain amount of time period > Chris is right, I would pull it up in another browser, just to make sure > that you are actually getting the real error message. > > Also, depending on how big the PDF files are that are being created, you may > want to look into the memory limit entry in php.ini, to make sure that you > have enough to allow the PDF to be created. > > memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) > > Sorry, I came into this post late, please excuse me if this has already been > suggested. > > Good Luck! > > Tom > > > > > > *************************************************** > What's Tom listening to right now? Find out here: > http://www.supertom.com/current_track.php > > > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > Sent: Tuesday, September 09, 2003 11:19 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > period > > > --- Anirudh Zala wrote: > > Chris, As i have mentioned, it is also not working at all, just "Page > > can not be displayed" after few mins. Looks like browser loose > > connection with server. > > Read my response again. Specifically: > > > > 2. Are you using IE? Don't. > > What I meant by this is that IE is likely giving you the BS error message, > and > it isn't the least bit helpful. In fact, it is usually very misleading. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Fri Sep 12 10:13:35 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 12 Sep 2003 07:13:35 -0700 (PDT) Subject: [nycphp-talk] Sessions help In-Reply-To: <00a501c378c8$1b3cfd40$0300a8c0@dads> Message-ID: On Thu, 11 Sep 2003, John W. Markert wrote: You have to specify your session directory in your php.ini file which should reside in your windows directory. Peter Lehrer > When I execute the following code: > > -------------- > > $retStat = session_start(); > echo "retStat is: $retStat"; > ?> > > -------------- > > I get the following error: > > -------------------------------- > > > Warning: session_start() [function.session-start]: open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 > retStat is: 1 > Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 > > Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 > ---------------------------- > > Do I interpret this as I am missing a /tmp directory? If so, what is that a subdirectory of? > > Thanks, > > John > > ___________________________________________ > > John W. Markert > 14 Joanna Way > Kinnelon, NJ 07405 > Phone: (973)838-8956 > Cell: (201)788-1740 > Fax: (973)838-4561 > email: markert at optonline.net > From lists at ny-tech.net Fri Sep 12 11:50:18 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Fri, 12 Sep 2003 11:50:18 -0400 Subject: [nycphp-talk] Sessions help In-Reply-To: Message-ID: <001001c37945$92728970$6401a8c0@main> Think the problem was solved. However, the easiest way to solve it is to create "tmp" directory in your "C:" drive. C:\tmp maps to /tmp - Nasir -----Original Message----- From: Peter Lehrer [mailto:pl at eskimo.com] Sent: Friday, September 12, 2003 10:14 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Sessions help On Thu, 11 Sep 2003, John W. Markert wrote: You have to specify your session directory in your php.ini file which should reside in your windows directory. Peter Lehrer > When I execute the following code: > > -------------- > > $retStat = session_start(); > echo "retStat is: $retStat"; > ?> > > -------------- > > I get the following error: > > -------------------------------- > > > Warning: session_start() [function.session-start]: > open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No > such file or directory (2) in c:\program files\apache > group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session > cookie - headers already sent by (output started at c:\program > files\apache group\apache\htdocs\test\session1.php:2) in c:\program > files\apache group\apache\htdocs\test\session1.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session > cache limiter - headers already sent (output started at c:\program > files\apache group\apache\htdocs\test\session1.php:2) in c:\program files\apache group\apache\htdocs\test\session1.php on line 2 retStat is: 1 > Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 > > Warning: Unknown(): Failed to write session data (files). Please > verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 > ---------------------------- > > Do I interpret this as I am missing a /tmp directory? If so, what is > that a subdirectory of? > > Thanks, > > John > > ___________________________________________ > > John W. Markert > 14 Joanna Way > Kinnelon, NJ 07405 > Phone: (973)838-8956 > Cell: (201)788-1740 > Fax: (973)838-4561 > email: markert at optonline.net > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Fri Sep 12 15:39:12 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 12 Sep 2003 15:39:12 -0400 (EDT) Subject: [nycphp-talk] recommend something CMS-ish In-Reply-To: <000401c378e6$6553fc80$6401a8c0@main> References: <000401c378e6$6553fc80$6401a8c0@main> Message-ID: Hey y'all. Today I'm looking for recommendations for something that I guess they call a Content Management System, a thing that will allow clients themselves to edit their own HTML pages (or Smarty templates as the case may be) so I don't have to do it, and without them having to have a shell or FTP account on the shared server where their sites live -- i.e., browser-based. They should be able to upload, download, move/copy/delete files and directories, and edit things in place as well (if they're fearless and foolish like... some people). If it's something that runs as me (as I imagine it will have to), then it should also feature activity logging so we'll know whom to point the finger at when something gets broken. Setup should be reasonably easy, the appearance should be easy to customize and it should cost, oh, I don't know, how about US$0.00 ? I've read a little about PostNuke and it seems like a 250-pound Swiss army knife -- but if it's just monsterously fabulous, OK I'll take it. I'm doing some homework at http://www.thefreecountry.com/php/contentmanagement.shtml but I thought I'd ask here as well. Thanks. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From chendry at nyc.rr.com Fri Sep 12 15:51:11 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Fri, 12 Sep 2003 15:51:11 -0400 Subject: [nycphp-talk] recommend something CMS-ish In-Reply-To: Message-ID: I've been happy with: http://www.webedpro.com/ (no affiliation) - but I don't think it offers logging, and only works on IE5.5+/PC -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org -> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Mintz -> Sent: Friday, September 12, 2003 3:39 PM -> To: NYPHP Talk -> Subject: [nycphp-talk] recommend something CMS-ish -> -> -> -> Hey y'all. -> -> Today I'm looking for recommendations for something that I guess -> they call -> a Content Management System, a thing that will allow clients -> themselves to -> edit their own HTML pages (or Smarty templates as the case may be) so I -> don't have to do it, and without them having to have a shell or FTP -> account on the shared server where their sites live -- i.e., -> browser-based. They should be able to upload, download, move/copy/delete -> files and directories, and edit things in place as well (if they're -> fearless and foolish like... some people). -> -> If it's something that runs as me (as I imagine it will have to), then it -> should also feature activity logging so we'll know whom to point the -> finger at when something gets broken. -> -> Setup should be reasonably easy, the appearance should be easy to -> customize and it should cost, oh, I don't know, how about US$0.00 ? -> -> I've read a little about PostNuke and it seems like a 250-pound -> Swiss army -> knife -- but if it's just monsterously fabulous, OK I'll take it. -> -> I'm doing some homework at -> http://www.thefreecountry.com/php/contentmanagement.shtml but I thought -> I'd ask here as well. -> -> Thanks. -> -> --- -> David Mintz -> http://davidmintz.org/ -> Email: See http://dmintzweb.com/whitelist.php first! -> -> "Y d?le p'abajo" -> -> Tito Rojas -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> From soazine at erols.com Fri Sep 12 16:27:07 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 12 Sep 2003 16:27:07 -0400 Subject: [nycphp-talk] had to give you guys a break Message-ID: <000b01c3796c$3d4b4dc0$67a76244@philofsoa> I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement: $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p, nnet_produkt_varegruppe v, ' . ' nnet_produkt_kvalitet k, nnet_produkt_storrelse s ' . 'WHERE p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' AND p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' AND p.nnet_produkt_storrelse_id (+) = s.nnet_produkt_storrelse_id ' . ' AND p.nnet_produkt_kvalitet_id (+) = k.nnet_produkt_kvalitet_id'; I am getting "invalid SQL near (+). That is totally VALID SQL syntax for an outer join! If mySQL doesn't allow for that, what am I supposed to do in lieu of the fact that I have to logically join two tables together or if the one is null (the case for an outer join)? Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From dkrook at hotmail.com Fri Sep 12 16:31:53 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 12 Sep 2003 16:31:53 -0400 Subject: [nycphp-talk] had to give you guys a break Message-ID: Phil, the (+) is only valid for joins in the Oracle dialect of SQL _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From nestorflorez at earthlink.net Fri Sep 12 16:34:11 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Fri, 12 Sep 2003 13:34:11 -0700 (GMT-07:00) Subject: [nycphp-talk] had to give you guys a break Message-ID: <10131463.1063398851497.JavaMail.root@waldorf.psp.pas.earthlink.net> Maybe, My eyes are old but I do not see the f table in your from statement. Nestor :-) -----Original Message----- From: Phil Powell Sent: Sep 12, 2003 1:27 PM To: NYPHP Talk Subject: [nycphp-talk] had to give you guys a break

    I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement:

    $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' .
    ' f.nnet_produkt_farge_navn, ' .
    ' s.nnet_produkt_storrelse_navn, ' .
    ' k.nnet_produkt_kvalitet_navn, ' .
    ' p.* ' .
    'FROM nnet_produkt p, nnet_produkt_varegruppe v, ' .
    ' nnet_produkt_kvalitet k, nnet_produkt_storrelse s ' .
    'WHERE p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' .
    ' AND p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' .
    ' AND p.nnet_produkt_storrelse_id (+) = s.nnet_produkt_storrelse_id ' .
    ' AND p.nnet_produkt_kvalitet_id (+) = k.nnet_produkt_kvalitet_id';
    I am getting "invalid SQL near (+). That is totally VALID SQL syntax for an outer join! If mySQL doesn't allow for that, what am I supposed to do in lieu of the fact that I have to logically join two tables together or if the one is null (the case for an outer join)?
    Phil
    From hans at nyphp.org Fri Sep 12 16:47:26 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 12 Sep 2003 16:47:26 -0400 Subject: [nycphp-talk] windows help OT In-Reply-To: <001f01c378a9$b7174eb0$6501a8c0@palacenew> References: <001f01c378a9$b7174eb0$6501a8c0@palacenew> Message-ID: <3F6230DE.1080806@nyphp.org> I'm sure there are many virus and trojan detection system available for Windows (after all, it's had it's practice :) but Norton should take care of it. Are you sure Norton's virus definition files are updated? Before I jump through hoops, however, I'd make them prove that there was a DoS from your box. People, especially those involved with IRC, are often quick to jump to conclusions. Put the ball in their court, first. H Evan Heller wrote: > Ok, somehow my windows machine was compromised and started to send out a dos > attack against an irc server (so i was told). I do keep up with the patches > and I run windows 2000 server. I do not run IIS. I also run norton antivuris > corporate and have come up with nothing. I could not find anything with a > trojan horse cleaner nor could I detect if I was compromised. > > Does anyone have any way of determining if I was compromised? Any utilities > I could use to check this out without the hassle of a rebuild of the entire > machine. I would like to avoid rebuilding but what other choice do I have if > I cannot determine the cause of the intrusion and the extend of the damage. > (as of now I can see no damage). > > -Evan > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jim at bizcomputinginc.com Fri Sep 12 16:57:27 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Fri, 12 Sep 2003 16:57:27 -0400 Subject: [nycphp-talk] had to give you guys a break References: <000b01c3796c$3d4b4dc0$67a76244@philofsoa> Message-ID: <00fe01c37970$795668f0$6501a8c0@Notebook> (+)= is not valid ANSI SQL, it's Oracle SQL you need to use join syntax. $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p ' . ' JOIN nnet_produkt_varegruppe v ON p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' JOIN whatevertable_is_f f ON p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' LEFT JOIN nnet_produkt_storrelse s ON p.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id ' . ' LEFT JOIN nnet_produkt_kvalitet k ON p.nnet_produkt_kvalitet_id = k.nnet_produkt_kvalitet_id ' I Forget the Oracle syntax so if this is suppose to be a right join, just replace LEFT with RIGHT. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Friday, September 12, 2003 4:27 PM Subject: [nycphp-talk] had to give you guys a break I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement: $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p, nnet_produkt_varegruppe v, ' . ' nnet_produkt_kvalitet k, nnet_produkt_storrelse s ' . 'WHERE p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' AND p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' AND p.nnet_produkt_storrelse_id (+) = s.nnet_produkt_storrelse_id ' . ' AND p.nnet_produkt_kvalitet_id (+) = k.nnet_produkt_kvalitet_id'; I am getting "invalid SQL near (+). That is totally VALID SQL syntax for an outer join! If mySQL doesn't allow for that, what am I supposed to do in lieu of the fact that I have to logically join two tables together or if the one is null (the case for an outer join)? Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Fri Sep 12 17:07:35 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Fri, 12 Sep 2003 17:07:35 -0400 Subject: [nycphp-talk] had to give you guys a break References: <000b01c3796c$3d4b4dc0$67a76244@philofsoa> Message-ID: <013101c37971$e3a40b30$6501a8c0@Notebook> (+)= is not valid ANSI SQL, it's Oracle SQL you need to use join syntax. $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p ' . ' JOIN nnet_produkt_varegruppe v ON p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' JOIN whatevertable_is_f f ON p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' LEFT JOIN nnet_produkt_storrelse s ON p.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id ' . ' LEFT JOIN nnet_produkt_kvalitet k ON p.nnet_produkt_kvalitet_id = k.nnet_produkt_kvalitet_id ' I Forget the Oracle syntax so if this is suppose to be a right join, just replace LEFT with RIGHT. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Friday, September 12, 2003 4:27 PM Subject: [nycphp-talk] had to give you guys a break I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement: $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p, nnet_produkt_varegruppe v, ' . ' nnet_produkt_kvalitet k, nnet_produkt_storrelse s ' . 'WHERE p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' AND p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' AND p.nnet_produkt_storrelse_id (+) = s.nnet_produkt_storrelse_id ' . ' AND p.nnet_produkt_kvalitet_id (+) = k.nnet_produkt_kvalitet_id'; I am getting "invalid SQL near (+). That is totally VALID SQL syntax for an outer join! If mySQL doesn't allow for that, what am I supposed to do in lieu of the fact that I have to logically join two tables together or if the one is null (the case for an outer join)? Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen at musgrave.org Fri Sep 12 19:22:18 2003 From: stephen at musgrave.org (Stephen Musgrave) Date: Fri, 12 Sep 2003 19:22:18 -0400 Subject: [nycphp-talk] Pear: Mail Mime / Mail Message-ID: Hello all - Thank you to those who recommending using Pear's Mail Mime to overcome my multi-part email issues.. it works like a charm. However... .. I want to use it in SMTP mode so that if a recipient is unreachable, the bounces goes back to the sender, not the postmaster. When I make the call to factory() in SMTP mode and send the email, I notice that the "to" field comes up blank when I receive the email. (The "To" field is nonexistent in my mail reader.) I was getting the 'To' field just fine when the factory() call was in default mode (mail). Anybody have any ideas? Thanks, Stephen Musgrave // stephen at musgrave.org // http://musgrave.org From pl at eskimo.com Fri Sep 12 23:04:44 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 12 Sep 2003 20:04:44 -0700 (PDT) Subject: [nycphp-talk] installing PHP/MySQL on a Mac Message-ID: I would like to know about the process of installing PHP and MySQL on a Mac. Would the Mac OS have to be OS X (to take advantage of Free BSD)? Would it be similar to installing it on Free BSD (or Linux)? Does Mac OS X already come with Apache loaded and configured to serve pages through "localhost"? Any help would be appreciated. Yours, Peter Lehrer From alexander_chan at yahoo.com Fri Sep 12 23:12:37 2003 From: alexander_chan at yahoo.com (Alexander Chan) Date: Fri, 12 Sep 2003 20:12:37 -0700 (PDT) Subject: [nycphp-talk] installing PHP/MySQL on a Mac In-Reply-To: Message-ID: <20030913031237.41987.qmail@web11606.mail.yahoo.com> I have php running on mac os x .. OS X comes with apache. I downloaded a precompiled version of php at http://www.entropy.ch/software/macosx/php/. you won't have to do anything. Alex --- Peter Lehrer wrote: > I would like to know about the process of installing > PHP and MySQL on a > Mac. Would the Mac OS have to be OS X (to take > advantage of Free BSD)? > Would it be similar to installing it on Free BSD (or > Linux)? Does Mac OS X > already come with Apache loaded and configured to > serve pages through > "localhost"? > > Any help would be appreciated. > > Yours, > Peter Lehrer > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dkrook at hotmail.com Fri Sep 12 23:38:25 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 12 Sep 2003 23:38:25 -0400 Subject: [nycphp-talk] installing PHP/MySQL on a Mac Message-ID: Peter, You could compile from source as on any other Unix variant, but if you want to take advantage of Mac OS X's GUI to manage servers, Server Logistics (no affiliation) lets you do so through the System Preferences panel with their free precompiled binaries. They're pretty quick to update PHP, Apache, MySQL, and Tomcat when new releases come out. http://serverlogistics.com/software.php + Complete MySQL + Complete Apache 2 + Complete PHP + Complete Jakarta Tomcat >I would like to know about the process of installing PHP and MySQL on a >Mac. Would the Mac OS have to be OS X (to take advantage of Free BSD)? >Would it be similar to installing it on Free BSD (or Linux)? Does Mac OS X >already come with Apache loaded and configured to serve pages through >"localhost"? > >Any help would be appreciated. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From jonbaer at jonbaer.net Thu Sep 11 15:18:46 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 11 Sep 2003 15:18:46 -0400 Subject: [nycphp-talk] "micro offices" (ot) Message-ID: <001d01c37899$862de530$6400a8c0@thinkpad> greetings ... i currently have a few/handful php/mysql/security/wireless projects (and backed up on alot since my laptop had a fitz), but im looking for some open space to work vs. home, does anyone know where i could barter some work/time or if there are any other options like this: http://www.microoffice.us (there was another big one in nyc but i cant remember the name or if they went out of biz) id rather be close by to like-minded peer amp developers ... i just really need space + open lan connection. thanks. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From dkrook at hotmail.com Sat Sep 13 11:28:36 2003 From: dkrook at hotmail.com (D C Krook) Date: Sat, 13 Sep 2003 11:28:36 -0400 Subject: [nycphp-talk] "micro offices" (ot) Message-ID: Jon, The contractor-oriented dotcom I used to work for had a relationship with HQ Global Workplaces. They seem to still be in business, although they might be overkill for your needs. http://hq.com/ http://hq.com/products/?id=25§ion=IP If you want open space and an open LAN, you could just go to Bryant Park and/or the NYPL with a wireless card though. :) >i currently have a few/handful php/mysql/security/wireless projects (and >backed up on alot since my laptop had a fitz), but im looking for some open >space to work vs. home, does anyone know where i could barter some >work/time >or if there are any other options like this: > >http://www.microoffice.us > >(there was another big one in nyc but i cant remember the name or if they >went out of biz) > >id rather be close by to like-minded peer amp developers ... i just really >need space + open lan connection. thanks. > >- jon _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From shiflett at php.net Sat Sep 13 14:41:59 2003 From: shiflett at php.net (Chris Shiflett) Date: Sat, 13 Sep 2003 11:41:59 -0700 (PDT) Subject: [nycphp-talk] installing PHP/MySQL on a Mac In-Reply-To: Message-ID: <20030913184159.7128.qmail@web14301.mail.yahoo.com> --- Peter Lehrer wrote: > I would like to know about the process of installing PHP and MySQL > on a Mac. It is identical to installing it on another other Unix variant, assuming you compile your own Apache, MySQL, PHP, OpenSSL, and mod_ssl as I do. If you don't, you can just use the Apache that comes with Mac OS X, or you can use fink (http://fink.sourceforge.net/). Fink allows you to install/update any software just as easily as you would on a Debian box (using apt-get), and it's really solid. I use it for everything that I'm not picky about (I'm picky about my AMP configuration). Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From stephen at musgrave.org Sat Sep 13 20:09:53 2003 From: stephen at musgrave.org (Stephen Musgrave) Date: Sat, 13 Sep 2003 20:09:53 -0400 Subject: [nycphp-talk] installing PHP/MySQL on a Mac In-Reply-To: <20030913031237.41987.qmail@web11606.mail.yahoo.com> Message-ID: I'll second this. I have been using Marc's packages for well over a year now.. good stuff.. never a problem. Stephen Musgrave // stephen at musgrave.org // http://musgrave.org // 718-486-6514 On 9/12/03 11:12 PM, "Alexander Chan" wrote: > I have php running on mac os x .. > OS X comes with apache. I downloaded a precompiled > version of php at > http://www.entropy.ch/software/macosx/php/. you won't > have to do anything. > > Alex > --- Peter Lehrer wrote: >> I would like to know about the process of installing >> PHP and MySQL on a >> Mac. Would the Mac OS have to be OS X (to take >> advantage of Free BSD)? >> Would it be similar to installing it on Free BSD (or >> Linux)? Does Mac OS X >> already come with Apache loaded and configured to >> serve pages through >> "localhost"? >> >> Any help would be appreciated. >> >> Yours, >> Peter Lehrer >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Sun Sep 14 09:22:26 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sun, 14 Sep 2003 09:22:26 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting Art. - Revised Message-ID: <004701c37ac3$3da08fd0$6401a8c0@EZDSDELL> The article on virtual hosting has been heavily revised. Please review it for accuracy and clarity (admittedly...you can only go so far in explaining things but make sure that all the important points have been addressed). This version, 1.2, contains a number of changes based on comments from list members. If there is anyone who had contributed a comment and did not receive a "credit" at the bottom of the article...please let me know. See: http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt Jeff Siegel From soazine at erols.com Sun Sep 14 20:06:41 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 14 Sep 2003 20:06:41 -0400 Subject: [nycphp-talk] had to give you guys a break References: Message-ID: <034c01c37b1d$3e3b5650$67a76244@philofsoa> What is the mySQL equivalent then? Online notes prove fruitless. :( Phil ----- Original Message ----- From: "D C Krook" To: Sent: Friday, September 12, 2003 4:31 PM Subject: Re: [nycphp-talk] had to give you guys a break > Phil, the (+) is only valid for joins in the Oracle dialect of SQL > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sun Sep 14 20:14:07 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 14 Sep 2003 20:14:07 -0400 Subject: [nycphp-talk] had to give you guys a break References: <000b01c3796c$3d4b4dc0$67a76244@philofsoa> <00fe01c37970$795668f0$6501a8c0@Notebook> Message-ID: <037301c37b1e$4803f4c0$67a76244@philofsoa> That produced a SQL syntax error as well, I'm afraid. :( Phil ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Friday, September 12, 2003 4:57 PM Subject: Re: [nycphp-talk] had to give you guys a break (+)= is not valid ANSI SQL, it's Oracle SQL you need to use join syntax. $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p ' . ' JOIN nnet_produkt_varegruppe v ON p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' JOIN whatevertable_is_f f ON p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' LEFT JOIN nnet_produkt_storrelse s ON p.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id ' . ' LEFT JOIN nnet_produkt_kvalitet k ON p.nnet_produkt_kvalitet_id = k.nnet_produkt_kvalitet_id ' I Forget the Oracle syntax so if this is suppose to be a right join, just replace LEFT with RIGHT. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Friday, September 12, 2003 4:27 PM Subject: [nycphp-talk] had to give you guys a break I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement: $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p, nnet_produkt_varegruppe v, ' . ' nnet_produkt_kvalitet k, nnet_produkt_storrelse s ' . 'WHERE p.nnet_produkt_varegruppe_code = v.nnet_produkt_varegruppe_code ' . ' AND p.nnet_produkt_farge_code = f.nnet_produkt_farge_code ' . ' AND p.nnet_produkt_storrelse_id (+) = s.nnet_produkt_storrelse_id ' . ' AND p.nnet_produkt_kvalitet_id (+) = k.nnet_produkt_kvalitet_id'; I am getting "invalid SQL near (+). That is totally VALID SQL syntax for an outer join! If mySQL doesn't allow for that, what am I supposed to do in lieu of the fact that I have to logically join two tables together or if the one is null (the case for an outer join)? Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Sun Sep 14 20:15:46 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sun, 14 Sep 2003 20:15:46 -0400 Subject: [nycphp-talk] had to give you guys a break In-Reply-To: <034c01c37b1d$3e3b5650$67a76244@philofsoa> References: <034c01c37b1d$3e3b5650$67a76244@philofsoa> Message-ID: <3F6504B2.4070201@nyphp.org> Phil Powell wrote: > What is the mySQL equivalent then? Online notes prove fruitless. :( The SQL standard is OUTER JOIN http://www.mysql.com/doc/en/Data_Manipulation.html H From soazine at erols.com Sun Sep 14 20:25:55 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 14 Sep 2003 20:25:55 -0400 Subject: [nycphp-talk] had to give you guys a break References: <034c01c37b1d$3e3b5650$67a76244@philofsoa> <3F6504B2.4070201@nyphp.org> Message-ID: <03bb01c37b1f$eda3bf40$67a76244@philofsoa> Ok, well, I am using OUTER JOINs in my syntax and it all broke apart until I combined what I learned in mySQL what what I've always understood INNER JOIN syntax to be: $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' . ' f.nnet_produkt_farge_navn, ' . ' s.nnet_produkt_storrelse_navn, ' . ' k.nnet_produkt_kvalitet_navn, ' . ' p.* ' . 'FROM nnet_produkt p, nnet_produkt_farge f, nnet_produkt_varegruppe v ' . ' LEFT JOIN nnet_produkt_storrelse s ON p.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id ' . ' LEFT JOIN nnet_produkt_kvalitet k ON p.nnet_produkt_kvalitet_id = k.nnet_produkt_kvalitet_id ' . 'WHERE v.nnet_produkt_varegruppe_code = p.nnet_produkt_varegruppe_code ' . ' AND f.nnet_produkt_farge_code = p.nnet_produkt_farge_code '; Unorthodox but it doesn't break. Phil ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Sunday, September 14, 2003 8:15 PM Subject: Re: [nycphp-talk] had to give you guys a break > > > Phil Powell wrote: > > > What is the mySQL equivalent then? Online notes prove fruitless. :( > > The SQL standard is OUTER JOIN > > http://www.mysql.com/doc/en/Data_Manipulation.html > > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sun Sep 14 20:36:38 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 14 Sep 2003 20:36:38 -0400 Subject: [nycphp-talk] had to give you guys a break References: <034c01c37b1d$3e3b5650$67a76244@philofsoa> <3F6504B2.4070201@nyphp.org> Message-ID: <03e401c37b21$6d8cff40$67a76244@philofsoa> I can't understand what your URL refers to! It's talking about SELECT statements, and I need to know about how it does outer joins (not straight joins, whatever those are) Phil ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Sunday, September 14, 2003 8:15 PM Subject: Re: [nycphp-talk] had to give you guys a break > > > Phil Powell wrote: > > > What is the mySQL equivalent then? Online notes prove fruitless. :( > > The SQL standard is OUTER JOIN > > http://www.mysql.com/doc/en/Data_Manipulation.html > > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Sun Sep 14 20:47:24 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sun, 14 Sep 2003 20:47:24 -0400 Subject: [nycphp-talk] had to give you guys a break In-Reply-To: <03e401c37b21$6d8cff40$67a76244@philofsoa> Message-ID: <002901c37b22$edd9e310$6401a8c0@EZDSDELL> This may be what you want. http://www.mysql.com/doc/en/JOIN.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 14, 2003 7:37 PM To: NYPHP Talk Subject: Re: [nycphp-talk] had to give you guys a break I can't understand what your URL refers to! It's talking about SELECT statements, and I need to know about how it does outer joins (not straight joins, whatever those are) Phil ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Sunday, September 14, 2003 8:15 PM Subject: Re: [nycphp-talk] had to give you guys a break > > > Phil Powell wrote: > > > What is the mySQL equivalent then? Online notes prove fruitless. :( > > The SQL standard is OUTER JOIN > > http://www.mysql.com/doc/en/Data_Manipulation.html > > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Sun Sep 14 22:00:30 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sun, 14 Sep 2003 22:00:30 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting Art. - Revised In-Reply-To: <004701c37ac3$3da08fd0$6401a8c0@EZDSDELL> References: <004701c37ac3$3da08fd0$6401a8c0@EZDSDELL> Message-ID: <3F651D3E.8090702@nyphp.org> Jeff wrote: > The article on virtual hosting has been heavily revised. Please review > it for accuracy and clarity (admittedly...you can only go so far in > explaining things but make sure that all the important points have been > addressed). > > This version, 1.2, contains a number of changes based on comments from > list members. If there is anyone who had contributed a comment and did > not receive a "credit" at the bottom of the article...please let me > know. > > See: http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt Looks great Jeff. It's been suggested that an appendix be added that covers Windows on the server side as well. I have little experience on this side of things, but maybe someone could contribute some notes, and we'll get them commited into the final version. Thanks, H From shiflett at php.net Sun Sep 14 23:24:48 2003 From: shiflett at php.net (Chris Shiflett) Date: Sun, 14 Sep 2003 20:24:48 -0700 (PDT) Subject: [nycphp-talk] had to give you guys a break In-Reply-To: <3F6504B2.4070201@nyphp.org> Message-ID: <20030915032448.33612.qmail@web14305.mail.yahoo.com> --- Hans Zaunere wrote: > Phil Powell wrote: > > > What is the mySQL equivalent then? Online notes prove fruitless. :( > > The SQL standard is OUTER JOIN > > http://www.mysql.com/doc/en/Data_Manipulation.html Just to offer more advice, here is a link that does a Google search for mysql join syntax: http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysql+join+syntax&btnG=Google+Search I'm not sure what "online notes" you were using, but you should try Google next time. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Sun Sep 14 23:39:35 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 14 Sep 2003 23:39:35 -0400 Subject: [nycphp-talk] had to give you guys a break References: <20030915032448.33612.qmail@web14305.mail.yahoo.com> Message-ID: <044501c37b3a$fc26d9b0$67a76244@philofsoa> Yep already went to that link and found some info on mysql.com on the way they do outer joins, the syntax is truly bizarre (I'm an Oracle guy) Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Sunday, September 14, 2003 11:24 PM Subject: Re: [nycphp-talk] had to give you guys a break > --- Hans Zaunere wrote: > > Phil Powell wrote: > > > > > What is the mySQL equivalent then? Online notes prove fruitless. :( > > > > The SQL standard is OUTER JOIN > > > > http://www.mysql.com/doc/en/Data_Manipulation.html > > Just to offer more advice, here is a link that does a Google search for mysql > join syntax: > > http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysql+join+syntax&btnG=Google+Search > > I'm not sure what "online notes" you were using, but you should try Google next > time. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From xml at aumcomputers.com Mon Sep 15 04:50:14 2003 From: xml at aumcomputers.com (Anirudh Zala) Date: Mon, 15 Sep 2003 14:20:14 +0530 Subject: [nycphp-talk] Script terminates after certain amount of time period References: Message-ID: <013901c37b66$d93cb1a0$3500a8c0@com1> Tom, No, problem doesn't occur in small pdf, script can generate file upto 2-3 MB of size that includes images and data. So Problem arise only when it is required to have PDF above 3 MB. During this process my script also interacts with Perl script that manipulates my images and php script uses those images in generating PDF. Hence 2 scripts working together. Thanks Anirudh Zala ----- Original Message ----- From: To: "NYPHP Talk" Sent: Friday, 12 September, 2003 5:31 PM Subject: RE: [nycphp-talk] Script terminates after certain amount of time period > Anirudh, > > If you try this with a "small" PDF (like 1 page, light graphics), do you > still have the same results? > > Thanks, > > Tom > > > > > > *************************************************** > What's Tom listening to right now? Find out here: > http://www.supertom.com/current_track.php > > > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Anirudh Zala > Sent: Friday, September 12, 2003 4:07 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > period > > > Thanks all, > > BUT nothing is working. I have also increased memory limit upto 20MB, and > tried all of your's suggestions, but still result is 0. While testing this > script on Netscape and other browser same error occures except message is > different that "Document contains no data". > > Looks like it needs huge amount of memory resources as finally over 15 MB > PDF document is to be created by that script. Perhaps Apache or Php is not > able to handle this much amount of data in memory. Any other suggestions > will be welcomed. > > Thanks > > Anirudh Zala > > ----- Original Message ----- > From: > To: "NYPHP Talk" > Sent: Tuesday, 09 September, 2003 9:02 PM > Subject: RE: [nycphp-talk] Script terminates after certain amount of time > period > > > > Chris is right, I would pull it up in another browser, just to make sure > > that you are actually getting the real error message. > > > > Also, depending on how big the PDF files are that are being created, you > may > > want to look into the memory limit entry in php.ini, to make sure that you > > have enough to allow the PDF to be created. > > > > memory_limit = 8M ; Maximum amount of memory a script may consume > (8MB) > > > > Sorry, I came into this post late, please excuse me if this has already > been > > suggested. > > > > Good Luck! > > > > Tom > > > > > > > > > > > > *************************************************** > > What's Tom listening to right now? Find out here: > > http://www.supertom.com/current_track.php > > > > > > > > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > > Sent: Tuesday, September 09, 2003 11:19 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > > period > > > > > > --- Anirudh Zala wrote: > > > Chris, As i have mentioned, it is also not working at all, just "Page > > > can not be displayed" after few mins. Looks like browser loose > > > connection with server. > > > > Read my response again. Specifically: > > > > > > 2. Are you using IE? Don't. > > > > What I meant by this is that IE is likely giving you the BS error message, > > and > > it isn't the least bit helpful. In fact, it is usually very misleading. > > > > Chris > > > > ===== > > Become a better Web developer with the HTTP Developer's Handbook > > http://httphandbook.org/ > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Mon Sep 15 07:17:32 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 07:17:32 -0400 Subject: [nycphp-talk] Off topic but...I have a small JSP project Message-ID: <000601c37b7a$f4fd1880$6401a8c0@EZDSDELL> Please contact me "off list" if you have the skills needed. Jeff Siegel From jsiegel1 at optonline.net Mon Sep 15 08:02:37 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 08:02:37 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows Message-ID: <001d01c37b81$41313f50$6401a8c0@EZDSDELL> We're at the final version for the article on virtual hosting (See v. 1.4 at: http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and the question has come up concerning doing virtual hosting on a Windows server in a development environment. So.......we're looking for volunteers to write this piece of the article. Who's ready to "step up to the plate"? Jeff Siegel From nyphp at websapp.com Mon Sep 15 08:12:42 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Mon, 15 Sep 2003 08:12:42 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows In-Reply-To: <001d01c37b81$41313f50$6401a8c0@EZDSDELL> Message-ID: > We're at the final version for the article on virtual hosting > (See v. 1.4 at: > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and There is still a tight connection between the original document root and the virtual host document roots. Quote: "Therefore, different projects will be in their own subdirectories under /var/www/html" This may be misleading and inaccurate. VirtualHost 1 can have a document root: /home/var/www and VirtualHost 2 can have a document root: /var/dev/site. Projects or Virtual Hosts are not necessarily sub directories of the original document root. > the question has come up concerning doing virtual hosting on a Windows > server in a development environment. > So.......we're looking for volunteers to write this piece of the > article. Who's ready to "step up to the plate"? Windows Apache has the same httpd.conf and therefore there is not difference. --Daniel From tom at supertom.com Mon Sep 15 08:19:20 2003 From: tom at supertom.com (tom at supertom.com) Date: Mon, 15 Sep 2003 08:19:20 -0400 Subject: [nycphp-talk] Script terminates after certain amount of time period In-Reply-To: <013901c37b66$d93cb1a0$3500a8c0@com1> Message-ID: If it doesn't occur in a smaller PDF, then your code probably isn't the problem, but one of those php.ini settings is. Raise the memory limit to a large number (like 50MB) and see if it works at all. If you are on Unix, you can use top to monitor how much memory and CPU that httpd thread is actually using. Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Anirudh Zala Sent: Monday, September 15, 2003 4:50 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Script terminates after certain amount of time period Tom, No, problem doesn't occur in small pdf, script can generate file upto 2-3 MB of size that includes images and data. So Problem arise only when it is required to have PDF above 3 MB. During this process my script also interacts with Perl script that manipulates my images and php script uses those images in generating PDF. Hence 2 scripts working together. Thanks Anirudh Zala ----- Original Message ----- From: To: "NYPHP Talk" Sent: Friday, 12 September, 2003 5:31 PM Subject: RE: [nycphp-talk] Script terminates after certain amount of time period > Anirudh, > > If you try this with a "small" PDF (like 1 page, light graphics), do you > still have the same results? > > Thanks, > > Tom > > > > > > *************************************************** > What's Tom listening to right now? Find out here: > http://www.supertom.com/current_track.php > > > > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Anirudh Zala > Sent: Friday, September 12, 2003 4:07 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > period > > > Thanks all, > > BUT nothing is working. I have also increased memory limit upto 20MB, and > tried all of your's suggestions, but still result is 0. While testing this > script on Netscape and other browser same error occures except message is > different that "Document contains no data". > > Looks like it needs huge amount of memory resources as finally over 15 MB > PDF document is to be created by that script. Perhaps Apache or Php is not > able to handle this much amount of data in memory. Any other suggestions > will be welcomed. > > Thanks > > Anirudh Zala > > ----- Original Message ----- > From: > To: "NYPHP Talk" > Sent: Tuesday, 09 September, 2003 9:02 PM > Subject: RE: [nycphp-talk] Script terminates after certain amount of time > period > > > > Chris is right, I would pull it up in another browser, just to make sure > > that you are actually getting the real error message. > > > > Also, depending on how big the PDF files are that are being created, you > may > > want to look into the memory limit entry in php.ini, to make sure that you > > have enough to allow the PDF to be created. > > > > memory_limit = 8M ; Maximum amount of memory a script may consume > (8MB) > > > > Sorry, I came into this post late, please excuse me if this has already > been > > suggested. > > > > Good Luck! > > > > Tom > > > > > > > > > > > > *************************************************** > > What's Tom listening to right now? Find out here: > > http://www.supertom.com/current_track.php > > > > > > > > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > > Sent: Tuesday, September 09, 2003 11:19 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Script terminates after certain amount of time > > period > > > > > > --- Anirudh Zala wrote: > > > Chris, As i have mentioned, it is also not working at all, just "Page > > > can not be displayed" after few mins. Looks like browser loose > > > connection with server. > > > > Read my response again. Specifically: > > > > > > 2. Are you using IE? Don't. > > > > What I meant by this is that IE is likely giving you the BS error message, > > and > > it isn't the least bit helpful. In fact, it is usually very misleading. > > > > Chris > > > > ===== > > Become a better Web developer with the HTTP Developer's Handbook > > http://httphandbook.org/ > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Mon Sep 15 08:36:06 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 15 Sep 2003 08:36:06 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows In-Reply-To: References: Message-ID: <3F65B236.3090608@nyphp.org> >>the question has come up concerning doing virtual hosting on a Windows >>server in a development environment. >>So.......we're looking for volunteers to write this piece of the >>article. Who's ready to "step up to the plate"? > > > Windows Apache has the same httpd.conf and therefore there is not > difference. I think he was asking for someone to outline these facts in a quick appendix text. Just with a couple examples so people can see the path differences, and any tips when working under Windows vs UNIX (for instance, I always hear the different slashes are a problem). Thanks :) H From pl at eskimo.com Mon Sep 15 09:50:27 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 09:50:27 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows References: <001d01c37b81$41313f50$6401a8c0@EZDSDELL> Message-ID: <019801c37b90$54b59800$332c0242@peter1> I remember some posts back a while of Chris Hendry giving advice on setting up virtual hosting on windows. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 8:02 AM Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > We're at the final version for the article on virtual hosting > (See v. 1.4 at: > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and > the question has come up concerning doing virtual hosting on a Windows > server in a development environment. > So.......we're looking for volunteers to write this piece of the > article. Who's ready to "step up to the plate"? > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Mon Sep 15 10:55:41 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 10:55:41 -0400 Subject: [nycphp-talk] Preg_match email address Message-ID: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> I'm hoping those who are more adept at regular expressions could tell me if this will validate the majority of email addresses...it seems like it will but... '/^[ a-z0-9-_]+(.[ a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', Thanks, Jeff Siegel From eric.cogswell at innlink.com Mon Sep 15 11:11:29 2003 From: eric.cogswell at innlink.com (Cogswell, Eric) Date: Mon, 15 Sep 2003 10:11:29 -0500 Subject: [nycphp-talk] Preg_match email address Message-ID: Try this: ^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$ It seems to work for me. -Eric -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Monday, September 15, 2003 9:56 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Preg_match email address I'm hoping those who are more adept at regular expressions could tell me if this will validate the majority of email addresses...it seems like it will but... '/^[ a-z0-9-_]+(.[ a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', Thanks, Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Mon Sep 15 11:17:11 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 11:17:11 -0400 Subject: [nycphp-talk] Preg_match email address References: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> Message-ID: <028901c37b9c$752b6a40$332c0242@peter1> I would go with {2,4} at the end of your expression because there are some domains like .info that have 4 characters. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 10:55 AM Subject: [nycphp-talk] Preg_match email address > I'm hoping those who are more adept at regular expressions could tell me > if this will validate the majority of email addresses...it seems like it > will but... > > '/^[ a-z0-9-_]+(.[ > a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', > > Thanks, > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Mon Sep 15 11:26:29 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 11:26:29 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows In-Reply-To: <019801c37b90$54b59800$332c0242@peter1> Message-ID: <003401c37b9d$bc62cf60$6401a8c0@EZDSDELL> So...Chris Hendry...are you interested in writing a few paragraphs? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer Sent: Monday, September 15, 2003 8:50 AM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows I remember some posts back a while of Chris Hendry giving advice on setting up virtual hosting on windows. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 8:02 AM Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > We're at the final version for the article on virtual hosting > (See v. 1.4 at: > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and > the question has come up concerning doing virtual hosting on a Windows > server in a development environment. > So.......we're looking for volunteers to write this piece of the > article. Who's ready to "step up to the plate"? > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From sklar at sklar.com Mon Sep 15 11:32:31 2003 From: sklar at sklar.com (David Sklar) Date: Mon, 15 Sep 2003 11:32:31 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> Message-ID: On Monday, September 15, 2003 10:56 AM, wrote: > I'm hoping those who are more adept at regular expressions could tell > me if this will validate the majority of email addresses...it seems > like it will but... > > '/^[ a-z0-9-_]+(.[ > a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', This regex is too broad. You need to escape the periods in the regex so they match just ".", not any character. You allow usernames that begin with " " -- do you really want that? The regex also allows domain names that begin with "-", e.g. foo at -bar.com, which are not valid. Some mail servers allow individual users to create aliases by appending their username with a "+", i.e. "foo+list at bar.com", "foo+shop at bar.com" -- your regex does not allow + signs in usernames. I know this has come up on the list before, but I'll put in a recommendation for using the techniques discussed in Recipe 13.5 in PHP Cookbook. There are two regexes there and some other techniques for verifying addresses, along with the plusses and minuses of each. If you don't own a copy of PHP Cookbook (why not?!:) you can download the example code from http://examples.oreilly.com/phpckbk/phpcbbk_examples.zip David From crisscott at netzero.com Mon Sep 15 11:32:47 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Mon, 15 Sep 2003 15:32:47 GMT Subject: [nycphp-talk] Preg_match email address Message-ID: <20030915.083335.2345.338872@webmail04.lax.untd.com> >Try this: > > ^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$ > >It seems to work for me. Correct me if I am wrong but won't ([[:alnum:]]|_|\.|-)+ match things like name.._ at domain.com or . at domain.com? I don't think this regexp requires letters first and lets you have multiple .'s in a row. Scott Mattocks From pl at eskimo.com Mon Sep 15 11:38:36 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 11:38:36 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows References: <003401c37b9d$bc62cf60$6401a8c0@EZDSDELL> Message-ID: <02aa01c37b9f$74498e60$332c0242@peter1> Check the posts on nyphp-talk for 5/22/03 and the thread "Need virtual host Apache help ...". You may find some info there. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 11:26 AM Subject: RE: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > So...Chris Hendry...are you interested in writing a few paragraphs? > > Jeff Siegel > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Peter Lehrer > Sent: Monday, September 15, 2003 8:50 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > > > I remember some posts back a while of Chris Hendry giving advice on > setting > up virtual hosting on windows. > > Peter Lehrer > ----- Original Message ----- > From: "Jeff" > To: "'NYPHP Talk'" > Sent: Monday, September 15, 2003 8:02 AM > Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > > > > We're at the final version for the article on virtual hosting > > (See v. 1.4 at: > > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and > > the question has come up concerning doing virtual hosting on a Windows > > server in a development environment. > > So.......we're looking for volunteers to write this piece of the > > article. Who's ready to "step up to the plate"? > > > > Jeff Siegel > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From csnyder at chxo.com Mon Sep 15 11:40:38 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 15 Sep 2003 11:40:38 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: <028901c37b9c$752b6a40$332c0242@peter1> References: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> <028901c37b9c$752b6a40$332c0242@peter1> Message-ID: <3F65DD76.7000809@chxo.com> And let's not forget good old .museum weighing in at 7 culture-packed letters. Peter Lehrer wrote: >I would go with {2,4} at the end of your expression because there are some >domains like .info that have 4 characters. > >Peter Lehrer >----- Original Message ----- >From: "Jeff" >To: "'NYPHP Talk'" >Sent: Monday, September 15, 2003 10:55 AM >Subject: [nycphp-talk] Preg_match email address > > > > >>I'm hoping those who are more adept at regular expressions could tell me >>if this will validate the majority of email addresses...it seems like it >>will but... >> >>'/^[ a-z0-9-_]+(.[ >>a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', >> >>Thanks, >> >>Jeff Siegel >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> >> > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From danielc at analysisandsolutions.com Mon Sep 15 11:53:24 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 15 Sep 2003 11:53:24 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> References: <003101c37b99$6ed63290$6401a8c0@EZDSDELL> Message-ID: <20030915155324.GA16204@panix.com> Hi Jeff: The original expression in the prior thread works (barring it'll allow addresses starting with punctuation). So, I'm guessing you haven't tracked down what's going on with the www. email addresses. You didn't reply to my email in that thread dated 9/11. Guess you didn't see it... From: Analysis & Solutions To: NYPHP Talk Date: Thu, 11 Sep 2003 01:26:26 -0400 Subject: Re: [nycphp-talk] Sneaking in unwanted characters On Wed, Sep 10, 2003 at 03:34:55PM -0400, Jeff wrote: > > Somehow someone managed to sneak through an email address with a www at > the beginning and I'm a bit puzzled as to how they managed to do it. You posted the actual address later on in the thread. What happens if you put in that email address yourself? Does it get through? If so, then there's definitely a flaw in the code. Perhaps the variable being checked isn't the same as the one that gets used. If not, maybe there's some other older version of the scripts laying around that the person in question used. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Mon Sep 15 11:56:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 11:56:55 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: Message-ID: <003701c37ba1$fc9bdcd0$6401a8c0@EZDSDELL> It's a heck of a lot more intelligible than what I concocted...I'll give it a shot. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Cogswell, Eric Sent: Monday, September 15, 2003 10:11 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Preg_match email address Try this: ^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$ It seems to work for me. -Eric -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Monday, September 15, 2003 9:56 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Preg_match email address I'm hoping those who are more adept at regular expressions could tell me if this will validate the majority of email addresses...it seems like it will but... '/^[ a-z0-9-_]+(.[ a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', Thanks, Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Mon Sep 15 11:56:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 11:56:55 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: <028901c37b9c$752b6a40$332c0242@peter1> Message-ID: <003801c37ba1$febdd270$6401a8c0@EZDSDELL> The "2,4" makes sense. Thanks for pointing it out. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer Sent: Monday, September 15, 2003 10:17 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Preg_match email address I would go with {2,4} at the end of your expression because there are some domains like .info that have 4 characters. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 10:55 AM Subject: [nycphp-talk] Preg_match email address > I'm hoping those who are more adept at regular expressions could tell me > if this will validate the majority of email addresses...it seems like it > will but... > > '/^[ a-z0-9-_]+(.[ > a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', > > Thanks, > > Jeff Siegel > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From stephen at musgrave.org Mon Sep 15 12:39:12 2003 From: stephen at musgrave.org (Stephen Musgrave) Date: Mon, 15 Sep 2003 12:39:12 -0400 Subject: [nycphp-talk] PayPal IPN Class? Message-ID: Can anybody recommend a PayPal IPN processing class? Thanks, Stephen Musgrave // stephen at musgrave.org // http://musgrave.org // 718-486-6514 From jsiegel1 at optonline.net Mon Sep 15 12:57:08 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 12:57:08 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: <20030915155324.GA16204@panix.com> Message-ID: <003901c37baa$661fe950$6401a8c0@EZDSDELL> My faux pas for not responding to your other email...there *was* some old code hangin' around and I had gotten rid of that. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Monday, September 15, 2003 10:53 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Preg_match email address Hi Jeff: The original expression in the prior thread works (barring it'll allow addresses starting with punctuation). So, I'm guessing you haven't tracked down what's going on with the www. email addresses. You didn't reply to my email in that thread dated 9/11. Guess you didn't see it... From: Analysis & Solutions To: NYPHP Talk Date: Thu, 11 Sep 2003 01:26:26 -0400 Subject: Re: [nycphp-talk] Sneaking in unwanted characters On Wed, Sep 10, 2003 at 03:34:55PM -0400, Jeff wrote: > > Somehow someone managed to sneak through an email address with a www at > the beginning and I'm a bit puzzled as to how they managed to do it. You posted the actual address later on in the thread. What happens if you put in that email address yourself? Does it get through? If so, then there's definitely a flaw in the code. Perhaps the variable being checked isn't the same as the one that gets used. If not, maybe there's some other older version of the scripts laying around that the person in question used. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Mon Sep 15 13:12:02 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 13:12:02 -0400 Subject: [nycphp-talk] Fatal error when trying to connect to db using DB/MySQL Message-ID: <02fa01c37bac$7cddae00$332c0242@peter1> Hi, I have PEAR and DB installed on my Windows 98 box and I get an error message when trying to use the DB/mysql.php function db_connect: include_once("DB/mysql.php"); $dbh = db_connect(array($db_host,$db_user,$db_password)); if (!$dbh) { die("Cannot connect to database"); } The error message is: Fatal error: Class db_common: Cannot inherit from undefined class pear in C:\php\pear\DB-1.3\DB\common.php on line 29 I checked line 29 of common.php and there is: "class DB_common extends PEAR" Does anyone know what the problem could be? I have installed PEAR-1.0 and DB-1. Both are installed in the directory C:\PHP\pear Yours, Peter Lehrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Mon Sep 15 13:22:52 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 13:22:52 -0400 Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows In-Reply-To: <02aa01c37b9f$74498e60$332c0242@peter1> Message-ID: <003d01c37bad$fe79ce20$6401a8c0@EZDSDELL> Thank you...found the thread. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer Sent: Monday, September 15, 2003 10:39 AM To: NYPHP Talk Subject: Re: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows Check the posts on nyphp-talk for 5/22/03 and the thread "Need virtual host Apache help ...". You may find some info there. Peter Lehrer ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 11:26 AM Subject: RE: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > So...Chris Hendry...are you interested in writing a few paragraphs? > > Jeff Siegel > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Peter Lehrer > Sent: Monday, September 15, 2003 8:50 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > > > I remember some posts back a while of Chris Hendry giving advice on > setting > up virtual hosting on windows. > > Peter Lehrer > ----- Original Message ----- > From: "Jeff" > To: "'NYPHP Talk'" > Sent: Monday, September 15, 2003 8:02 AM > Subject: [nycphp-talk] FUNDAMENTALS - Virtual Hosting on Windows > > > > We're at the final version for the article on virtual hosting > > (See v. 1.4 at: > > http://cvs.nyphp.org/cvsweb.cgi/fundamentals/virtual_hosting.txt ) and > > the question has come up concerning doing virtual hosting on a Windows > > server in a development environment. > > So.......we're looking for volunteers to write this piece of the > > article. Who's ready to "step up to the plate"? > > > > Jeff Siegel > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Mon Sep 15 13:22:52 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 15 Sep 2003 13:22:52 -0400 Subject: [nycphp-talk] Preg_match email address In-Reply-To: Message-ID: <003e01c37bad$fec61960$6401a8c0@EZDSDELL> Thanks for pointing this out (I think you may have pointed it out in the earlier thread on this issue). Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Sklar Sent: Monday, September 15, 2003 10:33 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Preg_match email address On Monday, September 15, 2003 10:56 AM, wrote: > I'm hoping those who are more adept at regular expressions could tell > me if this will validate the majority of email addresses...it seems > like it will but... > > '/^[ a-z0-9-_]+(.[ > a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i', This regex is too broad. You need to escape the periods in the regex so they match just ".", not any character. You allow usernames that begin with " " -- do you really want that? The regex also allows domain names that begin with "-", e.g. foo at -bar.com, which are not valid. Some mail servers allow individual users to create aliases by appending their username with a "+", i.e. "foo+list at bar.com", "foo+shop at bar.com" -- your regex does not allow + signs in usernames. I know this has come up on the list before, but I'll put in a recommendation for using the techniques discussed in Recipe 13.5 in PHP Cookbook. There are two regexes there and some other techniques for verifying addresses, along with the plusses and minuses of each. If you don't own a copy of PHP Cookbook (why not?!:) you can download the example code from http://examples.oreilly.com/phpckbk/phpcbbk_examples.zip David _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From pl at eskimo.com Mon Sep 15 13:29:30 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 13:29:30 -0400 Subject: [nycphp-talk] master_value include path Message-ID: <035401c37bae$ef034240$332c0242@peter1> Does anyone know how to specify the mast value include path in your script instead of the local value include path? Peter L. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Sep 15 14:13:21 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 15 Sep 2003 14:13:21 -0400 Subject: [nycphp-talk] Fatal error when trying to connect to db using DB/MySQL In-Reply-To: <02fa01c37bac$7cddae00$332c0242@peter1> References: <02fa01c37bac$7cddae00$332c0242@peter1> Message-ID: <20030915181321.GA6613@panix.com> Peter: On Mon, Sep 15, 2003 at 01:12:02PM -0400, Peter Lehrer wrote: > > Fatal error: Class db_common: Cannot inherit from undefined class pear > in C:\php\pear\DB-1.3\DB\common.php on line 29 > > I checked line 29 of common.php and there is: > > "class DB_common extends PEAR" The error message says it all. Line 29 is creating a new class that extends a class named PEAR. Unfortunately, the class named pear could not be found. It's kind of hard to extend something that can't be found, so PHP says so and stops. Now, the question is WHY the PEAR class can't be found. I'd guess your include path doesn't match your installation. Or, perhaps, you botched your installation all together. --Dan PS: Ditch the HTML email. See http://www.expita.com/nomime.html -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Sun Sep 14 13:52:59 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Sun, 14 Sep 2003 13:52:59 -0400 Subject: [nycphp-talk] [ot] sftp + scp with linux ... In-Reply-To: <20030915181321.GA6613@panix.com> References: <02fa01c37bac$7cddae00$332c0242@peter1> <20030915181321.GA6613@panix.com> Message-ID: <200309141352.59933.jonbaer@jonbaer.net> sorry for the off the wall + off topic questions ... but ... im on rh8 w/kde3 + i have been normally doing scp/sftp'ng php files through bash scripts/cli and someone the other day showed me that sftp:// and fish:// work directly through the kde browser konqueror and was left feeling pretty dumb so i went home to attempt it and it doesn't seem to work so well + just hangs (although normal sftp via command line works) ... anyone had experience with it? the drop + drag worked smoothly on this guys machine + i thought id just have to dump my key onto the server but that wasn't it ... stumped ... the only item i could find on google was that knoppix setups had the same issue ... http://www.knoppix.net/forum/viewtopic.php?t=4161&view=previous - jon From frankaltea at yahoo.com Mon Sep 15 14:39:17 2003 From: frankaltea at yahoo.com (Francisco Altea) Date: Mon, 15 Sep 2003 11:39:17 -0700 (PDT) Subject: [nycphp-talk] recommend something CMS-ish In-Reply-To: Message-ID: <20030915183917.84259.qmail@web80507.mail.yahoo.com> You might want to check out eZ publish- www.ez.no . It is a full-featured CMS and web-application framework. It is based on templates and has a modular design which can be extended to fit any web application. David Mintz wrote: Hey y'all. Today I'm looking for recommendations for something that I guess they call a Content Management System, a thing that will allow clients themselves to edit their own HTML pages (or Smarty templates as the case may be) so I don't have to do it, and without them having to have a shell or FTP account on the shared server where their sites live -- i.e., browser-based. They should be able to upload, download, move/copy/delete files and directories, and edit things in place as well (if they're fearless and foolish like... some people). If it's something that runs as me (as I imagine it will have to), then it should also feature activity logging so we'll know whom to point the finger at when something gets broken. Setup should be reasonably easy, the appearance should be easy to customize and it should cost, oh, I don't know, how about US$0.00 ? I've read a little about PostNuke and it seems like a 250-pound Swiss army knife -- but if it's just monsterously fabulous, OK I'll take it. I'm doing some homework at http://www.thefreecountry.com/php/contentmanagement.shtml but I thought I'd ask here as well. Thanks. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: From pl at eskimo.com Mon Sep 15 14:39:45 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 15 Sep 2003 14:39:45 -0400 Subject: [nycphp-talk] Fatal error when trying to connect to db usingDB/MySQL References: <02fa01c37bac$7cddae00$332c0242@peter1> <20030915181321.GA6613@panix.com> Message-ID: <03bc01c37bb8$bf3dc080$332c0242@peter1> I got it to work by including PEAR.php. That was the problem. Sorry about the HTML. Thanks, Peter L. ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Monday, September 15, 2003 2:13 PM Subject: Re: [nycphp-talk] Fatal error when trying to connect to db usingDB/MySQL > Peter: > > On Mon, Sep 15, 2003 at 01:12:02PM -0400, Peter Lehrer wrote: > > > > Fatal error: Class db_common: Cannot inherit from undefined class pear > > in C:\php\pear\DB-1.3\DB\common.php on line 29 > > > > I checked line 29 of common.php and there is: > > > > "class DB_common extends PEAR" > > The error message says it all. Line 29 is creating a new class that > extends a class named PEAR. Unfortunately, the class named pear could not > be found. It's kind of hard to extend something that can't be found, so > PHP says so and stops. > > Now, the question is WHY the PEAR class can't be found. I'd guess your > include path doesn't match your installation. Or, perhaps, you botched > your installation all together. > > --Dan > > PS: Ditch the HTML email. See http://www.expita.com/nomime.html > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From frankaltea at yahoo.com Mon Sep 15 14:59:29 2003 From: frankaltea at yahoo.com (Francisco Altea) Date: Mon, 15 Sep 2003 11:59:29 -0700 (PDT) Subject: [nycphp-talk] PayPal IPN Class? In-Reply-To: Message-ID: <20030915185929.89150.qmail@web80507.mail.yahoo.com> This could be useful, but it was written for osCommerce. http://www.oscommerce.com/community/contributions,1466/page,6 Stephen Musgrave wrote: Can anybody recommend a PayPal IPN processing class? Thanks, Stephen Musgrave // stephen at musgrave.org // http://musgrave.org // 718-486-6514 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Sun Sep 14 22:48:44 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sun, 14 Sep 2003 22:48:44 -0400 Subject: [nycphp-talk] Getting bombed w/ email Message-ID: <002a01c37b33$e15839f0$6700a8c0@thinkpad> is anyone else on this list receiving tons of rejections from TZO Mailer for pjmatthews at gotojml.com from talk at lists.php.org? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From dan at mx2pro.com Mon Sep 15 23:32:42 2003 From: dan at mx2pro.com (Dan Horning) Date: Mon, 15 Sep 2003 23:32:42 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <002a01c37b33$e15839f0$6700a8c0@thinkpad> Message-ID: <000001c37c03$30ec8960$6500a8c0@RobsVaio> I am -dan H -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Sunday, September 14, 2003 10:49 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Getting bombed w/ email is anyone else on this list receiving tons of rejections from TZO Mailer for pjmatthews at gotojml.com from talk at lists.php.org? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Mon Sep 15 23:34:51 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 15 Sep 2003 23:34:51 -0400 Subject: [nycphp-talk] Getting bombed w/ email References: <000001c37c03$30ec8960$6500a8c0@RobsVaio> Message-ID: <002601c37c03$7d429ed0$c801a8c0@dj> me too! ----- Original Message ----- From: "Dan Horning" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 11:32 PM Subject: RE: [nycphp-talk] Getting bombed w/ email > I am > -dan H > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of jon baer > Sent: Sunday, September 14, 2003 10:49 PM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] Getting bombed w/ email > > is anyone else on this list receiving tons of rejections from TZO Mailer > for > pjmatthews at gotojml.com from talk at lists.php.org? > > - jon > > pgp key: http://www.jonbaer.net/jonbaer.asc > fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Mon Sep 15 23:52:30 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 15 Sep 2003 23:52:30 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <002a01c37b33$e15839f0$6700a8c0@thinkpad> References: <002a01c37b33$e15839f0$6700a8c0@thinkpad> Message-ID: <3F6688FE.7010207@chxo.com> This is the result of a broken mailer at tzo.com that is ignoring Mailman's "Errors-to:" header and sending undeliverable messages to the original sender instead. We should probably be bombarding postmaster at tzo.com with requests to fix their mailer so that it does the right thing when mailing-list messages bounce. csnyder. jon baer wrote: >is anyone else on this list receiving tons of rejections from TZO Mailer for >pjmatthews at gotojml.com from talk at lists.php.org? > >- jon > >pgp key: http://www.jonbaer.net/jonbaer.asc >fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From mwithington at PLMresearch.com Tue Sep 16 00:18:32 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Tue, 16 Sep 2003 00:18:32 -0400 Subject: [nycphp-talk] Getting bombed w/ email Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3587CEDF1@network.PLMresearch.com> same here -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Donald J. Organ IV Sent: Monday, September 15, 2003 11:35 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Getting bombed w/ email me too! ----- Original Message ----- From: "Dan Horning" To: "'NYPHP Talk'" Sent: Monday, September 15, 2003 11:32 PM Subject: RE: [nycphp-talk] Getting bombed w/ email > I am > -dan H > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of jon baer > Sent: Sunday, September 14, 2003 10:49 PM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] Getting bombed w/ email > > is anyone else on this list receiving tons of rejections from TZO Mailer > for > pjmatthews at gotojml.com from talk at lists.php.org? > > - jon > > pgp key: http://www.jonbaer.net/jonbaer.asc > fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From bpang at bpang.com Tue Sep 16 00:54:23 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 16 Sep 2003 00:54:23 -0400 Subject: [nycphp-talk] Getting bombed w/ email Message-ID: me too it sucks From cmerlo at ncc.edu Tue Sep 16 01:43:33 2003 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Tue, 16 Sep 2003 01:43:33 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <002a01c37b33$e15839f0$6700a8c0@thinkpad> References: <002a01c37b33$e15839f0$6700a8c0@thinkpad> Message-ID: <20030916054333.GA9035@ncc.edu> Yeah. What's really weird is that the message that got bounced was from July. I hope that doesn't mean that more is on the way. :( -c -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo Q: How many system programmers does it take to change a lightbulb? A: None. The application can work around it. From jsiegel1 at optonline.net Tue Sep 16 06:37:38 2003 From: jsiegel1 at optonline.net (Jeff) Date: Tue, 16 Sep 2003 06:37:38 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <20030916054333.GA9035@ncc.edu> Message-ID: <001a01c37c3e$8ce06a80$6401a8c0@EZDSDELL> Well...looks like I'm not the only one getting whacked with months old bounced messages. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Christopher R. Merlo Sent: Tuesday, September 16, 2003 12:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Getting bombed w/ email Yeah. What's really weird is that the message that got bounced was from July. I hope that doesn't mean that more is on the way. :( -c -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo Q: How many system programmers does it take to change a lightbulb? A: None. The application can work around it. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Mon Sep 15 08:15:52 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 15 Sep 2003 08:15:52 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <20030916054333.GA9035@ncc.edu> References: <002a01c37b33$e15839f0$6700a8c0@thinkpad> <20030916054333.GA9035@ncc.edu> Message-ID: <200309150815.52919.jonbaer@jonbaer.net> Yeah same here, extremely *old* messages ... right now im feeling bad for Phil, I wonder if he knows what he is in for =) - Jon On Tuesday 16 September 2003 01:43, Christopher R. Merlo wrote: > Yeah. What's really weird is that the message that got bounced was > from July. I hope that doesn't mean that more is on the way. :( > -c From dmintz at panix.com Tue Sep 16 09:35:08 2003 From: dmintz at panix.com (David Mintz) Date: Tue, 16 Sep 2003 09:35:08 -0400 (EDT) Subject: [nycphp-talk] recommend something CMS-ish In-Reply-To: <20030915183917.84259.qmail@web80507.mail.yahoo.com> References: <20030915183917.84259.qmail@web80507.mail.yahoo.com> Message-ID: Thanks, I will give it a look. On Mon, 15 Sep 2003, Francisco Altea wrote: > You might want to check out eZ publish- www.ez.no . It is a full-featured CMS and web-application framework. It is based on templates and has a modular design which can be extended to fit any web application. > > David Mintz wrote: > Hey y'all. > > Today I'm looking for recommendations for something that I guess they call > a Content Management System, a thing that will allow clients themselves to > edit their own HTML pages (or Smarty templates as the case may be) so I > don't have to do it, and without them having to have a shell or FTP > account on the shared server where their sites live -- i.e., > browser-based. They should be able to upload, download, move/copy/delete > files and directories, and edit things in place as well (if they're > fearless and foolish like... some people). > From hans at nyphp.org Tue Sep 16 09:54:39 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 16 Sep 2003 09:54:39 -0400 Subject: [nycphp-talk] Getting bombed w/ email In-Reply-To: <3F6688FE.7010207@chxo.com> References: <002a01c37b33$e15839f0$6700a8c0@thinkpad> <3F6688FE.7010207@chxo.com> Message-ID: <3F67161F.7040804@nyphp.org> Chris Snyder wrote: > This is the result of a broken mailer at tzo.com that is ignoring > Mailman's "Errors-to:" header and sending undeliverable messages to the > original sender instead. > > We should probably be bombarding postmaster at tzo.com with requests to fix > their mailer so that it does the right thing when mailing-list messages > bounce. We should, and I have. His address has been removed from the list, but unfortunately there's nothing further we can do. H From mz34 at nyu.edu Tue Sep 16 11:23:20 2003 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Tue, 16 Sep 2003 11:23:20 -0400 Subject: [nycphp-talk] XSLT transformations with PHP In-Reply-To: <20030915185929.89150.qmail@web80507.mail.yahoo.com> Message-ID: Hey all, Since last month's presentation was on XML validation and parsing, I wanted to contribute my own .02 to our knowledge base. I have been using PHP to do XSLT transformations and made a short "how to" that covers compiling PHP with the XSLT extension and also the basic code for doing an XSLT transformation in PHP. It is written at avery novice level since I am a novice myself, but hopefully someone on here might find it useful. http://www.nyu.edu/its/humanities/docs/php_xslt.html Matt From carlos at sprout.net Tue Sep 16 11:08:17 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 11:08:17 -0400 Subject: [nycphp-talk] Delivery failure Message-ID: <49A9DEB886049242BA28C484A36C03F141A705@email.sprout.net> Guys any ideas why this bounced now? After weeks of sending it? Carlos -----Original Message----- From: TZO Mailer [mailto:mailer at tzo.com] Sent: Monday, September 15, 2003 9:36 PM To: Carlos G. Chiossone Subject: Delivery failure to pjmatthews at gotojml.com Delivery was attempted, but failed because: 550 No Acceptable Recipients -=-=-=-=-=-=-=-=- Original Message: -=-=-=-=-=-=-=-=- X-TZO-Forward: pjmatthews at gotojml.com Received: from 206.252.198.83 by saf.tzo.com id 2003072417300792137 for pjmatthews at gotojml.com; Thu, 24 Jul 2003 21:30:07 GMT Received: from virtu.nyphp.org (virtu.nyphp.org [206.252.198.83]) by virtu.nyphp.org (Postfix) with ESMTP id EACAFA85FD; Thu, 24 Jul 2003 17:29:03 -0400 (EDT) Received: from sc-0s4mh68whm0s.web.sprout.net (209733129.client.dti.net [209.73.31.29]) by virtu.nyphp.org (Postfix) with ESMTP id 616ACA85E9 for ; Thu, 24 Jul 2003 17:29:01 -0400 (EDT) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [nycphp-talk] PHP Editor X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Thu, 24 Jul 2003 17:18:16 -0400 Message-ID: <49A9DEB886049242BA28C484A36C03F12CB95A at email.sprout.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [nycphp-talk] PHP Editor Thread-Index: AcNSFzRUoyc6x3/rTIqbT4Yo23ccjQAE0rtg From: "Carlos G. Chiossone" To: "NYPHP Talk" X-BeenThere: talk at lists.nyphp.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: NYPHP Talk List-Id: NYPHP Talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: talk-bounces at lists.nyphp.org Errors-To: talk-bounces at lists.nyphp.org Man this is hard; I guess I'll keep this buggy phpEdit after all. Not 2 = of you used the same :) c -----Original Message----- From: Ken Robinson [mailto:kenrbnsn at rbnsn.com] Sent: Thursday, July 24, 2003 3:21 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor At 03:12 PM 7/24/2003 -0400, you wrote: >Chris, you've asked for it: > >Zend Studio rules.... Yes, Zend Studio is excellent (with a great debugger) but it's way too expensive for the struggling web designer with no money flow to buy. I = used the 3 week trial and got very used to it. Now, I'm using Homesite5 and TopStyle 3 (combination CSS editor and HTML/PHP editor written by the same person who originally wrote = Homesite). Ken _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 11:08:56 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 11:08:56 -0400 Subject: [nycphp-talk] Never mind Message-ID: <49A9DEB886049242BA28C484A36C03F141A706@email.sprout.net> I see now why it happened, sorry for not reading this first. Carlos -----Original Message----- From: Hans Zaunere [mailto:hans at nyphp.org] Sent: Tuesday, September 16, 2003 9:55 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Getting bombed w/ email Chris Snyder wrote: > This is the result of a broken mailer at tzo.com that is ignoring > Mailman's "Errors-to:" header and sending undeliverable messages to the > original sender instead. > > We should probably be bombarding postmaster at tzo.com with requests to fix > their mailer so that it does the right thing when mailing-list messages > bounce. We should, and I have. His address has been removed from the list, but unfortunately there's nothing further we can do. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 11:23:10 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 11:23:10 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141F5DD@email.sprout.net> Hi guys, thanks in advance for helping. I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. These are some of the formats I tried in the php file: mail("email at sprout.net","nothing at all","jkh kjhg kjygj kjhgkjhty kjhg kjh"); mail("email at sprout.net","nothing at all","jkh kjhg kjygj kjhgkjhty kjhg kjh", "From: carlos at sprout.net\r\n"."Reply-To: carlos at sprout.net\r\n"); mail("email at sprout.net","nothing at all","jkh kjhg kjygj kjhgkjhty kjhg kjh", "From: carlos at sprout.net\r\n"."Reply-To: carlos at sprout.net\r\n","-f cc at sprout.net"); Any ideas why the mail from PHP may not be going out? Thanks a lot, Carlos From hans at nyphp.org Tue Sep 16 12:00:14 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 16 Sep 2003 12:00:14 -0400 Subject: [nycphp-talk] mail function in Linux-Apache In-Reply-To: <49A9DEB886049242BA28C484A36C03F141F5DD@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F141F5DD@email.sprout.net> Message-ID: <3F67338E.30608@nyphp.org> Carlos G. Chiossone wrote: > Hi guys, thanks in advance for helping. > > I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. A couple things to try: --- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool --- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries? Does it have the permissions? su to the user Apache is running as and try the mail command again --- in the php.ini are the settings correct? I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache HTH, h From carlos at sprout.net Tue Sep 16 12:17:23 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 12:17:23 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141F5DE@email.sprout.net> Thanks Hans, Doing the tail -f does not give me anything when sending through PHP. I am not able to su to apache, "user not available" have to wait for my linux guy to help me in that one. And the php.ini settings do seem correct [mail function] ; For Win32 only. ;SMTP = localhost ; For Win32 only. ;sendmail_from = me at localhost.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = '/usr/sbin/sendmail -t -i' Will have to try to su when he gets in today. Thanks, Carlos -----Original Message----- From: Hans Zaunere [mailto:hans at nyphp.org] Sent: Tuesday, September 16, 2003 12:00 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache Carlos G. Chiossone wrote: > Hi guys, thanks in advance for helping. > > I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. A couple things to try: --- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool --- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries? Does it have the permissions? su to the user Apache is running as and try the mail command again --- in the php.ini are the settings correct? I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache HTH, h _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Tue Sep 16 12:37:54 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 16 Sep 2003 12:37:54 -0400 Subject: [nycphp-talk] Fatal error when trying to connect to dbusingDB/MySQL Message-ID: <20030916163754.GA22840@panix.com> Hi Peter: > I got it to work by including PEAR.php. I had a feeling you were calling the DB class incorrectly (and you still are). I didn't say anything about it in my last message because I didn't have an example at my finger tips to show you. Now I do... All you need to to is include DB.php, set the DSN and then connect. The database type used is determined by the DSN. require_once('DB.php'); $DSN = 'DB_Type://DB_User:DB_Pass at DB_Protocol+DB_Host:DB_Port/DB_Db'; $Options['debug'] = 2; $db = DB::connect($DSN, $Options); if ( DB::isError($db) ) { $killProcess('Having problems connecting to the database: ' . $db->getMessage() ); } Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From cmerlo at ncc.edu Tue Sep 16 12:38:49 2003 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Tue, 16 Sep 2003 12:38:49 -0400 Subject: [nycphp-talk] mail function in Linux-Apache In-Reply-To: <49A9DEB886049242BA28C484A36C03F141F5DE@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F141F5DE@email.sprout.net> Message-ID: <20030916163849.GC9920@ncc.edu> On 2003-09-16 12:17 -0400, Carlos G. Chiossone wrote: > Doing the tail -f does not give me anything when sending through > PHP. I am not able to su to apache, "user not available" have to > wait for my linux guy to help me in that one. Carlos: "apache" is probably not the name of the user who runs Apache. In my experience, it's usually the user "nobody". -c -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo There is one word in America that says it all, and that one word is, 'You never know.' - Joaquin Andujar From nestorflorez at earthlink.net Tue Sep 16 12:52:27 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Tue, 16 Sep 2003 09:52:27 -0700 (GMT-07:00) Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <12859063.1063731147608.JavaMail.root@waldorf.psp.pas.earthlink.net> If you can send maill from the command line then you probably need to set up your php.ini You can set it up to sendmail or SMTP as long as you know the name of you mail server or SMTP server I ran into the problem in a Mac OS X and send mail would not work althought, I could send mail from the command line so I changed it to SMTP and it work. Nestor :-) -----Original Message----- From: Hans Zaunere Sent: Sep 16, 2003 9:00 AM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache Carlos G. Chiossone wrote: > Hi guys, thanks in advance for helping. > > I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. A couple things to try: --- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool --- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries? Does it have the permissions? su to the user Apache is running as and try the mail command again --- in the php.ini are the settings correct? I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache HTH, h _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 12:37:02 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 12:37:02 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141A709@email.sprout.net> Thanks, I also can't su to "nobody". Now in the trusted-users under mail "apache" is the only one trusted. So I guess that would be the only one allowed? But I can email from root with no problems, via promt. c -----Original Message----- From: Christopher R. Merlo [mailto:cmerlo at ncc.edu] Sent: Tuesday, September 16, 2003 12:39 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache On 2003-09-16 12:17 -0400, Carlos G. Chiossone wrote: > Doing the tail -f does not give me anything when sending through > PHP. I am not able to su to apache, "user not available" have to > wait for my linux guy to help me in that one. Carlos: "apache" is probably not the name of the user who runs Apache. In my experience, it's usually the user "nobody". -c -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo There is one word in America that says it all, and that one word is, 'You never know.' - Joaquin Andujar _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 12:41:35 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 12:41:35 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141A70A@email.sprout.net> Actually that is what I originally wanted to do use my SMTP server. How did you change it in the php.ini ? Thanks, Carlos -----Original Message----- From: Nestor Florez [mailto:nestorflorez at earthlink.net] Sent: Tuesday, September 16, 2003 12:52 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache If you can send maill from the command line then you probably need to set up your php.ini You can set it up to sendmail or SMTP as long as you know the name of you mail server or SMTP server I ran into the problem in a Mac OS X and send mail would not work althought, I could send mail from the command line so I changed it to SMTP and it work. Nestor :-) -----Original Message----- From: Hans Zaunere Sent: Sep 16, 2003 9:00 AM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache Carlos G. Chiossone wrote: > Hi guys, thanks in advance for helping. > > I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. A couple things to try: --- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool --- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries? Does it have the permissions? su to the user Apache is running as and try the mail command again --- in the php.ini are the settings correct? I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache HTH, h _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 12:59:00 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 12:59:00 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141A70C@email.sprout.net> I don't know if this may help in my situation: Sep 16 13:08:00 mail sendmail[24361]: h8GH80SM024361: from=root, size=48, class=0, nrcpts=1, msgid=<200309161708.h8GH80SM024361 at mail.spam-watch.com>, relay=root at localhost Sep 16 13:08:01 mail sendmail[24363]: h8GH80Kt024363: from=, size=339, class=0, nrcpts=1, msgid=<200309161708.h8GH80SM024361 at mail.spam-watch.com>, proto=ESMTP, daemon=MTA, relay=[209.73.31.172] Sep 16 13:08:01 mail sendmail[24361]: h8GH80SM024361: to=carlos at sprout.net, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30037, relay=[209.73.31.172] [209.73.31.172], dsn=2.0.0, stat=Sent (h8GH80Kt024363 Message accepted for delivery) Sep 16 13:08:01 mail sendmail[24365]: h8GH80Kt024363: to=, ctladdr= (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30328, relay=email.sprout.net. [209.73.31.27], dsn=2.0.0, stat=Sent ( <200309161708.h8GH80SM024361 at mail.spam-watch.com> Queued mail for delivery) c -----Original Message----- From: Christopher R. Merlo [mailto:cmerlo at ncc.edu] Sent: Tuesday, September 16, 2003 12:39 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache On 2003-09-16 12:17 -0400, Carlos G. Chiossone wrote: > Doing the tail -f does not give me anything when sending through > PHP. I am not able to su to apache, "user not available" have to > wait for my linux guy to help me in that one. Carlos: "apache" is probably not the name of the user who runs Apache. In my experience, it's usually the user "nobody". -c -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo There is one word in America that says it all, and that one word is, 'You never know.' - Joaquin Andujar _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Tue Sep 16 15:03:40 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Tue, 16 Sep 2003 15:03:40 -0400 Subject: [nycphp-talk] mail function in Linux-Apache Message-ID: <49A9DEB886049242BA28C484A36C03F141F5DF@email.sprout.net> Ok problem solved thanks to Nestor. Now is this a BUG? This is part of my ini in the Linux box [mail function] ; For Win32 only. SMTP = email.sprout.net ; For Win32 only. ;sendmail_from = me at localhost.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; sendmail_path = '/usr/sbin/sendmail -t -i' And now it works fine. It is being directed to an Exchange server. Is this why SMTP works? Why does it say for Win32 only? If I uncomment "sendmail_path" the emails are not sent!!! So in theory is RELAYING to my mail server directly? Not at all, if I turn of the service for "sendmail" it also does not send the emails, but they do stay in que and when restarted they go out. I could not find any notes on this issue, and I am sure I am not the only one running PHP 4.3.2 sending mail through a Linux box. Thanks to all for the help, and hope this notes will help someone in the future. But actually hope they don't go through this. Carlos -----Original Message----- From: Nestor Florez [mailto:nestorflorez at earthlink.net] Sent: Tuesday, September 16, 2003 12:52 PM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache If you can send maill from the command line then you probably need to set up your php.ini You can set it up to sendmail or SMTP as long as you know the name of you mail server or SMTP server I ran into the problem in a Mac OS X and send mail would not work althought, I could send mail from the command line so I changed it to SMTP and it work. Nestor :-) -----Original Message----- From: Hans Zaunere Sent: Sep 16, 2003 9:00 AM To: NYPHP Talk Subject: Re: [nycphp-talk] mail function in Linux-Apache Carlos G. Chiossone wrote: > Hi guys, thanks in advance for helping. > > I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP. A couple things to try: --- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool --- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries? Does it have the permissions? su to the user Apache is running as and try the mail command again --- in the php.ini are the settings correct? I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache HTH, h _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Tue Sep 16 15:40:01 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 16 Sep 2003 15:40:01 -0400 Subject: [nycphp-talk] XSLT transformations with PHP In-Reply-To: References: Message-ID: <3F676711.1040500@nyphp.org> Matthew Zimmerman wrote: > Hey all, > > Since last month's presentation was on XML validation and parsing, I > wanted to contribute my own .02 to our knowledge base. I have been using > PHP to do XSLT transformations and made a short "how to" that covers > compiling PHP with the XSLT extension and also the basic code for doing > an XSLT transformation in PHP. It is written at avery novice level since > I am a novice myself, but hopefully someone on here might find it useful. > > http://www.nyu.edu/its/humanities/docs/php_xslt.html Great article... could we link to it once we get our content site online? Thanks, H From mz34 at nyu.edu Tue Sep 16 16:07:34 2003 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Tue, 16 Sep 2003 16:07:34 -0400 Subject: [nycphp-talk] XSLT transformations with PHP In-Reply-To: <3F676711.1040500@nyphp.org> Message-ID: <6968BD6A-E881-11D7-890E-00039344DCA8@nyu.edu> i'd be honored :-) On Tuesday, September 16, 2003, at 03:40 PM, Hans Zaunere wrote: > > > Matthew Zimmerman wrote: > >> Hey all, >> Since last month's presentation was on XML validation and parsing, I >> wanted to contribute my own .02 to our knowledge base. I have been >> using PHP to do XSLT transformations and made a short "how to" that >> covers compiling PHP with the XSLT extension and also the basic code >> for doing an XSLT transformation in PHP. It is written at avery >> novice level since I am a novice myself, but hopefully someone on >> here might find it useful. >> http://www.nyu.edu/its/humanities/docs/php_xslt.html > > Great article... could we link to it once we get our content site > online? > > Thanks, > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > MZ _________________ Matthew Zimmerman Humanities Computing Group, NYU Tel: 212.998.3038 Fax: 212.995.4120 From soazine at erols.com Tue Sep 16 16:23:45 2003 From: soazine at erols.com (Phil Powell) Date: Tue, 16 Sep 2003 16:23:45 -0400 Subject: [nycphp-talk] Can you do PHP within JSP BSF tag libraries? Message-ID: <048c01c37c90$86e734e0$67a76244@philofsoa> Referring to http://jakarta.apache.org/taglibs/doc/bsf-doc/intro.html does anyone know if PHP is doable within this framework? If so, OOOOO! :) Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From pl at eskimo.com Tue Sep 16 18:02:39 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 16 Sep 2003 18:02:39 -0400 Subject: [nycphp-talk] Fatal error when trying to connect to dbusingDB/MySQL References: <20030916163754.GA22840@panix.com> Message-ID: <00ac01c37c9e$413e8840$fb2c0242@peter1> That works. ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Tuesday, September 16, 2003 12:37 PM Subject: Re: [nycphp-talk] Fatal error when trying to connect to dbusingDB/MySQL > Hi Peter: > > > I got it to work by including PEAR.php. > > I had a feeling you were calling the DB class incorrectly (and you still > are). I didn't say anything about it in my last message because I didn't > have an example at my finger tips to show you. Now I do... > > All you need to to is include DB.php, set the DSN and then connect. The > database type used is determined by the DSN. > > require_once('DB.php'); > $DSN = 'DB_Type://DB_User:DB_Pass at DB_Protocol+DB_Host:DB_Port/DB_Db'; > $Options['debug'] = 2; > > $db = DB::connect($DSN, $Options); > if ( DB::isError($db) ) { > $killProcess('Having problems connecting to the database: ' > . $db->getMessage() ); > } > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From nyphp at NewAgeWeb.com Tue Sep 16 19:17:02 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Tue, 16 Sep 2003 19:17:02 -0400 Subject: [nycphp-talk] web store + Linkpoint API Message-ID: <00a201c37ca8$a35ae960$de01a8c0@duron.lan.newageweb.com> Does anybody know of any good complete web store code with support for the Linkpoint merchant API? I usually code my own stuff but I simply don't have enough time to "reinvent the wheel" this time ... and the deadline for this assignment is right around the corner. This client needs an advanced web store with all the bells and whistles, especially for shipping (real-time interaction with FedEx or UPS would be nice), shopper accounts, advanced order processing, inventory management and report creation. He already has a Linkpoint merchant account, so it would be nice if I could find a ready solution with support for Linkpoint API. Your suggestions are really appreciated. Cheers, Jerry From andrew at digitalpulp.com Tue Sep 16 19:26:55 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Tue, 16 Sep 2003 19:26:55 -0400 Subject: [nycphp-talk] web store + Linkpoint API In-Reply-To: <00a201c37ca8$a35ae960$de01a8c0@duron.lan.newageweb.com> References: <00a201c37ca8$a35ae960$de01a8c0@duron.lan.newageweb.com> Message-ID: <20030916232647.GA22185@localhost.localdomain> On Tue, Sep 16, 2003 at 07:17:02PM -0400, Jerry Kapron wrote: > > Does anybody know of any good complete web store code with support for the > Linkpoint merchant API? I usually code my own stuff but I simply don't have > enough time to "reinvent the wheel" this time ... and the deadline for this > assignment is right around the corner. This client needs an advanced web > store with all the bells and whistles, especially for shipping (real-time > interaction with FedEx or UPS would be nice), shopper accounts, advanced > order processing, inventory management and report creation. He already has > a Linkpoint merchant account, so it would be nice if I could find a ready > solution with support for Linkpoint API. Your suggestions are really > appreciated. > > Cheers, > Jerry > OSCommerce has most of what you're looking for. There is a Linkpoint API module in the contributions that uses the PHP Wrapper from Linkpoint (now free, used to be $95 from them). There are also shipping modules for the real-time shipping calculations... http://oscommerce.com/ PS. Don't bother using the Linkpoint Basic integration module ... there is potential for user error to foul up an order and thats not good. -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From dan at mx2pro.com Tue Sep 16 23:38:47 2003 From: dan at mx2pro.com (Dan Horning) Date: Tue, 16 Sep 2003 23:38:47 -0400 Subject: [nycphp-talk] web store + Linkpoint API In-Reply-To: <00a201c37ca8$a35ae960$de01a8c0@duron.lan.newageweb.com> Message-ID: <000001c37ccd$351d7a10$a50e9942@dwchome> Gonna have to go with the usual answer OS Commerce http://www.oscommerce.com/ Simple .. Fast./.. themeable - Dan Horning President: Technical Evangelism & Media Systems Administation MX2 Productions Media from concept to execution. > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jerry Kapron > Sent: Tuesday, September 16, 2003 7:17 PM > To: NYPHP Talk > Subject: [nycphp-talk] web store + Linkpoint API > > > > Does anybody know of any good complete web store code with > support for the > Linkpoint merchant API? I usually code my own stuff but I > simply don't have > enough time to "reinvent the wheel" this time ... and the > deadline for this > assignment is right around the corner. This client needs an > advanced web > store with all the bells and whistles, especially for > shipping (real-time > interaction with FedEx or UPS would be nice), shopper > accounts, advanced > order processing, inventory management and report creation. > He already has > a Linkpoint merchant account, so it would be nice if I could > find a ready > solution with support for Linkpoint API. Your suggestions are really > appreciated. > > Cheers, > Jerry > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Wed Sep 17 07:54:19 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 17 Sep 2003 07:54:19 -0400 Subject: [nycphp-talk] osCommerce questions ... References: <000001c37ccd$351d7a10$a50e9942@dwchome> Message-ID: <005201c37d12$6dcb9e10$8119fea9@thinkpad> 2 questions ... * have there been any *bad* experiences with using the package? * can the admin be locked down or be used only offsite with say a tunneled p'keyd mysql connection ... - jon From dan at mx2pro.com Wed Sep 17 09:11:20 2003 From: dan at mx2pro.com (Dan Horning) Date: Wed, 17 Sep 2003 09:11:20 -0400 Subject: [nycphp-talk] osCommerce questions ... In-Reply-To: <005201c37d12$6dcb9e10$8119fea9@thinkpad> Message-ID: <001501c37d1d$34f99000$d70f9942@dwchome> > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer > Subject: [nycphp-talk] osCommerce questions ... > 2 questions ... > > * have there been any *bad* experiences with using the package? I've personally only ever heard great results with OSC And that's from everyone I've talked to who uses it. (used all over the world) > * can the admin be locked down or be used only offsite with > say a tunneled p'keyd mysql connection ... Yes .. Because the database system on your server can be set to ip/domain only access Therefore assuming that your remote location has access to the port mysql runs on (firewall issue prevention) Any other questions? - Dan Horning President: Technical Evangelism & Media Systems Administation MX2 Productions Media from concept to execution. From andrew at digitalpulp.com Wed Sep 17 10:13:50 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Wed, 17 Sep 2003 10:13:50 -0400 Subject: [nycphp-talk] osCommerce questions ... In-Reply-To: <005201c37d12$6dcb9e10$8119fea9@thinkpad> References: <000001c37ccd$351d7a10$a50e9942@dwchome> <005201c37d12$6dcb9e10$8119fea9@thinkpad> Message-ID: <20030917141342.GE8912@thighmaster.digitalpulp.com> On Wed, Sep 17, 2003 at 07:54:19AM -0400, jon baer wrote: > 2 questions ... > > * have there been any *bad* experiences with using the package? You have to be very aware of versions of OS Commerce & contributions, some contributions are modules/plugins and some are patches/hacks. You'll have to be carefull of matching versions for your modules and patches and then be extra careful not to overwrite your own customizations w/ patches. Before you plunge into adding in some contribution, RTFM fully and understand just what kind of contribution it is and what you're getting yourself into. The reason for this is that some parts of OS Commerce were made to allow for modules (shipping, payment, taxation, etc) ... while some were not (product fields, non-product content, etc). Keep in mind that this also affects your own modifications to it... some things were designed to be easily modified, while others were not. > * can the admin be locked down or be used only offsite with say a tunneled > p'keyd mysql connection ... Shouldn't be a problem at all. The admin and the store are basically two entirely separate apps, with separate config files and all, so piping the mysql connection for the admin over a tunnel should be easy. Andrew -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From joshmccormack at travelersdiary.com Wed Sep 17 10:50:53 2003 From: joshmccormack at travelersdiary.com (joshmccormack at travelersdiary.com) Date: Wed, 17 Sep 2003 09:50:53 -0500 (CDT) Subject: [nycphp-talk] osCommerce questions ... In-Reply-To: <20030917141342.GE8912@thighmaster.digitalpulp.com> Message-ID: Has anyone ever seen a really nice catalog/front end done with oscommerce? Josh On Wed, 17 Sep 2003, Andrew Yochum wrote: > On Wed, Sep 17, 2003 at 07:54:19AM -0400, jon baer wrote: > > 2 questions ... > > > > * have there been any *bad* experiences with using the package? > > You have to be very aware of versions of OS Commerce & contributions, some > contributions are modules/plugins and some are patches/hacks. You'll have to > be carefull of matching versions for your modules and patches and then be extra > careful not to overwrite your own customizations w/ patches. Before you plunge > into adding in some contribution, RTFM fully and understand just what kind of > contribution it is and what you're getting yourself into. > > The reason for this is that some parts of OS Commerce were made to allow for > modules (shipping, payment, taxation, etc) ... while some were not (product > fields, non-product content, etc). Keep in mind that this also affects your > own modifications to it... some things were designed to be easily modified, > while others were not. > > > * can the admin be locked down or be used only offsite with say a tunneled > > p'keyd mysql connection ... > > Shouldn't be a problem at all. The admin and the store are basically two > entirely separate apps, with separate config files and all, so piping the mysql > connection for the admin over a tunnel should be easy. > > Andrew > > From jsiegel1 at optonline.net Wed Sep 17 10:58:57 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 10:58:57 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters Message-ID: <000f01c37d2c$38a31230$6401a8c0@EZDSDELL> If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel From mwithington at PLMresearch.com Wed Sep 17 11:00:14 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 17 Sep 2003 11:00:14 -0400 Subject: [nycphp-talk] osCommerce questions ... Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3587CEE6E@network.PLMresearch.com> Well, I'm not sure that I could say it's really nice ;-) but try http://www.uttermost.com . It uses an osCommerce snapshot. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of joshmccormack at travelersdiary.com Sent: Wednesday, September 17, 2003 10:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] osCommerce questions ... Has anyone ever seen a really nice catalog/front end done with oscommerce? Josh On Wed, 17 Sep 2003, Andrew Yochum wrote: > On Wed, Sep 17, 2003 at 07:54:19AM -0400, jon baer wrote: > > 2 questions ... > > > > * have there been any *bad* experiences with using the package? > > You have to be very aware of versions of OS Commerce & contributions, some > contributions are modules/plugins and some are patches/hacks. You'll have to > be carefull of matching versions for your modules and patches and then be extra > careful not to overwrite your own customizations w/ patches. Before you plunge > into adding in some contribution, RTFM fully and understand just what kind of > contribution it is and what you're getting yourself into. > > The reason for this is that some parts of OS Commerce were made to allow for > modules (shipping, payment, taxation, etc) ... while some were not (product > fields, non-product content, etc). Keep in mind that this also affects your > own modifications to it... some things were designed to be easily modified, > while others were not. > > > * can the admin be locked down or be used only offsite with say a tunneled > > p'keyd mysql connection ... > > Shouldn't be a problem at all. The admin and the store are basically two > entirely separate apps, with separate config files and all, so piping the mysql > connection for the admin over a tunnel should be easy. > > Andrew > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From sklar at sklar.com Wed Sep 17 11:20:38 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 17 Sep 2003 11:20:38 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters In-Reply-To: <000f01c37d2c$38a31230$6401a8c0@EZDSDELL> Message-ID: On Wednesday, September 17, 2003 10:59 AM, wrote: > If I understand correctly, a regular expression like this: > ^[a-z0-9\',. > -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is > not part of the regular ASCII set of characters but part of the > extended set. So...what's a kid to do? Use a POSIX named character class. These respect locale settings: preg_match('/[[:alnum:]]/','?'); This returns true under a locale like 'en_US', or 'de_DE'. Read all about POSIX named character classes in the egrep(1) manpage. You should probably call setlocale() in your PHP script before preg_match()ing against special characters, the default locale (often "C") may not include these characters in the "alnum" or "alpha" classes. E.g.: setlocale(LC_CTYPE,'en_US'); or setlocale(LC_ALL,'en_US'); David From nyphp at NewAgeWeb.com Wed Sep 17 11:26:01 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Wed, 17 Sep 2003 11:26:01 -0400 Subject: [nycphp-talk] web store + Linkpoint API Message-ID: <011101c37d30$007b7920$de01a8c0@duron.lan.newageweb.com> Andrew/Dan, Thanks guys! I'm actually somewhat familiar with OSC. I set it up for a client a while ago, but I had no idea that there is a Linkpoint module for it. this is great! Thanks again, Jerry >On Tue, Sep 16, 2003 at 07:34:02PM -0400, Andrew Yochum wrote: >OSCommerce has most of what you're looking for. There is a Linkpoint API >module in the contributions that uses the PHP Wrapper from Linkpoint (now free, >used to be $95 from them). There are also shipping modules for the real-time >shipping calculations... > >http://oscommerce.com/ > >PS. Don't bother using the Linkpoint Basic integration module ... there is >potential for user error to foul up an order and thats not good. > >-- >Andrew Yochum >Digital Pulp, Inc. >212.679.0676x255 >andrew at digitalpulp.com >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Wed Sep 17 10:05:37 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 17 Sep 2003 10:05:37 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters References: <000f01c37d2c$38a31230$6401a8c0@EZDSDELL> Message-ID: <003c01c37d24$c6eecfa0$8119fea9@thinkpad> from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Wed Sep 17 11:23:51 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Wed, 17 Sep 2003 11:23:51 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters Message-ID: <49A9DEB886049242BA28C484A36C03F141F5E0@email.sprout.net> Hi all, PHPEdit has a new Regular Expression editor that seems to be pretty good. This may be of help on all of this. http://www.phpedit.net/products/RegExpEditor/ Carlos -----Original Message----- From: jon baer [mailto:jonbaer at jonbaer.net] Sent: Wednesday, September 17, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Wed Sep 17 11:46:19 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 17 Sep 2003 11:46:19 -0400 Subject: [nycphp-talk] web store + Linkpoint API In-Reply-To: <00a201c37ca8$a35ae960$de01a8c0@duron.lan.newageweb.com> Message-ID: <001001c37d32$d72d8fb0$bf8d3818@OBERON1> If you go to the oscommerce site and click on read the weekly summaries there is a menu item called 'Workboard' There is an item: 49 ================================ register_globals Compatibility The requirement to have register_globals enabled will be removed. Part of this would have been done in Milestone 3 where the session logic is updated to class. ================================== There is a target of 2.2-MS4 (I interpret this to mean they will remove the 'register_globals dependency in Milestone 4 -- they are at Milestone 2 now and nobody is assigned to the task) You can see the bug list at http://sourceforge.net/mailarchive/forum.php?forum=tep-bugs Here is an example: ======================= New Comment from johan_awouters at pa... @ 09/17/2003 06:39:28 Is this still a problem? Can this be related to the effect that the sessions are lost all the time? It's strange that the osCsid is not always appended to the URL. That's way the session is lost and the shopping cart is empty. However, if you manually copy-paste the osCsid, the shopping cart is displayed again correctly. Is this because we are working with a milestone version? ======================== It looks to me as if the session ids maybe open to capture by a malicious intruder. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jerry Kapron Sent: Tuesday, September 16, 2003 7:17 PM To: NYPHP Talk Subject: [nycphp-talk] web store + Linkpoint API Does anybody know of any good complete web store code with support for the Linkpoint merchant API? I usually code my own stuff but I simply don't have enough time to "reinvent the wheel" this time ... and the deadline for this assignment is right around the corner. This client needs an advanced web store with all the bells and whistles, especially for shipping (real-time interaction with FedEx or UPS would be nice), shopper accounts, advanced order processing, inventory management and report creation. He already has a Linkpoint merchant account, so it would be nice if I could find a ready solution with support for Linkpoint API. Your suggestions are really appreciated. Cheers, Jerry _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Wed Sep 17 11:42:59 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Wed, 17 Sep 2003 11:42:59 -0400 Subject: [nycphp-talk] osCommerce questions ... Message-ID: <49A9DEB886049242BA28C484A36C03F141F5E1@email.sprout.net> We use to play a bit with OSC, you are able to customize the design as you wish, at least way back when we tried it. Our only problem was that it was too slow. But in general was a good piece of software. We decided to write our own with a totally different schema due to the speed. And not based at all on OSC. We branded it under ReadySites.com. Now what OSC has that is great, is the Open Source availability which allows for much faster growth. If you develop an easier design interface and gets added to it, then any design doubts that you have are solved. Carlos -----Original Message----- From: Mark Withington [mailto:mwithington at PLMresearch.com] Sent: Wednesday, September 17, 2003 11:00 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] osCommerce questions ... Well, I'm not sure that I could say it's really nice ;-) but try http://www.uttermost.com . It uses an osCommerce snapshot. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of joshmccormack at travelersdiary.com Sent: Wednesday, September 17, 2003 10:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] osCommerce questions ... Has anyone ever seen a really nice catalog/front end done with oscommerce? Josh On Wed, 17 Sep 2003, Andrew Yochum wrote: > On Wed, Sep 17, 2003 at 07:54:19AM -0400, jon baer wrote: > > 2 questions ... > > > > * have there been any *bad* experiences with using the package? > > You have to be very aware of versions of OS Commerce & contributions, some > contributions are modules/plugins and some are patches/hacks. You'll have to > be carefull of matching versions for your modules and patches and then be extra > careful not to overwrite your own customizations w/ patches. Before you plunge > into adding in some contribution, RTFM fully and understand just what kind of > contribution it is and what you're getting yourself into. > > The reason for this is that some parts of OS Commerce were made to allow for > modules (shipping, payment, taxation, etc) ... while some were not (product > fields, non-product content, etc). Keep in mind that this also affects your > own modifications to it... some things were designed to be easily modified, > while others were not. > > > * can the admin be locked down or be used only offsite with say a tunneled > > p'keyd mysql connection ... > > Shouldn't be a problem at all. The admin and the store are basically two > entirely separate apps, with separate config files and all, so piping the mysql > connection for the admin over a tunnel should be easy. > > Andrew > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 12:04:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 12:04:55 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters In-Reply-To: <003c01c37d24$c6eecfa0$8119fea9@thinkpad> Message-ID: <002901c37d35$71428770$6401a8c0@EZDSDELL> Oy...I hope I don't have to recompile. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Wednesday, September 17, 2003 9:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 12:04:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 12:04:55 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters In-Reply-To: Message-ID: <002a01c37d35$7163f220$6401a8c0@EZDSDELL> Thanks for pointing this out. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Sklar Sent: Wednesday, September 17, 2003 10:21 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters On Wednesday, September 17, 2003 10:59 AM, wrote: > If I understand correctly, a regular expression like this: > ^[a-z0-9\',. > -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is > not part of the regular ASCII set of characters but part of the > extended set. So...what's a kid to do? Use a POSIX named character class. These respect locale settings: preg_match('/[[:alnum:]]/','?'); This returns true under a locale like 'en_US', or 'de_DE'. Read all about POSIX named character classes in the egrep(1) manpage. You should probably call setlocale() in your PHP script before preg_match()ing against special characters, the default locale (often "C") may not include these characters in the "alnum" or "alpha" classes. E.g.: setlocale(LC_CTYPE,'en_US'); or setlocale(LC_ALL,'en_US'); David _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 12:08:43 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 12:08:43 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters In-Reply-To: <49A9DEB886049242BA28C484A36C03F141F5E0@email.sprout.net> Message-ID: <004001c37d35$f75a1300$6401a8c0@EZDSDELL> Does this work as a "standalone" application or only with PHPEdit? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Carlos G. Chiossone Sent: Wednesday, September 17, 2003 10:24 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Hi all, PHPEdit has a new Regular Expression editor that seems to be pretty good. This may be of help on all of this. http://www.phpedit.net/products/RegExpEditor/ Carlos -----Original Message----- From: jon baer [mailto:jonbaer at jonbaer.net] Sent: Wednesday, September 17, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 12:08:43 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 12:08:43 -0400 Subject: [nycphp-talk] Reg expression to make sure something is not blank Message-ID: <004101c37d35$f77dc7a0$6401a8c0@EZDSDELL> Is this "kosher" for determining that something has not be left blank? '/^[^^$]{1,35}$/i', Jeff Siegel From sklar at sklar.com Wed Sep 17 12:20:37 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 17 Sep 2003 12:20:37 -0400 Subject: [nycphp-talk] Reg expression to make sure something is not blank In-Reply-To: <004101c37d35$f77dc7a0$6401a8c0@EZDSDELL> Message-ID: On Wednesday, September 17, 2003 12:09 PM, wrote: > Is this "kosher" for determining that something has not be left blank? > > '/^[^^$]{1,35}$/i', No, it is not kosher. The regex matches strings like "country ham", "cheese burger" and "shrimp scampi". In fact, it matches any 1 to 35 character string that doesn't consist entirely of carets and dollar signs. If you want to make sure that a string at least one but no more than 35 characters, use: /^.{1,35}$/ But that would match a string of all whitespace. If you want to make sure that the string doesn't begin with whitespace, try: /^\S.{0,34}$/ Which guarantees that the first character is not whitespace. However, you're better off not using a regex for this stuff. Instead, do this to make sure a string is between 1 and 35 characters, after removing leading and trailing whitespace: $len = strlen(trim($s)); if (($len < 1) || ($len > 35)) { // the string is too long or too short } else { // the string is just right } David From jonbaer at jonbaer.net Wed Sep 17 11:12:38 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 17 Sep 2003 11:12:38 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters References: <004001c37d35$f75a1300$6401a8c0@EZDSDELL> Message-ID: <008801c37d2e$22111ba0$8119fea9@thinkpad> standalone ... there was a better web-based one somewhere ... i personally find regex coach to be more flexible ... http://www.weitz.de/regex-coach/ - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 12:08 PM Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Does this work as a "standalone" application or only with PHPEdit? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Carlos G. Chiossone Sent: Wednesday, September 17, 2003 10:24 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Hi all, PHPEdit has a new Regular Expression editor that seems to be pretty good. This may be of help on all of this. http://www.phpedit.net/products/RegExpEditor/ Carlos -----Original Message----- From: jon baer [mailto:jonbaer at jonbaer.net] Sent: Wednesday, September 17, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Wed Sep 17 12:29:50 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 17 Sep 2003 09:29:50 -0700 (PDT) Subject: [nycphp-talk] Reg expression to make sure something is not blank In-Reply-To: Message-ID: <20030917162950.76623.qmail@web14301.mail.yahoo.com> --- David Sklar wrote: > However, you're better off not using a regex for this stuff. > Instead, do this to make sure a string is between 1 and 35 > characters, after removing leading and trailing whitespace: > > $len = strlen(trim($s)); > if (($len < 1) || ($len > 35)) { > // the string is too long or too short > } else { > // the string is just right > } +1 This also makes you intent clearer, which will be an important factor in a few weeks, months, or years. Comments are great, but straightforward code can't be beat. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From nyphp at NewAgeWeb.com Wed Sep 17 12:26:24 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Wed, 17 Sep 2003 12:26:24 -0400 Subject: [nycphp-talk] Reg expression to make sure something is not blank Message-ID: <015a01c37d38$6fe49dc0$de01a8c0@duron.lan.newageweb.com> I would use '^.+$' Jerry -- 42.7% of all statistics are made up on the spot. -----Original Message----- Is this "kosher" for determining that something has not be left blank? '/^[^^$]{1,35}$/i', Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Wed Sep 17 12:38:20 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 17 Sep 2003 12:38:20 -0400 Subject: [nycphp-talk] google code jam 2003 Message-ID: <00ba01c37d3a$1b5b9db0$8119fea9@thinkpad> http://www.topcoder.com/pl/?&module=Static&d1=google&d2=google_overview too bad no php huh :-\ -snip- Use Java, C++, C# or VB.NET. Pick any of these programming languages to code your solutions. All are acceptable and none is given an advantage. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From carlos at sprout.net Wed Sep 17 13:45:04 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Wed, 17 Sep 2003 13:45:04 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters Message-ID: <49A9DEB886049242BA28C484A36C03F141A71C@email.sprout.net> Standalone. Carlos -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Wednesday, September 17, 2003 12:09 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Does this work as a "standalone" application or only with PHPEdit? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Carlos G. Chiossone Sent: Wednesday, September 17, 2003 10:24 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Hi all, PHPEdit has a new Regular Expression editor that seems to be pretty good. This may be of help on all of this. http://www.phpedit.net/products/RegExpEditor/ Carlos -----Original Message----- From: jon baer [mailto:jonbaer at jonbaer.net] Sent: Wednesday, September 17, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 14:06:31 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 14:06:31 -0400 Subject: [nycphp-talk] Reg expression to make sure something is not blank In-Reply-To: Message-ID: <005a01c37d46$6c43a0e0$6401a8c0@EZDSDELL> You and Chris have convinced me...regex is NOT the way to go...at least not in this case. However, "shrimp scampi" does sound good about now. ;) Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Sklar Sent: Wednesday, September 17, 2003 11:21 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Reg expression to make sure something is not blank On Wednesday, September 17, 2003 12:09 PM, wrote: > Is this "kosher" for determining that something has not be left blank? > > '/^[^^$]{1,35}$/i', No, it is not kosher. The regex matches strings like "country ham", "cheese burger" and "shrimp scampi". In fact, it matches any 1 to 35 character string that doesn't consist entirely of carets and dollar signs. If you want to make sure that a string at least one but no more than 35 characters, use: /^.{1,35}$/ But that would match a string of all whitespace. If you want to make sure that the string doesn't begin with whitespace, try: /^\S.{0,34}$/ Which guarantees that the first character is not whitespace. However, you're better off not using a regex for this stuff. Instead, do this to make sure a string is between 1 and 35 characters, after removing leading and trailing whitespace: $len = strlen(trim($s)); if (($len < 1) || ($len > 35)) { // the string is too long or too short } else { // the string is just right } David _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Wed Sep 17 14:15:47 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 17 Sep 2003 14:15:47 -0400 Subject: [nycphp-talk] google code jam 2003 In-Reply-To: <00ba01c37d3a$1b5b9db0$8119fea9@thinkpad> References: <00ba01c37d3a$1b5b9db0$8119fea9@thinkpad> Message-ID: <3F68A4D3.4070006@chxo.com> We would have an unfair advantage: no compile times. :-) jon baer wrote: >http://www.topcoder.com/pl/?&module=Static&d1=google&d2=google_overview > >too bad no php huh :-\ > > > From jsiegel1 at optonline.net Wed Sep 17 14:30:58 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 14:30:58 -0400 Subject: [nycphp-talk] Regular Expressions & Foreign Characters In-Reply-To: <49A9DEB886049242BA28C484A36C03F141A71C@email.sprout.net> Message-ID: <005d01c37d49$d6a55570$6401a8c0@EZDSDELL> I'll check it out. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Carlos G. Chiossone Sent: Wednesday, September 17, 2003 12:45 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Standalone. Carlos -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Wednesday, September 17, 2003 12:09 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Does this work as a "standalone" application or only with PHPEdit? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Carlos G. Chiossone Sent: Wednesday, September 17, 2003 10:24 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Regular Expressions & Foreign Characters Hi all, PHPEdit has a new Regular Expression editor that seems to be pretty good. This may be of help on all of this. http://www.phpedit.net/products/RegExpEditor/ Carlos -----Original Message----- From: jon baer [mailto:jonbaer at jonbaer.net] Sent: Wednesday, September 17, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Regular Expressions & Foreign Characters from what i recall you need to play around with multibyte/unicode functions + it needs to be compiled in (--enable-mbstring=all): http://us3.php.net/manual/en/ref.mbstring.php http://us3.php.net/manual/en/function.mb-ereg.php - jon ----- Original Message ----- From: "Jeff" To: "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 10:58 AM Subject: [nycphp-talk] Regular Expressions & Foreign Characters If I understand correctly, a regular expression like this: ^[a-z0-9\',. -]{1,35}$/I will not allow foreign characters, e.g., ?, because it is not part of the regular ASCII set of characters but part of the extended set. So...what's a kid to do? Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From nyphp at NewAgeWeb.com Wed Sep 17 15:07:12 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Wed, 17 Sep 2003 15:07:12 -0400 Subject: [nycphp-talk] Reg expression to make sure something is not blank Message-ID: <018f01c37d4e$e6e82340$de01a8c0@duron.lan.newageweb.com> > Jerry Kapron wrote: > I would use '^.+$' > Jerry Well.. it's a regular expression to match a non-empty string, but in real life you definitely shouldn't use regular expressions for something that simple. Dave's example not only makes your code much clearer, but also executes many times faster than a single regex function. Regular Expressions are relatively CPU-intensive and if overused, can considerably diminish your application's performance, especially on a busy server. Use them only if one or two simple string functions can't do the job. Be careful... regular expressions are like drugs - it feels good when you use them.. they can easily become an addiction, and they sure can kill (a server or two). I learned the hard way. cheers, Jerry -----Original Message----- Is this "kosher" for determining that something has not be left blank? '/^[^^$]{1,35}$/i', Jeff Siegel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 16:30:09 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 16:30:09 -0400 Subject: [nycphp-talk] Repost Post Vars Message-ID: <007101c37d5a$7d812490$6401a8c0@EZDSDELL> Is there a way to repost Post variables, i.e., pass along Post data, along with a header location change? Jeff Siegel From soazine at erols.com Wed Sep 17 16:34:51 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 17 Sep 2003 16:34:51 -0400 Subject: [nycphp-talk] Anyone know the ANSI SQL for Access equivalent to this? Message-ID: <005b01c37d5b$25878440$67a76244@philofsoa> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, R.label AS roleLabel FROM Role R, UserRoleAssoc URA, Team T, User U, UserTeamAssoc UTA WHERE U.userId = URA.userID AND URA.roleId = R.roleId AND U.userId = UTA.userID (+) AND T.teamId = UTA.teamID (+) AND U.userID > 1 ORDER BY #orderBy# #orderByTxt# I am at my wit's end on this one, and I thought ANSI Syntax for mySQL was evil! Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Wed Sep 17 16:41:25 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 17 Sep 2003 13:41:25 -0700 (PDT) Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <007101c37d5a$7d812490$6401a8c0@EZDSDELL> Message-ID: <20030917204125.14865.qmail@web14301.mail.yahoo.com> --- Jeff wrote: > Is there a way to repost Post variables Yes. > i.e., pass along Post data, along with a header location change? No. :-) To perform a POST with PHP, you have can do it manually: http://shiflett.org/dev/php_post.phps or you can use PEAR's HTTP request class: http://shiflett.org/dev/pear_post.phps or you can use cURL, and for some reason I don't have an example for that. Please note that all of this code was written a long time ago and used to search php.net for cURL (I think that's why I didn't have an example for that). It should work fine or at least give you an idea of where to look. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From dkrook at hotmail.com Wed Sep 17 16:56:36 2003 From: dkrook at hotmail.com (D C Krook) Date: Wed, 17 Sep 2003 16:56:36 -0400 Subject: [nycphp-talk] Best practices for form input/output between PHP & MySQL? Message-ID: Greetings, I work on a web application that is used to manage tasks and work flow among a team of developers and producers. Clients enter tasks, developers make notes and occasionally add code snippets via a standard form with text inputs and textarea boxes. We take care to sanitize user input and data display by way of addslashes(), stripslashes(), htmlfunctions(), nl2br() and the like, but occasionally a legitimate backslash in a code snippet gets removed when updating a textarea containing some code, for example: escape(document.title.replace(/\+/g,'')) becomes escape(document.title.replace(/+/g,'')) Of course, that sort of thing is not easy to catch when you're developing such an application (it went unnoticed in our case for quite a few months), so I'm wondering if anyone can share some good utility functions that can sanitize form input going into a database and information coming from the database for display in the browser (with HTML entitized). In essence, I'd like to hear some thoughts on the most robust way to flesh out the following functions: function sanitizeInputForDB ($strFieldInput) { } function formatDataForDisplay ($strData, $isTextArea = false) { if (!$isTextArea) { } else { } } TIA, -Dan ========================================== Daniel Christer Krook http://krook.net/ || http://krook.info/ http://civet.net/ || http://dev.krook.org/ _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From jsiegel1 at optonline.net Wed Sep 17 16:50:50 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 16:50:50 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030917204125.14865.qmail@web14301.mail.yahoo.com> Message-ID: <007901c37d5d$6cae7930$6401a8c0@EZDSDELL> Hmmm...I wonder if it would be easier to just rethink how I'm handling things with multiple forms. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Wednesday, September 17, 2003 3:41 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars --- Jeff wrote: > Is there a way to repost Post variables Yes. > i.e., pass along Post data, along with a header location change? No. :-) To perform a POST with PHP, you have can do it manually: http://shiflett.org/dev/php_post.phps or you can use PEAR's HTTP request class: http://shiflett.org/dev/pear_post.phps or you can use cURL, and for some reason I don't have an example for that. Please note that all of this code was written a long time ago and used to search php.net for cURL (I think that's why I didn't have an example for that). It should work fine or at least give you an idea of where to look. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Wed Sep 17 15:57:39 2003 From: shiflett at php.net (shiflett at php.net) Date: Wed, 17 Sep 2003 15:57:39 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106383227301@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From drydell at worldnet.att.net Wed Sep 17 17:04:51 2003 From: drydell at worldnet.att.net (David Rydell) Date: Wed, 17 Sep 2003 17:04:51 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030917204125.14865.qmail@web14301.mail.yahoo.com> Message-ID: you might consider storing the $_POST array as a session variable... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett Sent: Wednesday, September 17, 2003 4:41 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars --- Jeff wrote: > Is there a way to repost Post variables Yes. > i.e., pass along Post data, along with a header location change? No. :-) To perform a POST with PHP, you have can do it manually: http://shiflett.org/dev/php_post.phps or you can use PEAR's HTTP request class: http://shiflett.org/dev/pear_post.phps or you can use cURL, and for some reason I don't have an example for that. Please note that all of this code was written a long time ago and used to search php.net for cURL (I think that's why I didn't have an example for that). It should work fine or at least give you an idea of where to look. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 From shiflett at php.net Wed Sep 17 17:05:08 2003 From: shiflett at php.net (shiflett at php.net) Date: Wed, 17 Sep 2003 17:05:08 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106383270701@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From jonbaer at jonbaer.net Wed Sep 17 15:53:37 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 17 Sep 2003 15:53:37 -0400 Subject: [nycphp-talk] Repost Post Vars References: <007901c37d5d$6cae7930$6401a8c0@EZDSDELL> Message-ID: <015101c37d55$62dd0550$8119fea9@thinkpad> you would probably want to use sessions or the db then, or you can use chris's php_post method along w/ ur previous content via something like ... foreach($_POST as $key=>$value) { echo $key."=".$value; } - jon ----- Original Message ----- From: "Jeff" To: ; "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 4:50 PM Subject: RE: [nycphp-talk] Repost Post Vars > Hmmm...I wonder if it would be easier to just rethink how I'm handling > things with multiple forms. > > Jeff Siegel > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Chris Shiflett > Sent: Wednesday, September 17, 2003 3:41 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Repost Post Vars > > > --- Jeff wrote: > > Is there a way to repost Post variables > > Yes. > > > i.e., pass along Post data, along with a header location change? > > No. :-) > > To perform a POST with PHP, you have can do it manually: > > http://shiflett.org/dev/php_post.phps > > or you can use PEAR's HTTP request class: > > http://shiflett.org/dev/pear_post.phps > > or you can use cURL, and for some reason I don't have an example for > that. > > Please note that all of this code was written a long time ago and used > to > search php.net for cURL (I think that's why I didn't have an example for > that). > It should work fine or at least give you an idea of where to look. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From crisscott at netzero.com Wed Sep 17 17:13:09 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Wed, 17 Sep 2003 21:13:09 GMT Subject: [nycphp-talk] Repost Post Vars Message-ID: <20030917.141345.15023.284773@webmail06.lax.untd.com> I don't know how secure this would be or if it is considered really bad, but what about saving them in $_SESSION and then redirecting? Something like: $_SESSION['post_vars'] = $_POST; header(blah...); And then when you get to the second page you could put them back: $_POST = $_SESSION['post_vars']; unset($_SESSION['post_vars']); I have no idea what the implications of this are. Scott Mattocks From csnyder at chxo.com Wed Sep 17 17:15:12 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 17 Sep 2003 17:15:12 -0400 Subject: [nycphp-talk] Out of the office In-Reply-To: <106383270701@mercury.hosting4u.net> References: <106383270701@mercury.hosting4u.net> Message-ID: <3F68CEE0.6070304@chxo.com> Sigh. Happens to everyone, sooner or later. shiflett at php.net wrote: >Hello, > >I will be unavailable until Tuesday September 22, > >Thank you, > > > From shiflett at php.net Wed Sep 17 17:18:03 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 17 Sep 2003 14:18:03 -0700 (PDT) Subject: [nycphp-talk] Out of the office In-Reply-To: <3F68CEE0.6070304@chxo.com> Message-ID: <20030917211803.16238.qmail@web14306.mail.yahoo.com> Actually, as I pointed out to someone else, that email was not sent from me (or php.net). Don't forget that the From header can be spoofed. I don't have vacation messages. Chris --- Chris Snyder wrote: > Sigh. Happens to everyone, sooner or later. > > shiflett at php.net wrote: > > >Hello, > > > >I will be unavailable until Tuesday September 22, > > > >Thank you, From jsiegel1 at optonline.net Wed Sep 17 17:57:58 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 17:57:58 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030917.141345.15023.284773@webmail06.lax.untd.com> Message-ID: <007d01c37d66$ca367a90$6401a8c0@EZDSDELL> Good question. Anyone know about the security implications? Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of crisscott at netzero.com Sent: Wednesday, September 17, 2003 4:13 PM To: talk at lists.nyphp.org Subject: RE: [nycphp-talk] Repost Post Vars I don't know how secure this would be or if it is considered really bad, but what about saving them in $_SESSION and then redirecting? Something like: $_SESSION['post_vars'] = $_POST; header(blah...); And then when you get to the second page you could put them back: $_POST = $_SESSION['post_vars']; unset($_SESSION['post_vars']); I have no idea what the implications of this are. Scott Mattocks _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 17:57:58 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 17:57:58 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <015101c37d55$62dd0550$8119fea9@thinkpad> Message-ID: <007e01c37d66$ca7bc0f0$6401a8c0@EZDSDELL> That's what I'm gonna do. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Wednesday, September 17, 2003 2:54 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars you would probably want to use sessions or the db then, or you can use chris's php_post method along w/ ur previous content via something like ... foreach($_POST as $key=>$value) { echo $key."=".$value; } - jon ----- Original Message ----- From: "Jeff" To: ; "'NYPHP Talk'" Sent: Wednesday, September 17, 2003 4:50 PM Subject: RE: [nycphp-talk] Repost Post Vars > Hmmm...I wonder if it would be easier to just rethink how I'm handling > things with multiple forms. > > Jeff Siegel > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of Chris Shiflett > Sent: Wednesday, September 17, 2003 3:41 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Repost Post Vars > > > --- Jeff wrote: > > Is there a way to repost Post variables > > Yes. > > > i.e., pass along Post data, along with a header location change? > > No. :-) > > To perform a POST with PHP, you have can do it manually: > > http://shiflett.org/dev/php_post.phps > > or you can use PEAR's HTTP request class: > > http://shiflett.org/dev/pear_post.phps > > or you can use cURL, and for some reason I don't have an example for > that. > > Please note that all of this code was written a long time ago and used > to > search php.net for cURL (I think that's why I didn't have an example for > that). > It should work fine or at least give you an idea of where to look. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 17 17:57:58 2003 From: jsiegel1 at optonline.net (Jeff) Date: Wed, 17 Sep 2003 17:57:58 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: Message-ID: <007f01c37d66$cab4f960$6401a8c0@EZDSDELL> I do that in other places...I'll probably do that again. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Rydell Sent: Wednesday, September 17, 2003 4:05 PM To: shiflett at php.net; NYPHP Talk Subject: RE: [nycphp-talk] Repost Post Vars you might consider storing the $_POST array as a session variable... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett Sent: Wednesday, September 17, 2003 4:41 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars --- Jeff wrote: > Is there a way to repost Post variables Yes. > i.e., pass along Post data, along with a header location change? No. :-) To perform a POST with PHP, you have can do it manually: http://shiflett.org/dev/php_post.phps or you can use PEAR's HTTP request class: http://shiflett.org/dev/pear_post.phps or you can use cURL, and for some reason I don't have an example for that. Please note that all of this code was written a long time ago and used to search php.net for cURL (I think that's why I didn't have an example for that). It should work fine or at least give you an idea of where to look. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Wed Sep 17 18:15:50 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 17 Sep 2003 18:15:50 -0400 Subject: [nycphp-talk] Best practices for form input/output between PHP & MySQL? In-Reply-To: References: Message-ID: <20030917221550.GA24505@panix.com> Hi Dan: On Wed, Sep 17, 2003 at 04:56:36PM -0400, D C Krook wrote: > > We take care to sanitize user input and data display by way of > addslashes(), stripslashes(), htmlfunctions(), nl2br() and the like, but > occasionally a legitimate backslash in a code snippet gets removed when > updating a textarea containing some code, for example: > > escape(document.title.replace(/\+/g,'')) > becomes > escape(document.title.replace(/+/g,'')) By the way your talking, it sounds like you're using stripslashes after pulling stuff out of the database -- before displaying it. Am I reading you right? If so, that's not needed and leads to weird things like you're talking about. If not, where are you using it? You only need to use it _once_, before putting items into a query. The slashes won't be stored in the database. > function sanitizeInputForDB ($strFieldInput) { addslashes(); But, you'll also need to make sure data going to numeric fields don't have anything except numeric characters. This is because such fields don't need to be quoted in query strings, thus they're open to being easily manipulated. > function formatDataForDisplay ($strData, $isTextArea = false) { All output should be run through htmlspecialchars(), regardless of it being a textarea or not. That's all you need to do. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From shiflett at php.net Wed Sep 17 18:30:43 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 17 Sep 2003 15:30:43 -0700 (PDT) Subject: [nycphp-talk] Best practices for form input/output between PHP & MySQL? In-Reply-To: <20030917221550.GA24505@panix.com> Message-ID: <20030917223043.92104.qmail@web14310.mail.yahoo.com> --- Analysis & Solutions wrote: > By the way your talking, it sounds like you're using stripslashes > after pulling stuff out of the database -- before displaying it. > Am I reading you right? > > If so, that's not needed and leads to weird things like you're > talking about. > > If not, where are you using it? > > You only need to use it _once_, before putting items into a query. I think you mean to imply the use of addslashes() when generating your SQL query. I just wanted to clarify that. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From nyphp at websapp.com Wed Sep 17 18:33:22 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 17 Sep 2003 18:33:22 -0400 Subject: [nycphp-talk] Best practices for form input/output between PHP &MySQL? In-Reply-To: Message-ID: Hey Dan, If you don't need to search the code in the database you may want to base64_encode/decode it. Best, Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of D C Krook > Sent: Wednesday, September 17, 2003 4:57 PM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] Best practices for form input/output between PHP > &MySQL? > > > Greetings, > > I work on a web application that is used to manage tasks and work > flow among > a team of developers and producers. Clients enter tasks, developers make > notes and occasionally add code snippets via a standard form with text > inputs and textarea boxes. > > We take care to sanitize user input and data display by way of > addslashes(), > stripslashes(), htmlfunctions(), nl2br() and the like, but occasionally a > legitimate backslash in a code snippet gets removed when updating > a textarea > containing some code, for example: > > escape(document.title.replace(/\+/g,'')) > becomes > escape(document.title.replace(/+/g,'')) > > Of course, that sort of thing is not easy to catch when you're developing > such an application (it went unnoticed in our case for quite a > few months), > so I'm wondering if anyone can share some good utility functions that can > sanitize form input going into a database and information coming from the > database for display in the browser (with HTML entitized). > > In essence, I'd like to hear some thoughts on the most robust way > to flesh > out the following functions: > > > function sanitizeInputForDB ($strFieldInput) { > > } > > function formatDataForDisplay ($strData, $isTextArea = false) { > if (!$isTextArea) { > > } else { > > } > } > > > TIA, > -Dan > > > > ========================================== > Daniel Christer Krook > http://krook.net/ || http://krook.info/ > http://civet.net/ || http://dev.krook.org/ > > _________________________________________________________________ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Wed Sep 17 23:20:55 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 17 Sep 2003 23:20:55 -0400 Subject: [nycphp-talk] php & mysql in SecurityFocus Newsletter #214 Message-ID: <20030918032055.GA2091@panix.com> Hey Folks: More excitement... ----------------------- MySQL Password Handler Buffer Overflow Vulnerability http://www.securityfocus.com/bid/8590 The issue presents itself, due to a lack of sufficient bounds checking performed on MySQL user passwords that are stored in the 'Password' field of the 'User' table in a MySQL database. It has been reported that MySQL fails to properly perform bounds checking when processing passwords. A password greater that 16 characters may overrun the bounds of a reserved buffer in memory and corrupt adjacent memory. The buffer overflow occurs in an ACL_USER instance of acl_init(), and may ultimately result in the corruption of a saved instruction pointer. An attacker with global administrative privileges on an affected MySQL server may potentially exploit this condition to have arbitrary supplied instructions executed in the context of the MySQL server. This vulnerability has been reported to affect all versions of MySQL up to and including 4.0.14 and 3.0.57. ----------------------- Digital Scribe Error Function Cross-Site Scripting Vulnerabi... http://www.securityfocus.com/bid/8551 PHPBB URL BBCode HTML Injection Vulnerability http://www.securityfocus.com/bid/8570 Invision Power Board Index.php Showtopic Cross-Site Scriptin... http://www.securityfocus.com/bid/8575 KokeshCMS Unauthorized Content Editing Vulnerability http://www.securityfocus.com/bid/8585 b2evolution Multiple Cross-Site Scripting Vulnerabilities http://www.securityfocus.com/bid/8586 b2evolution Multiple SQL Injection Vulnerabilities http://www.securityfocus.com/bid/8591 Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From lists at ny-tech.net Thu Sep 18 01:53:43 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Thu, 18 Sep 2003 01:53:43 -0400 Subject: [nycphp-talk] Array keys in Smarty In-Reply-To: <20030918032055.GA2091@panix.com> Message-ID: <000001c37da9$3a7c5e40$6401a8c0@main> Is it possible to access the keys of an associative array _in_ a template. - Nasir From csnyder at chxo.com Thu Sep 18 08:59:38 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 18 Sep 2003 08:59:38 -0400 Subject: [nycphp-talk] Array keys in Smarty In-Reply-To: <000001c37da9$3a7c5e40$6401a8c0@main> References: <000001c37da9$3a7c5e40$6401a8c0@main> Message-ID: <3F69AC3A.6090900@chxo.com> Yes-- the syntax is like Java, though: {$array.key} You may also use objects, with no change: {$object->property} Or were you asking about getting at the keys themselves, using something like a foreach loop? csnyder Nasir Zubair wrote: >Is it possible to access the keys of an associative array _in_ a template. > >- Nasir > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From jonbaer at jonbaer.net Thu Sep 18 07:53:46 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 18 Sep 2003 07:53:46 -0400 Subject: [nycphp-talk] Array keys in Smarty References: <000001c37da9$3a7c5e40$6401a8c0@main> Message-ID: <004e01c37ddb$84b54d50$8119fea9@thinkpad> good question ... have u tried something like passing in the keys before the template? ie: $keys = array_keys($array); {section name=x loop=$keys} {$keys[x]}
    {/section} - jon ----- Original Message ----- From: "Nasir Zubair" To: "'NYPHP Talk'" Sent: Thursday, September 18, 2003 1:53 AM Subject: [nycphp-talk] Array keys in Smarty > Is it possible to access the keys of an associative array _in_ a template. > > - Nasir > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Thu Sep 18 09:59:20 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 18 Sep 2003 09:59:20 -0400 Subject: [nycphp-talk] Cookie values - Clean 'em out Message-ID: <011601c37ded$1b16dc30$6401a8c0@EZDSDELL> I need to allow website visitors to "reset" their cookie values, so to speak. Anyone have a recommended "method"? Just loop through the array of vals and set to ''? Jeff Siegel P.S. Here's the answer to the question that some may have...namely, why should visitors be allowed to "reset" their cookie values? Well, after a user has submitted a form, some of the values are saved in a cookie. On subsequent visits to the website, those cookie values are automatically read..and fed..into the appropriate text box fields. So...if they accidentally messed up during the previous use of the form and bad values are in the cookies...it seems there should be a simple way to allow the user to clear out those values. From danielc at analysisandsolutions.com Thu Sep 18 10:15:32 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 10:15:32 -0400 Subject: [nycphp-talk] Cookie values - Clean 'em out In-Reply-To: <011601c37ded$1b16dc30$6401a8c0@EZDSDELL> References: <011601c37ded$1b16dc30$6401a8c0@EZDSDELL> Message-ID: <20030918141532.GA11019@panix.com> Hi Jeff: On Thu, Sep 18, 2003 at 09:59:20AM -0400, Jeff wrote: > read..and fed..into the appropriate text box fields. So...if they > accidentally messed up during the previous use of the form and bad > values are in the cookies...it seems there should be a simple way to > allow the user to clear out those values. So, then why not have a preferences page? It'll have a form displaying the data from all such cookies. If something is wrong, the person can change it and save the corrected data. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Thu Sep 18 11:00:17 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 18 Sep 2003 11:00:17 -0400 Subject: [nycphp-talk] Cookie values - Clean 'em out In-Reply-To: <20030918141532.GA11019@panix.com> Message-ID: <012e01c37df5$98cbd2e0$6401a8c0@EZDSDELL> That's a nice clean way to do it. I like it!! Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Thursday, September 18, 2003 9:16 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cookie values - Clean 'em out Hi Jeff: On Thu, Sep 18, 2003 at 09:59:20AM -0400, Jeff wrote: > read..and fed..into the appropriate text box fields. So...if they > accidentally messed up during the previous use of the form and bad > values are in the cookies...it seems there should be a simple way to > allow the user to clear out those values. So, then why not have a preferences page? It'll have a form displaying the data from all such cookies. If something is wrong, the person can change it and save the corrected data. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Thu Sep 18 15:10:18 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 18 Sep 2003 15:10:18 -0400 Subject: [nycphp-talk] ssh/sftp for php? Message-ID: <3F6A031A.1020606@chxo.com> Does anybody know of an existing class or extension that allows a PHP script to use the sftp subsystem of ssh? I know that I can use ftps, aka ftp+ssl/tls. But those servers are pretty rare compared to servers with ssh. csnyder. From dmintz at panix.com Thu Sep 18 15:34:11 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 18 Sep 2003 15:34:11 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <000001c37da9$3a7c5e40$6401a8c0@main> References: <000001c37da9$3a7c5e40$6401a8c0@main> Message-ID: I'm gonna try to explain this as briefly and clearly as I can. I've got a scheduling program for us court interpreters where there's a table called 'events'. An event has attributes like date, time, judge, type of proceeding, language, etc. Of course things like judge and language are stored as smallints pointing to related records in other tables. Thus, in order to fetch human-meaningful data I have to join several tables. "SELECT events.event_id, events.docket,events.event_time, judges.lastname, proceedings.type, languages.name, events.notes, languages.lang_id, FROM judges, proceedings, languages, events WHERE events.event_date = '$date' AND events.judge_id = judges.judge_id AND events.language_id = languages.lang_id AND events.proceeding_id = proceedings.proceeding_id" OK, so far so good. But I also want to display data from tables that are in a 1-M relationship to 'events'. An event can have zero or more interpreters assigned to it, or zero or more defendant names associated with it. And I only want to display row of data per event. So even if I could figure out the LEFT JOIN syntax to left-join multiple tables in this way, if such is possible, it still wouldn't give me what I want. What I've been doing is building one associative array with the event_ids as keys and merging it all together with three queries. (There are rarely more than about 30 elements at this point.) My question is, would it be more efficient to do the first query first, and as I loop through the result, query the related tables, resulting in maybe 60 queries per page access? Or do it with a lot fewer database calls, but suck up more memory? I've always thought it kind of rude to hammer the database when there's another way, but frankly I'm not sure, maybe that's what MySQL is there for. TIA, --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From adam at trachtenberg.com Thu Sep 18 15:43:13 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 18 Sep 2003 15:43:13 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: Message-ID: On Thu, 18 Sep 2003, David Mintz wrote: > My question is, would it be more efficient to do the first query first, > and as I loop through the result, query the related tables, resulting in > maybe 60 queries per page access? Or do it with a lot fewer database > calls, but suck up more memory? I believe the snarky answer is: "It depends. Do you have more memory on your Web server boxes or excess processor cycles on your database machines?" The second snarky answer is: "Does it even matter? Are your machines under such load that this comparison is meaningful? If not, code whatever is most maintainable and document that the other solution may be necessary under duress." (Alt Answer: Is one significantly faster?) Finally, my answer is that 60 database calls seems like a lot. I would probably do fewer calls and more in PHP. Again, I would need to know the memory footprint and the speed tradeoffs. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From jonbaer at jonbaer.net Thu Sep 18 14:35:07 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 18 Sep 2003 14:35:07 -0400 Subject: [nycphp-talk] ssh/sftp for php? References: <3F6A031A.1020606@chxo.com> Message-ID: <001501c37e13$95cc79f0$6500a8c0@thinkpad> i too am looking for something similar to what Perl has: http://www.stupidfool.org/perl/net-ssh/ - jon ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Thursday, September 18, 2003 3:10 PM Subject: [nycphp-talk] ssh/sftp for php? > Does anybody know of an existing class or extension that allows a PHP > script to use the sftp subsystem of ssh? > I know that I can use ftps, aka ftp+ssl/tls. But those servers are > pretty rare compared to servers with ssh. > > csnyder. > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at panix.com Thu Sep 18 15:57:37 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 18 Sep 2003 15:57:37 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: References: Message-ID: Thanks Adam. I had a feeling the answer would be something like that. I don't know techniques for measuring memory usage/db access tradeoffs so I don't know objectively.... I believe the answer to the snarky answers is, no there's not such a big load on our (one) server and I can surely get away with either approach, but I'd like to do it "right". I think I will stick with more PHP/less MySQL. BTW -- once I had a similar scenario with a Perl/CGI/DBI script and I went with the big data structure approach, and the thing was so astonishingly slow (on a shared server) that I know something had to be hideously wrong. On Thu, 18 Sep 2003, Adam Maccabee Trachtenberg wrote: > On Thu, 18 Sep 2003, David Mintz wrote: > > > My question is, would it be more efficient to do the first query first, > > and as I loop through the result, query the related tables, resulting in > > maybe 60 queries per page access? Or do it with a lot fewer database > > calls, but suck up more memory? > > I believe the snarky answer is: "It depends. Do you have more memory > on your Web server boxes or excess processor cycles on your database > machines?" > > The second snarky answer is: "Does it even matter? Are your machines > under such load that this comparison is meaningful? If not, code > whatever is most maintainable and document that the other solution may > be necessary under duress." (Alt Answer: Is one significantly faster?) > > Finally, my answer is that 60 database calls seems like a lot. I would > probably do fewer calls and more in PHP. Again, I would need to know > the memory footprint and the speed tradeoffs. > > -adam From tgales at tgaconnect.com Thu Sep 18 16:12:04 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 18 Sep 2003 16:12:04 -0400 Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: Message-ID: <000201c37e21$21435ff0$bf8d3818@OBERON1> You probably have already thought of this, but if things slow down too much, you could put the judge's name in the event table. This brings about the usual headaches (referential integrity checks you have to make) when you de-normalize a design. But it might not be too bad (I am assuming the judges don't change much on the events). Just a thought T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Thursday, September 18, 2003 3:34 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? I'm gonna try to explain this as briefly and clearly as I can. I've got a scheduling program for us court interpreters where there's a table called 'events'. An event has attributes like date, time, judge, type of proceeding, language, etc. Of course things like judge and language are stored as smallints pointing to related records in other tables. Thus, in order to fetch human-meaningful data I have to join several tables. "SELECT events.event_id, events.docket,events.event_time, judges.lastname, proceedings.type, languages.name, events.notes, languages.lang_id, FROM judges, proceedings, languages, events WHERE events.event_date = '$date' AND events.judge_id = judges.judge_id AND events.language_id = languages.lang_id AND events.proceeding_id = proceedings.proceeding_id" OK, so far so good. But I also want to display data from tables that are in a 1-M relationship to 'events'. An event can have zero or more interpreters assigned to it, or zero or more defendant names associated with it. And I only want to display row of data per event. So even if I could figure out the LEFT JOIN syntax to left-join multiple tables in this way, if such is possible, it still wouldn't give me what I want. What I've been doing is building one associative array with the event_ids as keys and merging it all together with three queries. (There are rarely more than about 30 elements at this point.) My question is, would it be more efficient to do the first query first, and as I loop through the result, query the related tables, resulting in maybe 60 queries per page access? Or do it with a lot fewer database calls, but suck up more memory? I've always thought it kind of rude to hammer the database when there's another way, but frankly I'm not sure, maybe that's what MySQL is there for. TIA, --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Thu Sep 18 16:44:14 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 16:44:14 -0400 Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: References: <000001c37da9$3a7c5e40$6401a8c0@main> Message-ID: <20030918204413.GA25949@panix.com> Hey David: On Thu, Sep 18, 2003 at 03:34:11PM -0400, David Mintz wrote: > > So even if I > could figure out the LEFT JOIN syntax to left-join multiple tables in this > way, if such is possible, it still wouldn't give me what I want. With clever looping and comparisons, I bet you could get what you want with one query. For exapmle, I've made some calendars where the items are ORDER BY EventDate, StartTime. I then loop through the results. Before starting, a variable named $LastDate is set to the date of the first record and a date header is printed out. While looping through, before displaying each record, the $LastDate is compared to the current event date. Once the dates are different, then the next date header is printed. See http://www.bikesummer.org/calendar/ to see what I mean. Similarly, you can use this principle to handle multiple sub-items. Like, printing the Interpreter and Defendants only when the name changes. Am I writing this clearly? --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dmintz at panix.com Thu Sep 18 16:51:08 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 18 Sep 2003 16:51:08 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <000201c37e21$21435ff0$bf8d3818@OBERON1> References: <000201c37e21$21435ff0$bf8d3818@OBERON1> Message-ID: On Thu, 18 Sep 2003, Tim Gales wrote: > You probably have already thought of this, but if things > slow down too much, you could put the judge's name in the > event table. This brings about the usual headaches > (referential integrity checks you have to make) when you > de-normalize a design. But it might not be too bad (I am > assuming the judges don't change much on the events). Sshhhh, don't let the Normalization Police hear you. Theoretically one could also make more liberal use of ENUM column types. Which would also bring major maintenance headaches of its own. Sometimes a judge retires or dies and should be concealed from the user yet remain there un-deleted for historical and referential integrity reasons. I don't even want to think about how to implement that with an ENUM. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From tgales at tgaconnect.com Thu Sep 18 16:51:16 2003 From: tgales at tgaconnect.com (tgales at tgaconnect.com) Date: Thu, 18 Sep 2003 16:51:16 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106391827501@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From dmintz at panix.com Thu Sep 18 17:03:20 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 18 Sep 2003 17:03:20 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <20030918204413.GA25949@panix.com> References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> Message-ID: Dan, I believe I do follow you and I don't think it would do for me (or, it would work, and I do not understand you (-:). If two successive 'subitems' are different, I want to concatenate the fields that are different and display then in one cell in one row. Let's say the result set looked like this Judge Language Defendant Interpreter ------------------------------------ Jones Spanish Estrada Mirta Jones Spanish Estrada Elena ...then I want to display Judge Language Defendant Interpreters --------------------------------------- Jones Spanish Estrada Mirta, Elena ...because that's what makes sense to the user. Zat make any sense? Thanks, David On Thu, 18 Sep 2003, Analysis & Solutions wrote: > Hey David: > > On Thu, Sep 18, 2003 at 03:34:11PM -0400, David Mintz wrote: > > > > So even if I > > could figure out the LEFT JOIN syntax to left-join multiple tables in this > > way, if such is possible, it still wouldn't give me what I want. > > With clever looping and comparisons, I bet you could get what you want > with one query. > > For exapmle, I've made some calendars where the items are ORDER BY > EventDate, StartTime. I then loop through the results. Before starting, > a variable named $LastDate is set to the date of the first record and a > date header is printed out. While looping through, before displaying each > record, the $LastDate is compared to the current event date. Once the > dates are different, then the next date header is printed. > > See http://www.bikesummer.org/calendar/ to see what I mean. > > Similarly, you can use this principle to handle multiple sub-items. Like, > printing the Interpreter and Defendants only when the name changes. > > Am I writing this clearly? > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From shiflett at php.net Thu Sep 18 17:05:03 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 18 Sep 2003 14:05:03 -0700 (PDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <20030918204413.GA25949@panix.com> Message-ID: <20030918210503.82040.qmail@web14303.mail.yahoo.com> --- Analysis & Solutions wrote: > With clever looping and comparisons, I bet you could get what > you want with one query. I might be misinterpreting his question, but I believe he was asking whether he should, not whether he could. As Adam mentioned, with one query, you place a lot of data in memory, which is good if you can handle it and bad if you can't. With multiple queries, you create more load on the database, it might be slower, etc. Without having a good idea about the particular tradeoffs in someone's situation, it is hard to suggest one way over the other. Personally, I try to organize my data so well that my queries are as simple as possible (I'm not joining multiple tables all the time), useful as possible (I can get exactly the data I need from a simple query), and use up as little memory as possible (the number of records returned are no more than I need). Given this, I almost always limit my interactions with the database and do everything in PHP. Hope that helps. Chris From danielc at analysisandsolutions.com Thu Sep 18 17:29:43 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 17:29:43 -0400 Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> Message-ID: <20030918212943.GA1221@panix.com> David: On Thu, Sep 18, 2003 at 05:03:20PM -0400, David Mintz wrote: > > I believe I do follow you and I don't think it would do for me (or, it > would work, and I do not understand you (-:). Seems to be the latter. :) > Judge Language Defendant Interpreter > ------------------------------------ > Jones Spanish Estrada Mirta > Jones Spanish Estrada Elena > > ...then I want to display > > Judge Language Defendant Interpreters > --------------------------------------- > Jones Spanish Estrada Mirta, Elena > > ...because that's what makes sense to the user. Zat make any sense? Yes. That's exactly what I thought you were talking about. So, psuedo code... $LastEvent = 0; $LastDefendant = ''; $LastInterpreter = ''; $Defendants = array(); $Interpreters = array(); while ($row = fetchrow()) { if ($row['eventid'] != $LastEvent) { $LastJudge = $row['judge']; if ($row['Defendant'] != $LastDefendant) { $LastDefendant = $row['Defendant']; $Defednants[] = $row['Defendant']; } if ($row['Interpreter'] != $LastInterpreter) { $LastInterpreter = $row['Interpreter']; $Interpreters[] = $row['Interpreter']; } } else { echo "$LastJudge"; echo '' . implode(', ', $Defendants) . ''; echo '' . implode(', ', $Interpreters) . "\n"; $Defendants = array(); $Interpreters = array(); $Defednants[] = $row['Defendant']; $Interpreters[] = $row['Interpreter']; // also probably need to set the $Last* vars too, // but I'm getting lazy and you get the idea by now... } } -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Thu Sep 18 17:33:28 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 17:33:28 -0400 Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <20030918210503.82040.qmail@web14303.mail.yahoo.com> References: <20030918204413.GA25949@panix.com> <20030918210503.82040.qmail@web14303.mail.yahoo.com> Message-ID: <20030918213328.GB1221@panix.com> Hey Chris: On Thu, Sep 18, 2003 at 02:05:03PM -0700, Chris Shiflett wrote: > > I might be misinterpreting his question, but I believe he was asking > whether he > should, not whether he could. Yes and no. In the question was a lingering doubt that he could accomplish it in one query. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From rdumas at cmj.com Thu Sep 18 18:03:34 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 18 Sep 2003 18:03:34 -0400 Subject: [nycphp-talk] Simple parse/replace Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FBB2@webproxy.uat.dbinsight.com> That's some great code. Thanks; it works beautifully. One more thing: I have a text field for users to enter notes, but if they include a carriage return, it carries over to the log. How do I strip out any \n's a user has input (and preferably replace them with, say, a
    tag, or at least a space)? -----Original Message----- From: Adam Maccabee Trachtenberg [mailto:adam at trachtenberg.com] Sent: Wednesday, September 10, 2003 7:35 PM To: NYPHP Talk Cc: LIPHP (E-mail) Subject: Re: [nycphp-talk] Simple parse/replace This should be enough to get you started: $fp = fopen('foo.tab', 'r'); print "\n"; while ($line = fgetcsv($fp, 1000, "\t")) { print " \n \n \n \n"; } print "
    "; print join("", $line); print "
    \n"; fclose($fp); -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Thu Sep 18 17:05:07 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 18 Sep 2003 17:05:07 -0400 Subject: [nycphp-talk] Simple parse/replace References: <2ADC7BED20C3D711BFF100508B8FA3E307FBB2@webproxy.uat.dbinsight.com> Message-ID: <00bb01c37e28$8a5a9650$6500a8c0@thinkpad> RE: [nycphp-talk] Simple parse/replacehttp://us2.php.net/nl2br ----- Original Message ----- From: Robert Dumas To: 'NYPHP Talk' Sent: Thursday, September 18, 2003 6:03 PM Subject: RE: [nycphp-talk] Simple parse/replace That's some great code. Thanks; it works beautifully. One more thing: I have a text field for users to enter notes, but if they include a carriage return, it carries over to the log. How do I strip out any \n's a user has input (and preferably replace them with, say, a
    tag, or at least a space)? -----Original Message----- From: Adam Maccabee Trachtenberg [mailto:adam at trachtenberg.com] Sent: Wednesday, September 10, 2003 7:35 PM To: NYPHP Talk Cc: LIPHP (E-mail) Subject: Re: [nycphp-talk] Simple parse/replace This should be enough to get you started: $fp = fopen('foo.tab', 'r'); print "\n"; while ($line = fgetcsv($fp, 1000, "\t")) { print " \n \n \n \n"; } print "
    "; print join("", $line); print "
    \n"; fclose($fp); -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From southwell at dneba.com Thu Sep 18 20:30:44 2003 From: southwell at dneba.com (Michael Southwell) Date: Thu, 18 Sep 2003 20:30:44 -0400 Subject: [nycphp-talk] setcookie and localhost Message-ID: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> a script using setcookie works fine on a remote host but the cookie doesn't work on localhost (where I was testing)--the cookie is written but not read. Is this something I should have known, or is something else going on here? Can't find anything about this in docs. Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From danielc at analysisandsolutions.com Thu Sep 18 20:54:03 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 20:54:03 -0400 Subject: [nycphp-talk] setcookie and localhost In-Reply-To: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> References: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> Message-ID: <20030919005402.GA1303@panix.com> Hola Michael: On Thu, Sep 18, 2003 at 08:30:44PM -0400, Michael Southwell wrote: > a script using setcookie works fine on a remote host but the cookie doesn't > work on localhost (where I was testing)--the cookie is written but not > read. I suspect the paths are different. Adjust the path parameter as needed on the local machine and see what happens. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From shiflett at php.net Thu Sep 18 21:08:22 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 18 Sep 2003 18:08:22 -0700 (PDT) Subject: [nycphp-talk] setcookie and localhost In-Reply-To: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> Message-ID: <20030919010822.35912.qmail@web14306.mail.yahoo.com> --- Michael Southwell wrote: > a script using setcookie works fine on a remote host but the > cookie doesn't work on localhost (where I was testing)--the > cookie is written but not read. Are you setting a domain? You can always omit that to use the current domain, such as: header('Set-Cookie: foo=bar'); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From dmintz at panix.com Thu Sep 18 21:29:46 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 18 Sep 2003 21:29:46 -0400 (EDT) Subject: [nycphp-talk] more queries, or bigger in-memory data structure ? In-Reply-To: <20030918212943.GA1221@panix.com> References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> <20030918212943.GA1221@panix.com> Message-ID: On Thu, 18 Sep 2003, Analysis & Solutions wrote: > > I believe I do follow you and I don't think it would do for me (or, it > > would work, and I do not understand you (-:). > > Seems to be the latter. :) > > So, psuedo code... I think I follow you now. Seems like a solution, thank you. I suppose one could haggle that you're pulling redundant data that you aren't gonna use, if you see my point. Perhaps I'll show you how I'm doing it, once I get it presentable, see what you think. Chris said: <> I think I have done this as best I can in this particular scenario. The only way to do fewer joins would be to de-normalize the hell out of my db, and I would surely end up paying dearly for that elsewhere. Anyway I'm grateful for the discussion. This list rocks. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From southwell at dneba.com Thu Sep 18 21:20:24 2003 From: southwell at dneba.com (Michael Southwell) Date: Thu, 18 Sep 2003 21:20:24 -0400 Subject: [nycphp-talk] setcookie and localhost In-Reply-To: <20030919005402.GA1303@panix.com> References: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> Message-ID: <5.1.0.14.2.20030918211752.00b39480@mail.optonline.net> At 08:54 PM 9/18/2003, you wrote: >Hola Michael: > >On Thu, Sep 18, 2003 at 08:30:44PM -0400, Michael Southwell wrote: > > a script using setcookie works fine on a remote host but the cookie > doesn't > > work on localhost (where I was testing)--the cookie is written but not > > read. > >I suspect the paths are different. Adjust the path parameter as needed on >the local machine and see what happens. sorry, don't get it. Both Moz1.4 and IE6.0 know where to put the cookie without being told anything, and they do indeed put it there, but upon next invocation they don't read it, as if it's not there. What "path parameter" is this? >--Dan > >-- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From shiflett at php.net Thu Sep 18 21:37:08 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 18 Sep 2003 18:37:08 -0700 (PDT) Subject: [nycphp-talk] setcookie and localhost In-Reply-To: <5.1.0.14.2.20030918211752.00b39480@mail.optonline.net> Message-ID: <20030919013708.69519.qmail@web14307.mail.yahoo.com> --- Michael Southwell wrote: > sorry, don't get it. Both Moz1.4 and IE6.0 know where to put > the cookie without being told anything, and they do indeed put > it there, but upon next invocation they don't read it, as if > it's not there. What "path parameter" is this? Cookies have various attributes that restrict the cases in which a browser will send them in a request. He mentioned one of those attributes, path, that could be causing your problem. I think it is more likely a case of the domain being different, as that is another attribute. Of course, we're both just guessing. I am just now in the process of converting a chapter of my book into HTML, so that I can offer it for free on my Web site. You can read the chapter (without the figures, currently) here: http://shiflett.org/books/http-developers-handbook/chapters/11 Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Thu Sep 18 22:00:51 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 18 Sep 2003 22:00:51 -0400 Subject: [nycphp-talk] setcookie and localhost In-Reply-To: <5.1.0.14.2.20030918211752.00b39480@mail.optonline.net> References: <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> <5.1.0.14.2.20030918202825.00b218b8@mail.optonline.net> <5.1.0.14.2.20030918211752.00b39480@mail.optonline.net> Message-ID: <20030919020051.GA6335@panix.com> Michael: On Thu, Sep 18, 2003 at 09:20:24PM -0400, Michael Southwell wrote: > > sorry, don't get it. Both Moz1.4 and IE6.0 know where to put the cookie > without being told anything, and they do indeed put it there, but upon next > invocation they don't read it, as if it's not there. It doesn't have to do with where the cookie is stored. It has to do with the path of the website for which the cookie in question will be accessible. Read the manual. http://php.net/setcookie Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From alfonso at ruboskizo.com Fri Sep 19 05:02:25 2003 From: alfonso at ruboskizo.com (=?iso-8859-1?Q?Alfonso_S=E1nchez-Paus_D=EDaz?=) Date: Fri, 19 Sep 2003 11:02:25 +0200 Subject: [nycphp-talk] Repost Post Vars References: <007101c37d5a$7d812490$6401a8c0@EZDSDELL> Message-ID: <001501c37e8c$bf3b4680$0900a8c0@PABLO> You should try the http.inc class that you can find in PHPclasses website. This class has methods to send POST variables trough PHP, and of course with a header location change. Cheers, Alf From jsiegel1 at optonline.net Fri Sep 19 05:48:14 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 19 Sep 2003 05:48:14 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <001501c37e8c$bf3b4680$0900a8c0@PABLO> Message-ID: <003c01c37e93$258bb130$6401a8c0@EZDSDELL> Thank you. I'll check it out. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Alfonso S?nchez-Paus D?az Sent: Friday, September 19, 2003 4:02 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars You should try the http.inc class that you can find in PHPclasses website. This class has methods to send POST variables trough PHP, and of course with a header location change. Cheers, Alf _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Fri Sep 19 10:04:17 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 19 Sep 2003 10:04:17 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <007d01c37d66$ca367a90$6401a8c0@EZDSDELL> References: <20030917.141345.15023.284773@webmail06.lax.untd.com> <007d01c37d66$ca367a90$6401a8c0@EZDSDELL> Message-ID: <20030919140417.GA28005@panix.com> Hey Jeff: On Wed, Sep 17, 2003 at 05:57:58PM -0400, Jeff wrote: > Good question. Anyone know about the security implications? > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of crisscott at netzero.com > > $_SESSION['post_vars'] = $_POST; > header(blah...); > And then when you get to the second page you could put them back: > $_POST = $_SESSION['post_vars']; > > I have no idea what the implications of this are. > > Scott Mattocks I'd imagine the security risks involved are roughly equivalent to accepting post headers in the first place. Only hitch is you've got to make sure you're dealing with the same person, which shouldn't be too hard. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Fri Sep 19 09:06:39 2003 From: jonbaer at jonbaer.net (jon baer) Date: Fri, 19 Sep 2003 09:06:39 -0400 Subject: [nycphp-talk] MERGE tables (MySQL) ... Message-ID: <003c01c37eae$dd22cac0$8119fea9@thinkpad> has anyone been in the situation to use them yet? i need some clarification so i can understand their use a little better because id like to arrange an application to use them because it requires the need to pull out the data (tables), analyze them + flush the running process (much like a logrotate type) ... do merge tables have any real advantage + could you theoretically merge tables securely over IP using these types of tables/files? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From jsiegel1 at optonline.net Fri Sep 19 10:39:25 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 19 Sep 2003 10:39:25 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030919140417.GA28005@panix.com> Message-ID: <003301c37ebb$d3c0d500$6401a8c0@EZDSDELL> That should, theoretically, be taken care of by the browser. No? Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Friday, September 19, 2003 9:04 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars Hey Jeff: On Wed, Sep 17, 2003 at 05:57:58PM -0400, Jeff wrote: > Good question. Anyone know about the security implications? > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of crisscott at netzero.com > > $_SESSION['post_vars'] = $_POST; > header(blah...); > And then when you get to the second page you could put them back: > $_POST = $_SESSION['post_vars']; > > I have no idea what the implications of this are. > > Scott Mattocks I'd imagine the security risks involved are roughly equivalent to accepting post headers in the first place. Only hitch is you've got to make sure you're dealing with the same person, which shouldn't be too hard. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Fri Sep 19 11:06:15 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 19 Sep 2003 11:06:15 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <003301c37ebb$d3c0d500$6401a8c0@EZDSDELL> References: <20030919140417.GA28005@panix.com> <003301c37ebb$d3c0d500$6401a8c0@EZDSDELL> Message-ID: <20030919150614.GA8744@panix.com> Hey: On Fri, Sep 19, 2003 at 10:39:25AM -0400, Jeff Siegel wrote: > That should, theoretically, be taken care of by the browser. No? Well, I don't use cookies. I'd save $_SERVER['HTTP_USER_AGENT'] and the current timestamp in the session and pass the session ID in the query string of the header(Location) call. The subsequent script checks the saved user agent info matches and the time elapsed is less than a few seconds ago, you're good to continue. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Fri Sep 19 15:39:19 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 19 Sep 2003 15:39:19 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030919150614.GA8744@panix.com> Message-ID: <005301c37ee5$c1a32150$6401a8c0@EZDSDELL> Isn't it the case that if the user has cookies on it will use cookies but if the user doesn't have cookies on...then PHP kinda handles things? Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Friday, September 19, 2003 10:06 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars Hey: On Fri, Sep 19, 2003 at 10:39:25AM -0400, Jeff Siegel wrote: > That should, theoretically, be taken care of by the browser. No? Well, I don't use cookies. I'd save $_SERVER['HTTP_USER_AGENT'] and the current timestamp in the session and pass the session ID in the query string of the header(Location) call. The subsequent script checks the saved user agent info matches and the time elapsed is less than a few seconds ago, you're good to continue. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Fri Sep 19 15:11:03 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 19 Sep 2003 15:11:03 -0400 Subject: [nycphp-talk] PHP Logo Font References: <20030919140417.GA28005@panix.com> <003301c37ebb$d3c0d500$6401a8c0@EZDSDELL> <20030919150614.GA8744@panix.com> Message-ID: <000b01c37ee1$ce97ebb0$c801a8c0@dj> Does anyone know what font the PHP logo uses?? From danielc at analysisandsolutions.com Fri Sep 19 16:14:34 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 19 Sep 2003 16:14:34 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <005301c37ee5$c1a32150$6401a8c0@EZDSDELL> References: <20030919150614.GA8744@panix.com> <005301c37ee5$c1a32150$6401a8c0@EZDSDELL> Message-ID: <20030919201434.GA1929@panix.com> Hola: On Fri, Sep 19, 2003 at 03:39:19PM -0400, Jeff Siegel wrote: > Isn't it the case that if the user has cookies on it will use cookies > but if the user doesn't have cookies on...then PHP kinda handles things? Similar. BUT, you're writing a header() call, which I doubt PHP would automatically stick a session ID into. Adios, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dmintz at panix.com Fri Sep 19 16:25:34 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 19 Sep 2003 16:25:34 -0400 (EDT) Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030919201434.GA1929@panix.com> References: <20030919150614.GA8744@panix.com> <005301c37ee5$c1a32150$6401a8c0@EZDSDELL> <20030919201434.GA1929@panix.com> Message-ID: On Fri, 19 Sep 2003, Analysis & Solutions wrote: > Hola: > > On Fri, Sep 19, 2003 at 03:39:19PM -0400, Jeff Siegel wrote: > > Isn't it the case that if the user has cookies on it will use cookies > > but if the user doesn't have cookies on...then PHP kinda handles things? > > Similar. BUT, you're writing a header() call, which I doubt PHP would > automatically stick a session ID into. Plus don't you have to have url-rewriting configured? (I assume url rewriting is what you're talking about). From dkrook at hotmail.com Fri Sep 19 17:26:36 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 19 Sep 2003 17:26:36 -0400 Subject: [nycphp-talk] PHP Logo Font Message-ID: It's Handel Gothic: http://php.net/download-logos.php http://www.myfonts.com/fonts/bitstream/handel-gothic/ >Does anyone know what font the PHP logo uses?? _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From danielc at analysisandsolutions.com Fri Sep 19 18:05:26 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 19 Sep 2003 18:05:26 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: References: <20030919150614.GA8744@panix.com> <005301c37ee5$c1a32150$6401a8c0@EZDSDELL> <20030919201434.GA1929@panix.com> Message-ID: <20030919220526.GA19324@panix.com> On Fri, Sep 19, 2003 at 04:25:34PM -0400, David Mintz wrote: > On Fri, 19 Sep 2003, Analysis & Solutions wrote: > > > > On Fri, Sep 19, 2003 at 03:39:19PM -0400, Jeff Siegel wrote: > > > Isn't it the case that if the user has cookies on it will use cookies > > > but if the user doesn't have cookies on...then PHP kinda handles things? > > > > Similar. BUT, you're writing a header() call, which I doubt PHP would > > automatically stick a session ID into. > > Plus don't you have to have url-rewriting configured? (I assume url > rewriting is what you're talking about). It's not clear who you're talking to. Jeff was talking about URL rewriting. I wasn't and URL rewriting doesn't have to be on. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Fri Sep 19 20:22:23 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 19 Sep 2003 20:22:23 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030919201434.GA1929@panix.com> Message-ID: <000701c37f0d$434e8e70$6401a8c0@EZDSDELL> It seems to work without a hitch. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Friday, September 19, 2003 3:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars Hola: On Fri, Sep 19, 2003 at 03:39:19PM -0400, Jeff Siegel wrote: > Isn't it the case that if the user has cookies on it will use cookies > but if the user doesn't have cookies on...then PHP kinda handles things? Similar. BUT, you're writing a header() call, which I doubt PHP would automatically stick a session ID into. Adios, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Sat Sep 20 17:34:38 2003 From: soazine at erols.com (Phil Powell) Date: Sat, 20 Sep 2003 17:34:38 -0400 Subject: [nycphp-talk] Fw: Delivery failure to pjmatthews@gotojml.com Message-ID: <058701c37fbe$fe9e3200$67a76244@philofsoa> Um, I didn't do this one! :) So what's up with this? Phil ----- Original Message ----- From: "TZO Mailer" To: "Phil Powell" Sent: Saturday, September 20, 2003 5:32 PM Subject: Delivery failure to pjmatthews at gotojml.com > Delivery was attempted, but failed because: > 550 No Acceptable Recipients > > -=-=-=-=-=-=-=-=- > Original Message: > -=-=-=-=-=-=-=-=- > > X-TZO-Forward: pjmatthews at gotojml.com > Received: from 206.252.198.83 by saf.tzo.com > id 2003082215071071807 for pjmatthews at gotojml.com; > Fri, 22 Aug 2003 19:07:10 GMT > Received: from virtu.nyphp.org (virtu.nyphp.org [206.252.198.83]) > by virtu.nyphp.org (Postfix) with ESMTP > id B7697A8609; Fri, 22 Aug 2003 15:05:15 -0400 (EDT) > Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242]) > by virtu.nyphp.org (Postfix) with ESMTP id EC7ABA85FE > for ; Fri, 22 Aug 2003 15:05:12 -0400 (EDT) > Received: from philofsoa ([68.98.167.103]) by lakemtao03.cox.net > (InterMail vM.5.01.06.04 201-253-122-130-104-20030726) with SMTP > id <20030822190513.QTDX10977.lakemtao03.cox.net at philofsoa> > for ; Fri, 22 Aug 2003 15:05:13 -0400 > Message-ID: <02cb01c368e0$425f2300$67a76244 at philofsoa> > From: "Phil Powell" > To: "NYPHP Talk" > References: > Subject: Re: [nycphp-talk] PHP project from Hell Story > Date: Fri, 22 Aug 2003 15:04:48 -0400 > MIME-Version: 1.0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: 7bit > X-Priority: 3 > X-MSMail-Priority: Normal > X-Mailer: Microsoft Outlook Express 6.00.2800.1158 > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > X-BeenThere: talk at lists.nyphp.org > X-Mailman-Version: 2.1.2 > Precedence: list > Reply-To: NYPHP Talk > List-Id: NYPHP Talk > List-Unsubscribe: , > > List-Archive: > List-Post: > List-Help: > List-Subscribe: , > > Sender: talk-bounces at lists.nyphp.org > Errors-To: talk-bounces at lists.nyphp.org > > I suggested that too, Mauricio. He refused to do so, it was "more work than > what I expect from an upload page". He has, or rather HAD an upload page > (he deleted what I did now) that uploads the file, but he wanted it to > upload only a SINGLE file, complete with images intact if need be. > > Phil > ----- Original Message ----- > From: "Mauricio Sadicoff" > To: "NYPHP Talk" > Sent: Friday, August 22, 2003 3:03 PM > Subject: Re: [nycphp-talk] PHP project from Hell Story > > > > On 8/22/2003 14:23, "Phil Powell" scribbled: > > > > > Has anyone have anything like this happen to them? How have you handled > it, > > > I'm out of ideas. > > > > > > Thanks > > > Phil > > > > > > Phil, > > > > > > Unfortunately, this means that you were really not able to provide what > I had > > > asked for. As was explained in my original bid request "The key to this > will > > > be that I would like to be able to add the pages in the password > protected > > > part of the site by either filling in a form OR using FrontPage 2002." > Since > > > I am not able to do this with adding text and images in a way that > people can > > > read it, I am going to have to find another alternative. I will be > deleting > > > your files from the web site and starting over and hopefully will still > be > > > able to have this finished by Sunday > > > > > > Lawrence > > > > Suggestion: Make an "upload" page. Something inside the pwd protected page > > that would allow him to upload many files. They will all upload to the > same > > directory, so the images will be there. Tell him that he has to have the > > images in the same directory in his computer when he creates the file, > this > > should not be a problem. > > > > In the "upload" page, to avoid further discussion, you can even call one > of > > the upload fields "Word document" and the others images. You're just using > > HTML input fields, really, and uploading them to a specific directory. > > > > That should do it. If it does, 10% is my going rate, hehehe ;-) > > > > Cheers, > > Mauricio > > > > --- > > Mauricio L. Sadicoff > > mlevy at hypersol.com > > > > > > "Peace of mind isn't at all superficial, really," I expound. "It's the > whole > > thing. That which produces it is good maintenance; that which disturbs it > is > > poor maintenance. What we call workability of the machine is just an > > objectification of this peace of mind. The ultimate test is always your > own > > serenity." - Zen and the Art of Motorcycle Maintenance. > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Sat Sep 20 19:47:47 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sat, 20 Sep 2003 19:47:47 -0400 Subject: [nycphp-talk] Fw: Delivery failure to pjmatthews@gotojml.com References: <058701c37fbe$fe9e3200$67a76244@philofsoa> Message-ID: <009c01c37fd1$9886a840$8119fea9@thinkpad> yeah its been totally unacceptable, today alone i had over ~+60 emails + count that with another ~+100 Swen at MM (anyone else?) + emails been completely flooded all over the place ... wonder if this one has anything to do with verisigns new wildcard dns service ... - jon From jsiegel1 at optonline.net Sun Sep 21 09:45:29 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sun, 21 Sep 2003 09:45:29 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030919201434.GA1929@panix.com> Message-ID: <000001c38046$9f262890$6401a8c0@EZDSDELL> Dan, If I'm reading this correctly, PHP does automatically handle the passing of the session ID (see snippet below). However, it doesn't directly address your question concerning the header call. "PHP is capable of transforming links transparently. Unless you are using PHP 4.2 or later, you need to enable it manually when building PHP. Under UNIX, pass --enable-trans-sid to configure. If this build option and the run-time option session.use_trans_sid are enabled, relative URIs will be changed to contain the session id automatically." (See: http://us3.php.net/session) Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Friday, September 19, 2003 3:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars Hola: On Fri, Sep 19, 2003 at 03:39:19PM -0400, Jeff Siegel wrote: > Isn't it the case that if the user has cookies on it will use cookies > but if the user doesn't have cookies on...then PHP kinda handles things? Similar. BUT, you're writing a header() call, which I doubt PHP would automatically stick a session ID into. Adios, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Sun Sep 21 11:34:16 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Sun, 21 Sep 2003 11:34:16 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <000001c38046$9f262890$6401a8c0@EZDSDELL> References: <20030919201434.GA1929@panix.com> <000001c38046$9f262890$6401a8c0@EZDSDELL> Message-ID: <20030921153416.GA16257@panix.com> Howdy: On Sun, Sep 21, 2003 at 09:45:29AM -0400, Jeff Siegel wrote: > Dan, > > If I'm reading this correctly, PHP does automatically handle the passing > of the session ID (see snippet below). However, it doesn't directly > address your question concerning the header call. First, I doubt the transparent session ID / url rewriting works on header(Location) calls. Second, even if PHP did tack on a SID to the location header, the location specified is supposed to be a full URI, thus would land in the rule that only relative links are rewritten. Thus, you need to manually tack the session id into the header(Location) URI. ... snippity snip, because, that's why ... --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From soazine at erols.com Sun Sep 21 12:53:42 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 21 Sep 2003 12:53:42 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Message-ID: <096301c38060$eb17b100$67a76244@philofsoa> Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Sun Sep 21 13:08:07 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 21 Sep 2003 13:08:07 -0400 Subject: [nycphp-talk] (no subject) Message-ID: <001101c38062$ed8bfa70$bf8d3818@OBERON1> Hello it's me again Sorry for this 'nit-picken' detail stuff again but in regards to may last post: 1. If you are careful to always use '
    ' instead of '
    ' the validator won't complain about a missing end tag. 2. If you never start an unordered list without at least
  • (empty element) as in: Line 213:

      And you remember to close list items e.g. Line 217:
    • 6:45 Product/Technique/Special Feature
      Changed to: Line 217:
    • 6:45 Product/Technique/Special Feature

    • I think you would be eligible for a 'spiffy' w3c XHTML validated logo. (assuming you want one.) T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Sun Sep 21 13:12:25 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sun, 21 Sep 2003 13:12:25 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <20030921153416.GA16257@panix.com> Message-ID: <000f01c38063$878342f0$6401a8c0@EZDSDELL> Dan, You may have missed my little "disclaimer" in which I noted "...it doesn't directly address your question concerning the header call." As for requiring a full URI...it seems that's not required. The PHP manual does state that "...relative URIs will be changed to contain the session id automatically." Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Sunday, September 21, 2003 10:34 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Repost Post Vars Howdy: On Sun, Sep 21, 2003 at 09:45:29AM -0400, Jeff Siegel wrote: > Dan, > > If I'm reading this correctly, PHP does automatically handle the passing > of the session ID (see snippet below). However, it doesn't directly > address your question concerning the header call. First, I doubt the transparent session ID / url rewriting works on header(Location) calls. Second, even if PHP did tack on a SID to the location header, the location specified is supposed to be a full URI, thus would land in the rule that only relative links are rewritten. Thus, you need to manually tack the session id into the header(Location) URI. ... snippity snip, because, that's why ... --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jim at bizcomputinginc.com Sun Sep 21 13:25:35 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sun, 21 Sep 2003 13:25:35 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <096301c38060$eb17b100$67a76244@philofsoa> Message-ID: <00cb01c38065$5e9f8270$6501a8c0@Notebook> You are probably using an older version of mysql which does not support subqueries. You need to either move up to the latest version of mysql which I beleive now supports subqueries, or rewrite out the subquery. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 12:53 PM Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Sun Sep 21 13:46:37 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sun, 21 Sep 2003 13:46:37 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <096301c38060$eb17b100$67a76244@philofsoa> Message-ID: <002301c38068$4e606480$6401a8c0@EZDSDELL> You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Sun Sep 21 14:17:13 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 21 Sep 2003 14:17:13 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL> Message-ID: <0a2b01c3806c$95760970$67a76244@philofsoa> MessageI did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Sun Sep 21 14:51:45 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sun, 21 Sep 2003 14:51:45 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL> <0a2b01c3806c$95760970$67a76244@philofsoa> Message-ID: <002d01c38071$679edc70$6501a8c0@Notebook> MessageI wouldn't categorize mySQL a waste of database. It depends on your needs. Do you need a fast, small, cheap database which is easy to get into and use, or a advanced, expensive, database that takes months of studying to begin to utilize to it's best abilities? Oracle, Sybase, MSSQL etc. have been available for quite some time, have many advanced features, but comes at quite a cost in money, maint, learning curve, and resources. If you app needs high-end database functionality, then you have to be willing to part with some money, time, and resources. mySQL on the other hand has not been around as long as the commercial products, and has at it's foundation a small footprint with the majority of the learning curve in learning SQL and has a very low price - free. So far, mySQL has worked extremly well in many of my apps. Sometimes I have to rethink my design because I am thinking too much in the "large db" mindset, but that's me, not mySQL. It seems to me that you could really benefit from sitting down with the mySQL manual for a short spell, especially the part about mySQL Ansi 92 support. It might be beneficial to also get aquanted with Oracle's proprietary aspects so you understand what features need a different solution because your assuming an Oracle feature is Ansi 92. This would be true no matter what DB product you pick up. I got my start in SQL with MSSQL. When I tried to get into Oracle I was ready to call Oracle a piece of garbage because I couldn't do anything with it. The joins were different, the allocations different, the stored procedure language different, the permissions systems different. But after weeks of working with the product, I began to learn the Oracle way and realized my judgement of Oracle was not based on the merits/demerits of Oracle, but on my lack of knowledge of the product and what it's target audience is. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:17 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Sun Sep 21 14:56:03 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 21 Sep 2003 14:56:03 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa> <002d01c38071$679edc70$6501a8c0@Notebook> Message-ID: <0a9e01c38072$025cd050$67a76244@philofsoa> MessageJim, if I had that kind of learning ability I would do so, but unfortunately I can only take things in small bite-sized pieces, therefore, a manual would do me no good as a whole. Usually when it comes to manuals I can only pick at what I understand and/or need at the moment and apply. In fact, my entire ability is based on application, not on foreknowledge or logical cognition. In other words, I know that to make a cake you add these ingredients until it works, not that you already know to do this/that/other based on what you read, because often times what I read makes no sense to me anyway. Sorry, that's how I've always viewed the world since birth and school. Somehow I've compensated for this severe ability lacking and done what I needed to get done. In the case of creating relational data models of complexities ranging from lookup tables to association tables (as is the case of this freelance project I'm working on), mySQL doesn't cut it. Oracle, SQL Server and even Sybase (that I don't know) would cut it quite well. That's how I view it. Phil ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Sunday, September 21, 2003 2:51 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I wouldn't categorize mySQL a waste of database. It depends on your needs. Do you need a fast, small, cheap database which is easy to get into and use, or a advanced, expensive, database that takes months of studying to begin to utilize to it's best abilities? Oracle, Sybase, MSSQL etc. have been available for quite some time, have many advanced features, but comes at quite a cost in money, maint, learning curve, and resources. If you app needs high-end database functionality, then you have to be willing to part with some money, time, and resources. mySQL on the other hand has not been around as long as the commercial products, and has at it's foundation a small footprint with the majority of the learning curve in learning SQL and has a very low price - free. So far, mySQL has worked extremly well in many of my apps. Sometimes I have to rethink my design because I am thinking too much in the "large db" mindset, but that's me, not mySQL. It seems to me that you could really benefit from sitting down with the mySQL manual for a short spell, especially the part about mySQL Ansi 92 support. It might be beneficial to also get aquanted with Oracle's proprietary aspects so you understand what features need a different solution because your assuming an Oracle feature is Ansi 92. This would be true no matter what DB product you pick up. I got my start in SQL with MSSQL. When I tried to get into Oracle I was ready to call Oracle a piece of garbage because I couldn't do anything with it. The joins were different, the allocations different, the stored procedure language different, the permissions systems different. But after weeks of working with the product, I began to learn the Oracle way and realized my judgement of Oracle was not based on the merits/demerits of Oracle, but on my lack of knowledge of the product and what it's target audience is. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:17 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Sun Sep 21 14:58:08 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sun, 21 Sep 2003 14:58:08 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL> <0a2b01c3806c$95760970$67a76244@philofsoa> Message-ID: <004501c38072$4bf21810$6501a8c0@Notebook> MessageWhy can't your query be restated as: SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s JOIN nnet_storrelse_varegruppe_assoc sv ON s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id JOIN nnet_produkt_varegruppe v ON sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id WHERE v.nnet_produkt_varegruppe_code = 'FLU17' AND s.nnet_produkt_storrelse_id > 1 ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:17 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Sun Sep 21 15:04:46 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 21 Sep 2003 15:04:46 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa> <004501c38072$4bf21810$6501a8c0@Notebook> Message-ID: <0ad001c38073$393f9b10$67a76244@philofsoa> MessageANSI SQL is not what I'm used to, but anyway I bagged the whole initial approach, wrote a new association table (nnet_produkt_storrelse_assoc) and flattened out the query to be SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt p, nnet_produkt_storrelse_assoc sv, nnet_produkt_storrelse s WHERE p.nnet_produkt_id = sv.nnet_produkt_id AND p.nnet_produkt_id = ' . $row['nnet_produkt_id'] . AND sv.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id And that worked perfectly! Phil ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Sunday, September 21, 2003 2:58 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Why can't your query be restated as: SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s JOIN nnet_storrelse_varegruppe_assoc sv ON s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id JOIN nnet_produkt_varegruppe v ON sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id WHERE v.nnet_produkt_varegruppe_code = 'FLU17' AND s.nnet_produkt_storrelse_id > 1 ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:17 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Sun Sep 21 15:11:17 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sun, 21 Sep 2003 15:11:17 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa><002d01c38071$679edc70$6501a8c0@Notebook> <0a9e01c38072$025cd050$67a76244@philofsoa> Message-ID: <005d01c38074$229779e0$6501a8c0@Notebook> MessageSorry to hear you have such a struggle learning from a manual, but I wouldn't disparage a product because it doesn't lend easily to learning based on knowledge of another product. And when it comes to association tables, I have found no problem using mySQL. It's all in knowing that in SQL there is always more than 1 way to skin a cat ( no anti-cat sentiment meant ). With mySQL, they have been working to add in more of the advanced features, and in fact, the foreign keys have been available for a while, the subqueries are now there, and joins have always been Ansi standard. I can understand you learning in bits and pieces through application. I think many people learn best this way. A big problem with learning this way though is that you need to avoid jumping in the fire without a fire suit! When I decide I want to learn another product so I can add it to my portfolio, I choose an application of my choosing, possibly something I have done already in another environment. Then I try to replicate it. I hit alot of walls, but thats when it's time to experiement, hit manuals, ask questions, etc. Little by little the knowledge comes. If I try this means of learning while on a "real" project, I'm not going to learn as much because I am constantly under pressure to produce. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:56 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Jim, if I had that kind of learning ability I would do so, but unfortunately I can only take things in small bite-sized pieces, therefore, a manual would do me no good as a whole. Usually when it comes to manuals I can only pick at what I understand and/or need at the moment and apply. In fact, my entire ability is based on application, not on foreknowledge or logical cognition. In other words, I know that to make a cake you add these ingredients until it works, not that you already know to do this/that/other based on what you read, because often times what I read makes no sense to me anyway. Sorry, that's how I've always viewed the world since birth and school. Somehow I've compensated for this severe ability lacking and done what I needed to get done. In the case of creating relational data models of complexities ranging from lookup tables to association tables (as is the case of this freelance project I'm working on), mySQL doesn't cut it. Oracle, SQL Server and even Sybase (that I don't know) would cut it quite well. That's how I view it. Phil ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Sunday, September 21, 2003 2:51 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I wouldn't categorize mySQL a waste of database. It depends on your needs. Do you need a fast, small, cheap database which is easy to get into and use, or a advanced, expensive, database that takes months of studying to begin to utilize to it's best abilities? Oracle, Sybase, MSSQL etc. have been available for quite some time, have many advanced features, but comes at quite a cost in money, maint, learning curve, and resources. If you app needs high-end database functionality, then you have to be willing to part with some money, time, and resources. mySQL on the other hand has not been around as long as the commercial products, and has at it's foundation a small footprint with the majority of the learning curve in learning SQL and has a very low price - free. So far, mySQL has worked extremly well in many of my apps. Sometimes I have to rethink my design because I am thinking too much in the "large db" mindset, but that's me, not mySQL. It seems to me that you could really benefit from sitting down with the mySQL manual for a short spell, especially the part about mySQL Ansi 92 support. It might be beneficial to also get aquanted with Oracle's proprietary aspects so you understand what features need a different solution because your assuming an Oracle feature is Ansi 92. This would be true no matter what DB product you pick up. I got my start in SQL with MSSQL. When I tried to get into Oracle I was ready to call Oracle a piece of garbage because I couldn't do anything with it. The joins were different, the allocations different, the stored procedure language different, the permissions systems different. But after weeks of working with the product, I began to learn the Oracle way and realized my judgement of Oracle was not based on the merits/demerits of Oracle, but on my lack of knowledge of the product and what it's target audience is. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Sunday, September 21, 2003 2:17 PM Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacey at ix.netcom.com Sun Sep 21 15:15:56 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Sun, 21 Sep 2003 13:15:56 -0600 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <0a9e01c38072$025cd050$67a76244@philofsoa> References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa> <002d01c38071$679edc70$6501a8c0@Notebook> <0a9e01c38072$025cd050$67a76244@philofsoa> Message-ID: <3F6DF8EC.9080501@ix.netcom.com> Phil, When you get a chance, have a look at PostgreSQL -- I'm sure someone has already mentioned it though. I can relate to your learning/doing style and, in fact, I'm glad to get this kind of input, since I teach PHP/MySQL, etc. (beginner level). It always helps to be reminded that people have different styles of 'operating'. John Phil Powell wrote: > Jim, if I had that kind of learning ability I would do so, but > unfortunately I can only take things in small bite-sized pieces, > therefore, a manual would do me no good as a whole. Usually when it > comes to manuals I can only pick at what I understand and/or need at > the moment and apply. In fact, my entire ability is based on > application, not on foreknowledge or logical cognition. In other > words, I know that to make a cake you add these ingredients until it > works, not that you already know to do this/that/other based on what > you read, because often times what I read makes no sense to me anyway. > > Sorry, that's how I've always viewed the world since birth and > school. Somehow I've compensated for this severe ability lacking and > done what I needed to get done. In the case of creating relational > data models of complexities ranging from lookup tables to association > tables (as is the case of this freelance project I'm working on), > mySQL doesn't cut it. Oracle, SQL Server and even Sybase (that I > don't know) would cut it quite well. That's how I view it. > > Phil > > ----- Original Message ----- > *From:* Jim Hendricks > *To:* NYPHP Talk > *Sent:* Sunday, September 21, 2003 2:51 PM > *Subject:* Re: [nycphp-talk] Error involving inner SELECT using > mySQL - HELP > > I wouldn't categorize mySQL a waste of database. > > It depends on your needs. Do you need a fast, small, cheap > database which is easy to get into and use, or a advanced, > expensive, database that takes months of studying to begin to > utilize to it's best abilities? > > Oracle, Sybase, MSSQL etc. have been available for quite some > time, have many advanced features, but comes at quite a cost in > money, maint, learning curve, and resources. If you app needs > high-end database functionality, then you have to be willing to > part with some money, time, and resources. > > mySQL on the other hand has not been around as long as the > commercial products, and has at it's foundation a small footprint > with the majority of the learning curve in learning SQL and has a > very low price - free. So far, mySQL has worked extremly well in > many of my apps. Sometimes I have to rethink my design because I > am thinking too much in the "large db" mindset, but that's me, not > mySQL. > > It seems to me that you could really benefit from sitting down > with the mySQL manual for a short spell, especially the part about > mySQL Ansi 92 support. It might be beneficial to also get > aquanted with Oracle's proprietary aspects so you understand what > features need a different solution because your assuming an Oracle > feature is Ansi 92. > > This would be true no matter what DB product you pick up. I got > my start in SQL with MSSQL. When I tried to get into Oracle I was > ready to call Oracle a piece of garbage because I couldn't do > anything with it. The joins were different, the allocations > different, the stored procedure language different, the > permissions systems different. But after weeks of working with > the product, I began to learn the Oracle way and realized my > judgement of Oracle was not based on the merits/demerits of > Oracle, but on my lack of knowledge of the product and what it's > target audience is. > > Jim > ______________________________________________________________ > Jim Hendricks, President, Biz Computing, Inc > Phone: (201) 599-9380 Email: jim at bizcomputinginc.com > > Web: www.bizcomputinginc.com > Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, > New Milford, NJ 07646 > ______________________________________________________________ > > ----- Original Message ----- > *From:* Phil Powell > *To:* NYPHP Talk > *Sent:* Sunday, September 21, 2003 2:17 PM > *Subject:* Re: [nycphp-talk] Error involving inner SELECT using > mySQL - HELP > > I did, it seems that mySQL is becoming more and more of a > waste of database! > > Can't do subqueries, can't do foreign key constraints, even > the datetime field column datatype doesn't allow for the now() > function as an input parameter value in INSERT?.. so tell me > what GOOD is mySQL anyway???? > > I rewrote the entire database table schema relational > structure to include another association table and used that, > flatting out the query. However, it's really BAD coding > because I have this query generating for every single > $row['nnet_produkt_id'] from the outer query results. BAD BAD > BAD.. that means a while loop INSIDE another while loop! > > Can you say performance murder! > > Phil > > > > ----- Original Message ----- > *From:* Jeff Siegel > *To:* 'NYPHP Talk' > *Sent:* Sunday, September 21, 2003 1:46 PM > *Subject:* RE: [nycphp-talk] Error involving inner SELECT > using mySQL - HELP > > You need at least ver. 4.1 of mySql. You may also be able > to rewrite it. > See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html > > Jeff Siegel > > -----Original Message----- > *From:* talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org] *On Behalf Of > *Phil Powell > *Sent:* Sunday, September 21, 2003 11:54 AM > *To:* NYPHP Talk > *Subject:* [nycphp-talk] Error involving inner SELECT > using mySQL - HELP > > Ok guys, here we go again! > > SELECT s.nnet_produkt_storrelse_navn > FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe > v, nnet_storrelse_varegruppe_assoc sv > WHERE s.nnet_produkt_storrelse.id = > sv.nnet_produkt_storrelse id > AND sv.nnet_produkt_varegruppe_id = > v.nnet_produkt_varegruppe_id > AND sv.nnet_produkt_varegruppe_id IN ( > SELECT nnet_produkt_varegruppe_id > FROM nnet_produkt_varegruppe > WHERE nnet_produkt_varegruppe_code = 'FLU17' > ) > AND s.nnet_produkt_storrelse_id > 1 > > This produces the following error: > > You have an error in your SQL syntax near 'id AND > sv.nnet_produkt_varegruppe_id = > v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 > > I don't see anything wrong with this query, it's > standard inner SELECT stuff! I need help... again! > > Phil > > ------------------------------------------------------------------------ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > ------------------------------------------------------------------------ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > ------------------------------------------------------------------------ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Sun Sep 21 16:05:35 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Sun, 21 Sep 2003 16:05:35 -0400 Subject: [nycphp-talk] Repost Post Vars In-Reply-To: <000f01c38063$878342f0$6401a8c0@EZDSDELL> References: <20030921153416.GA16257@panix.com> <000f01c38063$878342f0$6401a8c0@EZDSDELL> Message-ID: <20030921200535.GA9648@panix.com> Howdy: On Sun, Sep 21, 2003 at 01:12:25PM -0400, Jeff Siegel wrote: > > You may have missed my little "disclaimer" in which I noted "...it > doesn't directly address your question concerning the header call." Noticed it. Sounded like you weren't sure. Made my points to address what seemed to be misunderstandings that rewriting would happen in header calls. > As for requiring a full URI...it seems that's not required. Depends how you interpret "required." RFC's say the full URI is required. Some browsers are kind enough to work on relative paths. > The PHP manual > does state that "...relative URIs will be changed to contain the session > id automatically." Yes. That's talking about hyperlinks in the output, not header calls. We're talking about header(Location) calls. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From tgales at tgaconnect.com Sun Sep 21 16:10:28 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 21 Sep 2003 16:10:28 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <0a2b01c3806c$95760970$67a76244@philofsoa> Message-ID: <003201c3807c$671ade60$bf8d3818@OBERON1> Okay let's try a simpler case: You have some products : CREATE TABLE prods ( prod_id int(4) default NULL, name varchar(20) NOT NULL default '', desc varchar(20) NOT NULL default '' ) TYPE=MyISAM COMMENT='Products Table'; INSERT INTO prods (prod_id, name, desc) VALUES (1, 'one', 'first'); INSERT INTO prods (prod_id, name, desc) VALUES (2, 'two', 'second'); INSERT INTO prods (prod_id, name, desc) VALUES (3, 'three', 'third'); INSERT INTO prods (prod_id, name, desc) VALUES (4, 'four', 'fourth'); INSERT INTO prods (prod_id, name, desc) VALUES (5, 'five', 'fifth'); INSERT INTO prods (prod_id, name, desc) VALUES (6, 'six', 'sixth'); And the products are sold in districts called groups: CREATE TABLE groups ( group_id int(4) default NULL, name varchar(20) NOT NULL default '', desc varchar(20) NOT NULL default '' ) TYPE=MyISAM COMMENT='Products Table'; INSERT INTO groups (group_id, name, desc) VALUES (10, 'east', 'eastern district'); INSERT INTO groups (group_id, name, desc) VALUES (20, 'west', 'western district'); And you have an associative table which tells which products are sold in which districts: CREATE TABLE assoc ( prod_id int(4) NOT NULL default '0', group_id int(4) NOT NULL default '0' ) TYPE=MyISAM COMMENT='Associates Prouduct with Groups'; INSERT INTO asoc (prod_id, group_id) VALUES (1, 10); INSERT INTO asoc (prod_id, group_id) VALUES (2, 10); INSERT INTO asoc (prod_id, group_id) VALUES (3, 10); INSERT INTO asoc (prod_id, group_id) VALUES (4, 20); INSERT INTO asoc (prod_id, group_id) VALUES (5, 20); INSERT INTO asoc (prod_id, group_id) VALUES (6, 20); In English you sell six products one, two and three are sold in the eastern district and Four, five and six are sold in the western district. You were trying something like this: SELECT p.prod_id FROM prods p, assoc a, groups g where p.prod_id = a.prod_id and a.group_id = g.group_id and a.group_id and g.group_id in (select group_id from groups where group_id = 10) which roughly states: find the products and districts that exist in a set of groups that are equal to 10 or: find product information from the eastern district or: SELECT p.prod_id FROM prods p, assoc a, groups g where p.prod_id = a.prod_id and a.group_id = g.group_id and a.group_id and g.group_id = 10 What do think? T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 2:17 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From smanes at magpie.com Sun Sep 21 16:21:50 2003 From: smanes at magpie.com (Steve Manes) Date: Sun, 21 Sep 2003 16:21:50 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <3F6DF8EC.9080501@ix.netcom.com> References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa> <002d01c38071$679edc70$6501a8c0@Notebook> <0a9e01c38072$025cd050$67a76244@philofsoa> <3F6DF8EC.9080501@ix.netcom.com> Message-ID: <3F6E085E.8070609@magpie.com> John Lacey wrote: > When you get a chance, have a look at PostgreSQL Seconded. I'm very impressed with 7.3, and with its performance, not just because it offers core SQL features that probably won't show up in MySQL for another couple of years, at least. ---------------------------------------------=o&o>--------- Steve Manes http://www.magpie.com Brooklyn, NY From chendry at nyc.rr.com Sun Sep 21 20:17:14 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Sun, 21 Sep 2003 20:17:14 -0400 Subject: [nycphp-talk] Fw: Delivery failure to pjmatthews@gotojml.com In-Reply-To: <009c01c37fd1$9886a840$8119fea9@thinkpad> Message-ID: -> completely flooded all over the place ... wonder if this one has -> anything to -> do with verisigns new wildcard dns service ... -> what is this wildcard dns service of which you speak? I just rolled over a site onto a new server and every few hours when I call up the site, I switch back and forth between the old site and the new site...is this related? From lists at ny-tech.net Sun Sep 21 20:22:12 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Sun, 21 Sep 2003 20:22:12 -0400 Subject: [nycphp-talk] Fw: Delivery failure to pjmatthews@gotojml.com In-Reply-To: Message-ID: <000201c3809f$933e39b0$6401a8c0@main> http://news.com.com/2100-1032_3-5077530.html - Nasir -----Original Message----- From: Christopher Hendry [mailto:chendry at nyc.rr.com] Sent: Sunday, September 21, 2003 8:17 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Fw: Delivery failure to pjmatthews at gotojml.com -> completely flooded all over the place ... wonder if this one has -> anything to do with verisigns new wildcard dns service ... -> what is this wildcard dns service of which you speak? I just rolled over a site onto a new server and every few hours when I call up the site, I switch back and forth between the old site and the new site...is this related? _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From chendry at nyc.rr.com Sun Sep 21 20:22:19 2003 From: chendry at nyc.rr.com (chendry at nyc.rr.com) Date: Sun, 21 Sep 2003 20:22:19 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106419013801@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From csnyder at chxo.com Sun Sep 21 20:46:30 2003 From: csnyder at chxo.com (Chris Snyder) Date: Sun, 21 Sep 2003 20:46:30 -0400 Subject: [nycphp-talk] Fw: Delivery failure to pjmatthews@gotojml.com In-Reply-To: <000201c3809f$933e39b0$6401a8c0@main> References: <000201c3809f$933e39b0$6401a8c0@main> Message-ID: <3F6E4666.30007@chxo.com> Chendry: see also:http://www.netsys.com/library/verisign-hijack-icann.txt The quick summary is that Verisign introduced wildcard records into the top-level .com and .net zones that point all non-existent domains to 64.94.110.11. With one stroke there are no longer any non-existent .com or .net domains, which has fascinating potential for breaking all kinds of things. The issue with returned mail from pjmatthews has nothing to do with this-- it is the result of a rude mailer-daemon at dynamic DNS service tzo.com that doesn't understand how to handle undeliverable messages from mailing lists. (What do I mean by rude? If an email message has an Errors-to: header, like this one does, a nice mailer will send error messages to that address instead of sending them to the original sender.) csnyder Nasir Zubair wrote: >http://news.com.com/2100-1032_3-5077530.html > >- Nasir > > >-----Original Message----- >From: Christopher Hendry [mailto:chendry at nyc.rr.com] >Sent: Sunday, September 21, 2003 8:17 PM >To: NYPHP Talk >Subject: RE: [nycphp-talk] Fw: Delivery failure to pjmatthews at gotojml.com > > >-> completely flooded all over the place ... wonder if this one has >-> anything to do with verisigns new wildcard dns service ... >-> > >what is this wildcard dns service of which you speak? I just rolled over a >site onto a new server and every few hours when I call up the site, I switch >back and forth between the old site and the new site...is this related? > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From csnyder at chxo.com Sun Sep 21 20:49:35 2003 From: csnyder at chxo.com (Chris Snyder) Date: Sun, 21 Sep 2003 20:49:35 -0400 Subject: [nycphp-talk] Out of the office In-Reply-To: <106419013801@mercury.hosting4u.net> References: <106419013801@mercury.hosting4u.net> Message-ID: <3F6E471F.8090504@chxo.com> What bot is generating these fake vacation messages? Is anyone else just a little bit curious about what will go down on Sept. 22? Maybe pjmatthews appear from out of the clouds and accept all of his undeliverable mail... csnyder chendry at nyc.rr.com wrote: >Hello, > >I will be unavailable until Tuesday September 22, > >Thank you, > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From chendry at nyc.rr.com Sun Sep 21 21:47:56 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Sun, 21 Sep 2003 21:47:56 -0400 Subject: [nycphp-talk] Out of the office In-Reply-To: <3F6E471F.8090504@chxo.com> Message-ID: lol mercury.hosting4u.net? Seems to be where this message generates from - maybe a poorly configured mailserver. -> -----Original Message----- -> From: talk-bounces at lists.nyphp.org -> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Snyder -> Sent: Sunday, September 21, 2003 8:50 PM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] Out of the office -> -> -> What bot is generating these fake vacation messages? -> -> Is anyone else just a little bit curious about what will go down on -> Sept. 22? Maybe pjmatthews appear from out of the clouds and accept all -> of his undeliverable mail... -> -> csnyder -> -> chendry at nyc.rr.com wrote: -> -> >Hello, -> > -> >I will be unavailable until Tuesday September 22, -> > -> >Thank you, -> > -> >_______________________________________________ -> >talk mailing list -> >talk at lists.nyphp.org -> >http://lists.nyphp.org/mailman/listinfo/talk -> > -> > -> -> _______________________________________________ -> talk mailing list -> talk at lists.nyphp.org -> http://lists.nyphp.org/mailman/listinfo/talk -> From danielc at analysisandsolutions.com Sun Sep 21 23:30:14 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Sun, 21 Sep 2003 23:30:14 -0400 Subject: [nycphp-talk] Out of the office In-Reply-To: References: <3F6E471F.8090504@chxo.com> Message-ID: <20030922033014.GA24271@panix.com> Hola: On Sun, Sep 21, 2003 at 09:47:56PM -0400, Christopher Hendry wrote: > > Seems to be where this message generates from - maybe a poorly configured > mailserver. Whatever it is, thank heavens I have procmail around to /dev/null all these stupid messages. So, Hans, how about adjusting the mail server to drop these type of messages? --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From chendry at nyc.rr.com Sun Sep 21 23:30:21 2003 From: chendry at nyc.rr.com (chendry at nyc.rr.com) Date: Sun, 21 Sep 2003 23:30:21 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106420142001@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From anthony.leung at virgin.net Mon Sep 22 07:28:19 2003 From: anthony.leung at virgin.net (Anthony) Date: Mon, 22 Sep 2003 12:28:19 +0100 Subject: [nycphp-talk] mysql query In-Reply-To: <20030921191627.3DD39A8605@virtu.nyphp.org> References: <20030921191627.3DD39A8605@virtu.nyphp.org> Message-ID: You wrote: ================================= SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id<---------!!!!!!!!! AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ============================================================ Just got back from holiday, hence late reply. Didn't you just miss out an underscore at the end of the line: "WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id" I usually look twice when I find myself blaming a language or system :D Cheers... _________________________________________________________ This mail sent using V-webmail - http://www.v-webmail.org From drydell at worldnet.att.net Mon Sep 22 10:23:29 2003 From: drydell at worldnet.att.net (David Rydell) Date: Mon, 22 Sep 2003 10:23:29 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <096301c38060$eb17b100$67a76244@philofsoa> Message-ID: there have been many responses to this, but nobody seemed to notice that Phil is missing the underscore in sv.nnet_produkt_storrelse_id the error message is quite specific about not understanding what 'id' is... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 12:54 PM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drydell at worldnet.att.net Mon Sep 22 11:12:06 2003 From: drydell at worldnet.att.net (David Rydell) Date: Mon, 22 Sep 2003 11:12:06 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: Message-ID: ... and s.nnet_produkt_storrelse.id should probably be s.nnet_produkt_storrelse_id -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Rydell Sent: Monday, September 22, 2003 10:23 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP there have been many responses to this, but nobody seemed to notice that Phil is missing the underscore in sv.nnet_produkt_storrelse_id the error message is quite specific about not understanding what 'id' is... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 12:54 PM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003 -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Mon Sep 22 11:32:21 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 22 Sep 2003 11:32:21 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: Message-ID: <136e01c3811e$b7532f70$67a76244@philofsoa> I corrected that a long time ago, actually! Phil ----- Original Message ----- From: David Rydell To: NYPHP Talk Sent: Monday, September 22, 2003 11:12 AM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP ... and s.nnet_produkt_storrelse.id should probably be s.nnet_produkt_storrelse_id -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Rydell Sent: Monday, September 22, 2003 10:23 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP there have been many responses to this, but nobody seemed to notice that Phil is missing the underscore in sv.nnet_produkt_storrelse_id the error message is quite specific about not understanding what 'id' is... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 12:54 PM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacey at ix.netcom.com Mon Sep 22 11:56:55 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Mon, 22 Sep 2003 09:56:55 -0600 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <3F6E085E.8070609@magpie.com> References: <002301c38068$4e606480$6401a8c0@EZDSDELL><0a2b01c3806c$95760970$67a76244@philofsoa> <002d01c38071$679edc70$6501a8c0@Notebook> <0a9e01c38072$025cd050$67a76244@philofsoa> <3F6DF8EC.9080501@ix.netcom.com> <3F6E085E.8070609@magpie.com> Message-ID: <3F6F1BC7.70605@ix.netcom.com> Steve, great job on the house man... J Steve Manes wrote: > John Lacey wrote: > >> When you get a chance, have a look at PostgreSQL > > > Seconded. I'm very impressed with 7.3, and with its performance, not > just because it offers core SQL features that probably won't show up > in MySQL for another couple of years, at least. > > ---------------------------------------------=o&o>--------- > Steve Manes http://www.magpie.com > Brooklyn, NY > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at panix.com Mon Sep 22 12:03:10 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 22 Sep 2003 12:03:10 -0400 (EDT) Subject: [nycphp-talk] Lush Media: bicycle parking ? In-Reply-To: References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> <20030918212943.GA1221@panix.com> Message-ID: Re tomorrow's meeting: is there a reasonably secure place to stow a bicycle indoors at Lush Media? Thanks, --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From csnyder at chxo.com Mon Sep 22 12:23:42 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 22 Sep 2003 12:23:42 -0400 Subject: [nycphp-talk] Digital Pulp: bicycle parking (was: Lush Media: bicycle parking ?) In-Reply-To: References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> <20030918212943.GA1221@panix.com> Message-ID: <3F6F220E.3090603@chxo.com> Tomorrow night's meeting is at Digital Pulp on East 23rd St, but I'm not sure abut the bicycle-parking situation there. Didn't want you going to the wrong venue... it's happened to me before! David Mintz wrote: >Re tomorrow's meeting: is there a reasonably secure place to stow a >bicycle indoors at Lush Media? > >Thanks, > > >--- >David Mintz >http://davidmintz.org/ >Email: See http://dmintzweb.com/whitelist.php first! > >"Y d?le p'abajo" > > Tito Rojas >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From dmintz at panix.com Mon Sep 22 12:37:40 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 22 Sep 2003 12:37:40 -0400 (EDT) Subject: [nycphp-talk] Digital Pulp: bicycle parking (was: Lush Media: bicycle parking ?) In-Reply-To: <3F6F220E.3090603@chxo.com> References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> <20030918212943.GA1221@panix.com> <3F6F220E.3090603@chxo.com> Message-ID: Uy, what an embarassing newbie blunder. Yes, make that Digital Pulp... thanks. David On Mon, 22 Sep 2003, Chris Snyder wrote: > Tomorrow night's meeting is at Digital Pulp on East 23rd St, > but I'm not sure abut the bicycle-parking situation there. > > Didn't want you going to the wrong venue... it's happened to me before! > > David Mintz wrote: > > >Re tomorrow's meeting: is there a reasonably secure place to stow a > >bicycle indoors at Lush Media? > > > >Thanks, > > > > > >--- > >David Mintz > >http://davidmintz.org/ > >Email: See http://dmintzweb.com/whitelist.php first! > > > >"Y d?le p'abajo" > > > > Tito Rojas > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From andrew at digitalpulp.com Mon Sep 22 12:33:09 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Mon, 22 Sep 2003 12:33:09 -0400 Subject: [nycphp-talk] Digital Pulp: bicycle parking (was: Lush Media: bicycle parking ?) In-Reply-To: <3F6F220E.3090603@chxo.com> References: <000001c37da9$3a7c5e40$6401a8c0@main> <20030918204413.GA25949@panix.com> <20030918212943.GA1221@panix.com> <3F6F220E.3090603@chxo.com> Message-ID: <20030922163308.GO8912@thighmaster.digitalpulp.com> On Mon, Sep 22, 2003 at 12:23:42PM -0400, Chris Snyder wrote: > Tomorrow night's meeting is at Digital Pulp on East 23rd St, > but I'm not sure abut the bicycle-parking situation there. Since its after hours, you can try to bring it up in the elevator. If the doorman complains, ask him to show you where to park it in the court yard behind the building. > Didn't want you going to the wrong venue... it's happened to me before! > > David Mintz wrote: > > >Re tomorrow's meeting: is there a reasonably secure place to stow a > >bicycle indoors at Lush Media? > > > >Thanks, > > > > > >--- > >David Mintz > >http://davidmintz.org/ > >Email: See http://dmintzweb.com/whitelist.php first! > > > >"Y d?le p'abajo" > > > > Tito Rojas > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From tgales at tgaconnect.com Mon Sep 22 12:58:00 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 22 Sep 2003 12:58:00 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP In-Reply-To: <0a2b01c3806c$95760970$67a76244@philofsoa> Message-ID: <001301c3812a$ae3711c0$bf8d3818@OBERON1> You say you can't do sub-queries But I think if you changed ' AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' )' To AND sv.nnet_produkt_varegruppe_id = ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) You might have better luck. You say you can't do foreign key constraints - >From the manual: "Starting from version 3.23.43b InnoDB features foreign key constraints. InnoDB is the first MySQL table type which allows you to define foreign key constraints to guard the integrity of your data. The syntax of a foreign key constraint definition in InnoDB: [CONSTRAINT symbol] FOREIGN KEY (index_col_name, ...) REFERENCES table_name (index_col_name, ...) [ON DELETE {CASCADE | SET NULL | NO ACTION | RESTRICT}] [ON UPDATE {CASCADE | SET NULL | NO ACTION | RESTRICT}] Both tables have to be InnoDB type, in the table there must be an INDEX where the foreign key columns are listed as the FIRST columns in the same order, and in the referenced table there must be an INDEX where the referenced columns are listed as the FIRST columns in the same order. InnoDB does not auto-create indexes on foreign keys or referenced keys: you have to create them explicitly. The indexes are needed for foreign key checks to be fast and not require a table scan. " You say the now() function is not allowed to be input into datetime columns While that is true you might want to read up on timestamp column types Timestamps can (under most circumstances) be set to NULL or now(). In short, I think you are mistaken. You said you added an associative table to "flatten out" the query and that it was BAD. Well when you make a sub-query, the database makes the equivalent of a temp table underneath the covers, from which it can do the selection. This means you should only use sub-queries on ad hoc requests. At other times (for routine retrievals) it is better to set up your own table from which to do the selections, because you can create the type of table it is and specifically put indexes where they are needed. In short, I don't agree with you. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 2:17 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Mon Sep 22 14:01:47 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 22 Sep 2003 14:01:47 -0400 Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP References: <001301c3812a$ae3711c0$bf8d3818@OBERON1> Message-ID: <147d01c38133$98070d20$67a76244@philofsoa> MessageSee below, Tim, I'm not mistaken, you're not getting the full scope of my issues. Phil ----- Original Message ----- From: Tim Gales To: 'NYPHP Talk' Sent: Monday, September 22, 2003 12:58 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You say you can't do sub-queries But I think if you changed ' AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' )' To AND sv.nnet_produkt_varegruppe_id = ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) You might have better luck. I'll remember that but right now they're talking about a complete RDM redesign so this one is a moot exercise until further notice. You say you can't do foreign key constraints - From the manual: "Starting from version 3.23.43b InnoDB features foreign key constraints. InnoDB is the first MySQL table type which allows you to define foreign key constraints to guard the integrity of your data. The syntax of a foreign key constraint definition in InnoDB: [CONSTRAINT symbol] FOREIGN KEY (index_col_name, ...) REFERENCES table_name (index_col_name, ...) [ON DELETE {CASCADE | SET NULL | NO ACTION | RESTRICT}] [ON UPDATE {CASCADE | SET NULL | NO ACTION | RESTRICT}]Both tables have to be InnoDB type, in the table there must be an INDEX where the foreign key columns are listed as the FIRST columns in the same order, and in the referenced table there must be an INDEX where the referenced columns are listed as the FIRST columns in the same order. InnoDB does not auto-create indexes on foreign keys or referenced keys: you have to create them explicitly. The indexes are needed for foreign key checks to be fast and not require a table scan. " That's fine. You didn't ask me what version mySQL this is. They don't OFFER InnoDB as table type for the version of mySQL that is running on the remote server. So I STILL can't do foreign key constraints. You say the now() function is not allowed to be input into datetime columns While that is true you might want to read up on timestamp column types Timestamps can (under most circumstances) be set to NULL or now(). That's fine, for timestamps, but not for datetime. Again, I don't have this problem in Oracle, sorry to be a db snob. In short, I think you are mistaken. You said you added an associative table to "flatten out" the query and that it was BAD. Well when you make a sub-query, the database makes the equivalent of a temp table underneath the covers, from which it can do the selection. This means you should only use sub-queries on ad hoc requests. At other times (for routine retrievals) it is better to set up your own table from which to do the selections, because you can create the type of table it is and specifically put indexes where they are needed. In short, I don't agree with you. That's fine. You don't have to. But before you go into slamming my theories realize the fact that I am working with a remote server that has an older version of mySQL than what your solutions can accommodate, therefore, again, mySQL is inadequate in this case. Phil T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 2:17 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Error involving inner SELECT using mySQL - HELP I did, it seems that mySQL is becoming more and more of a waste of database! Can't do subqueries, can't do foreign key constraints, even the datetime field column datatype doesn't allow for the now() function as an input parameter value in INSERT?.. so tell me what GOOD is mySQL anyway???? I rewrote the entire database table schema relational structure to include another association table and used that, flatting out the query. However, it's really BAD coding because I have this query generating for every single $row['nnet_produkt_id'] from the outer query results. BAD BAD BAD.. that means a while loop INSIDE another while loop! Can you say performance murder! Phil ----- Original Message ----- From: Jeff Siegel To: 'NYPHP Talk' Sent: Sunday, September 21, 2003 1:46 PM Subject: RE: [nycphp-talk] Error involving inner SELECT using mySQL - HELP You need at least ver. 4.1 of mySql. You may also be able to rewrite it. See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Phil Powell Sent: Sunday, September 21, 2003 11:54 AM To: NYPHP Talk Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe WHERE nnet_produkt_varegruppe_code = 'FLU17' ) AND s.nnet_produkt_storrelse_id > 1 This produces the following error: You have an error in your SQL syntax near 'id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_' at line 1 I don't see anything wrong with this query, it's standard inner SELECT stuff! I need help... again! Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Mon Sep 22 14:02:40 2003 From: tgales at tgaconnect.com (tgales at tgaconnect.com) Date: Mon, 22 Sep 2003 14:02:40 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106425375901@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From jonbaer at jonbaer.net Mon Sep 22 12:17:56 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 22 Sep 2003 12:17:56 -0400 Subject: [nycphp-talk] thehostingcompany.us (ecom) Message-ID: <016801c38125$15c08f20$8119fea9@thinkpad> i wanted to ask someone a few ?'s in regards to ecom hosting + remembered a few nyphp people were involved/managed their own hosting, will that person/those people be @ the meeting tomorrow night? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From nyphp at websapp.com Mon Sep 22 15:58:26 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Mon, 22 Sep 2003 15:58:26 -0400 Subject: [nycphp-talk] thehostingcompany.us (ecom) In-Reply-To: <016801c38125$15c08f20$8119fea9@thinkpad> Message-ID: Yes we will ! --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of jon baer > Sent: Monday, September 22, 2003 12:18 PM > To: talk at lists.nyphp.org > Cc: contact at thehostingcompany.us > Subject: [nycphp-talk] thehostingcompany.us (ecom) > > > i wanted to ask someone a few ?'s in regards to ecom hosting + > remembered a > few nyphp people were involved/managed their own hosting, will that > person/those people be @ the meeting tomorrow night? > > - jon > > pgp key: http://www.jonbaer.net/jonbaer.asc > fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From mz34 at nyu.edu Mon Sep 22 16:09:00 2003 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Mon, 22 Sep 2003 16:09:00 -0400 Subject: [nycphp-talk] installing PHP/MySQL on a Mac In-Reply-To: Message-ID: <9B1C90CA-ED38-11D7-B4F3-00039344DCA8@nyu.edu> little late on the response here, but I use Marc's packages too. On Saturday, September 13, 2003, at 08:09 PM, Stephen Musgrave wrote: > > I'll second this. I have been using Marc's packages for well over a > year > now.. good stuff.. never a problem. > > Stephen Musgrave > > // stephen at musgrave.org > // http://musgrave.org > // 718-486-6514 > > > On 9/12/03 11:12 PM, "Alexander Chan" wrote: > >> I have php running on mac os x .. >> OS X comes with apache. I downloaded a precompiled >> version of php at >> http://www.entropy.ch/software/macosx/php/. you won't >> have to do anything. >> >> Alex >> --- Peter Lehrer wrote: >>> I would like to know about the process of installing >>> PHP and MySQL on a >>> Mac. Would the Mac OS have to be OS X (to take >>> advantage of Free BSD)? >>> Would it be similar to installing it on Free BSD (or >>> Linux)? Does Mac OS X >>> already come with Apache loaded and configured to >>> serve pages through >>> "localhost"? >>> >>> Any help would be appreciated. >>> >>> Yours, >>> Peter Lehrer >>> >>> _______________________________________________ >>> talk mailing list >>> talk at lists.nyphp.org >>> http://lists.nyphp.org/mailman/listinfo/talk >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > MZ _________________ Matthew Zimmerman Humanities Computing Group, NYU Tel: 212.998.3038 Fax: 212.995.4120 From lists at ny-tech.net Mon Sep 22 16:09:36 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 22 Sep 2003 16:09:36 -0400 Subject: [nycphp-talk] Tomorrow's Meeting In-Reply-To: Message-ID: <000201c38145$73b7fcb0$6401a8c0@main> I'm hoping to attend tomorrow's meeting. Can anyone tell usually how long these meetings last? And it all starts at 6:30 pm, right? Nasir Zubair From shiflett at php.net Mon Sep 22 16:17:05 2003 From: shiflett at php.net (Chris Shiflett) Date: Mon, 22 Sep 2003 13:17:05 -0700 (PDT) Subject: [nycphp-talk] Tomorrow's Meeting In-Reply-To: <000201c38145$73b7fcb0$6401a8c0@main> Message-ID: <20030922201705.65314.qmail@web14307.mail.yahoo.com> --- Nasir Zubair wrote: > I'm hoping to attend tomorrow's meeting. Can anyone tell usually > how long these meetings last? And it all starts at 6:30 pm, right? Hi Nasir, The meeting outline can be found online at: http://www.nyphp.org/ Yes, it starts at 6:30, with the 45 minute feature presentation beginning at 7:00 (so if you're running late, you can still catch some good material, but probably not a good seat). Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From crisscott at netzero.com Mon Sep 22 16:19:47 2003 From: crisscott at netzero.com (Scott Mattocks) Date: Mon, 22 Sep 2003 16:19:47 -0400 Subject: [nycphp-talk] Sessions in Objects Message-ID: <3F6F5963.5030900@netzero.com> Hello, What are the issues related to storing objects in sessions? For instance, say I have a shopping cart full of objects that I store in a session. If I want to make a change to an object what kind of overhead is associated with it? ex: $cart = $_SESSION['shopping_cart']; $cart->items[2]->change_size('medium'); $_SESSION['shopping_cart'] = $cart; Is there another appraoch that might be better? Thanks, Scott Mattocks From danielc at analysisandsolutions.com Mon Sep 22 16:38:29 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 22 Sep 2003 16:38:29 -0400 Subject: [nycphp-talk] php in SecurityFocus Newsletter #215 Message-ID: <20030922203828.GA4399@panix.com> vbPortal Authentication SQL Injection Vulnerability http://www.securityfocus.com/bid/8613 Multiple Mambo Open Source 4.0.14 Server Vulnerabilities http://www.securityfocus.com/bid/8647 --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From lists at ny-tech.net Mon Sep 22 16:41:50 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 22 Sep 2003 16:41:50 -0400 Subject: [nycphp-talk] Tomorrow's Meeting In-Reply-To: <20030922201705.65314.qmail@web14307.mail.yahoo.com> Message-ID: <000101c38149$f4b4c830$6401a8c0@main> Thanks Chris. I'll be there early :-) Also, not sure it is relevant, but when I hit reply, Outlook put in two address in the "To" box, your own address and list's address. Isn't your address supposed to be masked or something? Nasir Zubair -----Original Message----- From: Chris Shiflett [mailto:shiflett at php.net] Sent: Monday, September 22, 2003 4:17 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Tomorrow's Meeting --- Nasir Zubair wrote: > I'm hoping to attend tomorrow's meeting. Can anyone tell usually how > long these meetings last? And it all starts at 6:30 pm, right? Hi Nasir, The meeting outline can be found online at: http://www.nyphp.org/ Yes, it starts at 6:30, with the 45 minute feature presentation beginning at 7:00 (so if you're running late, you can still catch some good material, but probably not a good seat). Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Mon Sep 22 16:42:02 2003 From: shiflett at php.net (shiflett at php.net) Date: Mon, 22 Sep 2003 16:42:02 -0400 Subject: [nycphp-talk] Out of the office Message-ID: <106426332101@mercury.hosting4u.net> Hello, I will be unavailable until Tuesday September 22, Thank you, From jonbaer at jonbaer.net Mon Sep 22 13:33:42 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 22 Sep 2003 13:33:42 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) Message-ID: <017801c3812f$ab7a9790$8119fea9@thinkpad> normally the small scripts i write either getopt for it's content or read STDIN along the pipe, but i just tried to throw in a usage() function for null input and could not determine if STDIN was empty or not it, just hangs (W32). ie: $d = fread(STDIN, 1024); nothing seems to be able to determine if there is content ... any ideas? have not tried on debian yet. thought checking (STDIN) would work but didn't. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From jonbaer at jonbaer.net Mon Sep 22 13:36:38 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 22 Sep 2003 13:36:38 -0400 Subject: [nycphp-talk] Tomorrow's Meeting References: <20030922201705.65314.qmail@web14307.mail.yahoo.com> Message-ID: <019601c38130$14226e80$8119fea9@thinkpad> any ideas on when/if last month's meeting will be available online soon? thanks. - jon From danielc at analysisandsolutions.com Mon Sep 22 17:22:49 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 22 Sep 2003 17:22:49 -0400 Subject: [nycphp-talk] Tomorrow's Meeting In-Reply-To: <019601c38130$14226e80$8119fea9@thinkpad> References: <20030922201705.65314.qmail@web14307.mail.yahoo.com> <019601c38130$14226e80$8119fea9@thinkpad> Message-ID: <20030922212249.GA12105@panix.com> On Mon, Sep 22, 2003 at 01:36:38PM -0400, jon baer wrote: > any ideas on when/if last month's meeting will be available online soon? Already is... http://nyphp.org/ "Presentation" link under the "Reference" nav section Click on the name of the presentation It's in HTML format, by the way. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Mon Sep 22 13:56:06 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 22 Sep 2003 13:56:06 -0400 Subject: [nycphp-talk] Tomorrow's Meeting References: <20030922201705.65314.qmail@web14307.mail.yahoo.com><019601c38130$14226e80$8119fea9@thinkpad> <20030922212249.GA12105@panix.com> Message-ID: <01c401c38132$cc30e450$8119fea9@thinkpad> thanks dan, was looking for the mp3 files :-) - jon ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Monday, September 22, 2003 5:22 PM Subject: Re: [nycphp-talk] Tomorrow's Meeting > On Mon, Sep 22, 2003 at 01:36:38PM -0400, jon baer wrote: > > any ideas on when/if last month's meeting will be available online soon? > > Already is... > http://nyphp.org/ > "Presentation" link under the "Reference" nav section > Click on the name of the presentation > > It's in HTML format, by the way. > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at panix.com Mon Sep 22 17:58:38 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 22 Sep 2003 17:58:38 -0400 (EDT) Subject: [nycphp-talk] Sessions in Objects In-Reply-To: <3F6F5963.5030900@netzero.com> References: <3F6F5963.5030900@netzero.com> Message-ID: On Mon, 22 Sep 2003, Scott Mattocks wrote: > Hello, > What are the issues related to storing objects in sessions? For > instance, say I have a shopping cart full of objects that I store in a > session. If I want to make a change to an object what kind of overhead > is associated with it? I'd like to jump in, make a fool of myself, and then let the more experienced people correct me (-: If you want to store object in sessions, go ahead. The relative overhead? Object instantiation is said to be an expensive operation, and OOP code slower than its strictly procedural counterpart. (I hear PHP 5 will bring major improvements to PHP's OOP support so you are thinking forward.) PHP serializes and de-serializes session-stored objects as needed at request time, so you get some disk I/O, but the same is true of primitives in sessions (right, gurus?). As for your snippet, I think it's fundamentally ok. A technique I have uses is to assign $_SESSION['cart'] to $cart BY REFERENCE, just for convenience (save typing) and it seems to work. > $cart = $_SESSION['shopping_cart']; > $cart->items[2]->change_size('medium'); > $_SESSION['shopping_cart'] = $cart; > Is there another appraoch that might be better? $cart =& $_SESSION['shopping_cart']; $cart->items[2]->change_size('medium'); // there, I saved you a line. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From soazine at erols.com Mon Sep 22 19:16:23 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 22 Sep 2003 19:16:23 -0400 Subject: [nycphp-talk] T_ARRAY error but have no idea why Message-ID: <014801c3815f$8af14610$67a76244@philofsoa> The following code: $kounter = 0; $fsArray = array('farge', 'storrelse'); for ($i = 0; $i < sizeof($fsArray); $i++) { // POPULATE CONTENT FOR BOTH FARGE AND ST?RRELSE DROPDOWNS NOW ASSOCIATED ACCORDING TO PRODUKT ID $label = $fsArray[$i]; ${$label}Array = array(); $sql = 'SELECT s.nnet_produkt_' . $label . '_navn ' . 'FROM nnet_produkt p, nnet_produkt_' . $label . '_assoc q, ' . ' nnet_produkt_' . $label . ' r ' . 'WHERE p.nnet_produkt_id = q.nnet_produkt_id ' . ' AND p.nnet_produkt_id = ' . $row['nnet_produkt_id'] . ' AND q.nnet_produkt_' . $label . '_id = r.nnet_produkt_' . $label . '_id'; $dropdownQuery = mysql_query($sql) or die('Could not perform dropdown query: ' . mysql_error()); while ($dropdownRow = mysql_fetch_row($dropdownQuery)) array_push(${$label}Array, $dropdownRow[0]); } // END OF FOR LOOP FOR $fsArray produces the following error: Parse error: parse error, unexpected T_ARRAY in /home/nordicnet.no/membersites/vis_varegruppen.php on line 133 Line 133 is: ${$label}Array = array(); I'm lost as usual. Help! Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Mon Sep 22 19:42:29 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 22 Sep 2003 19:42:29 -0400 Subject: [nycphp-talk] OT when all esle fails Message-ID: <001301c38163$32a7f7c0$bf8d3818@OBERON1> Stymied by our responses from Microsoft, we decided to try another service provider -- the Psychic Friends Network. Microsoft Technical Support vs. The Psychic Friends Network : Which Provides Better Support for Microsoft Products? by Michael Patrick Ellard and Daniel Albert Wright http://www.netscrap.com/netscrap_detail.cfm?scrap_id=704 Tim G. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Sep 22 22:54:53 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 22 Sep 2003 22:54:53 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) In-Reply-To: <017801c3812f$ab7a9790$8119fea9@thinkpad> References: <017801c3812f$ab7a9790$8119fea9@thinkpad> Message-ID: <20030923025453.GA4889@panix.com> Hi Jon: On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > normally the small scripts i write either getopt for it's content or read > STDIN along the pipe, but i just tried to throw in a usage() function for > null input and could not determine if STDIN was empty or not it, just hangs > (W32). > > ie: > $d = fread(STDIN, 1024); > > nothing seems to be able to determine if there is content ... any ideas? > have not tried on debian yet. thought checking (STDIN) would work but > didn't. I'm confused as to what you're really after. Wouldn't a usage example apply to tips on passing arguments to a command line script? Arguments for such scripts are found in $_SERVER['argv'], not STDIN. As far as STDIN goes, I'm used to reading it via fopen() then fgets(). So, a quick and dirty example... if ( empty($_SERVER['argv'][1]) ) { $_SERVER['argv'][1] = ''; } switch ($_SERVER['argv'][1]) { case 'blah': $In = fopen('php://stdin', 'r'); while ( !feof($In) ) { // do blah } break; default: echo 'usage...'; } Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Tue Sep 23 09:13:56 2003 From: jonbaer at jonbaer.net (jon baer) Date: Tue, 23 Sep 2003 09:13:56 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) References: <017801c3812f$ab7a9790$8119fea9@thinkpad> <20030923025453.GA4889@panix.com> Message-ID: <01d701c381d4$8b46f900$8119fea9@thinkpad> that was more or less what I had come up with but I had noticed that passing say an argument for reading php://stdin when there was no content would just hang. So if someone did: php blah.php blah -instead of- cat | php blah.php blah the feof is never read, im trying to determine if it has to do with the option 'auto_detect_line_endings' - jon ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Monday, September 22, 2003 10:54 PM Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > Hi Jon: > > On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > > normally the small scripts i write either getopt for it's content or read > > STDIN along the pipe, but i just tried to throw in a usage() function for > > null input and could not determine if STDIN was empty or not it, just hangs > > (W32). > > > > ie: > > $d = fread(STDIN, 1024); > > > > nothing seems to be able to determine if there is content ... any ideas? > > have not tried on debian yet. thought checking (STDIN) would work but > > didn't. > > I'm confused as to what you're really after. Wouldn't a usage example > apply to tips on passing arguments to a command line script? Arguments > for such scripts are found in $_SERVER['argv'], not STDIN. > > As far as STDIN goes, I'm used to reading it via fopen() then fgets(). > > So, a quick and dirty example... > > > if ( empty($_SERVER['argv'][1]) ) { > $_SERVER['argv'][1] = ''; > } > > switch ($_SERVER['argv'][1]) { > case 'blah': > $In = fopen('php://stdin', 'r'); > > while ( !feof($In) ) { > // do blah > } > break; > > default: > echo 'usage...'; > } > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Tue Sep 23 09:47:48 2003 From: jonbaer at jonbaer.net (jon baer) Date: Tue, 23 Sep 2003 09:47:48 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) References: <017801c3812f$ab7a9790$8119fea9@thinkpad><20030923025453.GA4889@panix.com> <01d701c381d4$8b46f900$8119fea9@thinkpad> Message-ID: <01fb01c381d9$480e7820$8119fea9@thinkpad> ok after further investigation i realized i should have worded my question differently but in a nutshell: this requires process control functions for setting a timeout to not wait for STDIN (otherwise user needs to type something first) in turn these functions are not available on Windoze. so just to clarify my question - "on W32 there is no way to timeout STDIN from cli?" - jon ----- Original Message ----- From: "jon baer" To: "NYPHP Talk" Sent: Tuesday, September 23, 2003 9:13 AM Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > that was more or less what I had come up with but I had noticed that passing > say an argument for reading php://stdin when there was no content would just > hang. So if someone did: > php blah.php blah > -instead of- > cat | php blah.php blah > the feof is never read, im trying to determine if it has to do with the > option 'auto_detect_line_endings' > > - jon > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Monday, September 22, 2003 10:54 PM > Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > > > > Hi Jon: > > > > On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > > > normally the small scripts i write either getopt for it's content or > read > > > STDIN along the pipe, but i just tried to throw in a usage() function > for > > > null input and could not determine if STDIN was empty or not it, just > hangs > > > (W32). > > > > > > ie: > > > $d = fread(STDIN, 1024); > > > > > > nothing seems to be able to determine if there is content ... any ideas? > > > have not tried on debian yet. thought checking (STDIN) would work but > > > didn't. > > > > I'm confused as to what you're really after. Wouldn't a usage example > > apply to tips on passing arguments to a command line script? Arguments > > for such scripts are found in $_SERVER['argv'], not STDIN. > > > > As far as STDIN goes, I'm used to reading it via fopen() then fgets(). > > > > So, a quick and dirty example... > > > > > > if ( empty($_SERVER['argv'][1]) ) { > > $_SERVER['argv'][1] = ''; > > } > > > > switch ($_SERVER['argv'][1]) { > > case 'blah': > > $In = fopen('php://stdin', 'r'); > > > > while ( !feof($In) ) { > > // do blah > > } > > break; > > > > default: > > echo 'usage...'; > > } > > > > Enjoy, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > 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 > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From tgales at tgaconnect.com Tue Sep 23 09:52:22 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 23 Sep 2003 09:52:22 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) In-Reply-To: <01fb01c381d9$480e7820$8119fea9@thinkpad> Message-ID: <000a01c381d9$ea436ec0$bf8d3818@OBERON1> Jon, I remembered seeing something about stream timeouts at php.net I was curious so I looked it up: bool stream_set_timeout ( resource stream, int seconds [, int microseconds]) Sets the timeout value on stream, expressed in the sum of seconds and microseconds. Note: As of PHP 4.3, this function can (potentially) work on any kind of stream. In PHP 4.3, socket based streams are still the only kind supported in the PHP core, although streams from other extensions may support this function. I don't know if this is any help -- but it might be. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Tuesday, September 23, 2003 9:48 AM To: NYPHP Talk Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) ok after further investigation i realized i should have worded my question differently but in a nutshell: this requires process control functions for setting a timeout to not wait for STDIN (otherwise user needs to type something first) in turn these functions are not available on Windoze. so just to clarify my question - "on W32 there is no way to timeout STDIN from cli?" - jon ----- Original Message ----- From: "jon baer" To: "NYPHP Talk" Sent: Tuesday, September 23, 2003 9:13 AM Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > that was more or less what I had come up with but I had noticed that passing > say an argument for reading php://stdin when there was no content would just > hang. So if someone did: > php blah.php blah > -instead of- > cat | php blah.php blah > the feof is never read, im trying to determine if it has to do with the > option 'auto_detect_line_endings' > > - jon > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Monday, September 22, 2003 10:54 PM > Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > > > > Hi Jon: > > > > On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > > > normally the small scripts i write either getopt for it's content or > read > > > STDIN along the pipe, but i just tried to throw in a usage() function > for > > > null input and could not determine if STDIN was empty or not it, just > hangs > > > (W32). > > > > > > ie: > > > $d = fread(STDIN, 1024); > > > > > > nothing seems to be able to determine if there is content ... any ideas? > > > have not tried on debian yet. thought checking (STDIN) would work but > > > didn't. > > > > I'm confused as to what you're really after. Wouldn't a usage example > > apply to tips on passing arguments to a command line script? Arguments > > for such scripts are found in $_SERVER['argv'], not STDIN. > > > > As far as STDIN goes, I'm used to reading it via fopen() then fgets(). > > > > So, a quick and dirty example... > > > > > > if ( empty($_SERVER['argv'][1]) ) { > > $_SERVER['argv'][1] = ''; > > } > > > > switch ($_SERVER['argv'][1]) { > > case 'blah': > > $In = fopen('php://stdin', 'r'); > > > > while ( !feof($In) ) { > > // do blah > > } > > break; > > > > default: > > echo 'usage...'; > > } > > > > Enjoy, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > 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 > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Tue Sep 23 10:07:04 2003 From: jonbaer at jonbaer.net (jon baer) Date: Tue, 23 Sep 2003 10:07:04 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) References: <000a01c381d9$ea436ec0$bf8d3818@OBERON1> Message-ID: <020b01c381db$f76f18e0$8119fea9@thinkpad> unfortunatley that failed as well ... here is a simple example: i was expecting this to bail out and print nothing after 3 seconds ... - jon ----- Original Message ----- From: "Tim Gales" To: "'NYPHP Talk'" Sent: Tuesday, September 23, 2003 9:52 AM Subject: RE: [nycphp-talk] determining empty STDIN | php://stdin (cli) Jon, I remembered seeing something about stream timeouts at php.net I was curious so I looked it up: bool stream_set_timeout ( resource stream, int seconds [, int microseconds]) Sets the timeout value on stream, expressed in the sum of seconds and microseconds. Note: As of PHP 4.3, this function can (potentially) work on any kind of stream. In PHP 4.3, socket based streams are still the only kind supported in the PHP core, although streams from other extensions may support this function. I don't know if this is any help -- but it might be. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Tuesday, September 23, 2003 9:48 AM To: NYPHP Talk Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) ok after further investigation i realized i should have worded my question differently but in a nutshell: this requires process control functions for setting a timeout to not wait for STDIN (otherwise user needs to type something first) in turn these functions are not available on Windoze. so just to clarify my question - "on W32 there is no way to timeout STDIN from cli?" - jon ----- Original Message ----- From: "jon baer" To: "NYPHP Talk" Sent: Tuesday, September 23, 2003 9:13 AM Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > that was more or less what I had come up with but I had noticed that passing > say an argument for reading php://stdin when there was no content would just > hang. So if someone did: > php blah.php blah > -instead of- > cat | php blah.php blah > the feof is never read, im trying to determine if it has to do with the > option 'auto_detect_line_endings' > > - jon > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Monday, September 22, 2003 10:54 PM > Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > > > > Hi Jon: > > > > On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > > > normally the small scripts i write either getopt for it's content or > read > > > STDIN along the pipe, but i just tried to throw in a usage() function > for > > > null input and could not determine if STDIN was empty or not it, just > hangs > > > (W32). > > > > > > ie: > > > $d = fread(STDIN, 1024); > > > > > > nothing seems to be able to determine if there is content ... any ideas? > > > have not tried on debian yet. thought checking (STDIN) would work but > > > didn't. > > > > I'm confused as to what you're really after. Wouldn't a usage example > > apply to tips on passing arguments to a command line script? Arguments > > for such scripts are found in $_SERVER['argv'], not STDIN. > > > > As far as STDIN goes, I'm used to reading it via fopen() then fgets(). > > > > So, a quick and dirty example... > > > > > > if ( empty($_SERVER['argv'][1]) ) { > > $_SERVER['argv'][1] = ''; > > } > > > > switch ($_SERVER['argv'][1]) { > > case 'blah': > > $In = fopen('php://stdin', 'r'); > > > > while ( !feof($In) ) { > > // do blah > > } > > break; > > > > default: > > echo 'usage...'; > > } > > > > Enjoy, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > 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 > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Tue Sep 23 10:24:29 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 23 Sep 2003 10:24:29 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) In-Reply-To: <020b01c381db$f76f18e0$8119fea9@thinkpad> Message-ID: <000b01c381de$66a8b0c0$bf8d3818@OBERON1> I found this interesting.. array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to write to ); $process = proc_open("php", $descriptorspec, $pipes); if (is_resource($process)) { fwrite($pipes[0], "\"NE1 there ??\""); // hacked here.. fclose($pipes[0]); while(!feof($pipes[1])) { echo fgets($pipes[1], 1024); } fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); echo "command returned $return_value\n"; } ?> again this may not further your cause... but it might T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Tuesday, September 23, 2003 10:07 AM To: NYPHP Talk Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) unfortunatley that failed as well ... here is a simple example: i was expecting this to bail out and print nothing after 3 seconds ... - jon ----- Original Message ----- From: "Tim Gales" To: "'NYPHP Talk'" Sent: Tuesday, September 23, 2003 9:52 AM Subject: RE: [nycphp-talk] determining empty STDIN | php://stdin (cli) Jon, I remembered seeing something about stream timeouts at php.net I was curious so I looked it up: bool stream_set_timeout ( resource stream, int seconds [, int microseconds]) Sets the timeout value on stream, expressed in the sum of seconds and microseconds. Note: As of PHP 4.3, this function can (potentially) work on any kind of stream. In PHP 4.3, socket based streams are still the only kind supported in the PHP core, although streams from other extensions may support this function. I don't know if this is any help -- but it might be. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Tuesday, September 23, 2003 9:48 AM To: NYPHP Talk Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) ok after further investigation i realized i should have worded my question differently but in a nutshell: this requires process control functions for setting a timeout to not wait for STDIN (otherwise user needs to type something first) in turn these functions are not available on Windoze. so just to clarify my question - "on W32 there is no way to timeout STDIN from cli?" - jon ----- Original Message ----- From: "jon baer" To: "NYPHP Talk" Sent: Tuesday, September 23, 2003 9:13 AM Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > that was more or less what I had come up with but I had noticed that passing > say an argument for reading php://stdin when there was no content would just > hang. So if someone did: > php blah.php blah > -instead of- > cat | php blah.php blah > the feof is never read, im trying to determine if it has to do with the > option 'auto_detect_line_endings' > > - jon > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Monday, September 22, 2003 10:54 PM > Subject: Re: [nycphp-talk] determining empty STDIN | php://stdin (cli) > > > > Hi Jon: > > > > On Mon, Sep 22, 2003 at 01:33:42PM -0400, jon baer wrote: > > > normally the small scripts i write either getopt for it's content or > read > > > STDIN along the pipe, but i just tried to throw in a usage() function > for > > > null input and could not determine if STDIN was empty or not it, just > hangs > > > (W32). > > > > > > ie: > > > $d = fread(STDIN, 1024); > > > > > > nothing seems to be able to determine if there is content ... any ideas? > > > have not tried on debian yet. thought checking (STDIN) would work but > > > didn't. > > > > I'm confused as to what you're really after. Wouldn't a usage example > > apply to tips on passing arguments to a command line script? Arguments > > for such scripts are found in $_SERVER['argv'], not STDIN. > > > > As far as STDIN goes, I'm used to reading it via fopen() then fgets(). > > > > So, a quick and dirty example... > > > > > > if ( empty($_SERVER['argv'][1]) ) { > > $_SERVER['argv'][1] = ''; > > } > > > > switch ($_SERVER['argv'][1]) { > > case 'blah': > > $In = fopen('php://stdin', 'r'); > > > > while ( !feof($In) ) { > > // do blah > > } > > break; > > > > default: > > echo 'usage...'; > > } > > > > Enjoy, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > 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 > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From andrew at digitalpulp.com Tue Sep 23 11:25:09 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Tue, 23 Sep 2003 11:25:09 -0400 Subject: [nycphp-talk] T_ARRAY error but have no idea why In-Reply-To: <014801c3815f$8af14610$67a76244@philofsoa> References: <014801c3815f$8af14610$67a76244@philofsoa> Message-ID: <20030923152508.GR8912@thighmaster.digitalpulp.com> Perhaps you want... ${$label . 'Array'} = array(); or something similar? On Mon, Sep 22, 2003 at 07:16:23PM -0400, Phil Powell wrote: > The following code: > > $kounter = 0; $fsArray = array('farge', 'storrelse'); > for ($i = 0; $i < sizeof($fsArray); $i++) { > // POPULATE CONTENT FOR BOTH FARGE AND ST?RRELSE DROPDOWNS NOW ASSOCIATED ACCORDING TO PRODUKT ID > $label = $fsArray[$i]; > ${$label}Array = array(); > $sql = 'SELECT s.nnet_produkt_' . $label . '_navn ' . > 'FROM nnet_produkt p, nnet_produkt_' . $label . '_assoc q, ' . > ' nnet_produkt_' . $label . ' r ' . > 'WHERE p.nnet_produkt_id = q.nnet_produkt_id ' . > ' AND p.nnet_produkt_id = ' . $row['nnet_produkt_id'] . > ' AND q.nnet_produkt_' . $label . '_id = r.nnet_produkt_' . $label . '_id'; > $dropdownQuery = mysql_query($sql) or die('Could not perform dropdown query: ' . mysql_error()); > while ($dropdownRow = mysql_fetch_row($dropdownQuery)) > array_push(${$label}Array, $dropdownRow[0]); > } // END OF FOR LOOP FOR $fsArray > > produces the following error: > > Parse error: parse error, unexpected T_ARRAY in /home/nordicnet.no/membersites/vis_varegruppen.php on line 133 > > Line 133 is: > > ${$label}Array = array(); > > I'm lost as usual. Help! > > Thanx > Phil > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From danielc at analysisandsolutions.com Tue Sep 23 11:46:37 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 23 Sep 2003 11:46:37 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) In-Reply-To: <020b01c381db$f76f18e0$8119fea9@thinkpad> References: <000a01c381d9$ea436ec0$bf8d3818@OBERON1> <020b01c381db$f76f18e0$8119fea9@thinkpad> Message-ID: <20030923154636.GA21490@panix.com> Hi Folks: On Tue, Sep 23, 2003 at 10:07:04AM -0400, jon baer wrote: > > stream_set_timeout(STDIN, 3); > $in = fgets(STDIN); > echo $in; > ?> I ran a similar test. Do note though, the first parameter to the function is supposed to be a resource ID. None the less, it returns false ("wasn't set" in my test) so this function isn't meant for manipulating STDIN. $In = fopen('php://stdin', 'r'); if (stream_set_timeout($In, 1) ) { echo "was set\n"; } else { echo "wasn't set\n"; } I just searched php.general about this and couldn't find any answers there either. http://groups.google.com/groups?group=php.general Enjoy, --Dan Ahhhh... Snipping old posts makes me feel so good! -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Tue Sep 23 12:03:11 2003 From: jonbaer at jonbaer.net (jon baer) Date: Tue, 23 Sep 2003 12:03:11 -0400 Subject: [nycphp-talk] determining empty STDIN | php://stdin (cli) References: <000a01c381d9$ea436ec0$bf8d3818@OBERON1><020b01c381db$f76f18e0$8119fea9@thinkpad> <20030923154636.GA21490@panix.com> Message-ID: <023d01c381ec$304db5d0$8119fea9@thinkpad> just wanted to point out that STDIN/STDOUT/STDERR with --enable-cli resolves to a resource automatically (http://www.zend.com/manual/features.commandline.php) STDIN = resource of "php://stdin" same for $_SERVER['argv'][1] = $argv[1] here is another example i notice that does not work as it should: ini_set("max_execution_time", "5"); $in = fgets(STDIN); echo $in; throws: Fatal error: Maximum execution time of 5 seconds exceeded. - jon >>> ran a similar test. Do note though, the first parameter to the function is supposed to be a resource ID. <<< From lists at ny-tech.net Tue Sep 23 13:05:47 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Tue, 23 Sep 2003 13:05:47 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <023d01c381ec$304db5d0$8119fea9@thinkpad> Message-ID: <001901c381f4$f08afdf0$6401a8c0@main> I'm thinking about getting a subscription to PHP Architect. However, today I saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues compared to PHP|a's $22 for 12. - Nasir From jlacey at ix.netcom.com Tue Sep 23 13:18:21 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Tue, 23 Sep 2003 11:18:21 -0600 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <001901c381f4$f08afdf0$6401a8c0@main> References: <001901c381f4$f08afdf0$6401a8c0@main> Message-ID: <3F70805D.5060401@ix.netcom.com> I subsribe to phparchitect and it's worth every penny for the value... I looked at php magazine initially but, like you, I was a bit put off by the price. John Nasir Zubair wrote: >I'm thinking about getting a subscription to PHP Architect. However, today I >saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is >it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues >compared to PHP|a's $22 for 12. > >- Nasir > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > > From hans at nyphp.org Tue Sep 23 13:36:24 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 23 Sep 2003 13:36:24 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <001901c381f4$f08afdf0$6401a8c0@main> References: <001901c381f4$f08afdf0$6401a8c0@main> Message-ID: <3F708498.8010806@nyphp.org> Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, today I > saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is > it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues > compared to PHP|a's $22 for 12. I have three issues I'll be giving away as samples at tonight's meeting (cover story: PHP 5's New OO MOdel). I've read through the magazine and it's very complete and detailed. Both are great, but I might say that PHP Magazine is a bit more technical. H From jlacey at ix.netcom.com Tue Sep 23 13:45:24 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Tue, 23 Sep 2003 11:45:24 -0600 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <3F708498.8010806@nyphp.org> References: <001901c381f4$f08afdf0$6401a8c0@main> <3F708498.8010806@nyphp.org> Message-ID: <3F7086B4.3060406@ix.netcom.com> Hans Zaunere wrote: > > > I have three issues I'll be giving away as samples at tonight's > meeting (cover story: PHP 5's New OO MOdel). I've read through the > magazine and it's very complete and detailed. Both are great, but I > might say that PHP Magazine is a bit more technical. > good input Hans -- I'll give php magazine a second look now. probably a good idea to get more than one perspective anyhow :) J From lists at ny-tech.net Tue Sep 23 13:59:33 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Tue, 23 Sep 2003 13:59:33 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <3F708498.8010806@nyphp.org> Message-ID: <000001c381fc$734f89c0$6401a8c0@main> Thanks Hans. Will take a look at PHP mag. -----Original Message----- From: Hans Zaunere [mailto:hans at nyphp.org] Sent: Tuesday, September 23, 2003 1:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Magazines Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, > today I saw PHP Magazine banner on NYPHP.org. Has anyone read this > magazine? How is it compared to PHP|a? Also, the price is kinda > steep, $72 for 6 issues compared to PHP|a's $22 for 12. I have three issues I'll be giving away as samples at tonight's meeting (cover story: PHP 5's New OO MOdel). I've read through the magazine and it's very complete and detailed. Both are great, but I might say that PHP Magazine is a bit more technical. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tom at supertom.com Tue Sep 23 13:57:55 2003 From: tom at supertom.com (tom at supertom.com) Date: Tue, 23 Sep 2003 13:57:55 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <3F708498.8010806@nyphp.org> Message-ID: So, I just typed in phpmagazine.com (I just guessed that would be the domain), and didn't end up where I thought I should. (Take my advice, folks, it was bad news!) Maybe that's the reason for the high-priced issues - they need to buy the domain from these scumbags! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Tuesday, September 23, 2003 1:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Magazines Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, today I > saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is > it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues > compared to PHP|a's $22 for 12. I have three issues I'll be giving away as samples at tonight's meeting (cover story: PHP 5's New OO MOdel). I've read through the magazine and it's very complete and detailed. Both are great, but I might say that PHP Magazine is a bit more technical. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Tue Sep 23 15:20:21 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Tue, 23 Sep 2003 15:20:21 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: Message-ID: <006b01c38207$bb77abf0$6401a8c0@EZDSDELL> OMG! This looks like the work of Microsoft! ;) Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of tom at supertom.com Sent: Tuesday, September 23, 2003 12:58 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Magazines So, I just typed in phpmagazine.com (I just guessed that would be the domain), and didn't end up where I thought I should. (Take my advice, folks, it was bad news!) Maybe that's the reason for the high-priced issues - they need to buy the domain from these scumbags! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Tuesday, September 23, 2003 1:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Magazines Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, today I > saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is > it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues > compared to PHP|a's $22 for 12. I have three issues I'll be giving away as samples at tonight's meeting (cover story: PHP 5's New OO MOdel). I've read through the magazine and it's very complete and detailed. Both are great, but I might say that PHP Magazine is a bit more technical. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tom at supertom.com Tue Sep 23 16:39:36 2003 From: tom at supertom.com (tom at supertom.com) Date: Tue, 23 Sep 2003 16:39:36 -0400 Subject: [nycphp-talk] PHP Magazines In-Reply-To: <006b01c38207$bb77abf0$6401a8c0@EZDSDELL> Message-ID: Now that you say that, I wouldn't be surprised! :-) *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff Siegel Sent: Tuesday, September 23, 2003 3:20 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] PHP Magazines OMG! This looks like the work of Microsoft! ;) Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of tom at supertom.com Sent: Tuesday, September 23, 2003 12:58 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Magazines So, I just typed in phpmagazine.com (I just guessed that would be the domain), and didn't end up where I thought I should. (Take my advice, folks, it was bad news!) Maybe that's the reason for the high-priced issues - they need to buy the domain from these scumbags! Tom *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Tuesday, September 23, 2003 1:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHP Magazines Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, today I > saw PHP Magazine banner on NYPHP.org. Has anyone read this magazine? How is > it compared to PHP|a? Also, the price is kinda steep, $72 for 6 issues > compared to PHP|a's $22 for 12. I have three issues I'll be giving away as samples at tonight's meeting (cover story: PHP 5's New OO MOdel). I've read through the magazine and it's very complete and detailed. Both are great, but I might say that PHP Magazine is a bit more technical. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Tue Sep 23 17:09:03 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 23 Sep 2003 17:09:03 -0400 Subject: [nycphp-talk] Out of the office In-Reply-To: <20030922033014.GA24271@panix.com> References: <3F6E471F.8090504@chxo.com> <20030922033014.GA24271@panix.com> Message-ID: <3F70B66F.6060708@nyphp.org> Analysis & Solutions wrote: > Hola: > > On Sun, Sep 21, 2003 at 09:47:56PM -0400, Christopher Hendry wrote: > >>Seems to be where this message generates from - maybe a poorly configured >>mailserver. > > > Whatever it is, thank heavens I have procmail around to /dev/null all > these stupid messages. > > So, Hans, how about adjusting the mail server to drop these type > of messages? These have become quite an annoyance. I'm looking at eliminating them. H From JudyBe at belkin.com Tue Sep 23 17:15:39 2003 From: JudyBe at belkin.com (Judy Bello) Date: Tue, 23 Sep 2003 17:15:39 -0400 Subject: [nycphp-talk] mysql authentication and php - building php for windows Message-ID: <006B22B846854640942D08F78855FCE14F184B@addison.belkin.com> Hi. I just installed php version 4.3.3, apache2.x and mysql version 4.1 on Windows. The mySql server does not work with php authentication and the error message suggests that i update php. Unfortunately, I cannot find a higher version of php released as Windows Binaries. Worse yet, I am not sure it would save me because the documentation says they are going to deprecate the mysql library. But I am thinking that the 'mysqli' library might fix my problem, but it looks like I have to build the code myself to integrate it, and I haven't seen a windows source package for php. I can back down my version of mysql, but then I lose some nice coding advantages there. This is all very frustrating because I am accustomed to working in linux or some other unix and working with gnu tools where you have a lot of freedom. But I am not sure that would work to get a viable windows executable and set of dlls. Does anyone know if this can be done? Is there any kind of package for building Windows php? Is there a simpler solution that I am not seeing? Thanks for your advice. Judy Judith Bello Belkin Research and Development 1057 East Henrietta Road Rochester, NY 14623 (585) 785-0686 From shiflett at php.net Tue Sep 23 17:28:53 2003 From: shiflett at php.net (Chris Shiflett) Date: Tue, 23 Sep 2003 14:28:53 -0700 (PDT) Subject: [nycphp-talk] PHP Magazines In-Reply-To: <001901c381f4$f08afdf0$6401a8c0@main> Message-ID: <20030923212853.10197.qmail@web14303.mail.yahoo.com> --- Nasir Zubair wrote: > I'm thinking about getting a subscription to PHP Architect. However, > today I saw PHP Magazine banner on NYPHP.org. Has anyone read this > magazine? How is it compared to PHP|a? Also, the price is kinda > steep, $72 for 6 issues compared to PHP|a's $22 for 12. I think it is good to support PHP magazines in general, at least while each is still relatively young. PHP Journal's fall is indicative of the instability such publications must endure initially. I'm speaking to myself as much as anyone. PHP Magazine has always seemed financially instable, but that's just my general perception (I could be completely wrong). It also seems to be targetted at the western European audience, which might be why it is so expensive to get it elsewhere. Still, some good authors have written for it, so I'm sure it is a quality magazine. I'm going to try and sneak at glance at one of the copies Hans brings. php|a seems to be the most successful so far, but I'm not sure if that is due to better content or being more focused on a worldwide audience. I think allowing people to buy individual issues as PDFs for very little money has helped them a lot. They gave me a free subscription back when they first started, so I've kept up more with it than with PHP Magazine. I wrote an article on XSS and CSRF for the October issue of php|a. As little as they pay authors, I figure that counts as supporting them. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From adam at trachtenberg.com Tue Sep 23 17:57:55 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 23 Sep 2003 17:57:55 -0400 (EDT) Subject: [nycphp-talk] mysql authentication and php - building php for windows In-Reply-To: <006B22B846854640942D08F78855FCE14F184B@addison.belkin.com> Message-ID: On Tue, 23 Sep 2003, Judy Bello wrote: > I just installed php version 4.3.3, apache2.x and mysql version 4.1 on > Windows. This is a nasty combination of versions. You can't run these together, and surprisingly enough, it's not the fault of Apache 2.0. :) If you want to use MySQL 4.1, you need the mysqli extension, which is PHP 5 only. Unfortunately, you need to not only be running the latest CVS (well, actually BitKeeper) version of MySQL 4.1, you probably also need to use the latest CVS of PHP 5.0. (So, you can't, for example, download MySQL 4.1a and use that with PHP 5.0 beta 1.) MySQL 4.1's in alpha and PHP 5.0's in beta and PHP's Apache 2.0 support is non-production quality, so draw you own conclusions. :) > This is all very frustrating because I am accustomed to working in > linux or some other unix and working with gnu tools where you have a > lot of freedom. But I am not sure that would work to get a viable > windows executable and set of dlls. Does anyone know if this can be > done? Is there any kind of package for building Windows php? Is > there a simpler solution that I am not seeing? I looked into getting this running on Mac OS X and/or Redhat Linux. It's a super pain-in-the-ass. I was looking at installing BitKeeper just to get the MySQL sources *and* upgrading autoconf and bison to get MySQL to build. And I already had a working version of PHP 5.0 building from CVS! I wouldn't suggest trying it on Windows. I would suggest using MySQL 4.0 instead as that is the best of all the crappy alternatives. You could also do what I'm doing: waiting until a newer version of MySQL 4.1 is released as a binary. A third option is looking to find a built-from-CVS binary version of MySQL 4.1 and trying something from http://snaps.php.net/. That may work, but now that MySQL 4.1 is GPL, PHP cannot currently distribute the MySQL client libraries due to "issues." (That are being worked on.) So, YMMV. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From soazine at erols.com Tue Sep 23 22:15:51 2003 From: soazine at erols.com (Phil Powell) Date: Tue, 23 Sep 2003 22:15:51 -0400 Subject: [nycphp-talk] T_ARRAY error but have no idea why References: <014801c3815f$8af14610$67a76244@philofsoa> <20030923152508.GR8912@thighmaster.digitalpulp.com> Message-ID: <0e1201c38241$c6e13940$67a76244@philofsoa> Yep couldn't figure out the exact syntax of what I wanted, thanx! Phil ----- Original Message ----- From: "Andrew Yochum" To: "NYPHP Talk" Sent: Tuesday, September 23, 2003 11:25 AM Subject: Re: [nycphp-talk] T_ARRAY error but have no idea why > Perhaps you want... > ${$label . 'Array'} = array(); > or something similar? > > On Mon, Sep 22, 2003 at 07:16:23PM -0400, Phil Powell wrote: > > The following code: > > > > $kounter = 0; $fsArray = array('farge', 'storrelse'); > > for ($i = 0; $i < sizeof($fsArray); $i++) { > > // POPULATE CONTENT FOR BOTH FARGE AND ST?RRELSE DROPDOWNS NOW ASSOCIATED ACCORDING TO PRODUKT ID > > $label = $fsArray[$i]; > > ${$label}Array = array(); > > $sql = 'SELECT s.nnet_produkt_' . $label . '_navn ' . > > 'FROM nnet_produkt p, nnet_produkt_' . $label . '_assoc q, ' . > > ' nnet_produkt_' . $label . ' r ' . > > 'WHERE p.nnet_produkt_id = q.nnet_produkt_id ' . > > ' AND p.nnet_produkt_id = ' . $row['nnet_produkt_id'] . > > ' AND q.nnet_produkt_' . $label . '_id = r.nnet_produkt_' . $label . '_id'; > > $dropdownQuery = mysql_query($sql) or die('Could not perform dropdown query: ' . mysql_error()); > > while ($dropdownRow = mysql_fetch_row($dropdownQuery)) > > array_push(${$label}Array, $dropdownRow[0]); > > } // END OF FOR LOOP FOR $fsArray > > > > produces the following error: > > > > Parse error: parse error, unexpected T_ARRAY in /home/nordicnet.no/membersites/vis_varegruppen.php on line 133 > > > > Line 133 is: > > > > ${$label}Array = array(); > > > > I'm lost as usual. Help! > > > > Thanx > > Phil > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > -- > Andrew Yochum > Digital Pulp, Inc. > 212.679.0676x255 > andrew at digitalpulp.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Tue Sep 23 23:09:01 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Tue, 23 Sep 2003 23:09:01 -0400 Subject: [nycphp-talk] Today's Meeting. Templates In-Reply-To: Message-ID: <000001c38249$35b195c0$6401a8c0@main> Hello everyone, Today's meeting was great, It was nice to attach faces to some of the regularly seen names on the list :) I just wanted to comment on templates discussion that went on today. All three presenters did their parts pretty well. The thing that bothered me was that both Daniel and Chris sort of implied that the "designers" are fairly dumb creatures, who only know HTML, or XHTML, and are completely oblivious to the whole realm of scripting. We all know that in today's market almost every designer has had some kind of experience with scripting, be it PHP, ASP, CF or even JavaScript. Unless they hands you the design in form of an image file, which will qualify them as an artist rather than a web designer. Officially, my stance on the templating engine is not a solid one. I recently setup smarty for a client, a painful process to setup with no root access, but it worked out quite well. I'll probably play around with PHPLib, however, last I looked at it, it totally confused me with the way blocks work. Most of my projects don't use an external templating engine, mostly everything in php, evals, includes, etc. etc. - Nasir From alexander_chan at yahoo.com Tue Sep 23 23:31:36 2003 From: alexander_chan at yahoo.com (Alexander Chan) Date: Tue, 23 Sep 2003 20:31:36 -0700 (PDT) Subject: [nycphp-talk] unziping files throug php Message-ID: <20030924033136.13685.qmail@web11608.mail.yahoo.com> hi everybody, I am not sure what would be the best way of doing the following. I have a php script that will take a HTTP uploaded zip file and and uncompress it. I am not sure if i should just do exec('gunzip $filename'); . Is there a cleaner way? alex From nyphp at websapp.com Tue Sep 23 23:38:56 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 23 Sep 2003 23:38:56 -0400 Subject: [nycphp-talk] Today's Meeting. Templates In-Reply-To: <000001c38249$35b195c0$6401a8c0@main> Message-ID: > Today's meeting was great, It was nice to attach faces to some of the > regularly seen names on the list :) it was nice to meet you too! > I just wanted to comment on templates discussion that went on today. All > three presenters did their parts pretty well. The thing that > bothered me was > that both Daniel and Chris sort of implied that the "designers" are fairly > dumb creatures, who only know HTML, or XHTML, and are completely oblivious > to the whole realm of scripting. We all know that in today's market almost > every designer has had some kind of experience with scripting, be it PHP, > ASP, CF or even JavaScript. Neither Chris or I never implied that designers are dumb. In todays market you can find many 'Jack of all tades'. I have worked with amazing designers and many of them did not know any programming what so ever. Not knowing a program language(s) does not mean that one is dumb. Being able to let a designer concentrate on what he/she does best, will result in a better product. I am positive that there are many good designers that know how to program, but when I look for a solution, I would like it to fit most cases. A word about PHPLib: it takes time to get used to! I did not go into details, but without adding anthing else to the HTML (besides variables and blocks), PHPLib Templates can do ANYTHING that you need be done with the template. I have build many commercial and complex sites with it (where the designers of the site did not know how to program :)). --Daniel From lists at ny-tech.net Tue Sep 23 23:54:08 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Tue, 23 Sep 2003 23:54:08 -0400 Subject: [nycphp-talk] Today's Meeting. Templates In-Reply-To: Message-ID: <000001c3824f$82f753a0$6401a8c0@main> > Neither Chris or I never implied that designers are dumb. In todays market you can find many 'Jack of all > tades'. I have worked with amazing designers and many of them did not know any programming what so ever. Not > knowing a program language(s) does not mean that one is dumb. Being able to let a designer concentrate on what > he/she does best, will result in a better product. I am positive that there are many good designers that know > how to program, but when I look for a solution, I would like it to fit most cases. I am not sure why but it did come across to me that as if "designers" in question were mostly those who didn't know anything about scripting, or the business logic. Hence the usage of "dumb", perhaps not the right word :) Thanks for clarification though. > A word about PHPLib: it takes time to get used to! I did not go into details, but without adding anthing else > to the HTML (besides variables and blocks), PHPLib Templates can do ANYTHING that you need be done with the > template. I have build many commercial and complex sites with it (where the designers of the site did not know > how to program :)). I'll give PHPLib a shot for one of my upcoming projects, and see where it leads me. - Nasir _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From adam at trachtenberg.com Wed Sep 24 00:20:42 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 24 Sep 2003 00:20:42 -0400 (EDT) Subject: [nycphp-talk] unziping files throug php In-Reply-To: <20030924033136.13685.qmail@web11608.mail.yahoo.com> Message-ID: On Tue, 23 Sep 2003, Alexander Chan wrote: > I am not sure what would be the best way of doing the > following. I have a php script that will take a HTTP > uploaded zip file and and uncompress it. I am not sure > if i should just do exec('gunzip $filename'); . Is > there a cleaner way? Depending on what you want to do with the file after you uncompress it, you may want to check out: . -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From nyphp at websapp.com Wed Sep 24 00:35:14 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 24 Sep 2003 00:35:14 -0400 Subject: [nycphp-talk] Reminder: 50% Zend Studio Version 3 Message-ID: Use special offer code: NYPHPZDE3 Zend Studio Plus for $124.50 Valid only from 23 - 26 September http://www.zend.com/store/products/zend-studio.php --Daniel From lists at ny-tech.net Wed Sep 24 01:00:05 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 24 Sep 2003 01:00:05 -0400 Subject: [nycphp-talk] Reminder: 50% Zend Studio Version 3 In-Reply-To: Message-ID: <000001c38258$b9640a60$6401a8c0@main> Thanks, I was about start a thread asking for it. Since I have a great memory, I had already forgotten it. - Nasir -----Original Message----- From: Daniel Kushner [mailto:nyphp at websapp.com] Sent: Wednesday, September 24, 2003 12:35 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Reminder: 50% Zend Studio Version 3 Use special offer code: NYPHPZDE3 Zend Studio Plus for $124.50 Valid only from 23 - 26 September http://www.zend.com/store/products/zend-studio.php --Daniel _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From csnyder at chxo.com Wed Sep 24 07:52:07 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 24 Sep 2003 07:52:07 -0400 Subject: [nycphp-talk] Today's Meeting. Templates In-Reply-To: <000001c38249$35b195c0$6401a8c0@main> References: <000001c38249$35b195c0$6401a8c0@main> Message-ID: <3F718567.3080900@chxo.com> Nasir Zubair wrote: >The thing that bothered me was >that both Daniel and Chris sort of implied that the "designers" are fairly >dumb creatures, who only know HTML, or XHTML, and are completely oblivious >to the whole realm of scripting. > On the contrary-- designers (and especially the integrators in Hans' world) are generally brilliant. It takes a logical mind to program in PHP, but it takes an artist to be able to craft an attractive website that is actually usable by non-technical people in a wide array of browsers. Had I been a little more on target, I would have implied that it is important to find a system that maximizes everyone's strengths. Even on a project where you are the sole author, it's helpful to be in a place where your tasks are delineated. That's exactly why some kind of templating scheme, whether it's disciplined PHP, Smarty, PHPLib, ZPT (I'm gonna check that out, thanks Andrew), or something you built from scratch, is important, and worth the processing overhead it imposes. Though maybe not worth 3x overhead... ;-) I learned a lot last night, thank you everyone! csnyder From Cdave77 at netscape.net Wed Sep 24 08:36:55 2003 From: Cdave77 at netscape.net (Cdave77 at netscape.net) Date: Wed, 24 Sep 2003 08:36:55 -0400 Subject: [nycphp-talk] problem with authentication ( apache) Message-ID: <18A9991B.4BE64FA0.0015EFA5@netscape.net> In apache i have created passward file and also placed .htaccess in my folder.still i am not getting any popup window for login and password. please help !! Linux Red 8.0 ====== this is in my .htaccess file AuthType Basic AuthName "By Invitation Only" AuthUserFile /usr/local/apache/passwd/passwords Require user testuser ==== already have file called passwords in /usr/local/apache/passwd with testuser in it . another question , what should i keep as my folder's Permission .is 755 okay ? Thanks __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 From danielc at analysisandsolutions.com Wed Sep 24 08:44:00 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 08:44:00 -0400 Subject: [nycphp-talk] unziping files throug php In-Reply-To: <20030924033136.13685.qmail@web11608.mail.yahoo.com> References: <20030924033136.13685.qmail@web11608.mail.yahoo.com> Message-ID: <20030924124400.GA17448@panix.com> Howdy: On Tue, Sep 23, 2003 at 08:31:36PM -0700, Alexander Chan wrote: > > uploaded zip file and and uncompress it. Might want to check out the PECL/PEAR zip package http://pecl.php.net/package/zip http://pear.php.net/package/zip >From my vaguely paying attention to development discussions, I suspect the PECL one is the one to use. Also, there's the Zip File Functions: http://us4.php.net/zip Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dan at mx2pro.com Wed Sep 24 08:55:15 2003 From: dan at mx2pro.com (Dan Horning) Date: Wed, 24 Sep 2003 08:55:15 -0400 Subject: [nycphp-talk] problem with authentication ( apache) In-Reply-To: <18A9991B.4BE64FA0.0015EFA5@netscape.net> Message-ID: <000201c3829b$1b54cd30$e4c8f63f@dwchome> The best way to do this .... Email dan h if you have questions For this example, we will show how to password protect a directory with a specific login and password. You can apply this procedure to virtual sites also by changing the directories. a. Telnet in, and login as the User or admin or root b. Navigate to the directory you want to password protect. c. Create the .htaccess file in the directory (example: pico .htaccess), it should contain the following lines: # Access file order allow,deny allow from all require valid-user Authname "Administrative area" Authtype Basic AuthUserFile /DirectoryName/.htpasswd Replace "DirectoryName" with the appropriate path Now you must create the .htpasswd file using the htpasswd tool. a. Type the following command to create the file and add a user: b. /usr/bin/htpasswd -c .htpasswd username c. You will be prompted for the users' password twice. If you need to add additional users to the file, use the command above without the -c. Tutorial taken from email by John D. Gorena [Support at JMG-Enterprises.com] - Dan Horning 1-866-284-3150 (Toll-Free) President: Technical Evangelism & Media Systems Administration MX2 Productions Media from concept to execution. > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of > Cdave77 at netscape.net > Sent: Wednesday, September 24, 2003 8:37 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] problem with authentication ( apache) > > > In apache i have created passward file and also placed > .htaccess in my folder.still i am not getting any popup > window for login and password. > > please help !! > > Linux Red 8.0 > ====== > this is in my .htaccess file > > AuthType Basic > AuthName "By Invitation Only" > AuthUserFile /usr/local/apache/passwd/passwords > Require user testuser > > ==== > already have file called passwords in > /usr/local/apache/passwd with testuser in it . > > another question , what should i keep as my folder's > Permission .is 755 okay ? > > Thanks > > > __________________________________________________________________ > McAfee VirusScan Online from the Netscape Network. > Comprehensive protection for your entire computer. Get your > free trial today! > http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro mo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Wed Sep 24 09:58:39 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 24 Sep 2003 09:58:39 -0400 (EDT) Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: <000001c38249$35b195c0$6401a8c0@main> References: <000001c38249$35b195c0$6401a8c0@main> Message-ID: On Tue, 23 Sep 2003, Nasir Zubair wrote: > Officially, my stance on the templating engine is not a solid one. I > recently setup smarty for a client, a painful process to setup with no root > access, but it worked out quite well. I've set up Smarty as non-root more often than not, and it wasn't painful. What was the problem? Last night's discussion was fascinating. All the presentations were compelling. ?Viva NYPHP! I'd like to have another look at the examples if I could. (I want to look at that function that converted values in bytes to human-friendly strings ) That Zend IDE thing has me breathing heavy too. I think I'm gonna bite. Question: as it really platform independent? In other words, say I buy a copy, run it on Windoze machine, then remove Windoze and install Linux in its place. Would I be able to re-install my Zend Studio? Yes I was paying attention when Daniel said it's written in Java, but still one wonders if there are any platform-specific gotchas. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From hans at nyphp.org Wed Sep 24 10:24:35 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 24 Sep 2003 10:24:35 -0400 Subject: [nycphp-talk] [Fwd: Open Enterprise Trends_September 15, 2003] Message-ID: <3F71A923.3030202@nyphp.org> Hi all, Nice to see PHP taking hold in such a context so I thought to pass it on. -------- Original Message -------- Subject: [Fwd: Open Enterprise Trends_September 15, 2003] Date: Tue, 16 Sep 2003 08:30:01 -0400 To: Hans Zaunere Open Enterprise Trends The Open Source Portal for Enterprise Developers September 15, 2003 www.oetrends.com (To unsubscribe see link at bottom) --------------------------------------------------- Top Stories o Hands On: Using PHP and PEAR for Web Services o Open Source vs. Shared Source - Hunt for Value o Zend Studio 3.0 Supports Mission-Critical PHP Apps o #develop Offers Sharp, Open Source IDE for .NET o SPML Dev Toolkit Open for Free Download o Hands On: Inside the Tricky PHP-to-XML Project ==================================================== Hands On: Using PHP and PEAR for Web Services --------------------------------------------------- The promise of distributed, platform-independent applications can make Web services appealing to many tech execs. But, it can also be more work than many devs bargain for. A PHP Open Source project called PEAR looks to provide devs a huge helping hand, by providing many key SOAP classes. See how sweet a PEAR can be. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=259 Open Source vs. Shared Source - Hunt for Value --------------------------------------------------- You may have missed last weekend's Mosley-De La Hoya fight, but there's another battle worth watching that may prove more lucrative to your career. Vendors are beginning to take a few pages from the Open Source playbook, offering devs more access to code and community for paid software. OET takes a look at the back-and-forth over the question of how much value "Shared Source" truly offers, and it's not on pay-per-view. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=258 Zend Studio 3.0 Supports Mission-Critical PHP Apps --------------------------------------------------- Engineers at Zend, keying off an uptick in corporate interest in PHP for mission-critical web-based apps, have released Zend Studio 3.0, an upgrade to their PHP IDE. See how interest from CBS, Lufthansa and others led Zend to add dynamic code support, online debugging and performance tuning in the latest IDE. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=257 #develop Offers Sharp, Open Source IDE for .NET --------------------------------------------------- Developers looking for an Open Source way to access .NET have an Open Source IDE that sports add-in menus, compiler backend tools and more. The #develop team has released #develop 1.0, with richer backend support for .NET 1.1, and easier front-end nav tools. OET spoke with project founder Christoph Wille, to get a look at the latest. You can get a free download, too. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=256 SPML Dev Toolkit Open for Free Download --------------------------------------------------- Devs can download a free, Open Source toolkit for Service Provisioning Markup Language (SPML) just as OASIS nears full adoption of an SPML 1.0 standard. SPML uses XML to help ensure cross-platform interoperability for access-control and identity technologies. Take a test drive of the latest tools for helping devs build secure end-to-end web services. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=255 Hands On: Inside the Tricky PHP-to-XML Project --------------------------------------------------- PHP-to-XML projects can be either relatively straightforward or complex. And now, as PHP becomes a familiar scripting environment for programmers working with and supporting XML, questions about the interoperability of both languages abound. This week, OET looks at the growing list of questions surrounding PHP-with-XML projects, and, more importantly, offers developers some answers. [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=250 --------------------------------------------------- Open Enterprise Trends is a bi-weekly newsletter aimed at helping developers "bridge the gap" between Open Source and commercial solutions Open Enterprise Trends www.oetrends.com 622 Edgewater Boulevard Foster City, CA 94404 See www.oetrends.com for Contact Information From nyphp at websapp.com Wed Sep 24 10:47:50 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 24 Sep 2003 10:47:50 -0400 Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: Message-ID: > That Zend IDE thing has me breathing heavy too. I think I'm gonna bite. > Question: as it really platform independent? In other words, say I buy a > copy, run it on Windoze machine, then remove Windoze and install Linux in > its place. Would I be able to re-install my Zend Studio? Yes I was paying > attention when Daniel said it's written in Java, but still one wonders if > there are any platform-specific gotchas. > When you purchase the ZDE, you can download the following binaries. Zend Studio 3.0.0 Client ======================== Linux glibc2.1 Windows NT4/2000/XP Mac OS X Zend Studio 3.0.0 Server ======================== Linux glibc2.1 Solaris Sparc FreeBSD 4.0 Windows NT4/2000/XP Mac OS X From dmintz at panix.com Wed Sep 24 11:10:26 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 24 Sep 2003 11:10:26 -0400 (EDT) Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: References: Message-ID: On Wed, 24 Sep 2003, Daniel Kushner wrote: > When you purchase the ZDE, you can download the following binaries. All of them, or just one? Sorry if I'm being dense. > > Zend Studio 3.0.0 Client > ======================== > Linux glibc2.1 > Windows NT4/2000/XP > Mac OS X > > Zend Studio 3.0.0 Server > ======================== > Linux glibc2.1 > Solaris Sparc > FreeBSD 4.0 > Windows NT4/2000/XP > Mac OS X From nyphp at websapp.com Wed Sep 24 11:17:15 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 24 Sep 2003 11:17:15 -0400 Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: Message-ID: You can download all of them. Once you install your product, it registers your license key as used. If you want to install the client on another machine, you will need to request from Zend to cancel your key and issue you a new one. --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Mintz > Sent: Wednesday, September 24, 2003 11:10 AM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Yesterday's Meeting. Templates etc > > > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > When you purchase the ZDE, you can download the following binaries. > > All of them, or just one? Sorry if I'm being dense. > > > > > Zend Studio 3.0.0 Client > > ======================== > > Linux glibc2.1 > > Windows NT4/2000/XP > > Mac OS X > > > > Zend Studio 3.0.0 Server > > ======================== > > Linux glibc2.1 > > Solaris Sparc > > FreeBSD 4.0 > > Windows NT4/2000/XP > > Mac OS X > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Wed Sep 24 11:19:21 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 24 Sep 2003 11:19:21 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? Message-ID: <104701c382af$3ae9e2c0$67a76244@philofsoa> I'm having trouble with using BSF-generated tags in JSP, and I can't find anyone that knows what BSF is. Can someone here may help? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at panix.com Wed Sep 24 11:23:06 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 24 Sep 2003 11:23:06 -0400 (EDT) Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: References: Message-ID: On Wed, 24 Sep 2003, Daniel Kushner wrote: > You can download all of them. Once you install your product, it registers > your license key as used. If you want to install the client on another > machine, you will need to request from Zend to cancel your key and issue you > a new one. Does it run out onto the network and check your license every time it launches? What if you wanted to run it on a machine that for some reason was not connected to the Internet, e.g, suppose your ISP was down? Would it refuse to run? TIA David From nyphp at websapp.com Wed Sep 24 11:28:07 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 24 Sep 2003 11:28:07 -0400 Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: Message-ID: David, I am not really sure how Zend do their license validations. You should contact them at contact at zend.com, sales at zend.com, ide at zend.com. Best, Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of David Mintz > Sent: Wednesday, September 24, 2003 11:23 AM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Yesterday's Meeting. Templates etc > > > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > You can download all of them. Once you install your product, it > registers > > your license key as used. If you want to install the client on another > > machine, you will need to request from Zend to cancel your key > and issue you > > a new one. > > Does it run out onto the network and check your license every time it > launches? What if you wanted to run it on a machine that for some reason > was not connected to the Internet, e.g, suppose your ISP was down? Would > it refuse to run? > > TIA > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From andrew at digitalpulp.com Wed Sep 24 11:21:54 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Wed, 24 Sep 2003 11:21:54 -0400 Subject: [nycphp-talk] PHPTAL - PHP Template Attribute Language Message-ID: <20030924152146.GU8912@thighmaster.digitalpulp.com> Hey Crew, As promised, here is the link to PHPTAL, the PHP implementation of Zope's Page Templates (ZPT): http://phptal.sourceforge.net/ The best place to get started is of course the documentation which seems to be very good: http://phptal.sourceforge.net/bagpack/HTML_Template_PHPTAL/doc/ I'd be glad to put together a short presentation (along the lines of what was done last night) for a future meeting if there is interest. Like I mentioned last night, I'm very familiar with the original TAL implementation in Zope, but not at all with the PHP implmentation, as it was nascent when I had first found it. So, a presentation would give me a good excuse to get to know PHPTAL. Andrew -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From danielc at analysisandsolutions.com Wed Sep 24 11:43:29 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 11:43:29 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? In-Reply-To: <104701c382af$3ae9e2c0$67a76244@philofsoa> References: <104701c382af$3ae9e2c0$67a76244@philofsoa> Message-ID: <20030924154329.GA9680@panix.com> Hi Phil: On Wed, Sep 24, 2003 at 11:19:21AM -0400, Phil Powell wrote: > I'm having trouble with using BSF-generated tags in JSP, and I can't > find anyone that knows what BSF is. Can someone here may help? In the future, please 1) stick to PHP, 2) make a concerted attempt to find an answer on your own (see below) and 3) provide a pointed question that demonstrates what you're trying to do and what you've tried. Go to one or both of the following: http://www.google.com/ http://groups.google.com/ Enter the search terms: "bsf generated tags jsp" --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Wed Sep 24 08:49:43 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 24 Sep 2003 08:49:43 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <104701c382af$3ae9e2c0$67a76244@philofsoa> Message-ID: <001901c3829a$542b6390$8119fea9@thinkpad> BSF is a generic scripting framework, but you need to say what scripting language you are using underneath ... (i dont think you can use PHP but i could be wrong) ... http://jakarta.apache.org/bsf/ The Alicebot Program D uses BSF for executing Javascript between tags. - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:19 AM Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? I'm having trouble with using BSF-generated tags in JSP, and I can't find anyone that knows what BSF is. Can someone here may help? Thanx Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Wed Sep 24 11:47:51 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 24 Sep 2003 11:47:51 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <104701c382af$3ae9e2c0$67a76244@philofsoa> <20030924154329.GA9680@panix.com> Message-ID: <10ac01c382b3$364738e0$67a76244@philofsoa> Thanx Dan. I'll remember in the future to do just that even though I've been trying for weeks on every single posting on java.sun.com, java USENET newsgroups, NovaJUG Yahoogroups posting, CF postings, countless Google searchings on URLs and newsgroups for answers. Phil ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 11:43 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? > Hi Phil: > > On Wed, Sep 24, 2003 at 11:19:21AM -0400, Phil Powell wrote: > > > I'm having trouble with using BSF-generated tags in JSP, and I can't > > find anyone that knows what BSF is. Can someone here may help? > > In the future, please 1) stick to PHP, 2) make a concerted attempt to > find an answer on your own (see below) and 3) provide a pointed question > that demonstrates what you're trying to do and what you've tried. > > Go to one or both of the following: > http://www.google.com/ > http://groups.google.com/ > > Enter the search terms: "bsf generated tags jsp" > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > 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 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Wed Sep 24 11:49:46 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 24 Sep 2003 11:49:46 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <104701c382af$3ae9e2c0$67a76244@philofsoa> <001901c3829a$542b6390$8119fea9@thinkpad> Message-ID: <10bf01c382b3$7af9bd50$67a76244@philofsoa> Thanx, actually I have already gone to jakarta.apache.org/bsf and downloaded the appropriate TLD and JAR files, installed, rebooted and tried using JRun, to no avail, I get NoClassDefFoundError on BSFManager() anytime I try using or I thought that (for Dan's sake considering his PHP puritanical viewpointing) there might be some PHP programmers who can cross-program also in JSP and have run into any problems involving BSF. Happy now Dan? Phil ----- Original Message ----- From: jon baer To: NYPHP Talk Sent: Wednesday, September 24, 2003 8:49 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? BSF is a generic scripting framework, but you need to say what scripting language you are using underneath ... (i dont think you can use PHP but i could be wrong) ... http://jakarta.apache.org/bsf/ The Alicebot Program D uses BSF for executing Javascript between tags. - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:19 AM Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? I'm having trouble with using BSF-generated tags in JSP, and I can't find anyone that knows what BSF is. Can someone here may help? Thanx Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Wed Sep 24 09:06:41 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 24 Sep 2003 09:06:41 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <104701c382af$3ae9e2c0$67a76244@philofsoa><001901c3829a$542b6390$8119fea9@thinkpad> <10bf01c382b3$7af9bd50$67a76244@philofsoa> Message-ID: <006201c3829c$b2984ae0$8119fea9@thinkpad> Well sounds more like a CLASSPATH problem then a BSF issue (a normal common problem when you try to attempt something "that should" work with all containers instead of what they were originally made for (Tomcat)) - thus another example of a common Java problem + why PHP is less of a hassle. From what I remember on older versions JRun has an extensive management console that manage your .jars ... likewise you did not say which scripting language you are using underneath, for example if I use javascript w/ BSF I need to make sure js.jar is linked, etc. This would be your problem if BSFManager() can't find the required libs for the scripting language. (likewise just guessing) - Jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:49 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? Thanx, actually I have already gone to jakarta.apache.org/bsf and downloaded the appropriate TLD and JAR files, installed, rebooted and tried using JRun, to no avail, I get NoClassDefFoundError on BSFManager() anytime I try using or I thought that (for Dan's sake considering his PHP puritanical viewpointing) there might be some PHP programmers who can cross-program also in JSP and have run into any problems involving BSF. Happy now Dan? Phil ----- Original Message ----- From: jon baer To: NYPHP Talk Sent: Wednesday, September 24, 2003 8:49 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? BSF is a generic scripting framework, but you need to say what scripting language you are using underneath ... (i dont think you can use PHP but i could be wrong) ... http://jakarta.apache.org/bsf/ The Alicebot Program D uses BSF for executing Javascript between tags. - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:19 AM Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? I'm having trouble with using BSF-generated tags in JSP, and I can't find anyone that knows what BSF is. Can someone here may help? Thanx Phil -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Wed Sep 24 12:08:16 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 24 Sep 2003 12:08:16 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <104701c382af$3ae9e2c0$67a76244@philofsoa><001901c3829a$542b6390$8119fea9@thinkpad><10bf01c382b3$7af9bd50$67a76244@philofsoa> <006201c3829c$b2984ae0$8119fea9@thinkpad> Message-ID: <110801c382b6$10d15980$67a76244@philofsoa> I would ultimately like to use PHP underneath but that would require some custom JAR files to do that, that would be a trip.. for now I've tried both Javascript and TCL, I have both JAR files installed already. What would I need to do in CLASSPATH to ensure working order; I put the path to the JAR files in CLASSPATH, what else would you recommend? Thanx Phil ----- Original Message ----- From: jon baer To: NYPHP Talk Sent: Wednesday, September 24, 2003 9:06 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? Well sounds more like a CLASSPATH problem then a BSF issue (a normal common problem when you try to attempt something "that should" work with all containers instead of what they were originally made for (Tomcat)) - thus another example of a common Java problem + why PHP is less of a hassle. From what I remember on older versions JRun has an extensive management console that manage your .jars ... likewise you did not say which scripting language you are using underneath, for example if I use javascript w/ BSF I need to make sure js.jar is linked, etc. This would be your problem if BSFManager() can't find the required libs for the scripting language. (likewise just guessing) - Jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:49 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? Thanx, actually I have already gone to jakarta.apache.org/bsf and downloaded the appropriate TLD and JAR files, installed, rebooted and tried using JRun, to no avail, I get NoClassDefFoundError on BSFManager() anytime I try using or I thought that (for Dan's sake considering his PHP puritanical viewpointing) there might be some PHP programmers who can cross-program also in JSP and have run into any problems involving BSF. Happy now Dan? Phil ----- Original Message ----- From: jon baer To: NYPHP Talk Sent: Wednesday, September 24, 2003 8:49 AM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? BSF is a generic scripting framework, but you need to say what scripting language you are using underneath ... (i dont think you can use PHP but i could be wrong) ... http://jakarta.apache.org/bsf/ The Alicebot Program D uses BSF for executing Javascript between tags. - jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Wednesday, September 24, 2003 11:19 AM Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? I'm having trouble with using BSF-generated tags in JSP, and I can't find anyone that knows what BSF is. Can someone here may help? Thanx Phil ------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Wed Sep 24 09:26:30 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 24 Sep 2003 09:26:30 -0400 Subject: [nycphp-talk] Global error handling ... Message-ID: <006801c3829f$776b5680$8119fea9@thinkpad> i missed a great meeting *again* last night and one of the questions i wanted to ask what in regards to having a global error handler for your website. for example i really wanted to provide much more helpful info on items that can occur with mysql for a project (cant connect, misconfiguration, non-installed tables, etc) ... but i noticed that (could be my config) that mysql_select_db will not pass error to any handlers (using set_error_handler). i ended up giving up and writing a bunch of tests inside install.php instead. but i thought there was a way to pass mysql_error() to your page handlers + if it was ok/smart to autoinclude both set_error_handler + the handler for all of the app. was really looking for/asking about this in the site layout discussion. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From adam at trachtenberg.com Wed Sep 24 12:23:07 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 24 Sep 2003 12:23:07 -0400 (EDT) Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? In-Reply-To: <10bf01c382b3$7af9bd50$67a76244@philofsoa> Message-ID: On Wed, 24 Sep 2003, Phil Powell wrote: > I thought that (for Dan's sake considering his PHP puritanical > viewpointing) there might be some PHP programmers who can > cross-program also in JSP and have run into any problems involving > BSF. > Happy now Dan? Aw man... This is the NYPHP mailing list. Is it too much to ask that people's posts be on at least one, if not both, of NY or PHP? I know it's tempting to use this list as a general all-purpose Web programming resource because a lot of people on the list know how to solve problems with JSP, BSF, ASP, Tcl, etc. But please don't. This is for PHP. (Or, as I said before, New York.) If you need the name of a good list for non-PHP Web development questions, I suggest webdesign-l. (http://www.webdesign-l.com) It covers more than just questions about HTML and lots of people are happy to answer (and read the answers to) programming questions of all kinds. I know; I've been on that list for about 5-6 years now. I'm not saying questions on SQL and Web hosting are bad. They're okay because they're closely related to PHP. But BSF? No way. But enough from me. -adam PS: Please note that I am not the management; merely a concerned customer. -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From jlacey at ix.netcom.com Wed Sep 24 12:27:07 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Wed, 24 Sep 2003 10:27:07 -0600 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? In-Reply-To: References: Message-ID: <3F71C5DB.4020908@ix.netcom.com> hear, hear,... even tho I'm from Colorado :( does being born and raised in Philly help -- and business trips to the City? :) Adam Maccabee Trachtenberg wrote: >On Wed, 24 Sep 2003, Phil Powell wrote: > > > >>I thought that (for Dan's sake considering his PHP puritanical >>viewpointing) there might be some PHP programmers who can >>cross-program also in JSP and have run into any problems involving >>BSF. >> >> > > > >>Happy now Dan? >> >> > >Aw man... This is the NYPHP mailing list. Is it too much to ask that >people's posts be on at least one, if not both, of NY or PHP? > >I know it's tempting to use this list as a general all-purpose Web >programming resource because a lot of people on the list know how to >solve problems with JSP, BSF, ASP, Tcl, etc. But please don't. > >This is for PHP. (Or, as I said before, New York.) If you need the >name of a good list for non-PHP Web development questions, I suggest >webdesign-l. (http://www.webdesign-l.com) It covers more than just >questions about HTML and lots of people are happy to answer (and read >the answers to) programming questions of all kinds. I know; I've been >on that list for about 5-6 years now. > >I'm not saying questions on SQL and Web hosting are bad. They're okay >because they're closely related to PHP. But BSF? No way. > >But enough from me. > >-adam > >PS: Please note that I am not the management; merely a concerned customer. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Wed Sep 24 12:30:51 2003 From: soazine at erols.com (Phil Powell) Date: Wed, 24 Sep 2003 12:30:51 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: Message-ID: <115201c382b9$38124d30$67a76244@philofsoa> Ok maybe I have asked too many questions here I am afraid. I guess I should just dart out of here. I've been in NY enough and normally I post a lot of PHP questions, and ultimately if I could get BSF to work I'd like to find some custom JARS that would allow PHP within JSP. Phil ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:23 PM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? > On Wed, 24 Sep 2003, Phil Powell wrote: > > > I thought that (for Dan's sake considering his PHP puritanical > > viewpointing) there might be some PHP programmers who can > > cross-program also in JSP and have run into any problems involving > > BSF. > > > Happy now Dan? > > Aw man... This is the NYPHP mailing list. Is it too much to ask that > people's posts be on at least one, if not both, of NY or PHP? > > I know it's tempting to use this list as a general all-purpose Web > programming resource because a lot of people on the list know how to > solve problems with JSP, BSF, ASP, Tcl, etc. But please don't. > > This is for PHP. (Or, as I said before, New York.) If you need the > name of a good list for non-PHP Web development questions, I suggest > webdesign-l. (http://www.webdesign-l.com) It covers more than just > questions about HTML and lots of people are happy to answer (and read > the answers to) programming questions of all kinds. I know; I've been > on that list for about 5-6 years now. > > I'm not saying questions on SQL and Web hosting are bad. They're okay > because they're closely related to PHP. But BSF? No way. > > But enough from me. > > -adam > > PS: Please note that I am not the management; merely a concerned customer. > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Wed Sep 24 12:36:47 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 24 Sep 2003 12:36:47 -0400 (EDT) Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) In-Reply-To: References: Message-ID: On Wed, 24 Sep 2003, Daniel Kushner wrote: > David, > > I am not really sure how Zend do their license validations. You should > contact them at contact at zend.com, sales at zend.com, ide at zend.com. A reasonable suggestion. Quite honestly, I'd like to install it on two boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd like to do it inexpensively. I know it's a fair price, but OTOH I am not making real cash at this full time, we're talking less than $5000/year as a sideline. Theoretically, could one put it on the Linux machine and run Zend Studio remotely over an SSH tunnel from the Windoze box? I haven't yet experimented with running full-blown Linux GUI applications remotely in this fashion. btw I've already had a little adventure with the Zend Studio eval copy I just installed. It overwrote php.ini with its own and when I restarted Apache, she gave me about a dozen error popups "the procedure entry point _safe_emalloc could not be located in the dynamic library php4ts.dll" and "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I restored my original php.ini and that seems to have resolved everything. David From jonbaer at jonbaer.net Wed Sep 24 09:45:23 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 24 Sep 2003 09:45:23 -0400 Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? References: <115201c382b9$38124d30$67a76244@philofsoa> Message-ID: <010c01c382a2$1a7d06a0$8119fea9@thinkpad> id think having a scripting language inside of a scripting language inside of a scripting language inside of a scripting language could be overkill :-) plus you can already get what you want: http://www.php.net/java http://us4.php.net/manual/en/ref.java.php#java.servlet trust me, the headache of JSP is not worth it. - jon ----- Original Message ----- From: "Phil Powell" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:30 PM Subject: Re: [nycphp-talk] Shot in the dark: anyone here know JSP really well? > Ok maybe I have asked too many questions here I am afraid. I guess I should > just dart out of here. I've been in NY enough and normally I post a lot of > PHP questions, and ultimately if I could get BSF to work I'd like to find > some custom JARS that would allow PHP within JSP. > From sklar at sklar.com Wed Sep 24 12:41:37 2003 From: sklar at sklar.com (David Sklar) Date: Wed, 24 Sep 2003 12:41:37 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) In-Reply-To: Message-ID: > Theoretically, could one put it on the Linux machine and run Zend > Studio remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely > in this fashion. I did this when evaluating a previous version of Zend Studio and it worked just fine. David From danielc at analysisandsolutions.com Wed Sep 24 12:42:38 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 12:42:38 -0400 Subject: [nycphp-talk] Global error handling ... In-Reply-To: <006801c3829f$776b5680$8119fea9@thinkpad> References: <006801c3829f$776b5680$8119fea9@thinkpad> Message-ID: <20030924164238.GA12877@panix.com> Hi Jon: On Wed, Sep 24, 2003 at 09:26:30AM -0400, jon baer wrote: > > but i noticed that (could be my config) that mysql_select_db will not pass > error to any handlers (using set_error_handler). When some mysql* functions fail, they cause PHP to die. Finding out what's going on is doable via $php_errormsg, which requires track_errors to be on (in php.ini for example). Here are some snippets from my SQL Solution class: // Connect to server $this->SQLConnection = @mysql_connect($this->SQLHost, $this->SQLUser, $this->SQLPassword) or die ( $this->KillQuery($FileName, $FileLine, $php_errormsg) ); // Select a db $this->SQLDbHandle = @mysql_select_db($this->SQLDbName, $this->SQLConnection) or die ( $this->KillQuery($FileName, $FileLine, 'Could not select database. ' . 'Invalid database name or connection ID.') ); // Run a query $php_errormsg = ''; if ( $this->SQLRecordSet = @mysql_query($this->SQLQueryString, $this->SQLConnection) ) { if ( ! $this->SQLRecordSetFieldCount = @mysql_num_fields($this->SQLRecordSet) ) { $this->SQLRecordSetFieldCount = 0; } if ( ! $this->SQLRecordSetRowCount = @mysql_num_rows($this->SQLRecordSet) ) { $this->SQLRecordSetRowCount = 0; } } elseif ( $php_errormsg == '' ) { # Probably a database error. $this->KillQuery( $FileName, $FileLine, @mysql_error($this->SQLConnection) ); } else { # Some PHP error. Probably a bad Connection. Complain. $this->KillQuery($FileName, $FileLine, $php_errormsg); } Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Wed Sep 24 09:50:41 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 24 Sep 2003 09:50:41 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) References: Message-ID: <011e01c382a2$d85d1e80$8119fea9@thinkpad> There is always secure VNC and vmWare :-) (just fyi, i was someone extremely skeptical @ vmware solutions but having a dual boot laptop w/ RH/XP i was extremely impressed with this product: http://www.vmware.com/products/desktop/ws_features.html) I did run Zend Studio on the Linux virtual IP + the editor on XP, not sure if that has anything to do with your problem but it was pretty cool. The VNC solution is also nice. - Jon ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:36 PM Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > David, > > > > I am not really sure how Zend do their license validations. You should > > contact them at contact at zend.com, sales at zend.com, ide at zend.com. > > A reasonable suggestion. Quite honestly, I'd like to install it on two > boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd > like to do it inexpensively. I know it's a fair price, but OTOH I > am not making real cash at this full time, we're talking less than > $5000/year as a sideline. > > Theoretically, could one put it on the Linux machine and run Zend Studio > remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely in > this fashion. > > > btw I've already had a little adventure with the Zend Studio eval copy I > just installed. It overwrote php.ini with its own and when I restarted > Apache, she gave me about a dozen error popups "the procedure entry point > _safe_emalloc could not be located in the dynamic library php4ts.dll" and > "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I > restored my original php.ini and that seems to have resolved everything. > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From mwithington at PLMresearch.com Wed Sep 24 12:56:55 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 24 Sep 2003 12:56:55 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3587CF12A@network.PLMresearch.com> I'm running the ZDE 3.0. Pretty kewl, however, the GUI slooooowwwws way down (ZDE 2.6 had no problem). Currently working with Zend tech support to figure out why. One suggestion they've offered is to upgrade to the JRE 1.4.2 (I've got 1.4.1). Have not gone this far yet as it appears to be a reasonable PITB to upgrade the JRE. Just an FYI/data point for everyone. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of jon baer Sent: Wednesday, September 24, 2003 9:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) There is always secure VNC and vmWare :-) (just fyi, i was someone extremely skeptical @ vmware solutions but having a dual boot laptop w/ RH/XP i was extremely impressed with this product: http://www.vmware.com/products/desktop/ws_features.html) I did run Zend Studio on the Linux virtual IP + the editor on XP, not sure if that has anything to do with your problem but it was pretty cool. The VNC solution is also nice. - Jon ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:36 PM Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > David, > > > > I am not really sure how Zend do their license validations. You should > > contact them at contact at zend.com, sales at zend.com, ide at zend.com. > > A reasonable suggestion. Quite honestly, I'd like to install it on two > boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd > like to do it inexpensively. I know it's a fair price, but OTOH I > am not making real cash at this full time, we're talking less than > $5000/year as a sideline. > > Theoretically, could one put it on the Linux machine and run Zend Studio > remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely in > this fashion. > > > btw I've already had a little adventure with the Zend Studio eval copy I > just installed. It overwrote php.ini with its own and when I restarted > Apache, she gave me about a dozen error popups "the procedure entry point > _safe_emalloc could not be located in the dynamic library php4ts.dll" and > "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I > restored my original php.ini and that seems to have resolved everything. > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Wed Sep 24 13:33:34 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 13:33:34 -0400 Subject: [nycphp-talk] [Fwd: Open Enterprise Trends_September 15, 2003] In-Reply-To: <3F71A923.3030202@nyphp.org> References: <3F71A923.3030202@nyphp.org> Message-ID: <20030924173334.GA18935@panix.com> Hi Folks: On Wed, Sep 24, 2003 at 10:24:35AM -0400, Hans Zaunere wrote: > > -------- Original Message -------- > Subject: [Fwd: Open Enterprise Trends_September 15, 2003] > Date: Tue, 16 Sep 2003 08:30:01 -0400 > To: Hans Zaunere > > ... snip ... > > Hands On: Inside the Tricky PHP-to-XML Project > --------------------------------------------------- > PHP-to-XML projects can be either relatively straightforward or complex. > And now, as PHP becomes a familiar scripting environment for > programmers working with and supporting XML, questions about the > interoperability of both languages abound. This week, OET looks at the > growing list of questions surrounding PHP-with-XML > projects, and, more importantly, offers developers some answers. > [FULL STORY] http://www.oetrends.com/news.php?action=view_record&idnum=250 I'm happy to say I'm one of the keynote interviewees in that article. A moment ago, the Editor fulfiled my request for a couple minor tweaks to improve the accuracy of the third paragraph. So, if you've already read it, you might want to check back. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From shiflett at php.net Wed Sep 24 13:49:06 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 24 Sep 2003 10:49:06 -0700 (PDT) Subject: [nycphp-talk] Shot in the dark: anyone here know JSP really well? In-Reply-To: Message-ID: <20030924174906.85390.qmail@web14306.mail.yahoo.com> Phil, You should really read this entire document before asking another question anywhere: http://www.catb.org/~esr/faqs/smart-questions.html It will likely save you a lot of grief. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jsiegel1 at optonline.net Wed Sep 24 13:55:59 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 24 Sep 2003 13:55:59 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3587CF12A@network.PLMresearch.com> Message-ID: <004401c382c5$25606b70$6401a8c0@EZDSDELL> Just had the very same problem on WinXP. Installed latest DirectX drivers and it works like a charm! Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Wednesday, September 24, 2003 11:57 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) I'm running the ZDE 3.0. Pretty kewl, however, the GUI slooooowwwws way down (ZDE 2.6 had no problem). Currently working with Zend tech support to figure out why. One suggestion they've offered is to upgrade to the JRE 1.4.2 (I've got 1.4.1). Have not gone this far yet as it appears to be a reasonable PITB to upgrade the JRE. Just an FYI/data point for everyone. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of jon baer Sent: Wednesday, September 24, 2003 9:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) There is always secure VNC and vmWare :-) (just fyi, i was someone extremely skeptical @ vmware solutions but having a dual boot laptop w/ RH/XP i was extremely impressed with this product: http://www.vmware.com/products/desktop/ws_features.html) I did run Zend Studio on the Linux virtual IP + the editor on XP, not sure if that has anything to do with your problem but it was pretty cool. The VNC solution is also nice. - Jon ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:36 PM Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > David, > > > > I am not really sure how Zend do their license validations. You should > > contact them at contact at zend.com, sales at zend.com, ide at zend.com. > > A reasonable suggestion. Quite honestly, I'd like to install it on two > boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd > like to do it inexpensively. I know it's a fair price, but OTOH I > am not making real cash at this full time, we're talking less than > $5000/year as a sideline. > > Theoretically, could one put it on the Linux machine and run Zend Studio > remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely in > this fashion. > > > btw I've already had a little adventure with the Zend Studio eval copy I > just installed. It overwrote php.ini with its own and when I restarted > Apache, she gave me about a dozen error popups "the procedure entry point > _safe_emalloc could not be located in the dynamic library php4ts.dll" and > "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I > restored my original php.ini and that seems to have resolved everything. > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Wed Sep 24 14:13:26 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 14:13:26 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) In-Reply-To: References: Message-ID: <20030924181326.GA21483@panix.com> Hey Folks: I gave a the IDE sample a shot. I wrote a quick outline of my painful experience which I may turn into a letter to Zeev. Here's the short of it... I found the Zend site torturous (JavaScript requirements, tons of cookies, broken advanced search). I found a couple major drawbacks with the IDE which will keep me from purchasing it at this time. It frequently sets a background color of it's own but uses Window's font color, producing windows that are difficult to read, if not impossible. The GUI has no means of debugging or profiling command line scripts. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Wed Sep 24 14:24:20 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 24 Sep 2003 14:24:20 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) In-Reply-To: <004401c382c5$25606b70$6401a8c0@EZDSDELL> Message-ID: <000001c382c9$2d8627f0$6401a8c0@EZDSDELL> Looks like I spoke to soon. After installing the driver update...gui worked fine...shutting it down however..... Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Wednesday, September 24, 2003 12:56 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) Just had the very same problem on WinXP. Installed latest DirectX drivers and it works like a charm! Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Wednesday, September 24, 2003 11:57 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) I'm running the ZDE 3.0. Pretty kewl, however, the GUI slooooowwwws way down (ZDE 2.6 had no problem). Currently working with Zend tech support to figure out why. One suggestion they've offered is to upgrade to the JRE 1.4.2 (I've got 1.4.1). Have not gone this far yet as it appears to be a reasonable PITB to upgrade the JRE. Just an FYI/data point for everyone. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of jon baer Sent: Wednesday, September 24, 2003 9:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) There is always secure VNC and vmWare :-) (just fyi, i was someone extremely skeptical @ vmware solutions but having a dual boot laptop w/ RH/XP i was extremely impressed with this product: http://www.vmware.com/products/desktop/ws_features.html) I did run Zend Studio on the Linux virtual IP + the editor on XP, not sure if that has anything to do with your problem but it was pretty cool. The VNC solution is also nice. - Jon ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:36 PM Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > David, > > > > I am not really sure how Zend do their license validations. You should > > contact them at contact at zend.com, sales at zend.com, ide at zend.com. > > A reasonable suggestion. Quite honestly, I'd like to install it on two > boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd > like to do it inexpensively. I know it's a fair price, but OTOH I > am not making real cash at this full time, we're talking less than > $5000/year as a sideline. > > Theoretically, could one put it on the Linux machine and run Zend Studio > remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely in > this fashion. > > > btw I've already had a little adventure with the Zend Studio eval copy I > just installed. It overwrote php.ini with its own and when I restarted > Apache, she gave me about a dozen error popups "the procedure entry point > _safe_emalloc could not be located in the dynamic library php4ts.dll" and > "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I > restored my original php.ini and that seems to have resolved everything. > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From danielc at analysisandsolutions.com Wed Sep 24 14:37:45 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 14:37:45 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) In-Reply-To: <20030924181326.GA21483@panix.com> References: <20030924181326.GA21483@panix.com> Message-ID: <20030924183745.GA27366@panix.com> Oh yes: Forgot to mention... Since I use a snapshot development build of PHP 5, the system spit out several warning dialog boxes on every HTTP request. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From hans at nyphp.org Wed Sep 24 15:10:30 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 24 Sep 2003 15:10:30 -0400 Subject: [nycphp-talk] MERGE tables (MySQL) ... In-Reply-To: <003c01c37eae$dd22cac0$8119fea9@thinkpad> References: <003c01c37eae$dd22cac0$8119fea9@thinkpad> Message-ID: <3F71EC26.1060307@nyphp.org> jon baer wrote: > has anyone been in the situation to use them yet? Yeah, but never really found them useful enough to implement it fully in production. > i need some clarification so i can understand their use a little better > because id like to arrange an application to use them because it requires > the need to pull out the data (tables), analyze them + flush the running > process (much like a logrotate type) ... I'm not sure what merge tables would buy you in this case, and I'm not sure if all of the functionality you'd need would be available (they have some limitations: http://www.mysql.com/doc/en/MERGE.html > do merge tables have any real advantage + could you theoretically merge > tables securely over IP using these types of tables/files? AFAIK you can only merge tables locally. They are primarily used to provide very large, mostly read only/fairly static tables. But, with newer versions of MySQL, you'd probably want their RAID functionality (http://www.mysql.com/doc/en/CREATE_TABLE.html#IDX1508) HTH, H From jsiegel1 at optonline.net Wed Sep 24 14:28:43 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 24 Sep 2003 14:28:43 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) In-Reply-To: <20030924181326.GA21483@panix.com> Message-ID: <000101c382c9$c5224260$6401a8c0@EZDSDELL> But other than that, you liked it? ;) Jeff P.S. We're in complete agreement concerning their site. It definitely needs to be revamped. It's not always obvious where to look for something and, if you do find something good and don't bookmark it...you better remember how you found it. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Wednesday, September 24, 2003 1:13 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) Hey Folks: I gave a the IDE sample a shot. I wrote a quick outline of my painful experience which I may turn into a letter to Zeev. Here's the short of it... I found the Zend site torturous (JavaScript requirements, tons of cookies, broken advanced search). I found a couple major drawbacks with the IDE which will keep me from purchasing it at this time. It frequently sets a background color of it's own but uses Window's font color, producing windows that are difficult to read, if not impossible. The GUI has no means of debugging or profiling command line scripts. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Wed Sep 24 15:36:21 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 24 Sep 2003 15:36:21 -0400 Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) In-Reply-To: <000001c382c9$2d8627f0$6401a8c0@EZDSDELL> Message-ID: <000901c382d3$2229a210$6401a8c0@EZDSDELL> Well...turns out that when the video drivers were *also* updated...THEN the problem really disappeared. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Wednesday, September 24, 2003 1:24 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) Looks like I spoke to soon. After installing the driver update...gui worked fine...shutting it down however..... Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Wednesday, September 24, 2003 12:56 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) Just had the very same problem on WinXP. Installed latest DirectX drivers and it works like a charm! Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Wednesday, September 24, 2003 11:57 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates et c) I'm running the ZDE 3.0. Pretty kewl, however, the GUI slooooowwwws way down (ZDE 2.6 had no problem). Currently working with Zend tech support to figure out why. One suggestion they've offered is to upgrade to the JRE 1.4.2 (I've got 1.4.1). Have not gone this far yet as it appears to be a reasonable PITB to upgrade the JRE. Just an FYI/data point for everyone. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of jon baer Sent: Wednesday, September 24, 2003 9:51 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) There is always secure VNC and vmWare :-) (just fyi, i was someone extremely skeptical @ vmware solutions but having a dual boot laptop w/ RH/XP i was extremely impressed with this product: http://www.vmware.com/products/desktop/ws_features.html) I did run Zend Studio on the Linux virtual IP + the editor on XP, not sure if that has anything to do with your problem but it was pretty cool. The VNC solution is also nice. - Jon ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 12:36 PM Subject: [nycphp-talk] Zend 3.0 (was Yesterday's Meeting. Templates etc) > On Wed, 24 Sep 2003, Daniel Kushner wrote: > > > David, > > > > I am not really sure how Zend do their license validations. You should > > contact them at contact at zend.com, sales at zend.com, ide at zend.com. > > A reasonable suggestion. Quite honestly, I'd like to install it on two > boxes, one Red Hat 9.x, one Win2K, and I'd like to do it legally, and I'd > like to do it inexpensively. I know it's a fair price, but OTOH I > am not making real cash at this full time, we're talking less than > $5000/year as a sideline. > > Theoretically, could one put it on the Linux machine and run Zend Studio > remotely over an SSH tunnel from the Windoze box? I haven't yet > experimented with running full-blown Linux GUI applications remotely in > this fashion. > > > btw I've already had a little adventure with the Zend Studio eval copy I > just installed. It overwrote php.ini with its own and when I restarted > Apache, she gave me about a dozen error popups "the procedure entry point > _safe_emalloc could not be located in the dynamic library php4ts.dll" and > "unable to load dynamic library C:\Zend\lib\php_ext\php_xxx.dll". So I > restored my original php.ini and that seems to have resolved everything. > > David > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Wed Sep 24 22:32:19 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Wed, 24 Sep 2003 22:32:19 -0400 Subject: [nycphp-talk] CSV References: <20030924181326.GA21483@panix.com> <20030924183745.GA27366@panix.com> Message-ID: <005d01c3830d$3e0a6cf0$c801a8c0@dj> what would be the best way to go about letting the user insert a csv file into a mysql database and also letting the user extract certain information from the server into a csv file. From dkrook at hotmail.com Wed Sep 24 22:48:08 2003 From: dkrook at hotmail.com (D C Krook) Date: Wed, 24 Sep 2003 22:48:08 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page Message-ID: Hello all, I'm having some trouble debugging a client's phpBB system. All the tables under a 'phpbb' database seem to be set up, and all the files for managing the forum are in place. I have confirmed this by 'mysqldump'ing his database and source'ing it into mine, and copying his files to my local machine; everything works for me locally. The problem that he is seeing is that he gets a blank page on what should be the forum homepage. Here are the steps I've taken to isolate the problem to no avail: - set error_reporting(E_ALL); - added the following to the .htaccess in the directory (httpd.conf is configured to allow me to do this) php_value error_reporting 7 - tailed the Apache error_log - scanned httpd.conf for access restrictions. I can echo text on this index page. - separately tested for globals and noted that they were on, I was able to toggle this in .htaccess with the following flag: php_value register_globals 1 - stripped the ampersand suppression of mysql errors in the database abstraction class. - successfully used the stock phpMyAdmin from his host, under his webroot, to connect to this database. - connected to MySQL via the command line client as root, the default site user, and the phpBB user. - Googled for "blank page phpBB", which throws up a lot of false hits because phpBB is the default forum for many online PHP related discussions of blank pages. - Perused the Knowledge Base at http://phpbb.com/kb/ I'm not quite sure what other tests I can carry out to isolate the problem. Is there anything obvious that I'm missing? Thanks for any and all help in advance, -Dan _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From alexander_chan at yahoo.com Wed Sep 24 22:51:08 2003 From: alexander_chan at yahoo.com (Alexander Chan) Date: Wed, 24 Sep 2003 19:51:08 -0700 (PDT) Subject: [nycphp-talk] CSV In-Reply-To: <005d01c3830d$3e0a6cf0$c801a8c0@dj> Message-ID: <20030925025108.34115.qmail@web11604.mail.yahoo.com> i would recommend using fgetcsv function should help you. if you goto http://us3.php.net/fgetcsv there is an example for you. Alex --- "Donald J. Organ IV" wrote: > what would be the best way to go about letting the > user insert a csv file > into a mysql database and also letting the user > extract certain information > from the server into a csv file. > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Wed Sep 24 22:52:06 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 24 Sep 2003 22:52:06 -0400 (EDT) Subject: [nycphp-talk] CSV In-Reply-To: <005d01c3830d$3e0a6cf0$c801a8c0@dj> References: <20030924181326.GA21483@panix.com> <20030924183745.GA27366@panix.com> <005d01c3830d$3e0a6cf0$c801a8c0@dj> Message-ID: On Wed, 24 Sep 2003, Donald J. Organ IV wrote: > what would be the best way to go about letting the user insert a csv file > into a mysql database and also letting the user extract certain information > from the server into a csv file. IMHO? If you're pretty sure they know what they're doing you can probably accomplish this with PhpMyAdmin. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From shiflett at php.net Wed Sep 24 23:03:05 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 24 Sep 2003 20:03:05 -0700 (PDT) Subject: [nycphp-talk] Debugging phpBB: blank page In-Reply-To: Message-ID: <20030925030305.93604.qmail@web14305.mail.yahoo.com> --- D C Krook wrote: > I'm having some trouble debugging a client's phpBB system. I seem to recall hearing of this before, and the problem was that the forum could not connect to the database. So, what happens when you try to manually connect to the database with the mysql command-line client? If that works, check to see if the forum expects the MySQL socket to be somewhere it is not. You may even create a link from /tmp/mysql.sock to wherever it is as a test. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Wed Sep 24 23:04:28 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 23:04:28 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page In-Reply-To: References: Message-ID: <20030925030428.GA4818@panix.com> Hi David: On Wed, Sep 24, 2003 at 10:48:08PM -0400, D C Krook wrote: > > The problem that he is seeing is that he gets a blank page on what should > be the forum homepage. I'll bet you a beer that either a) one or more include/require statements have an @ in front of it to supress errors (which has the unfortunate consequence of supressing all subsequent errors in that and sub-included files. b) the one or more of the mysql* functions have an @ in front of them. I'll then bet you another beer that there are problems connecting to the database. Have the MySQL permissions been properly set up and flushed? Do the scripts have the right user/password/db names? Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Wed Sep 24 23:11:05 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 24 Sep 2003 23:11:05 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page In-Reply-To: References: Message-ID: <20030925031104.GB4818@panix.com> On Wed, Sep 24, 2003 at 10:48:08PM -0400, D C Krook wrote: > > I'm having some trouble debugging a client's phpBB system. Oh yes, as you now see, phpBB could be better thought out and still has bugs. I can't count how many cross site scripting and even SQL injection vulnerabilities they've put in there. Hmm, know what, I CAN count... http://www.securityfocus.com/search search area "Vulnerabilities" search for "phpbb" Drum roll please... 24! The latest one is as recent as this month! So, BE CAREFUL! --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dkrook at hotmail.com Wed Sep 24 23:19:46 2003 From: dkrook at hotmail.com (D C Krook) Date: Wed, 24 Sep 2003 23:19:46 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page Message-ID: Heh, I think security is the *least* of his worries, considering that his Apache setup is not parsing .inc's or limiting their access, that his phpMyAdmin page is not password protected, that he hasn't set the MySQL root password, and he's letting a random guy he just met probe his entire server in search of a phpBB bug. : ) >search area "Vulnerabilities" >search for "phpbb" > >So, BE CAREFUL! _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From csnyder at chxo.com Wed Sep 24 23:20:19 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 24 Sep 2003 23:20:19 -0400 Subject: [nycphp-talk] PHPTAL - PHP Template Attribute Language In-Reply-To: <20030924152146.GU8912@thighmaster.digitalpulp.com> References: <20030924152146.GU8912@thighmaster.digitalpulp.com> Message-ID: <3F725EF3.5020204@chxo.com> That is intriguing. It looks like more fun for somebody who is used to Zope/ZPT already, but I like the featureset enough to give it a try on something. I spent a little time reading doc at Zope (always dangerous) and began to wonder if it would be possible to build a ZEO/ZODB client in PHP. Persistant objects with transactions, subtransactions, and undo sound like they might be fun to play with. How can? csnyder Andrew Yochum wrote: >As promised, here is the link to PHPTAL, the PHP implementation of Zope's Page >Templates (ZPT): > http://phptal.sourceforge.net/ > > From csnyder at chxo.com Wed Sep 24 23:28:45 2003 From: csnyder at chxo.com (Chris Snyder) Date: Wed, 24 Sep 2003 23:28:45 -0400 Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: References: <000001c38249$35b195c0$6401a8c0@main> Message-ID: <3F7260ED.2020403@chxo.com> http://dev.nyphp.org/~csnyder/3templates/smarty/task3-smarty.php Bet that size2human function becomes a pcom before too long... David Mintz wrote: > I'd like to have another look at the examples if I could. (I want > >to look at that function that converted values in bytes to human-friendly >strings ) > > > > From hans at nyphp.org Wed Sep 24 23:35:30 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 24 Sep 2003 23:35:30 -0400 Subject: [nycphp-talk] Yesterday's Meeting. Templates etc In-Reply-To: <3F7260ED.2020403@chxo.com> References: <000001c38249$35b195c0$6401a8c0@main> <3F7260ED.2020403@chxo.com> Message-ID: <3F726282.7060906@nyphp.org> Chris Snyder wrote: > http://dev.nyphp.org/~csnyder/3templates/smarty/task3-smarty.php > > Bet that size2human function becomes a pcom before too long... Give http://pcomd.net a shot... it should work :) H From hans at nyphp.org Thu Sep 25 08:26:49 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 25 Sep 2003 08:26:49 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? Message-ID: <3F72DF09.6090503@nyphp.org> Hi all, Whew, I think we'll need another server to support all the list's posts :) Seeing this type of enthusiasm from the community is fantastic, and questions, discussions, and the back-and-forth is what mailing lists, and NY, is all about. When NYPHP-Talk first started there was very little traffic and participation (actually, none :), and so a general "any topic goes" viewpoint has worked very well. Obviously, in just a year, it's grown to be a high-traffic and vibrant channel of communication. However, it may be beginning to outgrow it's usefulness for some, and we want to be sure to address the needs of the entire community. So, I'm throwing out the notion that it's time for another list, dedicated to the strict technical discussion of PHP/AMP Technology, and other closely related topics. Topics would include Apache/MySQL/PHP of course, any related installation/system-administration/security topics, any application written in PHP, and any PHP extension/variant (so, Oracle, PostgreSQL, CLI, GD, etc). Casual chat or posts, and other topics, wouldn't be included. And, since we do have such a diverse and knowledgeable community, NYPHP-Talk would be the place for any type of general web discussion, chat, and so forth (thus, falling inline with it's original name, 'Talk'). This organization would allow people to get their tough technical questions answered (on the new list, should we call it NYPHP-AMP ?), by probably the best AMP related lists in the world I might add, while avoiding much of the additional traffic related to other web development technologies, NY, political and other discussions. I've been hesitant to bring this up in the past simply because I didn't want to discourage people from using the lists, and divide the traffic up to the point that things fall dead. And, with so many varied topics, it wouldn't be good to make people afraid to post, and asking themselves questions "is this the right list to post?". Maybe some could assist in drafting well-worded list policies, that would eliminate this ambiguity and clearly depict what topics the lists are geared towards. Lastly, with the recent addition of the front-end list (http://lists.nyphp.org for those who haven't joined yet) we'd have a complete and very knowledgeable set of real time resources for the community to use. And, with all lists available as digests (also available via http://lists.nyphp.org), having the traffic organized a little may strike a nice balance for people. I'm eager to hear thoughts on this, either on this list or in private, and if I get a general +1 on this, I'll have the new list this afternoon (and if anyone has any notes/ideas to pass on about mailing list policies and guidelines, I it'd be a very valuable addition). It's a pleasure to be on this list, and to have seen it grow into a resource for so many. Thanks all, Hans Zaunere President, New York PHP http://nyphp.org hans at nyphp.org From hans at nyphp.org Thu Sep 25 08:31:37 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 25 Sep 2003 08:31:37 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page In-Reply-To: References: Message-ID: <3F72E029.1060709@nyphp.org> D C Krook wrote: > Hello all, > > I'm having some trouble debugging a client's phpBB system. > > All the tables under a 'phpbb' database seem to be set up, and all the > files for managing the forum are in place. I have confirmed this by > 'mysqldump'ing his database and source'ing it into mine, and copying his > files to my local machine; everything works for me locally. > > The problem that he is seeing is that he gets a blank page on what > should be the forum homepage. Here are the steps I've taken to isolate > the problem to no avail: > > - set error_reporting(E_ALL); > - added the following to the .htaccess in the directory (httpd.conf is > configured to allow me to do this) php_value error_reporting 7 > - tailed the Apache error_log > - scanned httpd.conf for access restrictions. I can echo text on this > index page. > - separately tested for globals and noted that they were on, I was able > to toggle this in .htaccess with the following flag: php_value > register_globals 1 > - stripped the ampersand suppression of mysql errors in the database > abstraction class. > - successfully used the stock phpMyAdmin from his host, under his > webroot, to connect to this database. > - connected to MySQL via the command line client as root, the default > site user, and the phpBB user. > - Googled for "blank page phpBB", which throws up a lot of false hits > because phpBB is the default forum for many online PHP related > discussions of blank pages. > - Perused the Knowledge Base at http://phpbb.com/kb/ > > > I'm not quite sure what other tests I can carry out to isolate the > problem. Is there anything obvious that I'm missing? Nothing obvious, but here are a couple crazy ideas: -- put MySQL into logging mode and tail -f mysql.log to what, if any, queries are getting run. You should be able to map those queries back into the code and see exactly where it's dieing. -- while watching the apache error logs, a trigger_error('TEST'); is visible? Just be sure the PHP logs aren't going somewhere else. HTH, H From jonbaer at jonbaer.net Thu Sep 25 08:37:35 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 25 Sep 2003 08:37:35 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page References: Message-ID: <00b201c38361$cc3704d0$8119fea9@thinkpad> here is what i would test: * design an index.php page that simply connects + selects a table from phpbb_(table) with a simple query like "select username from phpbb_users" ... if it works you know the db is ok. * the problem probably lies in the /template area, do the default subSilver templates work ok? if so, then try debugging the templates making sure that overall_header + overall_footer match up and table tags are properly closed. - jon ----- Original Message ----- From: "D C Krook" To: Sent: Wednesday, September 24, 2003 10:48 PM Subject: [nycphp-talk] Debugging phpBB: blank page > Hello all, > > I'm having some trouble debugging a client's phpBB system. > > All the tables under a 'phpbb' database seem to be set up, and all the files > for managing the forum are in place. I have confirmed this by > 'mysqldump'ing his database and source'ing it into mine, and copying his > files to my local machine; everything works for me locally. > > The problem that he is seeing is that he gets a blank page on what should be > the forum homepage. Here are the steps I've taken to isolate the problem to > no avail: > > - set error_reporting(E_ALL); > - added the following to the .htaccess in the directory (httpd.conf is > configured to allow me to do this) php_value error_reporting 7 > - tailed the Apache error_log > - scanned httpd.conf for access restrictions. I can echo text on this index > page. > - separately tested for globals and noted that they were on, I was able to > toggle this in .htaccess with the following flag: php_value register_globals > 1 > - stripped the ampersand suppression of mysql errors in the database > abstraction class. > - successfully used the stock phpMyAdmin from his host, under his webroot, > to connect to this database. > - connected to MySQL via the command line client as root, the default site > user, and the phpBB user. > - Googled for "blank page phpBB", which throws up a lot of false hits > because phpBB is the default forum for many online PHP related discussions > of blank pages. > - Perused the Knowledge Base at http://phpbb.com/kb/ > > > I'm not quite sure what other tests I can carry out to isolate the problem. > Is there anything obvious that I'm missing? > > Thanks for any and all help in advance, > -Dan > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Thu Sep 25 08:48:45 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 25 Sep 2003 08:48:45 -0400 Subject: [nycphp-talk] CSV/XML References: <20030925025108.34115.qmail@web11604.mail.yahoo.com> Message-ID: <00bc01c38363$5b8e4fc0$8119fea9@thinkpad> speaking of which, a simple fgetxml function would be pretty cool ... how id picture it working (without attributes): $handle = fopen("file.xml", "r"); while ($sub = fgetxml($handle, "")) { print "$sub[name] $sub[url]"; } NYPHP http://www.nyphp.org as for CVS/MYSQL use the syntax LOAD DATA INFILE as described here (keep in mind it is a SQL query so you can use PHP to do it): http://www.mysql.com/doc/en/LOAD_DATA.html - jon ----- Original Message ----- From: "Alexander Chan" To: "NYPHP Talk" Sent: Wednesday, September 24, 2003 10:51 PM Subject: Re: [nycphp-talk] CSV > i would recommend using fgetcsv function should help > you. > if you goto http://us3.php.net/fgetcsv there is an > example for you. > > Alex > --- "Donald J. Organ IV" wrote: > > what would be the best way to go about letting the > > user insert a csv file > > into a mysql database and also letting the user > > extract certain information > > from the server into a csv file. > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From sklar at sklar.com Thu Sep 25 09:17:14 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 25 Sep 2003 09:17:14 -0400 Subject: [nycphp-talk] CSV/XML In-Reply-To: <00bc01c38363$5b8e4fc0$8119fea9@thinkpad> Message-ID: Well, with SimpleXML in PHP 5, you can do something like $handle = simplexml_load_file('file.xml'); foreach ($handle as $root) { print "$root->name $root->url"; } David On Thursday, September 25, 2003 8:49 AM, wrote: > speaking of which, a simple fgetxml function would be pretty cool ... > > how id picture it working (without attributes): > > $handle = fopen("file.xml", "r"); > while ($sub = fgetxml($handle, "")) { > print "$sub[name] $sub[url]"; > } > > > NYPHP > http://www.nyphp.org > > > as for CVS/MYSQL use the syntax LOAD DATA INFILE as described here > (keep in mind it is a SQL query so you can use PHP to do it): > > http://www.mysql.com/doc/en/LOAD_DATA.html > > - jon > > ----- Original Message ----- > From: "Alexander Chan" > To: "NYPHP Talk" > Sent: Wednesday, September 24, 2003 10:51 PM > Subject: Re: [nycphp-talk] CSV > > >> i would recommend using fgetcsv function should help you. >> if you goto http://us3.php.net/fgetcsv there is an >> example for you. >> >> Alex >> --- "Donald J. Organ IV" wrote: >>> what would be the best way to go about letting the >>> user insert a csv file >>> into a mysql database and also letting the user >>> extract certain information >>> from the server into a csv file. >>> >>> _______________________________________________ >>> talk mailing list >>> talk at lists.nyphp.org >>> http://lists.nyphp.org/mailman/listinfo/talk >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Thu Sep 25 08:36:50 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 25 Sep 2003 08:36:50 -0400 Subject: [nycphp-talk] [Fwd: php-con West Early Bird Deadline ends Friday, September 26th] Message-ID: <3F72E162.6040001@nyphp.org> Hi folks, Just to pass this on for those considering attending php-con West this year. H Don't wait to secure your space at php-con! Early Bird Registration discounts end on September 26, 2003. Register online today at http://www.php-con.com. Reduced registration rates are available for Students, Employees of Yahoo!, Universities, and Non-Profit organizations. See our website for more details. Why is php-con the destination of choice for PHP and web developers? Because php-con is about three things: Community. Code. Solutions. php-con West continues its tradition of great speakers, cogent topics, and community enrichment. Join Keynote Speakers Zeev Suraski, Sterling Hughes, and Thies Arntzen as they discuss new developments in the Zend Engine, examine the future of PHP, and unveil an innovative new project. Think that's all? Our entire program is filled with speakers selected as much for their contributions to the community as for their expert knowledge of PHP. Joining us at php-con West 2003 are: * PostgreSQL Core Team member Josh Berkus * Yahoo! PHP Guru Michael Radwin * MySQL evangelist Zak Greant * Apache.com's Jim Winstead * PHP.net's James Cox * PostNuke's Vanessa Haakenson * Industry experts George Schlossnagle, Wez Furlong and new speakers John Neil, Allie Micka, Frank Kromann, and Aaron Stone * Authors Christian Wenz, John Coggeshall, Luke Welling and Laura Thomson Whether you're new to PHP or dig your hands into it everyday, this is where you want to be. php-con West 2003: Community. Code. Solutions. October 21- 24, 2003 Biltmore Hotel Santa Clara, California http://www.php-con.com ** Information, Questions and Comments ** Want to stay on top of PHPCon news? Sign up for our php-con Announce List and get the latest information. Click on http://www.php-con.com and scroll down to our "php-con Announce List" section to subscribe. ** Sponsors ** Platinum: Linux Magazine Silver: Developer's Library/Sams Publishing Coffee Break: ActiveState Corporation Media: CodeWalkers, Dr. Dobb's Journal, Dynamic Web Pages, The FuzzyGroup, HackerThreads.com, New York PHP User Group, O'Reilly ONLamp, PHPClasses.org, PHP-Editors.com, PHP Everywhere, PHPKitchen, PHPLens, The PHP User Group of Kansas City, PostgreSQL, PostNuke, Weberdev.com, and Webifex Magazine From jonbaer at jonbaer.net Thu Sep 25 09:27:29 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 25 Sep 2003 09:27:29 -0400 Subject: [nycphp-talk] CSV/XML References: Message-ID: <00e801c38368$c4a65b60$8119fea9@thinkpad> ah ok ... i think this was covered in one meeting ... can u recap a few ?'s for me (i havent actually tried it yet - just look @ the cvs notes - http://cvs.php.net/cvs.php/pecl/simplexml/simplexml.c): * so the array to the element can go down as far as you want? ie: $root->node1->node2->node3->node4->node5 * there is only load_file (local) + load_string (content) will there be load_resource or something to let you pull in other streams? although i guess you could still pull off something like simplexml_load_string(file_get_contents(url)) is that the idea? ... - jon ----- Original Message ----- From: "David Sklar" To: "NYPHP Talk" Sent: Thursday, September 25, 2003 9:17 AM Subject: RE: [nycphp-talk] CSV/XML > Well, with SimpleXML in PHP 5, you can do something like > > $handle = simplexml_load_file('file.xml'); > foreach ($handle as $root) { > print "$root->name $root->url"; > } From dkrook at hotmail.com Thu Sep 25 10:08:18 2003 From: dkrook at hotmail.com (D C Krook) Date: Thu, 25 Sep 2003 10:08:18 -0400 Subject: [nycphp-talk] Debugging phpBB: blank page Message-ID: Dan, Chris, Jon & Hans, Thanks for all the suggestions, I confirmed the following based on your feedback: - Hunted down all "@" suppressions, not only in the DB abstraction class, but in include statements. - Confirmed that other PHP errors - like missing semicolons - are being logged in Apache's error_log - Created a dummy page to connect to MySQL myself, I couldn't connect this way either, although I was able to from the command line client. Based on the third test, the dummy page with a simple connect, I'm assuming the problem is in the way PHP is set up to interact with MySQL. I've noted that phpMyAdmin is configured to use TCP and not the socket, so I've got an email in to the guy to confirm with his host or admin whether there is a specific connection string that needs to be used and/or whether they are able to connect themselves. Thanks again guys, -Dan _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From dan at mx2pro.com Thu Sep 25 10:11:02 2003 From: dan at mx2pro.com (Dan Horning) Date: Thu, 25 Sep 2003 10:11:02 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <3F72DF09.6090503@nyphp.org> Message-ID: <000901c3836e$dc2d1890$031d9942@dwchome> And in case anyone wants to talk politics ... http://www.dwc.to/politics/ :-D - Dan Horning 1-866-284-3150 (Toll-Free) President: Technical Evangelism & Media Systems Administration MX2 Productions Media from concept to execution. > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere > Sent: Thursday, September 25, 2003 8:27 AM > To: talk at lists.nyphp.org > Subject: [nycphp-talk] NYPHP List Reorganization? > > > > > Hi all, > > Whew, I think we'll need another server to support all the > list's posts :) Seeing this type of enthusiasm from the > community is fantastic, and questions, discussions, and the > back-and-forth is what mailing lists, and NY, is all about. > > When NYPHP-Talk first started there was very little traffic > and participation (actually, none :), and so a general "any > topic goes" viewpoint has worked very well. Obviously, in > just a year, it's grown to be a high-traffic and vibrant > channel of communication. > > However, it may be beginning to outgrow it's usefulness for > some, and we want to be sure to address the needs of the > entire community. So, I'm throwing out the notion that it's > time for another list, dedicated to the strict technical > discussion of PHP/AMP Technology, and other closely related > topics. Topics would include Apache/MySQL/PHP of course, any > related installation/system-administration/security topics, > any application written in PHP, and any PHP extension/variant > (so, Oracle, PostgreSQL, CLI, GD, etc). Casual chat or > posts, and other topics, wouldn't be included. > > And, since we do have such a diverse and knowledgeable > community, NYPHP-Talk would be the place for any type of > general web discussion, chat, and so forth (thus, falling > inline with it's original name, 'Talk'). This organization > would allow people to get their tough technical questions > answered (on the new list, should we call it NYPHP-AMP ?), by > probably the best AMP related lists in the world I might add, > while avoiding much of the additional traffic related to > other web development technologies, NY, political and other > discussions. > > I've been hesitant to bring this up in the past simply > because I didn't want to discourage people from using the > lists, and divide the traffic up to the point that things > fall dead. And, with so many varied topics, it wouldn't be > good to make people afraid to post, and asking themselves > questions "is this the right list to post?". Maybe some > could assist in drafting well-worded list policies, that > would eliminate this ambiguity and clearly depict what topics > the lists are geared towards. > > Lastly, with the recent addition of the front-end list (http://lists.nyphp.org for those who haven't joined yet) we'd have a complete and very knowledgeable set of real time resources for the community to use. And, with all lists available as digests (also available via http://lists.nyphp.org), having the traffic organized a little may strike a nice balance for people. I'm eager to hear thoughts on this, either on this list or in private, and if I get a general +1 on this, I'll have the new list this afternoon (and if anyone has any notes/ideas to pass on about mailing list policies and guidelines, I it'd be a very valuable addition). It's a pleasure to be on this list, and to have seen it grow into a resource for so many. Thanks all, Hans Zaunere President, New York PHP http://nyphp.org hans at nyphp.org _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jlacey at ix.netcom.com Thu Sep 25 10:53:00 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Thu, 25 Sep 2003 08:53:00 -0600 Subject: [nycphp-talk] AMP comments In-Reply-To: <3F72DF09.6090503@nyphp.org> References: <3F72DF09.6090503@nyphp.org> Message-ID: <3F73014C.8090603@ix.netcom.com> Hans, Would a 'subject' guideline work? For example, if I wanted to ask an AMP question -- first word of the subject line would be: PHP class question php and XML feedback MySQL problem with connects Apache virtual host question postgreSQL information etc... Then, perhaps a 'steering script' could direct the question/comment to [AMP] list. All subject lines that don't meet that criteria would be directed to "talk". It might also serve to remind people (if they are programmers -- they should be thinking logically anyway :) to give some thought to their question/comment ala Eric Raymond's famous "How to ask a question" document. This could be stated as a simple policy for posting to the lists. just some thoughts from out west... J Hans Zaunere wrote: > > > Hi all, > > Whew, I think we'll need another server to support all the list's > posts :) Seeing this type of enthusiasm from the community is > fantastic, and questions, discussions, and the back-and-forth is what > mailing lists, and NY, is all about. > > When NYPHP-Talk first started there was very little traffic and > participation (actually, none :), and so a general "any topic goes" > viewpoint has worked very well. Obviously, in just a year, it's grown > to be a high-traffic and vibrant channel of communication. > > However, it may be beginning to outgrow it's usefulness for some, and > we want to be sure to address the needs of the entire community. So, > I'm throwing out the notion that it's time for another list, dedicated > to the strict technical discussion of PHP/AMP Technology, and other > closely related topics. Topics would include Apache/MySQL/PHP of > course, any related installation/system-administration/security > topics, any application written in PHP, and any PHP extension/variant > (so, Oracle, PostgreSQL, CLI, GD, etc). Casual chat or posts, and > other topics, wouldn't be included. > > And, since we do have such a diverse and knowledgeable community, > NYPHP-Talk would be the place for any type of general web discussion, > chat, and so forth (thus, falling inline with it's original name, > 'Talk'). This organization would allow people to get their tough > technical questions answered (on the new list, should we call it > NYPHP-AMP ?), by probably the best AMP related lists in the world I > might add, while avoiding much of the additional traffic related to > other web development technologies, NY, political and other discussions. > > I've been hesitant to bring this up in the past simply because I > didn't want to discourage people from using the lists, and divide the > traffic up to the point that things fall dead. And, with so many > varied topics, it wouldn't be good to make people afraid to post, and > asking themselves questions "is this the right list to post?". Maybe > some could assist in drafting well-worded list policies, that would > eliminate this ambiguity and clearly depict what topics the lists are > geared towards. > > Lastly, with the recent addition of the front-end list > (http://lists.nyphp.org for those who haven't joined yet) we'd have a > complete and very knowledgeable set of real time resources for the > community to use. And, with all lists available as digests (also > available via http://lists.nyphp.org), having the traffic organized a > little may strike a nice balance for people. I'm eager to hear > thoughts on this, either on this list or in private, and if I get a > general +1 on this, I'll have the new list this afternoon (and if > anyone has any notes/ideas to pass on about mailing list policies and > guidelines, I it'd be a very valuable addition). > > It's a pleasure to be on this list, and to have seen it grow into a > resource for so many. Thanks all, > > Hans Zaunere > President, New York PHP > http://nyphp.org > hans at nyphp.org > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From shiflett at php.net Thu Sep 25 11:03:31 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 25 Sep 2003 08:03:31 -0700 (PDT) Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <3F72DF09.6090503@nyphp.org> Message-ID: <20030925150331.76464.qmail@web14308.mail.yahoo.com> --- Hans Zaunere wrote: > NYPHP-AMP? +1 Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From crisscott at netzero.com Thu Sep 25 11:05:21 2003 From: crisscott at netzero.com (Scott Mattocks) Date: Thu, 25 Sep 2003 11:05:21 -0400 Subject: [nycphp-talk] Lost Sessions Message-ID: <3F730431.60901@netzero.com> Hello, A couple of days ago I wrote asking about sessions and objects. Per David's suggestion I am storing objects in the session and calling them by reference, but when I get to the next page, my objects have disappeared. In fact all of my session has disappeared. When I try to login a user it works fine and all of the session info is present at the end of the script. When I click on a link to the next page the session is empty. All pages are starting the session through an included file. Any ideas as to what is killing my session? Thanks, Scott Mattocks From shiflett at php.net Thu Sep 25 11:07:30 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 25 Sep 2003 08:07:30 -0700 (PDT) Subject: [nycphp-talk] [Fwd: php-con West Early Bird Deadline ends Friday, September 26th] In-Reply-To: <3F72E162.6040001@nyphp.org> Message-ID: <20030925150730.25880.qmail@web14302.mail.yahoo.com> --- Hans Zaunere wrote: > Just to pass this on [...] > * Apache.com's Jim Winstead I suppose they mean apache.org? > * PostNuke's Vanessa Haakenson A security talk, perhaps? :-) Sorry, I couldn't resist... > * Industry experts George Schlossnagle I highly recommend listening in on George's talk if anyone is going. He's a very smart guy, especially when it comes to performance concerns. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From sklar at sklar.com Thu Sep 25 11:08:18 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 25 Sep 2003 11:08:18 -0400 Subject: [nycphp-talk] CSV/XML In-Reply-To: <00e801c38368$c4a65b60$8119fea9@thinkpad> Message-ID: > * so the array to the element can go down as far as you want? ie: > $root->node1->node2->node3->node4->node5 I think so. > * there is only load_file (local) + load_string (content) will there > be load_resource or something to let you pull in other streams? > although i guess you could still pull off something like > simplexml_load_string(file_get_contents(url)) is that the idea? ... IIRC the load_file routine uses the underlying streams support, so you should be able to use it for whatever stream types are supported: simplexml_load_file('http://www.example.com/my.xml'); simplexml_load_file('compress.bzip2://my.xml.bz2'); and so on... David From hans at nyphp.org Thu Sep 25 11:11:42 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 25 Sep 2003 11:11:42 -0400 Subject: [nycphp-talk] [Fwd: php-con West Early Bird Deadline ends Friday, September 26th] In-Reply-To: <20030925150730.25880.qmail@web14302.mail.yahoo.com> References: <20030925150730.25880.qmail@web14302.mail.yahoo.com> Message-ID: <3F7305AE.10503@nyphp.org> Chris Shiflett wrote: > --- Hans Zaunere wrote: > >>Just to pass this on > > [...] > >>* Apache.com's Jim Winstead > > > I suppose they mean apache.org? That's what I thought, too. But apparently Apache.com is it's own entity. H From shiflett at php.net Thu Sep 25 11:11:53 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 25 Sep 2003 08:11:53 -0700 (PDT) Subject: [nycphp-talk] Lost Sessions In-Reply-To: <3F730431.60901@netzero.com> Message-ID: <20030925151153.83468.qmail@web14305.mail.yahoo.com> --- Scott Mattocks wrote: > When I try to login a user it works fine and all of the session info > is present at the end of the script. When I click on a link to the > next page the session is empty. All pages are starting the session > through an included file. Any ideas as to what is killing my session? I think you will want to change your perspective a bit about the possible problems that would result in this behavior. The session may very well be alive and well, but if the client doesn't properly identify itself on the next request, PHP will have no idea that there is a session for this client. So, you want to test for different possibilities: 1. The session is in fact gone for some reason. 2. The client fails to pass PHPSESSID (or whatever you may have named it). 3. Both 1 and 2. 4. Something else specific to your session management mechanism. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From hans at nyphp.org Thu Sep 25 11:17:33 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 25 Sep 2003 11:17:33 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <3F73014C.8090603@ix.netcom.com> References: <3F72DF09.6090503@nyphp.org> <3F73014C.8090603@ix.netcom.com> Message-ID: <3F73070D.8010806@nyphp.org> John Lacey wrote: > > Hans, > > Would a 'subject' guideline work? For example, if I wanted to ask an > AMP question -- first word of the subject line would be: > PHP class question > php and XML feedback > MySQL problem with connects > Apache virtual host question > postgreSQL information > > etc... > > Then, perhaps a 'steering script' could direct the question/comment to > [AMP] list. All subject lines that don't meet that criteria would be > directed to "talk". It might also serve to remind people (if they are > programmers -- they should be thinking logically anyway :) to give some > thought to their question/comment ala Eric Raymond's famous "How to ask > a question" document. This could be stated as a simple policy for > posting to the lists. This is certainly something we ineveitably want to arrive at (ie, when we finally have our own mailing list system finalized) but with Mailman now I'm not sure it's doable. For now, unfortunately, the best we could do would be to add another list, and concisely define posting guidelines for it, with Talk being the catch-all list. I've had mixed responses as to whether adding another list is good or not, so I still don't know what to do. Perhaps we should be totally democratic about it and have a vote? H From shiflett at php.net Thu Sep 25 11:26:28 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 25 Sep 2003 08:26:28 -0700 (PDT) Subject: [nycphp-talk] AMP comments In-Reply-To: <3F73070D.8010806@nyphp.org> Message-ID: <20030925152628.44065.qmail@web14303.mail.yahoo.com> --- Hans Zaunere wrote: > Perhaps we should be totally democratic about it and have a vote? Although I am in favor of having a separate list, I can give you a reason why some people do not favor this type of idea (it has come up a lot on php.net mailing list discussions). The fear is that all of the "smart" people will migrate to the advanced/on-topic/whatever list that is being proposed, and the other list's usefulness will deteriorate, and it will die. If we do create an on-topic list, I can pretty much guarantee that I will subscribe to it and drop this one. My time is valuable to me, and while I like to contribute back to the PHP community by answering questions whenever I have the time, it is not worth it for me to wade through off-topic discussions and people asking questions without giving any personal attempt at solving their own problem. So, I would see the choices as: 1. Enforce that this list remain on-topic. 2. Create an on-topic list. Given these choices, either is fine for me, because I will choose to be subscribed to the on-topic list in either case. It makes no difference to me if others have a list where they can chat casually (and I have nothing against the idea at all). But, that's just my perspective, of course. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jeffknight at mac.com Thu Sep 25 11:34:35 2003 From: jeffknight at mac.com (PUTAMARE) Date: Thu, 25 Sep 2003 11:34:35 -0400 Subject: [nycphp-talk] AMP comments Message-ID: Meh, my precious scroll key finger isn't that abused by off topic posts, there really aren't enough to warrant the diversion of resources from some more worthy project to solve the "problem". As I mentioned at the meeting, probably the best first phundamentals should be a how to filter your email tutorial, since most of the list-based dissatisfaction comes from people who apparently don't. I'm not going to volunteer for this phundamental however because I do not know or care to know how to do anything in outlook. Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 LUSH media 110 W 40th St #1502 New York, NY 10018 From crisscott at netzero.com Thu Sep 25 11:37:11 2003 From: crisscott at netzero.com (Scott Mattocks) Date: Thu, 25 Sep 2003 11:37:11 -0400 Subject: [nycphp-talk] Lost Sessions In-Reply-To: <20030925151153.83468.qmail@web14305.mail.yahoo.com> References: <20030925151153.83468.qmail@web14305.mail.yahoo.com> Message-ID: <3F730BA7.9040804@netzero.com> Somehow the session cookie is not getting set. A new session id is being created on every page load. The constant SID is available which means that the cookie wasn't set right. Is there a way to determine why the cookie isn't set? The browser is set to accept all cookies. Thanks Scott Mattocks Chris Shiflett wrote: > --- Scott Mattocks wrote: > >>When I try to login a user it works fine and all of the session info >>is present at the end of the script. When I click on a link to the >>next page the session is empty. All pages are starting the session >>through an included file. Any ideas as to what is killing my session? > > > I think you will want to change your perspective a bit about the possible > problems that would result in this behavior. The session may very well be alive > and well, but if the client doesn't properly identify itself on the next > request, PHP will have no idea that there is a session for this client. > > So, you want to test for different possibilities: > > 1. The session is in fact gone for some reason. > 2. The client fails to pass PHPSESSID (or whatever you may have named it). > 3. Both 1 and 2. > 4. Something else specific to your session management mechanism. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From bpang at bpang.com Thu Sep 25 11:44:11 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 25 Sep 2003 11:44:11 -0400 Subject: [nycphp-talk] AMP comments Message-ID: I largely, if not wholly, agree with Chris, particularly where it involves "people asking questions without giving any personal attempt at solving their own problem." A question or two for a newbie is ok, but it often seems as though the list is used in lieu of the PHP (or other) Manual. Often I refer to the manual to answer someone's question, and that is just wrong. I think that the front-end list is a bit of a stretch, but at least it's separate (and I do subscribe to it). There are other lists available for problems/questions concering apache, mysql, etc, specific problems. I suppose, for example, apache specific questions could be relegated to an apache at lists.nyphp.org list, which people who have no apache interest could not subscribe to. While I admit that I've asked an off-topic question or two and I don't have an issue with a call for off-topic help, I think these threads should go off-list as soon as possible. > --- Hans Zaunere wrote: > > Perhaps we should be totally democratic about it and have a vote? > > Although I am in favor of having a separate list, I can give you a reason why > some people do not favor this type of idea (it has come up a lot on php.net > mailing list discussions). The fear is that all of the "smart" people will > migrate to the advanced/on-topic/whatever list that is being proposed, and the > other list's usefulness will deteriorate, and it will die. > > If we do create an on-topic list, I can pretty much guarantee that I will > subscribe to it and drop this one. My time is valuable to me, and while I like > to contribute back to the PHP community by answering questions whenever I have > the time, it is not worth it for me to wade through off-topic discussions and > people asking questions without giving any personal attempt at solving their > own problem. > > So, I would see the choices as: > > 1. Enforce that this list remain on-topic. > 2. Create an on-topic list. > > Given these choices, either is fine for me, because I will choose to be > subscribed to the on-topic list in either case. It makes no difference to me if > others have a list where they can chat casually (and I have nothing against the > idea at all). > From shiflett at php.net Thu Sep 25 11:49:04 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 25 Sep 2003 08:49:04 -0700 (PDT) Subject: [nycphp-talk] Lost Sessions In-Reply-To: <3F730BA7.9040804@netzero.com> Message-ID: <20030925154904.31879.qmail@web14302.mail.yahoo.com> --- Scott Mattocks wrote: > Somehow the session cookie is not getting set. A new session id is > being created on every page load. The constant SID is available > which means that the cookie wasn't set right. Is there a way to > determine why the cookie isn't set? The browser is set to accept > all cookies. Well, there is accepting, and there is returning. It is possible that the client is accepting the cookie just fine but for some reason is not returning the cookie in the next request. There are several attributes that can be associated with a cookie, and these generally restrict the cases in which a client will send them in a request. So, the first test might be to turn on "warnings" or whatever your browser calls them and carefully inspect the cookie that is being set. Check things like this: 1. Path 2. Domain 3. Expires 4. Secure A lack of an attribute generally means a lack of the associated restriction, except in the case of Path, which defaults to the path of the resource sending the cookie. You can get a more general overview of cookies here: http://shiflett.org/books/http-developers-handbook/chapters/11 Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Thu Sep 25 11:51:27 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 25 Sep 2003 11:51:27 -0400 Subject: [nycphp-talk] Lost Sessions In-Reply-To: <3F730BA7.9040804@netzero.com> References: <20030925151153.83468.qmail@web14305.mail.yahoo.com> <3F730BA7.9040804@netzero.com> Message-ID: <20030925155127.GA23488@panix.com> Hi Scott: On Thu, Sep 25, 2003 at 11:37:11AM -0400, Scott Mattocks wrote: > Somehow the session cookie is not getting set. Browser cookie preferences could be a problem. Cookie path could be a problem. But, my preference is to avoid all these problems by passing session ID's in the HTML itself. See my Simple Session Solution class: http://www.analysisandsolutions.com/software/session-simple/ --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From pl at eskimo.com Thu Sep 25 13:37:42 2003 From: pl at eskimo.com (Peter Lehrer) Date: Thu, 25 Sep 2003 13:37:42 -0400 Subject: [nycphp-talk] AMP comments References: Message-ID: <002e01c3838b$ded1f3a0$978dfea9@t9x6t1> Perhaps we can have a short presentation on how to ask a question on an "on-topic" list so the "knowledgable" people's time don't become wasted. This presentation could be based on our experience on the talk list as well as other resources such as Eric Raymond's article. Yours, Peter L. ----- Original Message ----- From: "PUTAMARE" To: Sent: Thursday, September 25, 2003 11:34 AM Subject: Re: [nycphp-talk] AMP comments > Meh, my precious scroll key finger isn't that abused by off topic > posts, there really aren't enough to warrant the diversion of resources > from some more worthy project to solve the "problem". As I mentioned at > the meeting, probably the best first phundamentals should be a how to > filter your email tutorial, since most of the list-based > dissatisfaction comes from people who apparently don't. I'm not going > to volunteer for this phundamental however because I do not know or > care to know how to do anything in outlook. > > Jeff Knight > jeff at lushmedia.com > 212/213-6558 x 203 > LUSH media > 110 W 40th St #1502 > New York, NY 10018 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From tgales at tgaconnect.com Thu Sep 25 14:34:50 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 25 Sep 2003 14:34:50 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <002e01c3838b$ded1f3a0$978dfea9@t9x6t1> Message-ID: <000d01c38393$b519bd60$bf8d3818@OBERON1> Perhaps we could have a web page, and ask people to read it before signing up. Then members of the list could have a form letter that has a link to the "etiquette" page. Replying with a form would just take a 'couple' of clicks and could be a kindler and gentler RTFM. Anyway I think the members should police the list instead of creating an elite list. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer Sent: Thursday, September 25, 2003 1:38 PM To: NYPHP Talk Subject: Re: [nycphp-talk] AMP comments Perhaps we can have a short presentation on how to ask a question on an "on-topic" list so the "knowledgable" people's time don't become wasted. This presentation could be based on our experience on the talk list as well as other resources such as Eric Raymond's article. Yours, Peter L. ----- Original Message ----- From: "PUTAMARE" To: Sent: Thursday, September 25, 2003 11:34 AM Subject: Re: [nycphp-talk] AMP comments > Meh, my precious scroll key finger isn't that abused by off topic > posts, there really aren't enough to warrant the diversion of resources > from some more worthy project to solve the "problem". As I mentioned at > the meeting, probably the best first phundamentals should be a how to > filter your email tutorial, since most of the list-based > dissatisfaction comes from people who apparently don't. I'm not going > to volunteer for this phundamental however because I do not know or > care to know how to do anything in outlook. > > Jeff Knight > jeff at lushmedia.com > 212/213-6558 x 203 > LUSH media > 110 W 40th St #1502 > New York, NY 10018 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From coling at macmicro.com Thu Sep 25 14:56:30 2003 From: coling at macmicro.com (Colin Goldberg) Date: Thu, 25 Sep 2003 14:56:30 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <000d01c38393$b519bd60$bf8d3818@OBERON1> References: <002e01c3838b$ded1f3a0$978dfea9@t9x6t1> <000d01c38393$b519bd60$bf8d3818@OBERON1> Message-ID: <6.0.0.22.0.20030925144019.04fe21d0@mail.macmicro.com> Why not consider adding a Forum section to the NYPHP site? In it you could set up multiple sections, with multiple topics, moderated or unmoderated. So instead of, or in addition to, keeping up by way of mailing lists, a member could visit the forum and browse through the sections/topics by thread, etc. according to interest. As I see it, a forum behaves like a "market" in a way, in that popularity of, and replies to, postings will be determined by the interest a forum visitor has in the thread. If someone posts a question etc. and nobody replies, then that just indicates that (a) no-one knows the answer, (b) no-one is interested, or (c) "you name it" reason. To me, that's quite fair, but even so, overall the forum page gives a quick idea about the direction(s) that discussion(s) are going in. I have seen a "free" product that seems (at first glance) to be well put together - http://www.invisionboard.com/ Perhaps it's worth looking at... (I have no connection with them). Colin G At 02:34 PM 9/25/03, you wrote: >Perhaps we could have a web page, and ask people to read it >before signing up. > >Then members of the list could have a form letter that has a >link to the "etiquette" page. Replying with a form would >just take a 'couple' of clicks and could be a kindler and >gentler RTFM. > >Anyway I think the members should police the list instead of >creating an elite list. > > >T. Gales & Associates >Helping People Connect with Technology >http://www.tgaconnect.com > >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter >Lehrer >Sent: Thursday, September 25, 2003 1:38 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] AMP comments > >Perhaps we can have a short presentation on how to ask a >question on an >"on-topic" list so the "knowledgable" people's time don't >become wasted. >This presentation could be based on our experience on the >talk list as well >as other resources such as Eric Raymond's article. > >Yours, >Peter L. >----- Original Message ----- >From: "PUTAMARE" >To: >Sent: Thursday, September 25, 2003 11:34 AM >Subject: Re: [nycphp-talk] AMP comments > > > > Meh, my precious scroll key finger isn't that abused by >off topic > > posts, there really aren't enough to warrant the diversion >of resources > > from some more worthy project to solve the "problem". As I >mentioned at > > the meeting, probably the best first phundamentals should >be a how to > > filter your email tutorial, since most of the list-based > > dissatisfaction comes from people who apparently don't. >I'm not going > > to volunteer for this phundamental however because I do >not know or > > care to know how to do anything in outlook. > > > > Jeff Knight > > jeff at lushmedia.com > > 212/213-6558 x 203 > > LUSH media > > 110 W 40th St #1502 > > New York, NY 10018 > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk From jlacey at ix.netcom.com Thu Sep 25 15:03:23 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Thu, 25 Sep 2003 13:03:23 -0600 Subject: [nycphp-talk] AMP comments In-Reply-To: <000d01c38393$b519bd60$bf8d3818@OBERON1> References: <000d01c38393$b519bd60$bf8d3818@OBERON1> Message-ID: <3F733BFB.1000805@ix.netcom.com> Tim Gales wrote: >Anyway I think the members should police the list instead of >creating an elite list. > > ahh.. someone finally "gets it". What is happening here is that NYPHP is having a "good problem" -- growing pains. Some of the most memorable people in my life have been the truly gifted ones who have taken the time to help me with something I didn't understand -- and for the record, I'm 57 years old and have had plenty of help. a list that is self-regulating (it's ok to simply ignore people who abuse it, etc) is the way to go IMHO John From danielc at analysisandsolutions.com Thu Sep 25 15:07:01 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 25 Sep 2003 15:07:01 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <3F72DF09.6090503@nyphp.org> References: <3F72DF09.6090503@nyphp.org> Message-ID: <20030925190701.GA8894@panix.com> Folks: On Thu, Sep 25, 2003 at 08:26:49AM -0400, Hans Zaunere wrote: > grown to be a high-traffic and vibrant channel of communication. The volume on this list doesn't seem so high to me. > However, it may be beginning to outgrow it's usefulness for some, How so? If you're talking about the quality of some of the questions posted, that would then wind up being the problem on any new list -- unless of course said list has a restricted membership. Considering the turn of events yesterday with Mr. Powell, it seems the community can police itself. > So, I'm > throwing out the notion that it's time for another list, dedicated to the > strict technical discussion of PHP/AMP Technology, and other closely > related topics. That's what this list already is. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From lists at ny-tech.net Thu Sep 25 15:25:50 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Thu, 25 Sep 2003 15:25:50 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <6.0.0.22.0.20030925144019.04fe21d0@mail.macmicro.com> Message-ID: <003a01c3839a$d57cbd30$6401a8c0@main> I'll second the idea of forums. They are much more effective ( however, much younger) and easier to manage than mailing lists. I am an active member of quite a few forums, related to web design/programming on the net. One of the most popular ones is Site Point Forums, http://www.sitepointforums.com/ which caters to 28,784 members. And another one is www.webdesignforums.net I also run and manage a few forums, including my own sites and my employer's site. There are quite a few forum packages for AMP environment. phpBB, www.phpbb.com , and Invision Power Boards, two of the top free ones. vBulletin, www.vbulletin.com, the best commercial one. I run vBulletin on my site because of its stability and the availability of support. I think this solution should be looked into, if not deployed on NYPHP. - Nasir -----Original Message----- From: Colin Goldberg [mailto:coling at macmicro.com] Sent: Thursday, September 25, 2003 2:57 PM To: NYPHP Talk Subject: RE: [nycphp-talk] AMP comments Why not consider adding a Forum section to the NYPHP site? In it you could set up multiple sections, with multiple topics, moderated or unmoderated. So instead of, or in addition to, keeping up by way of mailing lists, a member could visit the forum and browse through the sections/topics by thread, etc. according to interest. As I see it, a forum behaves like a "market" in a way, in that popularity of, and replies to, postings will be determined by the interest a forum visitor has in the thread. If someone posts a question etc. and nobody replies, then that just indicates that (a) no-one knows the answer, (b) no-one is interested, or (c) "you name it" reason. To me, that's quite fair, but even so, overall the forum page gives a quick idea about the direction(s) that discussion(s) are going in. I have seen a "free" product that seems (at first glance) to be well put together - http://www.invisionboard.com/ Perhaps it's worth looking at... (I have no connection with them). Colin G At 02:34 PM 9/25/03, you wrote: >Perhaps we could have a web page, and ask people to read it before >signing up. > >Then members of the list could have a form letter that has a link to >the "etiquette" page. Replying with a form would just take a 'couple' >of clicks and could be a kindler and gentler RTFM. > >Anyway I think the members should police the list instead of creating >an elite list. > > >T. Gales & Associates >Helping People Connect with Technology http://www.tgaconnect.com > >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer >Sent: Thursday, September 25, 2003 1:38 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] AMP comments > >Perhaps we can have a short presentation on how to ask a question on an >"on-topic" list so the "knowledgable" people's time don't >become wasted. >This presentation could be based on our experience on the >talk list as well >as other resources such as Eric Raymond's article. > >Yours, >Peter L. >----- Original Message ----- >From: "PUTAMARE" >To: >Sent: Thursday, September 25, 2003 11:34 AM >Subject: Re: [nycphp-talk] AMP comments > > > > Meh, my precious scroll key finger isn't that abused by >off topic > > posts, there really aren't enough to warrant the diversion >of resources > > from some more worthy project to solve the "problem". As I >mentioned at > > the meeting, probably the best first phundamentals should >be a how to > > filter your email tutorial, since most of the list-based > > dissatisfaction comes from people who apparently don't. >I'm not going > > to volunteer for this phundamental however because I do >not know or > > care to know how to do anything in outlook. > > > > Jeff Knight > > jeff at lushmedia.com > > 212/213-6558 x 203 > > LUSH media > > 110 W 40th St #1502 > > New York, NY 10018 > > > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Thu Sep 25 15:27:11 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 25 Sep 2003 15:27:11 -0400 (EDT) Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <20030925190701.GA8894@panix.com> References: <3F72DF09.6090503@nyphp.org> <20030925190701.GA8894@panix.com> Message-ID: I concur with the opinion that the status quo seems to be working ok. There's the moderately OT aside now and then ("Can I bring my bicycle to Digital Pulp?"), which the very name 'talk' doesn't discourage (as Hans has pointed out), but nobody seems to have a problem with that. And yes, when somebody started taxing the community's patience, the community dealt with it. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From csnyder at chxo.com Thu Sep 25 15:28:28 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 25 Sep 2003 15:28:28 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <3F733BFB.1000805@ix.netcom.com> References: <000d01c38393$b519bd60$bf8d3818@OBERON1> <3F733BFB.1000805@ix.netcom.com> Message-ID: <3F7341DC.10508@chxo.com> John Lacey wrote: > a list that is self-regulating (it's ok to simply ignore people who > abuse it, etc) is the way to go IMHO I agree with John. The chatter around the serious questions is the soul of this list, it creates a very welcoming environment. People will abuse it for sure-- but out of ignorance, not maliciousness. csnyder From jsiegel1 at optonline.net Thu Sep 25 14:19:52 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Thu, 25 Sep 2003 14:19:52 -0400 Subject: [nycphp-talk] AMP comments In-Reply-To: <002e01c3838b$ded1f3a0$978dfea9@t9x6t1> Message-ID: <001301c38391$9cd7f0c0$6401a8c0@EZDSDELL> And now...for my 2 cents. Sometimes the correct phrasing of the question has to do with the "experience level" of the person asking the question. If you are just learning a language, you don't yet know the terminology and therefore don't quite know how to phrase the question. However, following such rules as RTFM; checking Google, and so forth, may help someone to understand how to phrase the question (assuming they did not find the answer they were looking for). Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Peter Lehrer Sent: Thursday, September 25, 2003 12:38 PM To: NYPHP Talk Subject: Re: [nycphp-talk] AMP comments Perhaps we can have a short presentation on how to ask a question on an "on-topic" list so the "knowledgable" people's time don't become wasted. This presentation could be based on our experience on the talk list as well as other resources such as Eric Raymond's article. Yours, Peter L. ----- Original Message ----- From: "PUTAMARE" To: Sent: Thursday, September 25, 2003 11:34 AM Subject: Re: [nycphp-talk] AMP comments > Meh, my precious scroll key finger isn't that abused by off topic > posts, there really aren't enough to warrant the diversion of resources > from some more worthy project to solve the "problem". As I mentioned at > the meeting, probably the best first phundamentals should be a how to > filter your email tutorial, since most of the list-based > dissatisfaction comes from people who apparently don't. I'm not going > to volunteer for this phundamental however because I do not know or > care to know how to do anything in outlook. > > Jeff Knight > jeff at lushmedia.com > 212/213-6558 x 203 > LUSH media > 110 W 40th St #1502 > New York, NY 10018 > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jkelly at sussex.edu Thu Sep 25 15:52:25 2003 From: jkelly at sussex.edu (jessica kelly) Date: Thu, 25 Sep 2003 15:52:25 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? Message-ID: I'd have to agree with Dan. On an occasion or two, I have asked a question that I maybe should of asked elsewhere. Even though they are all AMP related it usually involves Windows as I don't have the luxury of a Linux box where I work nor will the bossman let me convert the server over to Linux. I always Google the question and RTFM first before I ask, but a lot of times I ask because I don't understand TFM. I have a treasure trove of saved emails that I have gleaned from this list and refer to them as needed or save for future reference. I would really hate to see the "Elite" disappear from this list. This would cause me to try to join the elite list to continue to glean info but be too afraid to ask a question for fear of a "What the *$%# are you doing on this list" response. In the end my effort to employ PHP when possible where I work would suffer. To keep this list going I would recommend: 1) Keeping posts on topic. 2) Subject lines should reflect what the question is about. 3) Let people know when their abusing the list. Kindly at first more aggressively if the problem persists. 4) Read other responses to a question before you answer it as the question is probably already answered. I see quite a bit of this on this list. 5) Be nice when possible. The so called Linux elitist attitude is a turn off to those who would like to delve further into Linux, self included. 6) Resist the temptation to throw in your two cents for the sake of throwing in your two cents, it's annoying. My two cents for keeping the list as is, Jessica Kelly >>> danielc at analysisandsolutions.com 9/25/03 3:07:01 PM >>> Folks: On Thu, Sep 25, 2003 at 08:26:49AM -0400, Hans Zaunere wrote: > grown to be a high-traffic and vibrant channel of communication. The volume on this list doesn't seem so high to me. > However, it may be beginning to outgrow it's usefulness for some, How so? If you're talking about the quality of some of the questions posted, that would then wind up being the problem on any new list -- unless of course said list has a restricted membership. Considering the turn of events yesterday with Mr. Powell, it seems the community can police itself. > So, I'm > throwing out the notion that it's time for another list, dedicated to the > strict technical discussion of PHP/AMP Technology, and other closely > related topics. That's what this list already is. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Thu Sep 25 16:54:11 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 25 Sep 2003 16:54:11 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: Message-ID: <000f01c383a7$2d7e12c0$bf8d3818@OBERON1> Earlier I wrote that we could have a kinder and gentler RTFM message. I was thinking of something like this: ========== "The reason you got the 'whatever' error was because your php.ini wasn't configured correctly." Did you know that you might have been able to solve this yourself by entering "phundamentals 'whatever' error site:www.nyphp.org" in the Google search box? ============ I think something like the above would reinforce nyphp as a resource for finding out more about PHP and still encourage people to do some homework before asking questions. I am not suggesting that we say 'go Google on that first, before asking that kind of question' because it would turn people way from the site which is a good source of help. Another problem with telling people to Google for the answers to their questions is, as Jeff Siegel pointed out, they may have trouble expressing what the problem is. Along the same lines, if they are new to the language they may have trouble sifting through all the stuff that comes back from a Google query to find what is relevant to them. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jessica kelly Sent: Thursday, September 25, 2003 3:52 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] NYPHP List Reorganization? I'd have to agree with Dan. On an occasion or two, I have asked a question that I maybe should of asked elsewhere. Even though they are all AMP related it usually involves Windows as I don't have the luxury of a Linux box where I work nor will the bossman let me convert the server over to Linux. I always Google the question and RTFM first before I ask, but a lot of times I ask because I don't understand TFM. I have a treasure trove of saved emails that I have gleaned from this list and refer to them as needed or save for future reference. I would really hate to see the "Elite" disappear from this list. This would cause me to try to join the elite list to continue to glean info but be too afraid to ask a question for fear of a "What the *$%# are you doing on this list" response. In the end my effort to employ PHP when possible where I work would suffer. To keep this list going I would recommend: 1) Keeping posts on topic. 2) Subject lines should reflect what the question is about. 3) Let people know when their abusing the list. Kindly at first more aggressively if the problem persists. 4) Read other responses to a question before you answer it as the question is probably already answered. I see quite a bit of this on this list. 5) Be nice when possible. The so called Linux elitist attitude is a turn off to those who would like to delve further into Linux, self included. 6) Resist the temptation to throw in your two cents for the sake of throwing in your two cents, it's annoying. My two cents for keeping the list as is, Jessica Kelly >>> danielc at analysisandsolutions.com 9/25/03 3:07:01 PM >>> Folks: On Thu, Sep 25, 2003 at 08:26:49AM -0400, Hans Zaunere wrote: > grown to be a high-traffic and vibrant channel of communication. The volume on this list doesn't seem so high to me. > However, it may be beginning to outgrow it's usefulness for some, How so? If you're talking about the quality of some of the questions posted, that would then wind up being the problem on any new list -- unless of course said list has a restricted membership. Considering the turn of events yesterday with Mr. Powell, it seems the community can police itself. > So, I'm > throwing out the notion that it's time for another list, dedicated to the > strict technical discussion of PHP/AMP Technology, and other closely > related topics. That's what this list already is. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Thu Sep 25 17:35:14 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 25 Sep 2003 17:35:14 -0400 (EDT) Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <000f01c383a7$2d7e12c0$bf8d3818@OBERON1> References: <000f01c383a7$2d7e12c0$bf8d3818@OBERON1> Message-ID: On Thu, 25 Sep 2003, Tim Gales wrote: > > Another problem with telling people to Google for the > answers to their questions is, as Jeff Siegel pointed out, > they may have trouble expressing what the problem is. > > Along the same lines, if they are new to the language they > may have trouble sifting through all the stuff that comes > back from a Google query to find what is relevant to them. Hmm, I wonder if there's a presentation idea in there: "The Art of RTFM/STFW" One could start by sort of logging a few incidents of successful RTFM/STFW, i.e., that didn't result in posting any question, and there you'd have a few examples. I could contribute a little story about how I learned how to sort multidimensional arrays all by myself today (well ok, with a little help from Google when http://us3.php.net/manual/en/function.array-multisort.php didn't do it for me) --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From southwell at dneba.com Thu Sep 25 18:03:03 2003 From: southwell at dneba.com (Michael Southwell) Date: Thu, 25 Sep 2003 18:03:03 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: References: <20030925190701.GA8894@panix.com> <3F72DF09.6090503@nyphp.org> <20030925190701.GA8894@panix.com> Message-ID: <5.1.0.14.2.20030925180239.00b4e5f8@mail.optonline.net> At 03:27 PM 9/25/2003, you wrote: >I concur with the opinion that the status quo seems to be working ok. > >There's the moderately OT aside now and then ("Can I bring my bicycle to >Digital Pulp?"), which the very name 'talk' doesn't discourage (as Hans >has pointed out), but nobody seems to have a problem with that. And yes, >when somebody started taxing the community's patience, the community dealt >with it. +1 to this from me >--- >David Mintz >http://davidmintz.org/ >Email: See http://dmintzweb.com/whitelist.php first! > >"Y d?le p'abajo" > > Tito Rojas >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk Michael G. Southwell ================================= DNEBA Enterprises 81 South Road Bloomingdale, NJ 07403-1419 973/492-7873 (voice and fax) southwell at dneba.com http://www.dneba.com ====================================================== From adam at trachtenberg.com Thu Sep 25 20:38:33 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 25 Sep 2003 20:38:33 -0400 (EDT) Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: Message-ID: On Thu, 25 Sep 2003, jessica kelly wrote: > On an occasion or two, I have asked a question that I maybe should > of asked elsewhere. Even though they are all AMP related it usually > involves Windows as I don't have the luxury of a Linux box where I > work nor will the bossman let me convert the server over to Linux. I > always Google the question and RTFM first before I ask, but a lot of > times I ask because I don't understand TFM. IMHO, there's nothing wrong with a WAMP question. One of PHP's strengths is that you can get it up and running on *both* Unix and Windows. In fact, because many people don't use Windows with PHP is actually all the more reason to encourage PHP Windows questions. It's much harder to find quality information on this topic, so I'm not surprised when the subject generates queries. (Running PHP on Windows is like a dog walking on two legs; you're not impressed with how well he's doing it, but that's he's able to do it at all.) In a (somewhat) related note from another post, this *is* NYPHP Talk. I hope people ask questions about bringing their bicycle to the monthly meeting because then it means they're actually going to the meeting! (Unlike me, who had to miss it this month. Shame, shame.) Despite my earlier rant, I actually have a pretty large definition of what qualifies as on topic. And if it's totally off-topic, then like it when you pretend that you're making an attempt to stay on topic. :) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From delta at rochester.rr.com Fri Sep 26 06:14:22 2003 From: delta at rochester.rr.com (deedee) Date: Fri, 26 Sep 2003 06:14:22 -0400 Subject: [nycphp-talk] AMP Comments and/or NYPHP List Reorganization References: <3F72DF09.6090503@nyphp.org> <3F73014C.8090603@ix.netcom.com> <3F73070D.8010806@nyphp.org> Message-ID: <00f501c38416$f5133710$fc00fe0a@KEITZWS2> Hans, i have been a quiet, proud member of nyphp.org since last year and i thought i'd add my 2 cents to this topic for what its worth! first, its a ugly job having to police human behavior - i manage a database of technical troubleshooting tips at work and its a constant battle to keep subject lines 'neat' and contributions 'clean' and so forth. i think some people just cant or wont follow basic instructions and guidelines. from this technical group and others i am annoyed when people cant click on the appropriate link for the simpliest task 'remove from list'. i mutter 'moran' or some other colorful word and then i use my delete key! that's probably where some tolerance kicks in for those of us that continue to hang out. i replied once to someone who had accidently posted a php question to nyphp-dev which prompted a gentle reminder of the list purpose from you...i remember wondering how to get the thread redirected, so i just abandoned it altogether! guidelines for posts are fair and reasonable, select the police if its necessary, gentle reminders are helpful to some and annoying to others. encourage tolerance. i have used forums before... the thread searchability is a nice feature but again as many have mentioned my inquiry results are based on my ability to articulate the technical verbage. i use google, i cherish my 'bibles' and reference manuals, i ask my friends and coworkers, i read the posts with nyphp & other groups.... then if i get code working or have experience, i share. i have posted replies here when i noticed some basic research was available, and possible overlooked. ...i think it shows the diversity of skill level of your members. i joined an online group once that strictly used the word "off topic" when posts werent within the designated guidelines, plus there was an automated monthly pre-scripted message regarding the membership rules & guidelines... once in a while the 'police force' posted "enough already" or helped steer the group discussion... sometimes i had time to read those off topic posts. the guideline reminder was helpful in the infancy of my membership. the delete key or filtering is always the members option. the recent question about bringing a bicycle to the meeting seemed important to the attendee... i regret i dont live in the area to attend. the question seemed reasonable enough and i have enjoyed reading where you all are heading for dinner or drinks and what train you might take.... but thats because i find all you 'geeks' interesting. moving this type of discussion to another location would make it less human, more technical. lastly i have found on occasion, (yet rarely) posted questions are unanswered...i have noticed its on or near the meeting dates - probably cuz most of the focus is on the meeting etc. again, its infrequent but it might be something to be conscious of. i trust your leadership on this so my vote is with you. i hope if you do start another elite group you invite the current members that have supported you from nearly the start! keep up the good work! ;) respectfully, deedee P.S. is this thread of discussion...'NYPHP List Reorganization?' or 'AMP comments' ? ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Thursday, September 25, 2003 11:17 AM Subject: Re: [nycphp-talk] AMP comments > > > John Lacey wrote: > > > > > Hans, > > > > Would a 'subject' guideline work? For example, if I wanted to ask an > > AMP question -- first word of the subject line would be: > > PHP class question > > php and XML feedback > > MySQL problem with connects > > Apache virtual host question > > postgreSQL information > > > > etc... > > > > Then, perhaps a 'steering script' could direct the question/comment to > > [AMP] list. All subject lines that don't meet that criteria would be > > directed to "talk". It might also serve to remind people (if they are > > programmers -- they should be thinking logically anyway :) to give some > > thought to their question/comment ala Eric Raymond's famous "How to ask > > a question" document. This could be stated as a simple policy for > > posting to the lists. > > This is certainly something we ineveitably want to arrive at (ie, when we finally have our own mailing list system finalized) but with Mailman now I'm not sure it's doable. For now, unfortunately, the best we could do would be to add another list, and concisely define posting guidelines for it, with Talk being the catch-all list. > > I've had mixed responses as to whether adding another list is good or not, so I still don't know what to do. Perhaps we should be totally democratic about it and have a vote? > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From davevgl at yahoo.com Fri Sep 26 09:45:02 2003 From: davevgl at yahoo.com (David Vogel) Date: Fri, 26 Sep 2003 06:45:02 -0700 (PDT) Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <20030905041801.GA11614@panix.com> Message-ID: <20030926134502.11577.qmail@web14309.mail.yahoo.com> Morning all, I just tried a little test: >From a file in a public directory I included a file located in a file that is restricted with .htaccess. I was hoping that I might be asked to authenticate, but instead the file was included normally. So, is there any way to make php use apache's authentication in this kind of situation? Don't knock yourselves out over this, I should probably figure out a different way to accomplish my goals here anyway, I was just curious. Thanks, Dave __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From pl at eskimo.com Fri Sep 26 09:49:50 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 26 Sep 2003 09:49:50 -0400 Subject: [nycphp-talk] .htaccess and php includes References: <20030926134502.11577.qmail@web14309.mail.yahoo.com> Message-ID: <000a01c38435$1e2ffb60$978dfea9@t9x6t1> What do you want to do? Stop .inc files from being served? Yours, Peter L. ----- Original Message ----- From: "David Vogel" To: "NYPHP Talk" Sent: Friday, September 26, 2003 9:45 AM Subject: [nycphp-talk] .htaccess and php includes > Morning all, > > I just tried a little test: > >From a file in a public directory I included a file located in a file > that is restricted with .htaccess. I was hoping that I might be asked > to authenticate, but instead the file was included normally. > > So, is there any way to make php use apache's authentication in this > kind of situation? > > Don't knock yourselves out over this, I should probably figure out a > different way to accomplish my goals here anyway, I was just curious. > > Thanks, > Dave > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From davevgl at yahoo.com Fri Sep 26 09:57:22 2003 From: davevgl at yahoo.com (David Vogel) Date: Fri, 26 Sep 2003 06:57:22 -0700 (PDT) Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <000a01c38435$1e2ffb60$978dfea9@t9x6t1> Message-ID: <20030926135722.19675.qmail@web14303.mail.yahoo.com> sorry: a file located in a file should have been a file located in a dir. that was probably obvious. No, I need to set up public and private versions of a telephone directory, and I was thinking that I might be able to branch my code to include either a file in the original public dir or one (that would display private fields) from a restricted dir. Like I said, probably not the best way to do it, just a first idea that made me wonder if you can do this... thanks, Dave --- Peter Lehrer wrote: > What do you want to do? Stop .inc files from being served? > > > Yours, > Peter L. > ----- Original Message ----- > From: "David Vogel" > To: "NYPHP Talk" > Sent: Friday, September 26, 2003 9:45 AM > Subject: [nycphp-talk] .htaccess and php includes > > > > Morning all, > > > > I just tried a little test: > > >From a file in a public directory I included a file located in a > file > > that is restricted with .htaccess. I was hoping that I might be > asked > > to authenticate, but instead the file was included normally. > > > > So, is there any way to make php use apache's authentication in > this > > kind of situation? > > > > Don't knock yourselves out over this, I should probably figure out > a > > different way to accomplish my goals here anyway, I was just > curious. > > > > Thanks, > > Dave > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From tgales at tgaconnect.com Fri Sep 26 10:14:50 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Fri, 26 Sep 2003 10:14:50 -0400 Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <20030926135722.19675.qmail@web14303.mail.yahoo.com> Message-ID: <000401c38438$8caae1b0$bf8d3818@OBERON1> David, You might want to re-think your strategy -- and look at how you could protect your data instead of your code. You know, let the code execute regardless of the access level of the user. And make private numbers available only to the suitable privileged users. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Vogel Sent: Friday, September 26, 2003 9:57 AM To: NYPHP Talk Subject: Re: [nycphp-talk] .htaccess and php includes sorry: a file located in a file should have been a file located in a dir. that was probably obvious. No, I need to set up public and private versions of a telephone directory, and I was thinking that I might be able to branch my code to include either a file in the original public dir or one (that would display private fields) from a restricted dir. Like I said, probably not the best way to do it, just a first idea that made me wonder if you can do this... thanks, Dave --- Peter Lehrer wrote: > What do you want to do? Stop .inc files from being served? > > > Yours, > Peter L. > ----- Original Message ----- > From: "David Vogel" > To: "NYPHP Talk" > Sent: Friday, September 26, 2003 9:45 AM > Subject: [nycphp-talk] .htaccess and php includes > > > > Morning all, > > > > I just tried a little test: > > >From a file in a public directory I included a file located in a > file > > that is restricted with .htaccess. I was hoping that I might be > asked > > to authenticate, but instead the file was included normally. > > > > So, is there any way to make php use apache's authentication in > this > > kind of situation? > > > > Don't knock yourselves out over this, I should probably figure out > a > > different way to accomplish my goals here anyway, I was just > curious. > > > > Thanks, > > Dave > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From cmerlo at ncc.edu Fri Sep 26 10:17:02 2003 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Fri, 26 Sep 2003 10:17:02 -0400 Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <20030926135722.19675.qmail@web14303.mail.yahoo.com> References: <000a01c38435$1e2ffb60$978dfea9@t9x6t1> <20030926135722.19675.qmail@web14303.mail.yahoo.com> Message-ID: <20030926141702.GA17002@ncc.edu> On 2003-09-26 06:57 -0700, David Vogel wrote: > No, I need to set up public and private versions of a telephone > directory, and I was thinking that I might be able to branch my code to > include either a file in the original public dir or one (that would > display private fields) from a restricted dir. Like I said, probably > not the best way to do it, just a first idea that made me wonder if you > can do this... Dave: My first thought reading that paragraph was a database table with as many data fields as you need, and a password field. if( $row[ 'password' ] != "" ) // if the password isn't empty { // Authenticate a user } else { // This is public information } Now you can use one select query, and just decide based on one field of the table. That's what I do. -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo It seems a little silly now, but this country was founded as a protest against taxation. From davevgl at yahoo.com Fri Sep 26 10:33:53 2003 From: davevgl at yahoo.com (David Vogel) Date: Fri, 26 Sep 2003 07:33:53 -0700 (PDT) Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <20030926141702.GA17002@ncc.edu> Message-ID: <20030926143353.63404.qmail@web14308.mail.yahoo.com> Yeah, something like that makes more sense. thanks again, Dave --- "Christopher R. Merlo" wrote: > On 2003-09-26 06:57 -0700, David Vogel wrote: > > > No, I need to set up public and private versions of a telephone > > directory, and I was thinking that I might be able to branch my > code to > > include either a file in the original public dir or one (that would > > display private fields) from a restricted dir. Like I said, > probably > > not the best way to do it, just a first idea that made me wonder if > you > > can do this... > > Dave: > My first thought reading that paragraph was a database table with as > many data fields as you need, and a password field. > > if( $row[ 'password' ] != "" ) // if the password isn't empty > { > // Authenticate a user > } else { > // This is public information > } > > Now you can use one select query, and just decide based on one field > of the table. That's what I do. > > -- > cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo > > It seems a little silly now, but this country was founded as a > protest > against taxation. > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From danielc at analysisandsolutions.com Fri Sep 26 10:50:48 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 26 Sep 2003 10:50:48 -0400 Subject: [nycphp-talk] .htaccess and php includes In-Reply-To: <20030926134502.11577.qmail@web14309.mail.yahoo.com> References: <20030905041801.GA11614@panix.com> <20030926134502.11577.qmail@web14309.mail.yahoo.com> Message-ID: <20030926145047.GA13609@panix.com> Hi David: On Fri, Sep 26, 2003 at 06:45:02AM -0700, David Vogel wrote: > > I just tried a little test: > From a file in a public directory I included a file located in a file > that is restricted with .htaccess. I was hoping that I might be asked > to authenticate, but instead the file was included normally. When a PHP script is executing and the script is asked to include files ON YOUR server, those file accesses will be made via the operating system, not the web server. Thus, .htaccess has no role to play. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From crisscott at netzero.com Fri Sep 26 10:58:38 2003 From: crisscott at netzero.com (Scott Mattocks) Date: Fri, 26 Sep 2003 10:58:38 -0400 Subject: [nycphp-talk] More Objects in Sessions Message-ID: <3F74541E.2@netzero.com> Hello, Ok, so I have these objects that have other objects as attributes. I can't get the second object to come out of the session properly. I have tried using __sleep and __wakeup to serialize/unserialize but the object loses its methods and is pretty much useless. I have a class method that can recreate the second object but it won't recreate it properly if called within the class itself. ex: // In the class definition function __wakeup () { unset($this->secondObj); $this->createSecondObj(); return array(); } // This does not work!? // In my script that uses object $obj =& $_SESSION['obj']; unset($obj->secondObj); $obj->createSecondObj(); // Works fine but I don't like it! Any ideas how to fix this? Thanks, Scott Mattocks From jay at trans-city.com Fri Sep 26 11:39:01 2003 From: jay at trans-city.com (Jay Greenspan) Date: Fri, 26 Sep 2003 11:39:01 -0400 Subject: [nycphp-talk] email list sign-up In-Reply-To: <3F74541E.2@netzero.com> Message-ID: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> I'm starting a site that's going to have a newsletter. I was planning on sending a confirmation to the users who give their email data, something that required them to click on a link to confirm their entry to the list. Something simple like: You have signed up for the CollestSiteEver Newletter. To confirm, click below http://example.com/emailsignup.php?id=randomizedstring But I recently heard that this type of email was sure to get caught by spam filters on most major servers. Anyone have experience with this? Tips? thanks. -j From hans at nyphp.org Fri Sep 26 11:44:19 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 26 Sep 2003 11:44:19 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <3F72DF09.6090503@nyphp.org> References: <3F72DF09.6090503@nyphp.org> Message-ID: <3F745ED3.1000702@nyphp.org> Out of about 15 posts on the topic, there's 30 different viewpoints, which is good. Thank you for the suggestions, now someone just make a decision :) I'm not sure where the notion of an elite list came from, but a NYPHP-AMP would be nothing of the sort - it'd be simply a more poignant list for a specific set of topics. However, as has correctly been pointed out, it'd probably take away from this list. The "problem" that I suggested needed to be solved was not that of the occasional off-topic post; afterall, this is the "Talk list" and a community needs to communicate. But, I do see a large turnover on subscriptions/unsubscriptions and I think it's important that those who are looking for a poignant technical resource be able to have it. True, mail filtering makes this less of a problem, but one of the core reasons NYPHP exists is to help support PHP, etc. and make it easy for new users and experts alike to quickly find the resources they need. It can be difficult enough to adopt/learn a new technology, without wading through a lot of email (whether it be off-topic or on). I think NYPHP should be as accomodative as possible to users (afterall, PHP is brand new in the grand scheme of programming languages), while retaining a casual community atmosphere that has been NYPHP from the start. I think the general consensus has been to *not* grow another list, but other, possibly better options, have surfaced. Somethings to consider for future development: -- having the list be "subject line aware" -- maintain a listing of poingant answers/questions, allowing list regulars to refer others to them (a FAQ of sorts) -- build a repository of member's "Favorite Posts" or a "Top 10" -- integrating tips in posts, where people can mark sections of posts as valuable for future reference These are fine ideas, and will be developed, but would certainly require some time before they can fully be implemented. Two other topics, however, have been voiced in the past, and perhaps they're ready for primetime. Web forums have come up a lot, but implementing them has gotten lost in the shuffle. A few suggestions have been made: -- http://www.phpbb.com -- http://www.invisionboard.com -- http://www.vbulletin.com Of these, or others people have had a positive experience with, which could we go with? Using a commercial product is fine since quality and functionality of the forum is paramount. After we decide on a forum application, I'll look at getting it online. Lastly, the notion of list guidelines and suggestions is something we're sorely lacking, and something almost all other lists have. I have some ideas myself, but I'm sure others have better ideas on this than I. Please contact me if you can pass on some ideas and suggestions for putting this together. Thanks all, Hans From hans at nyphp.org Fri Sep 26 11:45:53 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 26 Sep 2003 11:45:53 -0400 Subject: [nycphp-talk] email list sign-up In-Reply-To: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> References: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> Message-ID: <3F745F31.7000005@nyphp.org> Jay Greenspan wrote: > I'm starting a site that's going to have a newsletter. I was planning on > sending a confirmation to the users who give their email data, something > that required them to click on a link to confirm their entry to the > list. Something simple like: > > You have signed up for the CollestSiteEver Newletter. To confirm, click > below > > http://example.com/emailsignup.php?id=randomizedstring > > > But I recently heard that this type of email was sure to get caught by > spam filters on most major servers. > > Anyone have experience with this? Tips? Not too much help I'm afraid, but when I use my Yahoo! email account and get confirmation messages, they don't end up marked as spam. H From jonbaer at jonbaer.net Fri Sep 26 11:31:15 2003 From: jonbaer at jonbaer.net (jon baer) Date: Fri, 26 Sep 2003 11:31:15 -0400 Subject: [nycphp-talk] email list sign-up References: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> Message-ID: <008a01c38443$39ed8ad0$8119fea9@thinkpad> interesting ... most boards (like phpbb) would have the same problem if that is the case ... i run a few + have not seen complaints ... - jon ----- Original Message ----- From: "Jay Greenspan" To: "NYPHP Talk" Sent: Friday, September 26, 2003 11:39 AM Subject: [nycphp-talk] email list sign-up > I'm starting a site that's going to have a newsletter. I was planning > on sending a confirmation to the users who give their email data, > something that required them to click on a link to confirm their entry > to the list. Something simple like: > > You have signed up for the CollestSiteEver Newletter. To confirm, click > below > > http://example.com/emailsignup.php?id=randomizedstring > > > But I recently heard that this type of email was sure to get caught by > spam filters on most major servers. > > Anyone have experience with this? Tips? > > thanks. > > -j > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From csnyder at chxo.com Fri Sep 26 11:58:22 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 26 Sep 2003 11:58:22 -0400 Subject: [nycphp-talk] email list sign-up In-Reply-To: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> References: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> Message-ID: <3F74621E.3000801@chxo.com> It's true that SpamAssassin will tag many messages of that type as spam. Yet Mailman's confirmations, which are essentially the same thing, aren't tagged as spam. Take a look at a confirmation message from Mailman, such as you might receive when signing up for this list, and ask yourself why? Pay attention to the headers and the amount of information included in the message. When you are ready to start testing your application, sign up for an email account that is protected by SpamAssassin, or use one of the many test scripts out there that will run an email through the filters to see how it scores. It isn't too hard to come up with an honest format. After all, this kind of opt-in is exactly what your application should be doing. csnyder Jay Greenspan wrote: > I'm starting a site that's going to have a newsletter. I was planning > on sending a confirmation to the users who give their email data, > something that required them to click on a link to confirm their entry > to the list. Something simple like: > > You have signed up for the CollestSiteEver Newletter. To confirm, > click below > > http://example.com/emailsignup.php?id=randomizedstring > > > But I recently heard that this type of email was sure to get caught by > spam filters on most major servers. > > Anyone have experience with this? Tips? > > thanks. > > -j > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From cmerlo at ncc.edu Fri Sep 26 12:01:21 2003 From: cmerlo at ncc.edu (Christopher R. Merlo) Date: Fri, 26 Sep 2003 12:01:21 -0400 Subject: [nycphp-talk] email list sign-up In-Reply-To: <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> References: <3F74541E.2@netzero.com> <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> Message-ID: <20030926160121.GA17095@ncc.edu> On 2003-09-26 11:39 -0400, Jay Greenspan wrote: > But I recently heard that this type of email was sure to get caught by > spam filters on most major servers. > > Anyone have experience with this? Tips? I do this exact thing when my students create accounts on my website. Some, but not all, AOL users never get the e-mail. I'm not quite sure what causes this, whether it's me or AOL, but as far as I can tell, AOL is the only domain where these messages don't get through. The script is at http://turing.matcmp.ncc.edu/~cmerlo/accounts/new.php, if you want to look at the code. -- cmerlo at ncc.edu http://turing.matcmp.ncc.edu/~cmerlo It seems a little silly now, but this country was founded as a protest against taxation. From csnyder at chxo.com Fri Sep 26 12:14:15 2003 From: csnyder at chxo.com (Chris Snyder) Date: Fri, 26 Sep 2003 12:14:15 -0400 Subject: [nycphp-talk] email list sign-up In-Reply-To: <20030926160121.GA17095@ncc.edu> References: <3F74541E.2@netzero.com> <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> <20030926160121.GA17095@ncc.edu> Message-ID: <3F7465D7.3040707@chxo.com> Tried it, and my ISP says it probably isn't spam: X-Spam-Report: Content analysis details: (score = -1.60, score threshold = 5) BAYES_30 (-1.6 points) BODY: Bayesian classifier says spam probability is 30 to 40% [score: 0.3935] Not sure why AOL would reject it. Some possible trouble spots that I've seen in other messages are the language "someone (possibly you)" and the URL with an identifier that looks like an MD5 hash. If you really want figure out what's going on, and you have some willing students with AOL accounts, you could try tweaking both of those to see if the messages go through without them. Christopher R. Merlo wrote: >I do this exact thing when my students create accounts on my website. >Some, but not all, AOL users never get the e-mail. I'm not quite sure >what causes this, whether it's me or AOL, but as far as I can tell, >AOL is the only domain where these messages don't get through. The >script is at http://turing.matcmp.ncc.edu/~cmerlo/accounts/new.php, if >you want to look at the code. > > > From dmintz at panix.com Fri Sep 26 16:16:51 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 26 Sep 2003 16:16:51 -0400 (EDT) Subject: [nycphp-talk] Zend IDE and CVS on Win32 In-Reply-To: <3F7465D7.3040707@chxo.com> References: <3F74541E.2@netzero.com> <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> <20030926160121.GA17095@ncc.edu> <3F7465D7.3040707@chxo.com> Message-ID: Anybody out there having luck with CVS and Zend 3.0 on a Windoze system? I am using CVS 1.11. My Zend is installed in C:\Zend. My local repository is F:\data\repository, and that's the setting I put in the CVS Root field of the checkout dialog (it's also what my CVSROOT environment variable is set to). When I try checkout, I get: cvs.exe [checkout aborted]: no such host F Weird thing is, the first time I tried a checkout, it worked, but I could not commit, so I started fiddling and now I can't checkout either. Just for laughs I tried restarting Zend -- no dice. I've tried different permutations of using my own cvs.exe rather than the one in zend/bin; using forward slashes instead of backslashes; feeding it a "-d F:\data\repository" switch. I am otherwise able to use CVS with both WinCVS and the command line, so it seems like the issue is with Zend. No luck with the Zend documentations, forums, or Google. Hope this ain't too OT. TIA. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From dmintz at panix.com Fri Sep 26 16:41:44 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 26 Sep 2003 16:41:44 -0400 (EDT) Subject: [nycphp-talk] Zend IDE and CVS on Win32: SH*T! In-Reply-To: References: <3F74541E.2@netzero.com> <8D8B25B9-F037-11D7-8251-0003939BBBC2@trans-city.com> <20030926160121.GA17095@ncc.edu> <3F7465D7.3040707@chxo.com> Message-ID: Nevermind. I figured it out (I think). Gotta use Unix style paths. Duh, no wonder it was giving me a hard time about "host" when it saw the colon. Surely there must be some syntax to make it happy... file://blablabla/bla perhaps. Otherwise, you have to have your zend/cvs and your local repository on the same partition if you're on Win32. Sorry for the trouble. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From dmintz at panix.com Fri Sep 26 17:18:00 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 26 Sep 2003 17:18:00 -0400 (EDT) Subject: [nycphp-talk] More Objects in Sessions In-Reply-To: <3F74541E.2@netzero.com> References: <3F74541E.2@netzero.com> Message-ID: Scott, It's hard for me to guess given my experience level and the amount of info provided, so I tried to reproduce the problem just for kicks (I need to up my karmic bank balance here anyway (-: ), and there was no problem. It occurs to me to suggest that you be sure to pass in your objects by reference, and also assign them by reference. Here's a snippet by way of example. (btw I'm told that in PHP 5 objects will be passed by reference automatically.) HTH. attribute =& $attribute; } } class Attribute { var $whatever = "I'm an attribute"; function wassup() { echo "wassup yo?\n<"; } } session_start(); if (isset($_SESSION['thing'])) { $thing =& $_SESSION['thing']; echo "there's a thing in the session"; } else { echo "there's no thing in the session. so let's make one... "; $attrib = new Attribute(); $thing = new Thing($attrib); $_SESSION['thing'] =& $thing; } ?>
      
      Testing thing's attribute's wassup method:
      attribute->wassup() ?>
      
      On Fri, 26 Sep 2003, Scott Mattocks wrote: > Hello, > Ok, so I have these objects that have other objects as attributes. I > can't get the second object to come out of the session properly. I have > tried using __sleep and __wakeup to serialize/unserialize but the object > loses its methods and is pretty much useless. I have a class method > that can recreate the second object but it won't recreate it properly if > called within the class itself. ex: > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas From jsiegel1 at optonline.net Fri Sep 26 16:48:28 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 26 Sep 2003 16:48:28 -0400 Subject: [nycphp-talk] Zend IDE and CVS on Win32 In-Reply-To: Message-ID: <002b01c3846f$89cfd040$6401a8c0@EZDSDELL> I haven't even gotten that far. Yesterday I had thought I had licked the problem I was having with the IDE (didn't seem to want to read my keystrokes...trouble shutting down, etc.) but it seemed that the longer the app was running the more likely the problems would resurface. So....I ended up uninstalling it for now and going back to ver. 2.6. Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of David Mintz Sent: Friday, September 26, 2003 3:17 PM To: NYPHP Talk Subject: [nycphp-talk] Zend IDE and CVS on Win32 Anybody out there having luck with CVS and Zend 3.0 on a Windoze system? I am using CVS 1.11. My Zend is installed in C:\Zend. My local repository is F:\data\repository, and that's the setting I put in the CVS Root field of the checkout dialog (it's also what my CVSROOT environment variable is set to). When I try checkout, I get: cvs.exe [checkout aborted]: no such host F Weird thing is, the first time I tried a checkout, it worked, but I could not commit, so I started fiddling and now I can't checkout either. Just for laughs I tried restarting Zend -- no dice. I've tried different permutations of using my own cvs.exe rather than the one in zend/bin; using forward slashes instead of backslashes; feeding it a "-d F:\data\repository" switch. I am otherwise able to use CVS with both WinCVS and the command line, so it seems like the issue is with Zend. No luck with the Zend documentations, forums, or Google. Hope this ain't too OT. TIA. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Y d?le p'abajo" Tito Rojas _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dan at mx2pro.com Sat Sep 27 01:07:12 2003 From: dan at mx2pro.com (Dan Horning) Date: Sat, 27 Sep 2003 01:07:12 -0400 Subject: [nycphp-talk] NYPHP List Reorganization? In-Reply-To: <3F745ED3.1000702@nyphp.org> Message-ID: <000a01c384b5$384181b0$c71f9942@dwchome> Vbulletin is the bast way out of that list Let me know if you need help installing - Dan Horning 1-866-284-3150 (Toll-Free) President: Technical Evangelism & Media Systems Administration MX2 Productions Media from concept to execution. > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere > Sent: Friday, September 26, 2003 11:44 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] NYPHP List Reorganization? > > > > Out of about 15 posts on the topic, there's 30 different > viewpoints, which is good. Thank you for the suggestions, now > someone just make a decision :) > > I'm not sure where the notion of an elite list came from, but > a NYPHP-AMP would be nothing of the sort - it'd be simply a > more poignant list for a specific set of topics. However, as > has correctly been pointed out, it'd probably take away from > this list. > > The "problem" that I suggested needed to be solved was not > that of the occasional off-topic post; afterall, this is the > "Talk list" and a community needs to communicate. But, I do > see a large turnover on subscriptions/unsubscriptions and I > think it's important that those who are looking for a > poignant technical resource be able to have it. True, mail > filtering makes this less of a problem, but one of the core > reasons NYPHP exists is to help support PHP, etc. and make it > easy for new users and experts alike to quickly find the > resources they need. It can be difficult enough to > adopt/learn a new technology, without wading through a lot of > email (whether it be off-topic or on). I think NYPHP should > be as accomodative as possible to users (afterall, PHP is > brand new in the grand scheme of programming languages), > while retaining a casual community atmosphere that has been > NYPHP from the start. > > I think the general consensus has been to *not* grow another > list, but other, possibly better options, have surfaced. > > Somethings to consider for future development: > -- having the list be "subject line aware" > -- maintain a listing of poingant answers/questions, > allowing list regulars to refer others to them (a FAQ of sorts) > -- build a repository of member's "Favorite Posts" or a "Top 10" > -- integrating tips in posts, where people can mark > sections of posts as valuable for future reference > > These are fine ideas, and will be developed, but would > certainly require some time before they can fully be implemented. > > Two other topics, however, have been voiced in the past, and > perhaps they're ready for primetime. Web forums have come up > a lot, but implementing them has gotten lost in the shuffle. > A few suggestions have been made: > > -- http://www.phpbb.com > -- http://www.invisionboard.com > -- http://www.vbulletin.com > > Of these, or others people have had a positive experience > with, which could we go with? Using a commercial product is > fine since quality and functionality of the forum is > paramount. After we decide on a forum application, I'll look > at getting it online. > > Lastly, the notion of list guidelines and suggestions is > something we're sorely lacking, and something almost all > other lists have. I have some ideas myself, but I'm sure > others have better ideas on this than I. Please contact me > if you can pass on some ideas and suggestions for putting > this together. > > Thanks all, > > Hans > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dan at cain.sh Sat Sep 27 13:57:38 2003 From: dan at cain.sh (Daniel J Cain Jr.) Date: Sat, 27 Sep 2003 12:57:38 -0500 Subject: [nycphp-talk] AMP comments In-Reply-To: <000d01c38393$b519bd60$bf8d3818@OBERON1> References: <000d01c38393$b519bd60$bf8d3818@OBERON1> Message-ID: <1064685458.5025.23.camel@gigabeast.home.cain.sh> On Thu, 2003-09-25 at 13:34, Tim Gales wrote: > Perhaps we could have a web page, and ask people to read it > before signing up. It might be useful to provide info in a "Welcome to the NYPHP mailing list" upon signing up to the list. I am by no means an expert in netiquette and would find it helpful to read some information how to effectively use the mailing list as an 'additional' resource. Not to insult the readers intelligence nor scare off newer users from even posting to the list. But maybe info on how to trim response posts for readability and how to effectively ask questions (steps taken already, code examples, etc.). Just a thought that occurred to me while reading Tim's response. I'll leave it to the mailing list veterans to fill in any blanks or oversights. From velez at sinu.com Sun Sep 28 14:12:39 2003 From: velez at sinu.com (Larry Velez) Date: Sun, 28 Sep 2003 14:12:39 -0400 Subject: [nycphp-talk] We just launched a sizable all PHP site In-Reply-To: Message-ID: <000f01c385ec$1ab2fe20$0e0ea8c0@therealm> Hey PHPers, Just thought you guys would like to glance at a sizable all PHP site we just launched through our entronic brand. It incorporates use of Flash talking to PHP and MYSQL. http://www.warburgrealty.com | Larry Velez | http://sinu.com | From soazine at erols.com Mon Sep 29 01:30:29 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 29 Sep 2003 01:30:29 -0400 Subject: [nycphp-talk] PHP and Cookies.. AGAIN! Message-ID: <0df401c3864a$cc82ec60$67a76244@philofsoa> ok I have a question maybe this might help if you have $_COOKIE['nordicnet_registration'] that is a session cookie in path '/' you also have a cookie $_COOKIE['nordicnet_bestilling'] that is a 24-hour timed cookie in path '/' what is the behavior of BOTH cookies? I need to know this because the scope of the "bestilling" cookie is to be a 24-hour timed cookie used in the shopping cart process. However, the scope of the cookie has been erratic. If I as a user order an item, it adds it to my cart db, however, the bestilling_id is not the correct value; it turns out to be the value of the deleted cookie of the prior session! Can someone help make sense out of this? I am having cookie trouble again in PHP. Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Mon Sep 29 02:41:03 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 29 Sep 2003 02:41:03 -0400 Subject: [nycphp-talk] shopping cart help Message-ID: <0e3301c38654$a7329230$67a76244@philofsoa> I need a back-to-basics shopping cart tutorial in PHP/mySQL. I thought I had it down and I failed, as usual. Here is what I mapped out as a spec: 3) initial work on bestilling.php to contain the following plan: 1) Cookie: 'nordicnet_bestilling' to contain unique, random 16-char string 2) Table: nnet_produkt_bestilling to contain ordering information bundled by unique bestilling_id (16-char string) a) produkt_id b) farge_id c) storrelse_id d) quantity ordered e) bestilling_id f) nordicnet_registration_number 3) *PROPOSAL* To make cookie a timed cookie - if user does not check out in X hours the cookie will be deleted 4) *PROPOSAL* CRON-based PHP script to systemically wipe out any stray rows in nnet_produkt_bestilling that have not yet been checked out 5) Idea plan for bestilling: a) User will order produkt in vis_varegruppen.php b) bestilling.php will do server-side checking of produkt, farge, storrelse and quantity based upon entry in nnet_produkt_farge_storrelse_assoc c) bestilling.php will then check if $_COOKIE['nordicnet_bestilling'] already exists (meaning you have an order # - or, a cart ('bestill') d) If you have a cart then check if there is already a row in nnet_produkt_bestilling with same produkt_id/farge_id/storrelse_id with your matching bestilling_id e) If so then increase quantity ordered by the quantity you ordered and check quantity totals against nnet_produkt_farge_storrelse_assoc f) If NOT then add new row with produkt_id, farge_id, storrelse_id and quantity with your bestilling_id and registration number g) -- If you do NOT have a cart (no cookie) then generate a new cart (bestilling) id into a cookie h) If other people ordered the same item be sure to check their quantities ordered against yours and what is in stock before proceeding So far this is what happens: 1) I enter products into the cart 2) If I delete items from the cart, they can be deleted; if I delete all items from my cart, the cart cookie is deleted, I think. 3) I try to re-enter the same item into the cart, it inserts into the db w/ a NULL value for 'nnet_user_bestilling_id' which is the cart id (which it's not supposed to do) and browser-side logic fails, you get the wrong screen and all kinds of garbage I cannot even go into because it's in Norwegian I have tried for nearly 24 hours to build a cart and I can't seem to get it done. I really need some help. Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Mon Sep 29 07:43:50 2003 From: tom at supertom.com (Tom) Date: Mon, 29 Sep 2003 07:43:50 -0400 Subject: [nycphp-talk] LIPHP meeting Monday 9/29 @ 8pm Message-ID: Hey folks, LIPHP will be meeting tomorrow, 9/29/2003, at 8pm in Hauppauge. This is the first month of our new day and time (we are now the last MONDAY of every month @ 8PM). In addition, this month (and this month only) we are meeting at headquarters of Bascom Global Internet Services, Inc. (also in Hauppauge), so they may give us a demonstration of their products which utilize PHP. Directions to Bascom are here: http://www.bascom.com/contactus.shtml Or, you may just come to usually meeting place at Desktop Solutions, and we may all go together. If you choose to meet me at Desktop Solutions, please be there by 7:40 the latest, so we may get to Bascom on time. Directions to Desktop Solutions and other LIPHP info is here: http://www.liphp.org/ Thanks to Bob and everyone at Bascom for inviting us in for the demonstration. Please reply to the list or me directly just so we can get a general idea of how many will attend. Our favorite attendee, Krispy Kremes, will, of course, attend. :-) Both newbies and veterans alike are always welcome, and we will still be fielding/talking about all things PHP at this meeting, so come on down! See you tomorrow, Tom _______________________________________________ Liphp mailing list Liphp at liphp.org http://www.liphp.org/mailman/listinfo/liphp From jonbaer at jonbaer.net Mon Sep 29 08:01:36 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 29 Sep 2003 08:01:36 -0400 Subject: [nycphp-talk] shopping cart help References: <0e3301c38654$a7329230$67a76244@philofsoa> Message-ID: <003d01c38681$6eefd360$0200a8c0@thinkpad> Use oscommerce.com w/ Norwegian Language pack :-) http://prdownloads.sourceforge.net/tep/tep_language_norwegian-pr2.1.tar.gz - (sorry, not much help) jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Monday, September 29, 2003 2:41 AM Subject: [nycphp-talk] shopping cart help I need a back-to-basics shopping cart tutorial in PHP/mySQL. I thought I had it down and I failed, as usual. Here is what I mapped out as a spec: 3) initial work on bestilling.php to contain the following plan: 1) Cookie: 'nordicnet_bestilling' to contain unique, random 16-char string 2) Table: nnet_produkt_bestilling to contain ordering information bundled by unique bestilling_id (16-char string) a) produkt_id b) farge_id c) storrelse_id d) quantity ordered e) bestilling_id f) nordicnet_registration_number 3) *PROPOSAL* To make cookie a timed cookie - if user does not check out in X hours the cookie will be deleted 4) *PROPOSAL* CRON-based PHP script to systemically wipe out any stray rows in nnet_produkt_bestilling that have not yet been checked out 5) Idea plan for bestilling: a) User will order produkt in vis_varegruppen.php b) bestilling.php will do server-side checking of produkt, farge, storrelse and quantity based upon entry in nnet_produkt_farge_storrelse_assoc c) bestilling.php will then check if $_COOKIE['nordicnet_bestilling'] already exists (meaning you have an order # - or, a cart ('bestill') d) If you have a cart then check if there is already a row in nnet_produkt_bestilling with same produkt_id/farge_id/storrelse_id with your matching bestilling_id e) If so then increase quantity ordered by the quantity you ordered and check quantity totals against nnet_produkt_farge_storrelse_assoc f) If NOT then add new row with produkt_id, farge_id, storrelse_id and quantity with your bestilling_id and registration number g) -- If you do NOT have a cart (no cookie) then generate a new cart (bestilling) id into a cookie h) If other people ordered the same item be sure to check their quantities ordered against yours and what is in stock before proceeding So far this is what happens: 1) I enter products into the cart 2) If I delete items from the cart, they can be deleted; if I delete all items from my cart, the cart cookie is deleted, I think. 3) I try to re-enter the same item into the cart, it inserts into the db w/ a NULL value for 'nnet_user_bestilling_id' which is the cart id (which it's not supposed to do) and browser-side logic fails, you get the wrong screen and all kinds of garbage I cannot even go into because it's in Norwegian I have tried for nearly 24 hours to build a cart and I can't seem to get it done. I really need some help. Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at mx2pro.com Mon Sep 29 11:29:37 2003 From: dan at mx2pro.com (Dan Horning) Date: Mon, 29 Sep 2003 11:29:37 -0400 Subject: [nycphp-talk] shopping cart help In-Reply-To: <003d01c38681$6eefd360$0200a8c0@thinkpad> Message-ID: <000a01c3869e$80a222d0$f60f9942@dwchome> jon that'd be nice .. but it's entirely a custom cart/store / everything system i asked that to phil a while back - Dan Horning 1-866-284-3150 (Toll-Free) President: Technical Evangelism & Media Systems Administration MX2 Productions Media from concept to execution. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of jon baer Sent: Monday, September 29, 2003 8:02 AM To: NYPHP Talk Subject: Re: [nycphp-talk] shopping cart help Use oscommerce.com w/ Norwegian Language pack :-) http://prdownloads.sourceforge.net/tep/tep_language_norwegian-pr2.1.tar. gz - (sorry, not much help) jon ----- Original Message ----- From: Phil Powell To: NYPHP Talk Sent: Monday, September 29, 2003 2:41 AM Subject: [nycphp-talk] shopping cart help I need a back-to-basics shopping cart tutorial in PHP/mySQL. I thought I had it down and I failed, as usual. Here is what I mapped out as a spec: 3) initial work on bestilling.php to contain the following plan: 1) Cookie: 'nordicnet_bestilling' to contain unique, random 16-char string 2) Table: nnet_produkt_bestilling to contain ordering information bundled by unique bestilling_id (16-char string) a) produkt_id b) farge_id c) storrelse_id d) quantity ordered e) bestilling_id f) nordicnet_registration_number 3) *PROPOSAL* To make cookie a timed cookie - if user does not check out in X hours the cookie will be deleted 4) *PROPOSAL* CRON-based PHP script to systemically wipe out any stray rows in nnet_produkt_bestilling that have not yet been checked out 5) Idea plan for bestilling: a) User will order produkt in vis_varegruppen.php b) bestilling.php will do server-side checking of produkt, farge, storrelse and quantity based upon entry in nnet_produkt_farge_storrelse_assoc c) bestilling.php will then check if $_COOKIE['nordicnet_bestilling'] already exists (meaning you have an order # - or, a cart ('bestill') d) If you have a cart then check if there is already a row in nnet_produkt_bestilling with same produkt_id/farge_id/storrelse_id with your matching bestilling_id e) If so then increase quantity ordered by the quantity you ordered and check quantity totals against nnet_produkt_farge_storrelse_assoc f) If NOT then add new row with produkt_id, farge_id, storrelse_id and quantity with your bestilling_id and registration number g) -- If you do NOT have a cart (no cookie) then generate a new cart (bestilling) id into a cookie h) If other people ordered the same item be sure to check their quantities ordered against yours and what is in stock before proceeding So far this is what happens: 1) I enter products into the cart 2) If I delete items from the cart, they can be deleted; if I delete all items from my cart, the cart cookie is deleted, I think. 3) I try to re-enter the same item into the cart, it inserts into the db w/ a NULL value for 'nnet_user_bestilling_id' which is the cart id (which it's not supposed to do) and browser-side logic fails, you get the wrong screen and all kinds of garbage I cannot even go into because it's in Norwegian I have tried for nearly 24 hours to build a cart and I can't seem to get it done. I really need some help. Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From sklar at sklar.com Mon Sep 29 11:30:36 2003 From: sklar at sklar.com (David Sklar) Date: Mon, 29 Sep 2003 11:30:36 -0400 Subject: [nycphp-talk] Need Hardware for PHP Code Cache / Accelerator Benchmarking Message-ID: One of the books that I'm writing right now has a section on PHP code caches / accelerators. I'd like to include some comparative benchmarks in the book that explore the performance of the different accelerators in various circumstances. To do the benchmarking properly, though, I need some computers that I don't have, namely a relatively beefy server on a network with a bunch of client computers that can bombard the server with requests. Perhaps someone has a setup like this that I could run some benchmarks on? I am most interested in the relative performance of the accelerators, not their absolute performance, so the server doesn't have to be anything really beefy, just powerful enough that it doesn't run into problems that are unlikely in the real world (like swapping web server processes to disk when handling five simultaneous requests). The server should be running Linux (although the presence of a Windows server as well would be a bonus) and the client computers can be running just about anything, as long as they can handle one of the zillion web stress tools out there. The server must be configurable so that while the benchmarks are running, there are no other variable-load programs running (i.e. a mail, DNS, or active web server is no good.) Remote (ssh) access to the machines would be most convenient for me, but if you're in Manhattan, on-site access is OK, too. I can pay you in thanks, acknowledgement in the book, and a free copy or three of the book. Thanks (in advance :), David From sailer at bnl.gov Mon Sep 29 11:51:12 2003 From: sailer at bnl.gov (Tim Sailer) Date: Mon, 29 Sep 2003 11:51:12 -0400 Subject: [nycphp-talk] Need Hardware for PHP Code Cache / Accelerator Benchmarking In-Reply-To: References: Message-ID: <20030929155112.GB7424@bnl.gov> On Mon, Sep 29, 2003 at 11:30:36AM -0400, David Sklar wrote: > The server should be running Linux (although the presence of a Windows > server as well would be a bonus) and the client computers can be running > just about anything, as long as they can handle one of the zillion web > stress tools out there. The server must be configurable so that while the > benchmarks are running, there are no other variable-load programs running > (i.e. a mail, DNS, or active web server is no good.) Remote (ssh) access to > the machines would be most convenient for me, but if you're in Manhattan, > on-site access is OK, too. I can pay you in thanks, acknowledgement in the > book, and a free copy or three of the book. Let me see if I can get you access to an intranet I help manage. The web farm is all copper Gig-E, the 3 main servers are dual Xeons with scsi-3 disk subsystems, and 2G RAM. I believe that I can get access to a part of the compute farm for clients, possibly 100-150 nodes, 100Mb connections. I'll know in 24 hrs if I can get past corporate politics in this particular case. Too bad I couldn't get you access here at BNL. There's a linux farm with about 1500 nodes... :) Tim -- Tim Sailer Information and Special Technologies Program Office of CounterIntelligence Brookhaven National Laboratory (631) 344-3001 From enunez at tiaa-cref.org Mon Sep 29 12:54:55 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Mon, 29 Sep 2003 10:54:55 -0600 Subject: [nycphp-talk] We just launched a sizable all PHP site Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D59@msxnyusr01.msx.ops.tiaa-cref.org> Very nice, reminds me of my old days at working for New York Realty dot com. It was straight PHP with Oracle. Too bad the company laid me off and other developers. They were one of the very first sites on the web giving this kind of service to New York area. Hope your service does better. G'luck! -Eddy Nu?ez -----Original Message----- From: Larry Velez [mailto:velez at sinu.com] Sent: Sunday, September 28, 2003 2:13 PM To: 'NYPHP Talk' Subject: [nycphp-talk] We just launched a sizable all PHP site Hey PHPers, Just thought you guys would like to glance at a sizable all PHP site we just launched through our entronic brand. It incorporates use of Flash talking to PHP and MYSQL. http://www.warburgrealty.com | Larry Velez | http://sinu.com | _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** From jonbaer at jonbaer.net Mon Sep 29 17:36:00 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 29 Sep 2003 17:36:00 -0400 Subject: [nycphp-talk] KSES 0.2.1 : XHTML filter in PHP Message-ID: <000b01c386d1$ad654d50$0200a8c0@thinkpad> ----- Original Message ----- From: ; "Ulf" To: Cc: Sent: Monday, September 29, 2003 4:08 PM Subject: [ANNOUNCE] kses 0.2.1 > kses 0.2.1 > ========== > > > kses is an HTML/XHTML filter written in PHP. It removes all unwanted HTML > elements and attributes, no matter how malformed HTML input you give it. > It also does several checks on attribute values. kses can be used to avoid > Cross-Site Scripting (XSS), Buffer Overflows and Denial of Service attacks, > among other things. > > The program is released under the terms of the GNU General Public License. You > should look into what that means, before using kses in your programs. > > > * FEATURES * > > > Some of kses' current features are: > > * It will only allow the HTML elements and attributes that it was explicitly > told to allow. > > * Element and attribute names are case-insensitive (a href vs A HREF). > > * It will understand and process whitespace correctly. > > * Attribute values can be surrounded with quotes, apostrophes or nothing. > > * It will accept valueless attributes with just names and no values (selected). > > * It will accept XHTML's closing " /" marks. > > * Attribute values that are surrounded with nothing will get quotes to avoid > producing non-W3C conforming HTML > ( works but isn't valid HTML). > > * It handles lots of types of malformed HTML, by interpreting the existing > code the best it can and then rebuilding new code from it. That's a better > approach than trying to process existing code, as you're bound to forget about > some weird special case somewhere. It handles problems like never-ending > quotes and tags gracefully. > > * It will remove additional "<" and ">" characters that people may try to > sneak in somewhere. > > * It supports checking attribute values for minimum/maximum length and > minimum/maximum value, to protect against Buffer Overflows and Denial of > Service attacks against WWW clients and various servers. You can stop >